quiz MDL-19813 Updated print_header_simple and build_navigation to OUTPUT and PAGE equivalents
This commit is contained in:
@@ -72,7 +72,9 @@ if (has_capability('moodle/course:manageactivities', $contexts->lowest())) {
|
||||
$strupdatemodule = update_module_button($cm->id, $course->id, get_string('modulename', 'quiz'));
|
||||
}
|
||||
$PAGE->navbar->add($streditingquiz);
|
||||
print_header_simple($streditingquiz, '', $navigation, '', '', true, $strupdatemodule);
|
||||
$PAGE->set_title($streditingquiz);
|
||||
$PAGE->set_button($strupdatemodule);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
if (!$quizname = $DB->get_field($cm->modname, 'name', array('id' => $cm->instance))) {
|
||||
print_error('invalidcoursemodule');
|
||||
|
||||
@@ -92,8 +92,9 @@
|
||||
$accessmanager->setup_secure_page($attemptobj->get_course()->shortname . ': ' .
|
||||
format_string($attemptobj->get_quiz_name()), $headtags);
|
||||
} else {
|
||||
print_header_simple(format_string($attemptobj->get_quiz_name()), '', $attemptobj->navigation($title),
|
||||
'', $headtags, true, $attemptobj->update_module_button());
|
||||
$PAGE->set_title(format_string($attemptobj->get_quiz_name()));
|
||||
$PAGE->set_button($attemptobj->update_module_button());
|
||||
echo $OUTPUT->header();
|
||||
}
|
||||
echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>'; // for overlib
|
||||
|
||||
|
||||
+3
-2
@@ -448,8 +448,9 @@ $PAGE->navbar->add($pagetitle);
|
||||
$PAGE->requires->skip_link_to('questionbank', get_string('skipto', 'access', get_string('questionbank', 'question')));
|
||||
$PAGE->requires->skip_link_to('quizcontentsblock', get_string('skipto', 'access', get_string('questionsinthisquiz', 'quiz')));
|
||||
|
||||
print_header_simple($pagetitle, '', $navigation, '', '', true,
|
||||
$questionbankmanagement.$strupdatemodule);
|
||||
$PAGE->set_title($pagetitle);
|
||||
$PAGE->set_button($questionbankmanagement.$strupdatemodule);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
// Initialise the JavaScript.
|
||||
$quizeditconfig = new stdClass;
|
||||
|
||||
+3
-2
@@ -31,8 +31,9 @@
|
||||
</form>";
|
||||
}
|
||||
$PAGE->navbar->add($strquizzes);
|
||||
print_header_simple($strquizzes, '', $navigation,
|
||||
'', '', true, $streditquestions, navmenu($course));
|
||||
$PAGE->set_title($strquizzes);
|
||||
$PAGE->set_button($streditquestions);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
// Get all the appropriate data
|
||||
if (!$quizzes = get_all_instances_in_course("quiz", $course)) {
|
||||
|
||||
@@ -27,9 +27,9 @@ class quiz_default_report {
|
||||
$strquizzes = get_string("modulenameplural", "quiz");
|
||||
$strquiz = get_string("modulename", "quiz");
|
||||
/// Print the page header
|
||||
|
||||
print_header_simple(format_string($quiz->name), "", $navigation,
|
||||
'', '', true, update_module_button($cm->id, $course->id, $strquiz), navmenu($course, $cm));
|
||||
$PAGE->set_title(format_string($quiz->name));
|
||||
$PAGE->set_button(update_module_button($cm->id, $course->id, $strquiz));
|
||||
echo $OUTPUT->header();
|
||||
/// Print the tabs
|
||||
$currenttab = 'reports';
|
||||
$mode = $reportmode;
|
||||
|
||||
+4
-2
@@ -81,8 +81,10 @@
|
||||
if ($accessmanager->securewindow_required($attemptobj->is_preview_user())) {
|
||||
$accessmanager->setup_secure_page($attemptobj->get_course()->shortname.': '.format_string($attemptobj->get_quiz_name()), $headtags);
|
||||
} else {
|
||||
print_header_simple(format_string($attemptobj->get_quiz_name()), '', $attemptobj->navigation($strreviewtitle),
|
||||
'', $headtags, true, $attemptobj->update_module_button());
|
||||
$attemptobj->navigation($strreviewtitle);
|
||||
$PAGE->set_title(format_string($attemptobj->get_quiz_name()));
|
||||
$PAGE->set_button($attemptobj->update_module_button());
|
||||
echo $OUTPUT->header();
|
||||
}
|
||||
echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>'; // for overlib
|
||||
|
||||
|
||||
@@ -50,8 +50,10 @@ if ($accessmanager->securewindow_required($attemptobj->is_preview_user())) {
|
||||
$accessmanager->setup_secure_page($attemptobj->get_course()->shortname . ': ' .
|
||||
format_string($attemptobj->get_quiz_name()), '');
|
||||
} else {
|
||||
print_header_simple(format_string($attemptobj->get_quiz_name()), '',
|
||||
$attemptobj->navigation($title), '', '', true, $attemptobj->update_module_button());
|
||||
$attemptobj->navigation($title);
|
||||
$PAGE->set_title(format_string($attemptobj->get_quiz_name()));
|
||||
$PAGE->set_button($attemptobj->update_module_button());
|
||||
echo $OUTPUT->header();
|
||||
}
|
||||
|
||||
/// Print tabs if they should be there.
|
||||
|
||||
Reference in New Issue
Block a user