]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed bug in resumitting work - datalib now looks at record->id value.
authorrkingdon <rkingdon>
Thu, 9 Sep 2004 18:47:07 +0000 (18:47 +0000)
committerrkingdon <rkingdon>
Thu, 9 Sep 2004 18:47:07 +0000 (18:47 +0000)
mod/workshop/locallib.php

index 3bafd0cbbbb41c680f8674c675cb7352a8626337..e417d532c76440560c1693f1900cbf7970aeb236 100644 (file)
@@ -157,6 +157,7 @@ function workshop_copy_assessment($assessment, $submission, $withfeedback = fals
     
     if ($grades = get_records("workshop_grades", "assessmentid", $assessment->id)) {
         foreach ($grades as $grade) {
+            unset($grade->id); // clear id, insert record now seems to believe it!
             if (!$withfeedback) {
                 $grade->feedback = '';
             }