Skip to content

Commit

Permalink
MDL-31407 quiz: finish_attempt method should not rely on $USER
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Temkin authored and timhunt committed Feb 2, 2012
1 parent baa5cd8 commit 704f062
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod/quiz/attemptlib.php
Expand Up @@ -1165,7 +1165,7 @@ public function finish_attempt($timestamp) {
$DB->update_record('quiz_attempts', $this->attempt); $DB->update_record('quiz_attempts', $this->attempt);


if (!$this->is_preview()) { if (!$this->is_preview()) {
quiz_save_best_grade($this->get_quiz()); quiz_save_best_grade($this->get_quiz(), $this->attempt->userid);


// Trigger event // Trigger event
$eventdata = new stdClass(); $eventdata = new stdClass();
Expand Down

0 comments on commit 704f062

Please sign in to comment.