MDL-80746 core_course: fix group_selector rendering

This change:
- Fixes the group_selector constructor, removing the unnecessarily
deprecated param (this code is main-only, so no need to deprecate) and
fixes all calling code.
- moves the button and content into separate named_templatable
renderables, cleaning up the group_selector code so that it only needs
to make a single call to render and doesn't concern itself with contexts
of other renderables.
This commit is contained in:
Jake Dallimore 2024-09-16 15:18:50 +08:00 committed by Mihail Geshoski
parent 8d1cdf6f8e
commit c648839070
8 changed files with 151 additions and 45 deletions

View file

@ -136,7 +136,7 @@ class grading_actionmenu implements templatable, renderable {
if (groups_get_activity_groupmode($cm, $course)) {
$data['groupselector'] = $actionbarrenderer->render(
new \core_course\output\actionbar\group_selector(null, $PAGE->context));
new \core_course\output\actionbar\group_selector($PAGE->context));
}
if ($extrafiltersdropdown = $this->get_extra_filters_dropdown()) {