Permalink
Browse files

MDL-28679 question response history displays states incorrectly.

  • Loading branch information...
1 parent ce0cb24 commit 08d1ba7106bff693a0a4ed4db288c07f4cfbe190 @timhunt timhunt committed Sep 16, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 question/engine/renderer.php
@@ -371,6 +371,7 @@ protected function response_history(question_attempt $qa, qbehaviour_renderer $b
foreach ($qa->get_full_step_iterator() as $i => $step) {
$stepno = $i + 1;
+
$rowclass = '';
if ($stepno == $qa->get_num_steps()) {
$rowclass = 'current';
@@ -382,13 +383,16 @@ protected function response_history(question_attempt $qa, qbehaviour_renderer $b
array('width' => 450, 'height' => 650)),
array('title' => get_string('reviewresponse', 'question')));
}
+
+ $restrictedqa = new question_attempt_with_restricted_history($qa, $i, null);
+
$user = new stdClass();
$user->id = $step->get_user_id();
$row = array(
$stepno,
userdate($step->get_timecreated(), get_string('strftimedatetimeshort')),
s($qa->summarise_action($step)),
- $step->get_state()->default_string(true),
+ $restrictedqa->get_state_string($options->correctness),
);
if ($options->marks >= question_display_options::MARK_AND_MAX) {

0 comments on commit 08d1ba7

Please sign in to comment.