Updating grades will update the grade_item too

This commit is contained in:
moodler 2007-09-04 05:56:19 +00:00
parent fb81abe154
commit f4d24ff5c3

View 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;
}
?>
?>