]> git.mjollnir.org Git - moodle.git/commitdiff
Updating grades will update the grade_item too
authormoodler <moodler>
Tue, 4 Sep 2007 05:56:19 +0000 (05:56 +0000)
committermoodler <moodler>
Tue, 4 Sep 2007 05:56:19 +0000 (05:56 +0000)
mod/quiz/lib.php

index f072ae475636551a2d6aee9754063954820e47c0..5f9c163c09377af20a80048610975b3d4e716b02 100644 (file)
@@ -266,6 +266,7 @@ function quiz_update_grades($quiz=null, $userid=0, $nullifnone=true) {
     }
 
     if ($quiz != null) {
+        quiz_grade_item_update($quiz);  // Recreate it if necessary
         if ($grades = quiz_get_user_grades($quiz, $userid)) {
             grade_update('mod/quiz', $quiz->course, 'mod', 'quiz', $quiz->id, 0, $grades);
 
@@ -909,4 +910,4 @@ function quiz_check_file_access($attemptid, $questionid) {
     // otherwise, this user does not have permission    
     return false;
 }
-?>
\ No newline at end of file
+?>