MDL-21655 big scary enrolment and roles improvements - see tacker for list of changes, includes other minor fixes too
This commit is contained in:
@@ -1072,7 +1072,7 @@ class assignment_upload extends assignment_base {
|
||||
|
||||
// get users submission if there is one
|
||||
$submission = $this->get_submission();
|
||||
if (has_capability('mod/assignment:submit', $this->cm->context)) {
|
||||
if (has_capability('mod/assignment:submit', get_context_instance(COURSE_MODULE, $this->cm->id))) {
|
||||
$editable = $this->isopen() && (!$submission || $this->assignment->resubmit || !$submission->timemarked);
|
||||
} else {
|
||||
$editable = false;
|
||||
|
||||
@@ -192,7 +192,7 @@ class assignment_uploadsingle extends assignment_base {
|
||||
|
||||
// get users submission if there is one
|
||||
$submission = $this->get_submission();
|
||||
if (has_capability('mod/assignment:submit', $this->cm->context)) {
|
||||
if (has_capability('mod/assignment:submit', get_context_instance(CONTEXT_MODULE, $this->cm->id))) {
|
||||
$editable = $this->isopen() && (!$submission || $this->assignment->resubmit || !$submission->timemarked);
|
||||
} else {
|
||||
$editable = false;
|
||||
|
||||
Reference in New Issue
Block a user