MDL-45729 assign: conditional submission summary

Only show the submission summary if user has assign:submit capability.

Amended to fix some whitespace and the commit message.
This commit is contained in:
Graham Bowman
2014-06-09 22:07:15 +02:00
committed by Eloy Lafuente (stronk7)
parent 3566ea16a8
commit 09fdd221ca
+3 -1
View File
@@ -3731,7 +3731,9 @@ class assign {
$gradingcontrollerpreview,
$instance->attemptreopenmethod,
$instance->maxattempts);
$o .= $this->get_renderer()->render($submissionstatus);
if (has_capability('mod/assign:submit', $this->get_context())) {
$o .= $this->get_renderer()->render($submissionstatus);
}
require_once($CFG->libdir.'/gradelib.php');
require_once($CFG->dirroot.'/grade/grading/lib.php');