MDL-50083 mod_assign: protect code against not set flags
Yes could have used !empty() but for some reason found the isset() && condition more clear. Tired brain, surely.
This commit is contained in:
committed by
Andrew Nicols
parent
0ef9c59d09
commit
e2baf7ed8a
@@ -7163,7 +7163,7 @@ class assign {
|
||||
|
||||
$this->update_submission($newsubmission, $userid, false, $this->get_instance()->teamsubmission);
|
||||
$flags = $this->get_user_flags($userid, false);
|
||||
if ($flags->locked) {
|
||||
if (isset($flags->locked) && $flags->locked) { // May not exist.
|
||||
$this->process_unlock_submission($userid);
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user