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

This commit is contained in:
Kyle Temkin
2012-02-02 18:37:05 +00:00
committed by Tim Hunt
parent baa5cd8240
commit 704f062b87
+1 -1
View File
@@ -1165,7 +1165,7 @@ class quiz_attempt {
$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();