MDL-55275 assign: Prevent exception under admin role assignment.

In group mode the submission status was displayed to admins.
This caused an exception when the admins were enrolled as teachers
in a course while being the only member of a group.
This commit is contained in:
Tobias Reischmann
2016-11-16 16:49:16 +01:00
parent 55fb326d70
commit 25bb8b64f9
+1 -1
View File
@@ -4592,7 +4592,7 @@ class assign {
if ($this->can_view_submission($user->id)) {
if (has_capability('mod/assign:submit', $this->get_context(), $user)) {
if (has_capability('mod/assign:submit', $this->get_context(), $user, false)) {
$submissionstatus = $this->get_assign_submission_status_renderable($user, $showlinks);
$o .= $this->get_renderer()->render($submissionstatus);
}