MDL-56566 mod_assign: ignore "doanything" in course overview

Do not count site admin "doanything" capability for determining
what should be shown in the course overview for assignments.
This commit is contained in:
Henning Bostelmann 2016-11-12 19:23:15 +00:00
parent 5ef81f2b0b
commit 5c4bd8f4e8

View File

@ -572,7 +572,7 @@ function assign_print_overview($courses, &$htmlarray) {
$context = context_module::instance($assignment->coursemodule);
// Does the submission status of the assignment require notification?
if (has_capability('mod/assign:submit', $context)) {
if (has_capability('mod/assign:submit', $context, null, false)) {
// Does the submission status of the assignment require notification?
$submitdetails = assign_get_mysubmission_details_for_print_overview($mysubmissions, $sqlassignmentids,
$assignmentidparams, $assignment);
@ -580,7 +580,7 @@ function assign_print_overview($courses, &$htmlarray) {
$submitdetails = false;
}
if (has_capability('mod/assign:grade', $context)) {
if (has_capability('mod/assign:grade', $context, null, false)) {
// Does the grading status of the assignment require notification ?
$gradedetails = assign_get_grade_details_for_print_overview($unmarkedsubmissions, $sqlassignmentids,
$assignmentidparams, $assignment, $context);