mirror of
https://github.com/moodle/moodle.git
synced 2025-04-12 20:12:15 +02:00
MDL-75423 gradereport_singleview: Fix group navigation for grade mode
When we change a group page should redirect to a user selection.
This commit is contained in:
parent
6ae4e00d72
commit
8d81f8c0d7
@ -102,6 +102,10 @@ class singleview extends grade_report {
|
||||
// The setup_group method is used to validate group mode and permissions and define the currentgroup value.
|
||||
$this->setup_groups();
|
||||
|
||||
if (($itemtype !== 'grade') && ($itemtype !== 'user')) {
|
||||
$itemid = null;
|
||||
}
|
||||
|
||||
$this->setup_item_selector($itemtype, $itemid);
|
||||
|
||||
$screenclass = "\\gradereport_singleview\\local\\screen\\${itemtype}";
|
||||
@ -138,6 +142,11 @@ class singleview extends grade_report {
|
||||
global $PAGE;
|
||||
|
||||
$renderer = $PAGE->get_renderer('core_grades');
|
||||
$params = $urlroot->params();
|
||||
if ($params['item'] == 'user') {
|
||||
$params['item'] = 'user_select';
|
||||
$urlroot->params($params);
|
||||
}
|
||||
return $renderer->group_selector($course, $urlroot->out());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user