Automatic installer.php lang files by installer_builder (20070726)
[moodle-linuxchix.git] / group / db / dbmodulelib.php
blob04bf18b24d9d416cef800f7974da3d0ec54b4c25
1 <?php
2 /*******************************************************************************
3 * modulelib.php
4 *
5 * This file contains functions to be used by modules to support groups. More
6 * documentation is available on the Developer's Notes section of the Moodle
7 * wiki.
8 *
9 * For queries, suggestions for improvements etc. please post on the Groups
10 * forum on the moodle.org site.
11 ******************************************************************************/
12 // @@@ Lots TO DO in this file
15 /**
16 * Gets the groupingid for a particular course module instance returning
17 * false if it is null.
18 * @param int $cmid The id of the module instance.
19 * @return int The grouping id (or false if it is null or an error occurred)
21 function groups___db_m_get_groupingid($cmid) {
22 // @@@ Check nulls are turned into false
23 $query = get_record('course_modules', 'groupingid', $userid);
24 return $query;
27 /**
28 * Gets the groupingid for a particular course module instance
30 function groups_db_m_set_groupingid($cmid) {
31 // @@@ TO DO
35 /**
36 * Gets the group object associated with a group id. This group object can be
37 * used to get information such as the name of the group and the file for the
38 * group icon if it exists. (Look at the groups table in the database to see
39 * the fields).
40 * @param int $groupid The id of the group
41 * @return group The group object
43 function groups_db_m_get_group($groupid) {