Skip to content
Permalink
Browse files

MDL-36804 Assignment attempt history: Fix warning on saving a new grade.

This is a fix for the case when there is a submission but no grade.
  • Loading branch information...
damyon committed Apr 5, 2013
1 parent 577173a commit a8fdb36cf2cf32559382025feac091f15b48f30e
Showing with 4 additions and 0 deletions.
  1. +4 −0 mod/assign/locallib.php
@@ -1692,6 +1692,10 @@ public function update_grade($grade) {
}
}
if (empty($grade->attemptnumber)) {
// Set it to the default.
$grade->attemptnumber = 0;
}
$result = $DB->update_record('assign_grades', $grade);
// Only push to gradebook if the update is for the latest attempt.

0 comments on commit a8fdb36

Please sign in to comment.
You can’t perform that action at this time.