Skip to content

Commit 9b63872

Browse files
nero-92junpataleta
authored andcommitted
Groups API: Fix typos in code examples
1 parent 7cb32af commit 9b63872

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/apis/subsystems/group/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ This is using an example from the module forums.
8787
$id = required_param('id', PARAM_INT);
8888

8989
// Get the course module.
90-
$cm = get_coursemodule_from_id('forum', $id, 0, false, MUST_EXIST)
90+
$cm = get_coursemodule_from_id('forum', $id, 0, false, MUST_EXIST);
9191

9292
// Get the current group id.
9393
$currentgroupid = groups_get_activity_group($cm);
@@ -161,7 +161,7 @@ groups_print_activity_menu($cm, $url);
161161
The following example will check whether the current user has permission to see hidden groups on a course, and **if they do not**, will apply additional conditions to a query to restrict the results to just those groups they should see.
162162

163163
```php
164-
$courseid = required_param('courseid', PARAM_INT)';
164+
$courseid = required_param('courseid', PARAM_INT);
165165
$sql = "SELECT g.idnumber, gm.*
166166
FROM {groups} g
167167
JOIN {groups_members} gm ON gm.groupid = g.id
@@ -170,7 +170,7 @@ $sql = "SELECT g.idnumber, gm.*
170170
$params = [$courseid];
171171

172172
$context = context_course::instance($courseid);
173-
if (!has_capability('moodle/course:viewhiddengroups', $context) {
173+
if (!has_capability('moodle/course:viewhiddengroups', $context)) {
174174
// Apply visibility restrictions.
175175
[
176176
$visibilitywhere,

0 commit comments

Comments
 (0)