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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user