Skip to content

Commit

Permalink
Merge branch 'MDL-76781-master' of https://github.com/lucaboesch/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
paulholden committed Jan 6, 2023
2 parents db1b807 + 864a1eb commit 982dbee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions grade/classes/external/get_groups_for_search_widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ protected static function execute(int $courseid, string $actionbaseurl): array {
]);
}

$mappedgroups = array_map(function($group) use ($COURSE, $actionbaseurl) {
$mappedgroups = array_map(function($group) use ($COURSE, $actionbaseurl, $context) {
$url = new \moodle_url($actionbaseurl, [
'id' => $COURSE->id,
'group' => $group->id
]);
return (object) [
'id' => $group->id,
'name' => $group->name,
'name' => format_string($group->name, true, ['context' => $context]),
'url' => $url->out(false),
'active' => false // @TODO MDL-76246
];
Expand Down
2 changes: 1 addition & 1 deletion grade/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function group_selector(object $course, ?string $groupactionbaseurl = nul

if ($activegroup) {
$group = groups_get_group($activegroup);
$data['selectedgroup'] = $group->name;
$data['selectedgroup'] = format_string($group->name, true, ['context' => $context]);
} else if ($activegroup === 0) {
$data['selectedgroup'] = get_string('allparticipants');
}
Expand Down
8 changes: 5 additions & 3 deletions grade/report/user/tests/behat/groupsearch.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ Feature: Group searching functionality within the user report.
| student2 | C1 | student |
And the following "groups" exist:
| name | course | idnumber |
| Default group | C1 | dg |
| Tutor group | C1 | tg |
| Marker group | C1 | mg |
| Default <span class="multilang" lang="de">Gruppe</span><span class="multilang" lang="en">group</span> | C1 | dg |
| Tutor <span class="multilang" lang="de">Gruppe</span><span class="multilang" lang="en">group</span> | C1 | tg |
| Marker <span class="multilang" lang="de">Gruppe</span><span class="multilang" lang="en">group</span> | C1 | mg |
And the following "group members" exist:
| user | group |
| student1 | dg |
And the "multilang" filter is "on"
And the "multilang" filter applies to "content and headings"
And I am on the "C1" "Course" page logged in as "teacher1"
And I change window size to "large"

Expand Down

0 comments on commit 982dbee

Please sign in to comment.