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

This commit is contained in:
Tim Hunt
2011-08-26 18:21:43 +01:00
parent 4ad6128920
commit 918776f47d
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -50,7 +50,7 @@ require_login($attemptobj->get_course(), false, $attemptobj->get_cm());
// 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 (!$attemptobj->is_preview_user()) {
// 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.
+2 -2
View File
@@ -203,7 +203,7 @@ class mod_quiz_renderer extends plugin_renderer_base {
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 @@ class mod_quiz_renderer extends plugin_renderer_base {
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'));
}
+2 -2
View File
@@ -79,7 +79,7 @@ if ($options->flags == question_display_options::EDITABLE && optional_param('sav
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->get_quiz()->showuserpicture && $attemptobj->get_userid() != $U
);
}
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(