2 /*******************************************************************************
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
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
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);
28 * Gets the groupingid for a particular course module instance
30 function groups_db_m_set_groupingid($cmid) {
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
40 * @param int $groupid The id of the group
41 * @return group The group object
43 function groups_db_m_get_group($groupid) {