|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
| enum NOGROUPS |
Groups not used in course or activity
Definition at line 30 of file grouplib.php.
| enum SEPARATEGROUPS |
Groups used, users do not see other groups
Definition at line 35 of file grouplib.php.
| enum VISIBLEGROUPS |
Groups used, students see other groups
Definition at line 40 of file grouplib.php.
| groups_course_module_visible | ( | $ | cm, |
| $ | userid = null |
||
| ) |
Determine if a course module is currently visible to a user
$USER If $userid is null, use the global object.
| int | $cm | The course module |
| int | $userid | The user to check against the group. |
Definition at line 691 of file grouplib.php.


| groups_get_activity_allowed_groups | ( | $ | cm, |
| $ | userid = 0 |
||
| ) |
Gets a list of groups that the user is allowed to access within the specified activity.
| object | $cm | Course-module |
| int | $userid | User ID (defaults to current user) |
Definition at line 661 of file grouplib.php.


| groups_get_activity_group | ( | $ | cm, |
| $ | update = false, |
||
| $ | allowedgroups = null |
||
| ) |
Returns group active in activity, changes the group by default if 'group' page param present
| stdClass | $cm | course module object |
| boolean | $update | change active group if group param submitted |
| array | $allowedgroups | list of groups user may access (INTERNAL, to be used only from groups_print_activity_menu()) |
Definition at line 610 of file grouplib.php.


| groups_get_activity_groupmode | ( | $ | cm, |
| $ | course = null |
||
| ) |
Returns effective groupmode used in activity, course setting overrides activity setting if groupmodeforce enabled.
object object
| object | $cm | the course module object. Only the ->course and ->groupmode need to be set. |
| object | $course | object optional course object to improve perf |
Definition at line 371 of file grouplib.php.

| groups_get_all_groupings | ( | $ | courseid | ) |
Gets array of all groupings in a specified course.
object object
| int | $courseid | return only groupings in this with this courseid |
Definition at line 234 of file grouplib.php.

| groups_get_all_groups | ( | $ | courseid, |
| $ | userid = 0, |
||
| $ | groupingid = 0, |
||
| $ | fields = 'g.*' |
||
| ) |
Gets array of all groups in a specified course.
| int | $courseid | The id of the course. |
| mixed | $userid | optional user id or array of ids, returns only groups of the user. |
| int | $groupingid | optional returns only groups in the specified grouping. |
| string | $fields |
Definition at line 146 of file grouplib.php.

| groups_get_course_group | ( | $ | course, |
| $ | update = false, |
||
| $ | allowedgroups = null |
||
| ) |
Returns group active in course, changes the group by default if 'group' page param present
| stdClass | $course | course bject |
| boolean | $update | change active group if group param submitted |
| array | $allowedgroups | list of groups user may access (INTERNAL, to be used only from groups_print_course_menu()) |
Definition at line 559 of file grouplib.php.


| groups_get_course_groupmode | ( | $ | course | ) |
Returns effective groupmode used in course
Definition at line 357 of file grouplib.php.

| groups_get_group | ( | $ | groupid, |
| $ | fields = '*', |
||
| $ | strictness = IGNORE_MISSING |
||
| ) |
Get the group object
| int | $groupid | ID of the group. |
Definition at line 120 of file grouplib.php.

| groups_get_group_by_name | ( | $ | courseid, |
| $ | name | ||
| ) |
Returns the groupid of a group with the name specified for the course. Group names should be unique in course
object
| int | $courseid | The id of the course |
| string | $name | name of group (without magic quotes) |
Definition at line 89 of file grouplib.php.

| groups_get_group_name | ( | $ | groupid | ) |
Gets the name of a group with a specified id
object
| int | $groupid | The id of the group |
Definition at line 63 of file grouplib.php.

| groups_get_grouping | ( | $ | groupingid, |
| $ | fields = '*', |
||
| $ | strictness = IGNORE_MISSING |
||
| ) |
Get the grouping object
| int | $groupingid | ID of the group. |
| string | $fields |
Definition at line 132 of file grouplib.php.

| groups_get_grouping_by_name | ( | $ | courseid, |
| $ | name | ||
| ) |
Returns the groupingid of a grouping with the name specified for the course. Grouping names should be unique in course
object
| int | $courseid | The id of the course |
| string | $name | name of group (without magic quotes) |
Definition at line 106 of file grouplib.php.

| groups_get_grouping_members | ( | $ | groupingid, |
| $ | fields = 'u.*', |
||
| $ | sort = 'lastname ASC' |
||
| ) |
Returns the users in the specified grouping.
object
| int | $groupingid | The groupingid to get the users for |
| int | $fields | The fields to return |
| int | $sort | optional sorting of returned users |
Definition at line 341 of file grouplib.php.

| groups_get_grouping_name | ( | $ | groupingid | ) |
Gets the name of a grouping with a specified id
object
| int | $groupingid | The id of the grouping |
Definition at line 75 of file grouplib.php.
| groups_get_members | ( | $ | groupid, |
| $ | fields = 'u.*', |
||
| $ | sort = 'lastname ASC' |
||
| ) |
Returns the users in the specified group.
object
| int | $groupid | The groupid to get the users for |
| int | $fields | The fields to return |
| int | $sort | optional sorting of returned users |
Definition at line 321 of file grouplib.php.

| groups_get_user_groups | ( | $ | courseid, |
| $ | userid = 0 |
||
| ) |
Returns info about user's groups in course.
| int | $courseid | |
| int | $userid | $USER if not specified |
Definition at line 184 of file grouplib.php.

| groups_group_exists | ( | $ | groupid | ) |
Determines if a group with a given groupid exists.
object
| int | $groupid | The groupid to check for |
Definition at line 51 of file grouplib.php.

| groups_has_membership | ( | $ | cm, |
| $ | userid = null |
||
| ) |
Determines if current or specified is member of any active group in activity
object object object array $cache
| object | $cm | coruse module object |
| int | $userid | id of user, null menas $USER->id |
Definition at line 277 of file grouplib.php.

| groups_is_member | ( | $ | groupid, |
| $ | userid = null |
||
| ) |
Determines if the user is a member of the given group.
If $userid is null, use the global object.
object object
| int | $groupid | The group to check for membership. |
| int | $userid | The user to check against the group. |
Definition at line 256 of file grouplib.php.

| groups_print_activity_menu | ( | $ | cm, |
| $ | urlroot, | ||
| $ | return = false, |
||
| $ | hideallparticipants = false |
||
| ) |
Print group menu selector for activity.
| stdClass | $cm | course module object |
| string | moodle_url | $urlroot | return address that users get to if they choose an option; should include any parameters needed, e.g. "$CFG->wwwroot/mod/forum/view.php?id=34" |
| boolean | $return | return as string instead of printing |
| boolean | $hideallparticipants | If true, this prevents the 'All participants' option from appearing in cases where it normally would. This is intended for use only by activities that cannot display all groups together. (Note that selecting this option does not prevent groups_get_activity_group from returning 0; it will still do that if the user has chosen 'all participants' in another activity, or not chosen anything.) |
Definition at line 474 of file grouplib.php.


| groups_print_course_menu | ( | $ | course, |
| $ | urlroot, | ||
| $ | return = false |
||
| ) |
Print group menu selector for course level.
| stdClass | $course | course object |
| string | moodle_url | $urlroot | return address |
| boolean | $return | return as string instead of printing |
Definition at line 396 of file grouplib.php.

