Merge branch 'MDL-52383' of https://github.com/stronk7/moodle
authorAndrew Nicols <andrew@nicols.co.uk>
Wed, 20 Jan 2016 02:16:19 +0000 (10:16 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Wed, 20 Jan 2016 02:16:19 +0000 (10:16 +0800)
mod/assign/locallib.php

index 612d1d0..f353948 100644 (file)
@@ -7205,7 +7205,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;