Permalink
Browse files

MDL-31407 quiz: finish_attempt method should not rely on $USER

  • Loading branch information...
1 parent 4d2f89f commit c31783bb34d27408b288a3d95469737d902fa431 @ktemkin ktemkin committed with timhunt Jan 30, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/quiz/attemptlib.php
View
@@ -1160,7 +1160,7 @@ public function finish_attempt($timestamp) {
$DB->update_record('quiz_attempts', $this->attempt);
if (!$this->is_preview()) {
- quiz_save_best_grade($this->get_quiz());
+ quiz_save_best_grade($this->get_quiz(), $this->attempt->userid);
// Trigger event
$eventdata = new stdClass();

0 comments on commit c31783b

Please sign in to comment.