diff --git a/mod/glossary/comment.php b/mod/glossary/comment.php index 98fadf09085..ecb7b131770 100644 --- a/mod/glossary/comment.php +++ b/mod/glossary/comment.php @@ -207,6 +207,7 @@ function glossary_comment_edit() { ////////////////////////////////// function glossary_comment_print_header($course, $cm, $glossary, $entry, $action) { + global $PAGE, $OUTPUT; switch ($action){ case 'add': $straction = get_string('addingcomment','glossary'); @@ -222,14 +223,12 @@ function glossary_comment_print_header($course, $cm, $glossary, $entry, $action) $strglossary = get_string('modulename', 'glossary'); $strcomments = get_string('comments', 'glossary'); - $navlinks = array(); - $navlinks[] = array('name' => $strcomments, 'link' => "comments.php?id=$cm->id&eid=$entry->id", 'type' => 'title'); - $navlinks[] = array('name' => $straction, 'link' => '', 'type' => 'action'); - $navigation = build_navigation($navlinks, $cm); - - print_header_simple(format_string($glossary->name), '', $navigation, - '', '', true, update_module_button($cm->id, $course->id, $strglossary), - navmenu($course, $cm)); + $PAGE->navbar->add($strcomments, new moodle_url($CFG->wwwroot.'/mod/glossary/comments.php', array('id'=>$cm->id,'eid'=>$entry->id))); + $PAGE->navbar->add($straction); + $PAGE->set_title(format_string($glossary->name)); + $PAGE->set_button(update_module_button($cm->id, $course->id, $strglossary)); + echo $OUTPUT->header(); + /// print original glossary entry for any comment action (add, update, delete) glossary_print_entry($course, $cm, $glossary, $entry, 'approval', '', false); } diff --git a/mod/glossary/comments.php b/mod/glossary/comments.php index 6bf4ed51efb..84bb3f1db92 100644 --- a/mod/glossary/comments.php +++ b/mod/glossary/comments.php @@ -40,10 +40,10 @@ $strcomments = get_string("comments", "glossary"); $straddcomment = get_string("addcomment", "glossary"); - $navigation = build_navigation($strcomments, $cm); - print_header_simple(strip_tags("$strcomments: $entry->concept"), "", $navigation, - "", "", true, update_module_button($cm->id, $course->id, $strglossary), - navmenu($course, $cm)); + $PAGE->navbar->add($strcomments); + $PAGE->set_title(strip_tags("$strcomments: $entry->concept")); + $PAGE->set_button(update_module_button($cm->id, $course->id, $strglossary)); + echo $OUTPUT->header(); /// original glossary entry diff --git a/mod/glossary/deleteentry.php b/mod/glossary/deleteentry.php index 6a61cd21fab..92435d3a228 100644 --- a/mod/glossary/deleteentry.php +++ b/mod/glossary/deleteentry.php @@ -38,8 +38,6 @@ $strareyousuredelete = get_string("areyousuredelete","glossary"); - $navigation = build_navigation('', $cm); - if (($entry->userid != $USER->id) and !$manageentries) { // guest id is never matched, no need for special check here print_error('nopermissiontodelentry'); } @@ -92,9 +90,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 - print_header_simple(format_string($glossary->name), "", $navigation, - "", "", true, update_module_button($cm->id, $course->id, $strglossary), - navmenu($course, $cm)); + $PAGE->set_title(format_string($glossary->name)); + $PAGE->set_button(update_module_button($cm->id, $course->id, $strglossary)); + echo $OUTPUT->header(); $areyousure = "".format_string($entry->concept)."
$strareyousuredelete
"; $linkyes = 'deleteentry.php'; $linkno = 'view.php'; diff --git a/mod/glossary/edit.php b/mod/glossary/edit.php index 70ff623de84..77f6df21e4f 100644 --- a/mod/glossary/edit.php +++ b/mod/glossary/edit.php @@ -165,10 +165,9 @@ if ($mform->is_cancelled()){ $stredit = empty($entry->id) ? get_string('addentry', 'glossary') : get_string('edit'); -$navigation = build_navigation($stredit, $cm); -print_header_simple(format_string($glossary->name), "", $navigation, "", - "", true, "", navmenu($course, $cm)); - +$PAGE->navbar->add($stredit); +$PAGE->set_title(format_string($glossary->name)); +echo $OUTPUT->header(); echo $OUTPUT->heading(format_string($glossary->name)); $mform->display(); diff --git a/mod/glossary/editcategories.php b/mod/glossary/editcategories.php index 4c63875c5db..166200d07ea 100644 --- a/mod/glossary/editcategories.php +++ b/mod/glossary/editcategories.php @@ -47,16 +47,12 @@ $strglossaries = get_string("modulenameplural", "glossary"); $strglossary = get_string("modulename", "glossary"); - $navlinks = array(); - $navlinks[] = array('name' => $strglossaries, 'link' => "index.php?id=$course->id", 'type' => 'activity'); - $navlinks[] = array('name' => format_string($glossary->name), 'link' => "view.php?id=$cm->id&tab=GLOSSARY_CATEGORY_VIEW", 'type' => 'activityinstance'); - $navlinks[] = array('name' => get_string("categories","glossary"), 'link' => '', 'type' => 'title'); - - $navigation = build_navigation($navlinks); - - print_header_simple(format_string($glossary->name), "", $navigation, - "", "", true, update_module_button($cm->id, $course->id, $strglossary), - navmenu($course, $cm)); + $PAGE->navbar->add($strglossaries, new moodle_url($CFG->wwwroot.'/mod/glossary/index.php', array('id'=>$course->id))); + $PAGE->navbar->add(format_string($glossary->name), new moodle_url($CFG->wwwroot.'/mod/glossary/view.php', array('id'=>$cm->id,'tab'=>'GLOSSARY_CATEGORY_VIEW'))); + $PAGE->navbar->add(get_string("categories","glossary")); + $PAGE->set_title(format_string($glossary->name)); + $PAGE->set_button(update_module_button($cm->id, $course->id, $strglossary)); + echo $OUTPUT->header(); if ( $hook >0 ) { diff --git a/mod/glossary/export.php b/mod/glossary/export.php index e39e7bbfd46..abf2d7a2561 100644 --- a/mod/glossary/export.php +++ b/mod/glossary/export.php @@ -37,13 +37,12 @@ $strexportfile = get_string("exportfile", "glossary"); $strexportentries = get_string('exportentriestoxml', 'glossary'); - $navigation = build_navigation($strexportentries, $cm); - print_header_simple(format_string($glossary->name), "",$navigation, - "", "", true, update_module_button($cm->id, $course->id, $strglossary), - navmenu($course, $cm)); + $PAGE->navbar->add($strexportentries); + $PAGE->set_title(format_string($glossary->name)); + $PAGE->set_button(update_module_button($cm->id, $course->id, $strglossary)); + echo $OUTPUT->header(); echo $OUTPUT->heading($strexportentries); - echo $OUTPUT->box_start('glossarydisplay generalbox'); ?>