mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-45940 Assign: Improved access check
Call can_edit() instead of repeating a (slightly wrong) access check.
This commit is contained in:
parent
070d5b17e1
commit
de06ce7ed3
@ -3678,10 +3678,9 @@ class assign {
|
||||
}
|
||||
|
||||
if ($this->can_view_submission($user->id)) {
|
||||
$showedit = has_capability('mod/assign:submit', $this->context) &&
|
||||
$this->submissions_open($user->id) &&
|
||||
$showedit = $showlinks &&
|
||||
($this->is_any_submission_plugin_enabled()) &&
|
||||
$showlinks;
|
||||
$this->can_edit_submission($user->id);
|
||||
|
||||
$gradelocked = ($flags && $flags->locked) || $this->grading_disabled($user->id, false);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user