-
Bug
-
Resolution: Fixed
-
Minor
-
3.1.4, 3.4
-
MOODLE_31_STABLE, MOODLE_34_STABLE
-
MOODLE_33_STABLE, MOODLE_34_STABLE
-
MDL-58983-master -
If a student get the right for viewing gradings (mod/assign:grades), without the right grading submissions (mod/assign:grade)
Moodle shows the button grade now for the user.
If the student click on the button, he get some error message.
Solution:
Change source code in method "render_assign_grading_summary" in file mod/assign/renderer.php
Changes are green. The methode conside now the right "mod/assign:grade".
$context = context_module::instance($summary->coursemoduleid);
if(has_capability('mod/assign:grade', $context)){
$urlparams = array('id' => $summary->coursemoduleid, 'action' => 'grader');
$url = new moodle_url('/mod/assign/view.php', $urlparams);
$o .= '<a href="' . $url . '" class="btn btn-primary">' . get_string('grade') . '</a>';
}