choice MDL-19805 Updated print_header_simple and build_navigation to OUTPUT and PAGE equivalents
This commit is contained in:
@@ -15,12 +15,9 @@
|
||||
|
||||
$strchoice = get_string("modulename", "choice");
|
||||
$strchoices = get_string("modulenameplural", "choice");
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $strchoices, 'link' => '', 'type' => 'activity');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
print_header_simple("$strchoices", "", $navigation, "", "", true, "", navmenu($course));
|
||||
|
||||
$PAGE->set_title($strchoices);
|
||||
$PAGE->navbar->add($strchoices);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
if (! $choices = get_all_instances_in_course("choice", $course)) {
|
||||
notice(get_string('thereareno', 'moodle', $strchoices), "../../course/view.php?id=$course->id");
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
}
|
||||
|
||||
if (!$download) {
|
||||
|
||||
$navigation = build_navigation($strresponses, $cm);
|
||||
print_header_simple(format_string($choice->name).": $strresponses", "", $navigation, "", '', true,
|
||||
update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm));
|
||||
$PAGE->navbar->add($strresponses);
|
||||
$PAGE->set_title(format_string($choice->name).": $strresponses");
|
||||
$PAGE->set_button(update_module_button($cm->id, $course->id, $strchoice));
|
||||
echo $OUTPUT->header();
|
||||
/// Check to see if groups are being used in this choice
|
||||
$groupmode = groups_get_activity_groupmode($cm);
|
||||
if ($groupmode) {
|
||||
|
||||
+3
-3
@@ -36,9 +36,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
$navigation = build_navigation('', $cm);
|
||||
print_header_simple(format_string($choice->name), "", $navigation, "", "", true,
|
||||
update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm));
|
||||
$PAGE->set_title(format_string($choice->name));
|
||||
$PAGE->set_button(update_module_button($cm->id, $course->id, $strchoice));
|
||||
echo $OUTPUT->header();
|
||||
|
||||
/// Submit any new data if there is any
|
||||
if ($form = data_submitted() && has_capability('mod/choice:choose', $context)) {
|
||||
|
||||
Reference in New Issue
Block a user