mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Merge branch 'MDL-29111' of git://github.com/timhunt/moodle
This commit is contained in:
commit
1343d181ae
@ -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.
|
||||
|
@ -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'));
|
||||
}
|
||||
|
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user