From ff62c6599082ccdf0192bfec87eff018b8303769 Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 2 May 2004 02:25:04 +0000 Subject: [PATCH] Some fixes to headers --- mod/glossary/showentry.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/mod/glossary/showentry.php b/mod/glossary/showentry.php index fc88c68665..c3fb6d1ab4 100644 --- a/mod/glossary/showentry.php +++ b/mod/glossary/showentry.php @@ -8,18 +8,23 @@ optional_variable($displayformat,-1); if (!empty($courseid)) { - $site = get_site(); - if ($courseid != $site->id) { + $course = get_record("course", "id", $courseid); + if ($course->category) { require_login($courseid); } - $course = get_record("course", "id", $courseid); $strglossaries = get_string("modulenameplural", "glossary"); $strsearch = get_string("search"); $CFG->framename = "newwindow"; - print_header(strip_tags("$course->shortname: $glossary->name"), "$course->fullname", - "wwwroot/course/view.php?id=$course->id\">$course->shortname -> $strglossaries -> $strsearch", "", "", true, " ", " "); + if ($course->category) { + print_header(strip_tags("$course->shortname: $glossary->name"), "$course->fullname", + "wwwroot/course/view.php?id=$course->id\">$course->shortname -> $strglossaries -> $strsearch", "", "", true, " ", " "); + } else { + print_header(strip_tags("$course->shortname: $glossary->name"), "$course->fullname", + "$strglossaries -> $strsearch", "", "", true, " ", " "); + } + } else { print_header(); // Needs to be something here to allow linking back to the whole glossary -- 2.39.5