$quiz_page = optional_param('quiz_page', 0, PARAM_SEQUENCE);
$returnurl = optional_param('returnurl', 0, PARAM_LOCALURL);
+$url = new moodle_url($CFG->wwwroot.'/mod/quiz/addrandom.php');
+if ($quiz_page != 0) {
+ $url->param('quiz_page', $quiz_page);
+}
+if ($returnurl != 0) {
+ $url->param('returnurl', $returnurl);
+}
+$PAGE->set_url($url);
+
$strquizzes = get_string('modulenameplural', 'quiz');
$strquiz = get_string('modulename', 'quiz');
$streditingquestions = get_string('editquestions', 'quiz');
$accessmanager->setup_secure_page($attemptobj->get_course()->shortname . ': ' .
format_string($attemptobj->get_quiz_name()), $headtags);
} elseif ($accessmanager->safebrowser_required($attemptobj->is_preview_user())) {
- print_header($attemptobj->get_course()->shortname . ': '.
- format_string($attemptobj->get_quiz_name()), '', '', '', $headtags, false, '', '', false, '');
+ $PAGE->set_title($attemptobj->get_course()->shortname . ': '.format_string($attemptobj->get_quiz_name()));
+ $PAGE->set_cacheable(false);
+ echo $OUTPUT->header();
} else {
$PAGE->set_title(format_string($attemptobj->get_quiz_name()));
$PAGE->set_button($attemptobj->update_module_button());
-<?php // $Id$
+<?php
/**
* This page allows the teacher to enter a manual grade for a particular question.
* This page is expected to only be used in a popup window.
$attemptid = required_param('attempt', PARAM_INT); // attempt id
$questionid = required_param('question', PARAM_INT); // question id
+ $PAGE->set_url(new moodle_url($CFG->wwwroot.'/mod/quiz/comment.php', array('attempt'=>$attemptid, 'question'=>$questionid)));
+
$attemptobj = new quiz_attempt($attemptid);
/// Can only grade finished attempts.
-<?php // $Id$
+<?php
/**
* This page lists all the instances of quiz in a particular course
*
require_once("locallib.php");
$id = required_param('id', PARAM_INT);
+ $PAGE->set_url(new moodle_url($CFG->wwwroot.'/mod/quiz/index.php', array('id'=>$id)));
if (!$course = $DB->get_record('course', array('id' => $id))) {
print_error('invalidcourseid');
}
if ($accessmanager->securewindow_required($attemptobj->is_preview_user())) {
$accessmanager->setup_secure_page($attemptobj->get_course()->shortname.': '.format_string($attemptobj->get_quiz_name()), $headtags);
} elseif ($accessmanager->safebrowser_required($attemptobj->is_preview_user())) {
- print_header($attemptobj->get_course()->shortname . ': '.format_string($attemptobj->get_quiz_name()), '', '', '', $headtags, false, '', '', false, '');
+ $PAGE->set_title($attemptobj->get_course()->shortname . ': '.format_string($attemptobj->get_quiz_name()));
+ $PAGE->set_cacheable(false);
+ echo $OUTPUT->header();
} else {
$attemptobj->navigation($strreviewtitle);
$PAGE->set_title(format_string($attemptobj->get_quiz_name()));
-<?php // $Id$
+<?php
/**
* This page prints a review of a particular question attempt.
* This page is expected to only be used in a popup window.
$questionid = required_param('question', PARAM_INT); // question id
$stateid = optional_param('state', 0, PARAM_INT); // state id
+ $url = new moodle_url($CFG->wwwroot.'/mod/quiz/reviewquestion.php', array('attempt'=>$attemptid,'question'=>$questionid));
+ if ($stateid !== 0) {
+ $url->param('state', $stateid);
+ }
+ $PAGE->set_url($url);
+
$attemptobj = new quiz_attempt($attemptid);
/// Check login.
-<?php // $Id$
+<?php
/**
* This page prints a summary of a quiz attempt before it is submitted.
*
require_once($CFG->dirroot . '/mod/quiz/locallib.php');
$attemptid = required_param('attempt', PARAM_INT); // The attempt to summarise.
+
+$PAGE->set_url(new moodle_url($CFG->wwwroot.'/mod/quiz/summary.php', array('attempt'=>$attemptid)));
+
$attemptobj = new quiz_attempt($attemptid);
/// Check login.
$accessmanager->setup_secure_page($attemptobj->get_course()->shortname . ': ' .
format_string($attemptobj->get_quiz_name()), '');
} elseif ($accessmanager->safebrowser_required($attemptobj->is_preview_user())) {
- print_header($attemptobj->get_course()->shortname . ': '.
- format_string($attemptobj->get_quiz_name()), '', '', '', '', false, '', '', false, '');
+ $PAGE->set_title($attemptobj->get_course()->shortname . ': '.format_string($attemptobj->get_quiz_name()));
+ $PAGE->set_cacheable(false);
+ echo $OUTPUT->header();
} else {
$attemptobj->navigation($title);
$PAGE->set_title(format_string($attemptobj->get_quiz_name()));
// The code will be much nicer than this eventually.
$title = $course->shortname . ': ' . format_string($quiz->name);
- $buttons = '<table><tr><td>'.update_module_button($cm->id, $course->id, get_string('modulename', 'quiz')).'</td>';
+ $buttons = '<table><tr><td>'.$OUTPUT->update_module_button($cm->id, $cm->modname).'</td>';
if ($PAGE->user_allowed_editing() && !empty($CFG->showblocksonmodpages)) {
$buttons .= '<td><form '.$CFG->frametarget.' method="get" action="view.php"><div>'.
'<input type="hidden" name="id" value="'.$cm->id.'" />'.