Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
lib.php File Reference

Functions

 core_group_inplace_editable ($itemtype, $itemid, $newvalue)
 Callback for inplace editable API.
 
 get_group_custom_fields_data (array $groupids)
 Returns custom fields data for provided groups.
 
 get_grouping_custom_fields_data (array $groupingids)
 Returns custom fields data for provided groupings.
 
 groups_add_member ($grouporid, $userorid, $component=null, $itemid=0)
 Extra library for groups and groupings.
 
 groups_assign_grouping ($groupingid, $groupid, $timeadded=null, $invalidatecache=true)
 Assigns group into grouping.
 
 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.
 
 groups_create_group ($data, $editform=false, $editoroptions=false)
 Add a new group.
 
 groups_create_grouping ($data, $editoroptions=null)
 Add a new grouping.
 
 groups_delete_group ($grouporid)
 Delete a group best effort, first removing members and links with courses and groupings.
 
 groups_delete_group_members ($courseid, $userid=0, $unused=false)
 Remove all users (or one user) from all groups in course.
 
 groups_delete_grouping ($groupingorid)
 Delete grouping.
 
 groups_delete_groupings ($courseid, $showfeedback=false)
 Delete all groupings from course.
 
 groups_delete_groupings_groups ($courseid, $showfeedback=false)
 Remove all groups from all groupings in course.
 
 groups_delete_groups ($courseid, $showfeedback=false)
 Delete all groups from course.
 
 groups_get_members_by_role (int $groupid, int $courseid, string $fields='u.*', ?string $sort=null, string $extrawheretest='', array $whereorsortparams=[], string $joins='')
 Lists users in a group based on their role on the course.
 
 groups_get_possible_roles ($context)
 Obtains a list of the possible roles that group members might come from, on a course.
 
 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.
 
 groups_parse_name ($format, $groupnumber)
 Parse a group name for characters to replace.
 
 groups_remove_member ($grouporid, $userorid)
 Deletes the link between the specified user and group.
 
 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.
 
 groups_sync_with_enrolment ($enrolname, $courseid=0, $gidfield='customint2')
 Synchronises enrolments with the group membership.
 
 groups_unassign_grouping ($groupingid, $groupid, $invalidatecache=true)
 Unassigns group from grouping.
 
 groups_update_group ($data, $editform=false, $editoroptions=false)
 Update group.
 
 groups_update_group_icon ($group, $data, $editform)
 Update the group icon from form data.
 
 groups_update_grouping ($data, $editoroptions=null)
 Update grouping.
 
 set_groups_messaging (array $groupids, bool $enabled)
 Updates group messaging to enable/disable in bulk.