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

This commit is contained in:
Kyle Temkin
2012-02-02 18:13:30 +00:00
committed by Tim Hunt
parent 4d2f89f85b
commit c31783bb34
+1 -1
View File
@@ -1160,7 +1160,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();