From 1cca9a3479f1d677fbe8776806784ccd50eac59e Mon Sep 17 00:00:00 2001 From: Tobias Reischmann Date: Wed, 16 Nov 2016 16:49:16 +0100 Subject: [PATCH] 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. --- mod/assign/locallib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index b45d03204ee..71f51e92801 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -4872,7 +4872,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); }