MDL-36679: Assignment revert to draft should user the selected user id, not the logge...
authorDamyon Wiese <damyon@moodle.org>
Tue, 20 Nov 2012 04:23:45 +0000 (12:23 +0800)
committerDamyon Wiese <damyon@moodle.org>
Tue, 20 Nov 2012 04:23:45 +0000 (12:23 +0800)
mod/assign/locallib.php

index 4837593..99efb11 100644 (file)
@@ -4097,9 +4097,9 @@ class assign {
         }
 
         if ($this->get_instance()->teamsubmission) {
-            $submission = $this->get_group_submission($USER->id, 0, false);
+            $submission = $this->get_group_submission($userid, 0, false);
         } else {
-            $submission = $this->get_user_submission($USER->id, false);
+            $submission = $this->get_user_submission($userid, false);
         }
 
         if (!$submission) {