Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Functions
lib.php File Reference

Extra library for groups and groupings. More...

Functions

 core_group_inplace_editable ($itemtype, $itemid, $newvalue)
 Callback for inplace editable API. More...
 
 groups_add_member ($grouporid, $userorid, $component=null, $itemid=0)
 Adds a specified user to a group. More...
 
 groups_assign_grouping ($groupingid, $groupid, $timeadded=null, $invalidatecache=true)
 Assigns group into grouping. More...
 
 groups_calculate_role_people ($rs, $context)
 Internal function used by groups_get_members_by_role to handle the results of a database query that includes a list of users and possible roles on a course. More...
 
 groups_create_group ($data, $editform=false, $editoroptions=false)
 Add a new group. More...
 
 groups_create_grouping ($data, $editoroptions=null)
 Add a new grouping. More...
 
 groups_delete_group ($grouporid)
 Delete a group best effort, first removing members and links with courses and groupings. More...
 
 groups_delete_group_members ($courseid, $userid=0, $unused=false)
 Remove all users (or one user) from all groups in course. More...
 
 groups_delete_grouping ($groupingorid)
 Delete grouping. More...
 
 groups_delete_groupings ($courseid, $showfeedback=false)
 Delete all groupings from course. More...
 
 groups_delete_groupings_groups ($courseid, $showfeedback=false)
 Remove all groups from all groupings in course. More...
 
 groups_delete_groups ($courseid, $showfeedback=false)
 Delete all groups from course. More...
 
 groups_get_members_by_role ($groupid, $courseid, $fields='u.*', $sort=null, $extrawheretest='', $whereorsortparams=array())
 Lists users in a group based on their role on the course. More...
 
 groups_get_possible_roles ($context)
 Obtains a list of the possible roles that group members might come from, on a course. More...
 
 groups_get_potential_members ($courseid, $roleid=null, $source=null, $orderby='lastname ASC, firstname ASC', $notingroup=null, $onlyactiveenrolments=false, $extrafields=[])
 Gets potential group members for grouping. More...
 
 groups_parse_name ($format, $groupnumber)
 Parse a group name for characters to replace. More...
 
 groups_remove_member ($grouporid, $userorid)
 Deletes the link between the specified user and group. More...
 
 groups_remove_member_allowed ($grouporid, $userorid)
 Checks whether the current user is permitted (using the normal UI) to remove a specific group member, assuming that they have access to remove group members in general. More...
 
 groups_sync_with_enrolment ($enrolname, $courseid=0, $gidfield='customint2')
 Synchronises enrolments with the group membership. More...
 
 groups_unassign_grouping ($groupingid, $groupid, $invalidatecache=true)
 Unassigns group from grouping. More...
 
 groups_update_group ($data, $editform=false, $editoroptions=false)
 Update group. More...
 
 groups_update_group_icon ($group, $data, $editform)
 Update the group icon from form data. More...
 
 groups_update_grouping ($data, $editoroptions=null)
 Update grouping. More...
 

Detailed Description

Extra library for groups and groupings.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later