Skip to content
Browse files

MDL-29111 quiz was passing 0 to ->review_url when it should have been…

… null.
  • Loading branch information...
1 parent e4527c5 commit 15e62463594580dcf41478e3f99b9068436e8651 @timhunt timhunt committed Aug 25, 2011
Showing with 6 additions and 6 deletions.
  1. +2 −2 mod/quiz/attempt.php
  2. +2 −2 mod/quiz/renderer.php
  3. +2 −2 mod/quiz/review.php
View
4 mod/quiz/attempt.php
@@ -50,7 +50,7 @@
// Check that this attempt belongs to this user.
if ($attemptobj->get_userid() != $USER->id) {
if ($attemptobj->has_capability('mod/quiz:viewreports')) {
- redirect($attemptobj->review_url(0, $page));
+ redirect($attemptobj->review_url(null, $page));
} else {
throw new moodle_quiz_exception($attemptobj->get_quizobj(), 'notyourattempt');
}
@@ -69,7 +69,7 @@
// If the attempt is already closed, send them to the review page.
if ($attemptobj->is_finished()) {
- redirect($attemptobj->review_url(0, $page));
+ redirect($attemptobj->review_url(null, $page));
}
// Check the access rules.
View
4 mod/quiz/renderer.php
@@ -203,7 +203,7 @@ public function review_form($page, $showall, $displayoptions, $content, $attempt
quiz_get_js_module());
$output = '';
- $output .= html_writer::start_tag('form', array('action' => $attemptobj->review_url(0,
+ $output .= html_writer::start_tag('form', array('action' => $attemptobj->review_url(null,
$page, $showall), 'method' => 'post', 'class' => 'questionflagsaveform'));
$output .= html_writer::start_tag('div');
$output .= $content;
@@ -249,7 +249,7 @@ public function review_next_navigation(quiz_attempt $attemptobj, $page, $lastpag
if ($lastpage) {
$nav = $this->finish_review_link($attemptobj->view_url());
} else {
- $nav = link_arrow_right(get_string('next'), $attemptobj->review_url(0, $page + 1));
+ $nav = link_arrow_right(get_string('next'), $attemptobj->review_url(null, $page + 1));
}
return html_writer::tag('div', $nav, array('class' => 'submitbtns'));
}
View
4 mod/quiz/review.php
@@ -79,7 +79,7 @@
PARAM_BOOL)) {
require_sesskey();
$attemptobj->save_question_flags();
- redirect($attemptobj->review_url(0, $page, $showall));
+ redirect($attemptobj->review_url(null, $page, $showall));
}
// Log this review.
@@ -150,7 +150,7 @@
);
}
if ($attemptobj->has_capability('mod/quiz:viewreports')) {
- $attemptlist = $attemptobj->links_to_other_attempts($attemptobj->review_url(0, $page,
+ $attemptlist = $attemptobj->links_to_other_attempts($attemptobj->review_url(null, $page,
$showall));
if ($attemptlist) {
$summarydata['attemptlist'] = array(

0 comments on commit 15e6246

Please sign in to comment.
Something went wrong with that request. Please try again.