mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 19:36:41 +02:00
MDL-82393 course: Deprecate the $course argument in group_selector
Deprecates the $course parameter in the constructor of the core_course\output\actionbar\group_selector class. This parameter is no longer used, as the $course object can now be obtained through the $context class property. Additionaly, the $course class property has been removed in accordance with this change.
This commit is contained in:
parent
02755c4f95
commit
b7481cf4aa
6 changed files with 32 additions and 18 deletions
|
@ -114,7 +114,7 @@ class action_bar extends \core_grades\output\action_bar {
|
|||
if ($course->groupmode) {
|
||||
$actionbarrenderer = $PAGE->get_renderer('core_course', 'actionbar');
|
||||
$data['groupselector'] = $actionbarrenderer->render(
|
||||
new \core_course\output\actionbar\group_selector($course, $this->context));
|
||||
new \core_course\output\actionbar\group_selector(null, $this->context));
|
||||
}
|
||||
|
||||
$resetlink = new moodle_url('/grade/report/grader/index.php', ['id' => $courseid]);
|
||||
|
|
|
@ -147,7 +147,7 @@ class singleview extends grade_report {
|
|||
global $PAGE;
|
||||
|
||||
$renderer = $PAGE->get_renderer('core_course', 'actionbar');
|
||||
return $renderer->render(new \core_course\output\actionbar\group_selector($course, $PAGE->context));
|
||||
return $renderer->render(new \core_course\output\actionbar\group_selector(null, $PAGE->context));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -94,7 +94,7 @@ class action_bar extends \core_grades\output\action_bar {
|
|||
$userreportrenderer = $PAGE->get_renderer('gradereport_user');
|
||||
$course = get_course($courseid);
|
||||
if ($course->groupmode) {
|
||||
$groupselector = new \core_course\output\actionbar\group_selector($course, $this->context);
|
||||
$groupselector = new \core_course\output\actionbar\group_selector(null, $this->context);
|
||||
$data['groupselector'] = $PAGE->get_renderer('core_course', 'actionbar')->render($groupselector);
|
||||
}
|
||||
$data['userselector'] = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue