MDL-38647 quiz review question issues
authorTim Hunt <T.J.Hunt@open.ac.uk>
Fri, 22 Mar 2013 11:16:02 +0000 (11:16 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Fri, 22 Mar 2013 11:16:02 +0000 (11:16 +0000)
1. Page URL should contain 'step=0' if necessary, but not 'step='.
2. Review specific step was not using the right display options.

mod/quiz/attemptlib.php
mod/quiz/reviewquestion.php

index bf5d542..eef2f89 100644 (file)
@@ -1192,7 +1192,7 @@ class quiz_attempt {
      */
     public function render_question_at_step($slot, $seq, $reviewing, $thispageurl = '') {
         return $this->quba->render_question_at_step($slot, $seq,
-                $this->get_display_options($reviewing),
+                $this->get_display_options_with_edit_link($reviewing, $slot, $thispageurl),
                 $this->get_question_number($slot));
     }
 
index 9e79eee..7359ff0 100644 (file)
@@ -35,7 +35,7 @@ $seq = optional_param('step', null, PARAM_INT);
 $baseurl = new moodle_url('/mod/quiz/reviewquestion.php',
         array('attempt' => $attemptid, 'slot' => $slot));
 $currenturl = new moodle_url($baseurl);
-if ($seq !== 0) {
+if (!is_null($seq)) {
     $currenturl->param('step', $seq);
 }
 $PAGE->set_url($currenturl);