core_group_add_group_members
This function adds one or more users to a specific group within a course.
Let's review the POST parameters for this function:
- Required Parameters:
members[0][groupid]
= int (Required: The numeric ID of the group.)members[0][userid]
= int (Required: The numeric ID of the user to add to the group.)
cURL Command Example (Adding a Group Member):
core_group_delete_group_members
This function removes one or more users from a specific group.
Let's review the POST parameters for this function:
- Required Parameters:
members[0][groupid]
= int (Required: The numeric ID of the group.)members[0][userid]
= int (Required: The numeric ID of the user to remove from the group.)
cURL Command Example (Removing a Group Member):
core_group_create_groups
This function creates one or more new groups within a specified course.
Let's review the POST parameters for this function:
- Required Parameters:
groups[0][courseid]
= int (Required: The numeric ID of the course where the group will be created.)groups[0][name]
= string (Required: The name of the new group.)groups[0][description]
= string (Required: A description for the group.)
- Optional Parameters:
groups[0][descriptionformat]
= int (Optional: The text format. 1 = HTML, 2 = Plain, 4 = Markdown. Defaults to 1.)groups[0][idnumber]
= string (Optional: A unique alphanumeric ID for the group.)groups[0][enrolmentkey]
= string (Optional: A password that users can use to join the group.)
cURL Command Example (Creating a Group):
core_group_delete_groups
This function deletes one or more groups based on their IDs.
Let's review the POST parameters for this function:
- Required Parameter:
groupids[0]
= int (Required: The numeric ID of the group to delete. Pass multiple to delete more than one.)
cURL Command Example (Deleting a Group):