From bd08a24a8ad01d774475e28d6fa3eb06c9bd2e92 Mon Sep 17 00:00:00 2001 From: Rossiani Wijaya Date: Thu, 27 May 2010 09:33:46 +0000 Subject: [PATCH] add page heading --- calendar/delete.php | 2 +- calendar/event.php | 2 +- calendar/preferences.php | 2 +- calendar/view.php | 2 +- cohort/assign.php | 2 ++ cohort/edit.php | 2 ++ cohort/index.php | 3 ++- group/autogroup.php | 2 +- group/delete.php | 2 +- group/group.php | 4 ++-- group/grouping.php | 4 ++-- 11 files changed, 16 insertions(+), 11 deletions(-) diff --git a/calendar/delete.php b/calendar/delete.php index 98a900c8360..04cf557f052 100644 --- a/calendar/delete.php +++ b/calendar/delete.php @@ -94,7 +94,7 @@ $strcalendar = get_string('calendar', 'calendar'); $PAGE->navbar->add($strcalendar, $viewcalendarurl); $PAGE->navbar->add($title); $PAGE->set_title($site->shortname.': '.$strcalendar.': '.$title); -$PAGE->set_heading($strcalendar); +$PAGE->set_heading($COURSE->fullname); echo $OUTPUT->header(); echo $OUTPUT->box_start('eventlist'); diff --git a/calendar/event.php b/calendar/event.php index 45918e044f0..4a749c40570 100644 --- a/calendar/event.php +++ b/calendar/event.php @@ -203,7 +203,7 @@ if ($data) { $PAGE->navbar->add($strcalendar, $link); $PAGE->navbar->add($title); $PAGE->set_title($site->shortname.': '.$strcalendar.': '.$title); -$PAGE->set_heading($strcalendar); +$PAGE->set_heading($COURSE->fullname); echo $OUTPUT->header(); diff --git a/calendar/preferences.php b/calendar/preferences.php index 90ecdfb27c9..24fb5c0c5b7 100644 --- a/calendar/preferences.php +++ b/calendar/preferences.php @@ -67,7 +67,7 @@ if ($course->id != SITEID) { $PAGE->navbar->add($strpreferences, new moodle_url('/calendar/view.php')); $PAGE->set_title("$site->shortname: $strcalendar: $strpreferences"); -$PAGE->set_heading($strcalendar); +$PAGE->set_heading($COURSE->fullname); echo $OUTPUT->header(); diff --git a/calendar/view.php b/calendar/view.php index be416270117..a0bd998951e 100644 --- a/calendar/view.php +++ b/calendar/view.php @@ -151,7 +151,7 @@ $prefsbutton = calendar_preferences_button(); // Print title and header $PAGE->set_title("$site->shortname: $strcalendar: $pagetitle"); -$PAGE->set_heading($strcalendar); +$PAGE->set_heading($COURSE->fullname); $PAGE->set_button($prefsbutton); echo $OUTPUT->header(); diff --git a/cohort/assign.php b/cohort/assign.php index 45c74960e24..020687d7486 100644 --- a/cohort/assign.php +++ b/cohort/assign.php @@ -56,6 +56,8 @@ if ($context->contextlevel == CONTEXT_COURSECAT) { } $PAGE->navbar->add(get_string('cohorts', 'cohort'), new moodle_url('/cohort/', array('contextid'=>$context->id))); $PAGE->navbar->add(get_string('assign', 'cohort')); +$PAGE->set_title(get_string('cohort:assign', 'cohort')); +$PAGE->set_heading($COURSE->fullname); echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('assignto', 'cohort', format_string($cohort->name))); diff --git a/cohort/edit.php b/cohort/edit.php index c1e190ee05b..94798a1427d 100644 --- a/cohort/edit.php +++ b/cohort/edit.php @@ -80,6 +80,7 @@ if ($delete and $cohort->id) { $strheading = get_string('delcohort', 'cohort'); $PAGE->navbar->add($strheading); $PAGE->set_title($strheading); + $PAGE->set_heading($COURSE->fullname); echo $OUTPUT->header(); echo $OUTPUT->heading($strheading); $yesurl = new moodle_url('/cohort/edit.php', array('id'=>$cohort->id, 'delete'=>1, 'confirm'=>1,'sesskey'=>sesskey())); @@ -102,6 +103,7 @@ if ($cohort->id) { } $PAGE->set_title($strheading); +$PAGE->set_heading($COURSE->fullname); $PAGE->navbar->add($strheading); $editform = new cohort_edit_form(null, array('editoroptions'=>$editoroptions, 'data'=>$cohort)); diff --git a/cohort/index.php b/cohort/index.php index 8b93928203a..e08985b2cd6 100644 --- a/cohort/index.php +++ b/cohort/index.php @@ -53,10 +53,11 @@ if (!$manager) { $strcohorts = get_string('cohorts', 'cohort'); -if ($category) { +if ($category) { $PAGE->set_context($context); $PAGE->set_url('/cohort/index.php', array('contextid'=>$context->id)); $PAGE->set_title($strcohorts); + $PAGE->set_heading($COURSE->fullname); $PAGE->navbar->add($category->name, new moodle_url('/course/index.php', array('categoryedit'=>'1'))); $PAGE->navbar->add($strcohorts); } else { diff --git a/group/autogroup.php b/group/autogroup.php index fa37ddb4c26..4105e24c464 100644 --- a/group/autogroup.php +++ b/group/autogroup.php @@ -223,7 +223,7 @@ $PAGE->navbar->add($strautocreategroups); /// Print header $PAGE->set_title($strgroups); -$PAGE->set_heading(': '.$strgroups); +$PAGE->set_heading($course->fullname. ': '.$strgroups); echo $OUTPUT->header(); echo $OUTPUT->heading($strautocreategroups); diff --git a/group/delete.php b/group/delete.php index fe7df6f8393..3d5af1581f6 100644 --- a/group/delete.php +++ b/group/delete.php @@ -57,7 +57,7 @@ if ($confirm && data_submitted()) { redirect($returnurl); } else { $PAGE->set_title(get_string('deleteselectedgroup', 'group')); - $PAGE->set_heading(get_string('deleteselectedgroup', 'group')); + $PAGE->set_heading($course->fullname . ': '. get_string('deleteselectedgroup', 'group')); echo $OUTPUT->header(); $optionsyes = array('courseid'=>$courseid, 'groups'=>$groupids, 'sesskey'=>sesskey(), 'confirm'=>1); $optionsno = array('id'=>$courseid); diff --git a/group/group.php b/group/group.php index 56535bdbd04..1830fc345a0 100644 --- a/group/group.php +++ b/group/group.php @@ -63,7 +63,7 @@ $returnurl = $CFG->wwwroot.'/group/index.php?id='.$course->id.'&group='.$id; if ($id and $delete) { if (!$confirm) { $PAGE->set_title(get_string('deleteselectedgroup', 'group')); - $PAGE->set_heading(get_string('deleteselectedgroup', 'group')); + $PAGE->set_heading($course->fullname . ': '. get_string('deleteselectedgroup', 'group')); echo $OUTPUT->header(); $optionsyes = array('id'=>$id, 'delete'=>1, 'courseid'=>$courseid, 'sesskey'=>sesskey(), 'confirm'=>1); $optionsno = array('id'=>$courseid); @@ -124,7 +124,7 @@ $PAGE->navbar->add($strheading); /// Print header $PAGE->set_title($strgroups); -$PAGE->set_heading(': '.$strgroups); +$PAGE->set_heading($course->fullname . ': '.$strgroups); echo $OUTPUT->header(); echo '
'; if ($id) { diff --git a/group/grouping.php b/group/grouping.php index 51c7e59c231..131428f97a1 100644 --- a/group/grouping.php +++ b/group/grouping.php @@ -58,7 +58,7 @@ $returnurl = $CFG->wwwroot.'/group/groupings.php?id='.$course->id; if ($id and $delete) { if (!$confirm) { $PAGE->set_title(get_string('deletegrouping', 'group')); - $PAGE->set_heading(get_string('deletegrouping', 'group')); + $PAGE->set_heading($course->fullname. ': '. get_string('deletegrouping', 'group')); echo $OUTPUT->header(); $optionsyes = array('id'=>$id, 'delete'=>1, 'courseid'=>$courseid, 'sesskey'=>sesskey(), 'confirm'=>1); $optionsno = array('id'=>$courseid); @@ -120,7 +120,7 @@ $PAGE->navbar->add($strheading); /// Print header $PAGE->set_title($strgroupings); -$PAGE->set_heading(': '.$strgroupings); +$PAGE->set_heading($course->fullname. ': '.$strgroupings); echo $OUTPUT->header(); echo $OUTPUT->heading($strheading); $editform->display();