MDL-75423 gradereport_singleview: show editing mode if can edit grades
Users should be able to turn editing mode on on the single view report if they have the capability to edit grades.
This commit is contained in:
committed by
Mihail Geshoski
parent
9dd8749ebd
commit
3daabd6840
@@ -57,7 +57,8 @@ $pageparams = [
|
||||
'perpage' => $perpage,
|
||||
];
|
||||
$PAGE->set_url(new moodle_url('/grade/report/singleview/index.php', $pageparams));
|
||||
$PAGE->set_pagelayout('incourse');
|
||||
$PAGE->set_pagelayout('report');
|
||||
$PAGE->set_other_editing_capability('moodle/grade:edit');
|
||||
|
||||
if (!$course = $DB->get_record('course', $courseparams)) {
|
||||
throw new \moodle_exception('invalidcourseid');
|
||||
@@ -104,8 +105,6 @@ $pageparams = [
|
||||
'perpage' => $perpage,
|
||||
];
|
||||
|
||||
$PAGE->set_pagelayout('report');
|
||||
|
||||
$actionbar = new \core_grades\output\general_action_bar($context,
|
||||
new moodle_url('/grade/report/singleview/index.php', ['id' => $courseid]), 'report', 'singleview');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user