Permalink
Browse files

MDL-20447 - bulk upload: add heading to the page and fix navbar content.

  • Loading branch information...
1 parent cde82a4 commit 2e4fd16675f33b6b74f3930993896a2445a6839a Rossiani Wijaya committed May 28, 2010
View
2 mod/glossary/deleteentry.php
@@ -109,7 +109,9 @@
redirect("view.php?id=$cm->id&mode=$prevmode&hook=$hook");
} else { // the operation has not been confirmed yet so ask the user to do so
+ $PAGE->navbar->add(get_string('delete'));
$PAGE->set_title(format_string($glossary->name));
+ $PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
$areyousure = "<b>".format_string($entry->concept)."</b><p>$strareyousuredelete</p>";
$linkyes = 'deleteentry.php';
View
6 mod/glossary/edit.php
@@ -170,10 +170,12 @@
redirect("view.php?id=$cm->id&amp;mode=entry&amp;hook=$entry->id");
}
-$stredit = empty($entry->id) ? get_string('addentry', 'glossary') : get_string('edit');
+if (!empty($id)) {
+ $PAGE->navbar->add(get_string('edit'));
+}
-$PAGE->navbar->add($stredit);
$PAGE->set_title(format_string($glossary->name));
+$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
echo $OUTPUT->heading(format_string($glossary->name));
View
6 mod/glossary/editcategories.php
@@ -70,9 +70,13 @@
$strglossary = get_string("modulename", "glossary");
$PAGE->navbar->add($strglossaries, new moodle_url('/mod/glossary/index.php', array('id'=>$course->id)));
-$PAGE->navbar->add(format_string($glossary->name), new moodle_url('/mod/glossary/view.php', array('id'=>$cm->id,'tab'=>'GLOSSARY_CATEGORY_VIEW')));
$PAGE->navbar->add(get_string("categories","glossary"));
+if (!empty($action)) {
+ $navaction = get_string($action). " " . moodle_strtolower(get_string("category","glossary"));
+ $PAGE->navbar->add($navaction);
+}
$PAGE->set_title(format_string($glossary->name));
+$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
if ( $hook >0 ) {
View
1 mod/glossary/export.php
@@ -52,6 +52,7 @@
$PAGE->set_url('/mod/glossary/export.php', array('id'=>$cm->id));
$PAGE->navbar->add($strexportentries);
$PAGE->set_title(format_string($glossary->name));
+$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
echo $OUTPUT->heading($strexportentries);
View
2 mod/glossary/exportentry.php
@@ -71,6 +71,7 @@
if (!$mainglossary->allowduplicatedentries) {
if ($DB->get_record('glossary_entries', array('glossaryid'=>$mainglossary->id, 'lower(concept)'=>moodle_strtolower($entry->concept)))) {
$PAGE->set_title(format_string($glossary->name));
+ $PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
echo $OUTPUT->notification(get_string('errconceptalreadyexists', 'glossary'));
echo $OUTPUT->continue_button($returnurl);
@@ -82,6 +83,7 @@
if (!data_submitted() or !$confirm or !confirm_sesskey()) {
$PAGE->set_title(format_string($glossary->name));
+ $PAGE->set_heading(format_string($course->fullname));
echo $OUTPUT->header();
echo '<div class="boxaligncenter">';
$areyousure = '<h2>'.format_string($entry->concept).'</h2><p align="center">'.get_string('areyousureexport','glossary').'<br /><b>'.format_string($mainglossary->name).'</b>?';
View
1 mod/glossary/import.php
@@ -68,6 +68,7 @@
$PAGE->set_url('/mod/glossary/import.php', array('id'=>$cm->id, 'mode'=>$mode, 'hook'=>$hook));
$PAGE->navbar->add($strimportentries);
$PAGE->set_title(format_string($glossary->name));
+$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
echo $OUTPUT->heading($strimportentries);
View
1 mod/glossary/index.php
@@ -33,6 +33,7 @@
/// Print the header
$PAGE->navbar->add($strglossarys, "index.php?id=$course->id");
$PAGE->set_title($strglossarys);
+$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
/// Get all the appropriate data
View
2 mod/glossary/print.php
@@ -54,6 +54,8 @@
require_course_login($course, true, $cm);
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
+$PAGE->set_title(get_string("modulenameplural", "glossary"));
+$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
/// Loading the textlib singleton instance. We are going to need it.
View
1 mod/glossary/view.php
@@ -231,6 +231,7 @@
/// If we are in approval mode, prit special header
$PAGE->set_title(format_string($glossary->name));
+$PAGE->set_heading($course->fullname);
$url = new moodle_url('/mod/glossary/view.php', array('id'=>$cm->id));
if (isset($mode)) {
$url->param('mode', $mode);

0 comments on commit 2e4fd16

Please sign in to comment.