Merge branch 'MDL-28976' of git://github.com/timhunt/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 24 Aug 2011 10:57:16 +0000 (12:57 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 24 Aug 2011 10:57:16 +0000 (12:57 +0200)
mod/quiz/attempt.php
mod/quiz/processattempt.php
mod/quiz/renderer.php
mod/quiz/review.php

index 0bbd37f..5cc2f89 100644 (file)
@@ -42,7 +42,7 @@ $attemptid = required_param('attempt', PARAM_INT);
 $page = optional_param('page', 0, PARAM_INT);
 
 $attemptobj = quiz_attempt::create($attemptid);
-$PAGE->set_url($attemptobj->attempt_url(0, $page));
+$PAGE->set_url($attemptobj->attempt_url(null, $page));
 
 // Check login.
 require_login($attemptobj->get_course(), false, $attemptobj->get_cm());
index 79da301..7c25b7a 100644 (file)
@@ -57,7 +57,7 @@ if ($next) {
 if ($page == -1) {
     $nexturl = $attemptobj->summary_url();
 } else {
-    $nexturl = $attemptobj->attempt_url(0, $page);
+    $nexturl = $attemptobj->attempt_url(null, $page);
     if ($scrollpos !== '') {
         $nexturl->param('scrollpos', $scrollpos);
     }
@@ -96,7 +96,7 @@ if (!$finishattempt) {
         $attemptobj->process_all_actions($timenow);
     } catch (question_out_of_sequence_exception $e) {
         print_error('submissionoutofsequencefriendlymessage', 'question',
-                $attemptobj->attempt_url(0, $thispage));
+                $attemptobj->attempt_url(null, $thispage));
     }
     $transaction->allow_commit();
     redirect($nexturl);
index d44be22..9709681 100644 (file)
@@ -417,8 +417,8 @@ class mod_quiz_renderer extends plugin_renderer_base {
 
         // Print all the questions
         foreach ($slots as $slot) {
-            $output .= $attemptobj->render_question($slot, false, $attemptobj->attempt_url($id,
-                    $page));
+            $output .= $attemptobj->render_question($slot, false,
+                    $attemptobj->attempt_url($slot, $page));
         }
 
         $output .= html_writer::start_tag('div', array('class' => 'submitbtns'));
index cd36bd9..b744e05 100644 (file)
@@ -57,7 +57,7 @@ $options = $attemptobj->get_display_options(true);
 // Check permissions.
 if ($attemptobj->is_own_attempt()) {
     if (!$attemptobj->is_finished()) {
-        redirect($attemptobj->attempt_url(0, $page));
+        redirect($attemptobj->attempt_url(null, $page));
     } else if (!$options->attempt) {
         $accessmanager->back_to_view_page($attemptobj->is_preview_user(),
                 $accessmanager->cannot_review_message($attemptobj->get_attempt_state()));