Skip to content

Commit

Permalink
MDL-75947 ltiservice_gradebookservices: use score->timestamp as dateg…
Browse files Browse the repository at this point in the history
…raded

If this is not passed in to grade_update(), then it's not passed on to
update_raw_grade(), resulting in time() being used instead, which isn't
correct. The grade timemodified value should be set to the timestamp
provided by the tool in the score post JSON, not the time of the score
post itself.
  • Loading branch information
snake committed Aug 9, 2024
1 parent 17c4b84 commit ef11603
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ public function save_grade_item($gradeitem, $score, $userid) {
$grade->feedbackformat = $feedbackformat;
$grade->feedback = $feedback;
$grade->rawgrade = $finalgrade;
$grade->dategraded = $timemodified;
$status = grade_update($source, $gradeitem->courseid,
$gradeitem->itemtype, $gradeitem->itemmodule,
$gradeitem->iteminstance, $gradeitem->itemnumber, $grade);
Expand Down

0 comments on commit ef11603

Please sign in to comment.