Skip to content

Commit

Permalink
Fix regression - value of STUDENT variable was not being properly
Browse files Browse the repository at this point in the history
restored when a teacher reviews a student's attempts.
  • Loading branch information
trampgeek committed Nov 7, 2019
1 parent 4982585 commit f29ca9d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions question.php
Expand Up @@ -59,6 +59,7 @@ class qtype_coderunner_question extends question_graded_automatically {
public function start_attempt(question_attempt_step $step=null, $variant=null) {
global $DB, $USER;
if ($step !== null) {
parent::start_attempt($step, $variant);
$userid = $step->get_user_id();
$this->student = $DB->get_record('user', array('id' => $userid));
$step->set_qt_var('_STUDENT', serialize($this->student));
Expand Down

0 comments on commit f29ca9d

Please sign in to comment.