Removed notices by introducing new function print_header_simple() which works on site as well as in courses without extra logic.

This commit is contained in:
gustav_delius 2004-08-21 20:20:58 +00:00
parent 64c3e85374
commit 90fcc576ea
49 changed files with 1530 additions and 1709 deletions

View file

@ -1153,6 +1153,26 @@ function print_header ($title="", $heading="", $navigation="", $focus="", $meta=
include ("$CFG->dirroot/theme/$CFG->theme/header.html");
}
function print_header_simple($title="", $heading="", $navigation="", $focus="", $meta="",
$cache=true, $button=" ", $menu="", $usexml=false, $bodytags="") {
/// This version of print_header is simpler because the course name does not have to be
/// provided explicitly in the strings. It can be used on the site page as in courses
/// Eventually all print_header could be replaced by print_header_simple
global $course; // The same hack is used in print_header
$shortname ='';
if ($course->category) {
$shortname = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
}
print_header("$course->shortname: $title", "$course->fullname $heading", "$shortname $navigation", $focus, $meta,
$cache, $button, $menu, $usexml, $bodytags);
}
function print_footer ($course=NULL, $usercourse=NULL) {
// Can provide a course object to make the footer contain a link to
// to the course home page, otherwise the link will go to the site home

View file

@ -12,10 +12,6 @@
require_login($course->id);
add_to_log($course->id, "assignment", "view all", "index.php?id=$course->id", "");
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strassignments = get_string("modulenameplural", "assignment");
$strassignment = get_string("modulename", "assignment");
$strweek = get_string("week");
@ -25,7 +21,7 @@
$strsubmitted = get_string("submitted", "assignment");
print_header("$course->shortname: $strassignments", "$course->fullname", "$navigation $strassignments", "", "", true, "", navmenu($course));
print_header_simple($strassignments, "", $strassignments, "", "", true, "", navmenu($course));
if (! $assignments = get_all_instances_in_course("assignment", $course)) {
notice("There are no assignments", "../../course/view.php?id=$course->id");

View file

@ -27,17 +27,13 @@
error("Only teachers can look at this page");
}
if ($course->category) {
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
}
$strassignments = get_string("modulenameplural", "assignment");
$strassignment = get_string("modulename", "assignment");
$strsubmissions = get_string("submissions", "assignment");
$strsaveallfeedback = get_string("saveallfeedback", "assignment");
print_header("$course->shortname: $assignment->name", "$course->fullname",
"$navigation <a href=\"index.php?id=$course->id\">$strassignments</a> ->
print_header_simple($assignment->name, "",
"<a href=\"index.php?id=$course->id\">$strassignments</a> ->
<a href=\"view.php?a=$assignment->id\">$assignment->name</a> -> $strsubmissions",
"", "", true, update_module_button($cm->id, $course->id, $strassignment), navmenu($course, $cm));

View file

@ -25,15 +25,12 @@
add_to_log($course->id, "assignment", "upload", "view.php?a=$assignment->id", "$assignment->id", $cm->id);
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strassignments = get_string("modulenameplural", "assignment");
$strassignment = get_string("modulename", "assignment");
$strupload = get_string("upload");
print_header("$course->shortname: $assignment->name : $strupload", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strassignments</A> ->
print_header_simple("$assignment->name : $strupload", "",
"<A HREF=index.php?id=$course->id>$strassignments</A> ->
<A HREF=\"view.php?a=$assignment->id\">$assignment->name</A> -> $strupload",
"", "", true);

View file

@ -35,15 +35,11 @@
add_to_log($course->id, "assignment", "view", "view.php?id=$cm->id", $assignment->id, $cm->id);
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strassignments = get_string("modulenameplural", "assignment");
$strassignment = get_string("modulename", "assignment");
print_header("$course->shortname: $assignment->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strassignments</A> -> $assignment->name",
print_header_simple($assignment->name, "",
"<A HREF=index.php?id=$course->id>$strassignments</A> -> $assignment->name",
"", "", true, update_module_button($cm->id, $course->id, $strassignment), navmenu($course, $cm));
if (isteacher($course->id)) {

View file

@ -26,11 +26,7 @@
/// Print the header
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
print_header("$course->shortname: $strattendance", "$course->fullname", "$navigation $strattendances", "", "", true, "", navmenu($course));
print_header_simple($strattendance, "", "$strattendances", "", "", true, "", navmenu($course));
/// Get all the appropriate data

View file

@ -34,16 +34,12 @@
/// Print the page header
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strattendances = get_string("modulenameplural", "attendance");
$strattendance = get_string("modulename", "attendance");
$strteacheredit = get_string("teacheredit", "attendance");
print_header("$course->shortname: $attendance->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strattendances</A> -> $attendance->name",
print_header_simple($attendance->name, "",
"<A HREF=index.php?id=$course->id>$strattendances</A> -> $attendance->name",
"", "", true, update_module_button($cm->id, $course->id, $strattendance),
navmenu($course, $cm));

View file

@ -474,15 +474,12 @@ function attendance_print_header() {
global $course, $cm;
/// Print the page header
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strattendances = get_string("modulenameplural", "attendance");
$strattendance = get_string("modulename", "attendance");
$strallattendance = get_string("allmodulename", "attendance");
print_header("$course->shortname: $strallattendance", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strattendances</A> -> $strallattendance",
print_header_simple("$strallattendance", "",
"<A HREF=index.php?id=$course->id>$strattendances</A> -> $strallattendance",
"", "", true, "&nbsp;",
navmenu($course, $cm));
}

View file

@ -516,15 +516,12 @@ function attendance_print_header() {
/// Print the page header
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strattendances = get_string("modulenameplural", "attendance");
$strattendance = get_string("modulename", "attendance");
$strweekattendance = get_string("weekmodulename", "attendance");
print_header("$course->shortname: $strallattendance", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strattendances</A> -> $strweekattendance",
print_header_simple("$strallattendance", "",
"<A HREF=index.php?id=$course->id>$strattendances</A> -> $strweekattendance",
"", "", true, "&nbsp;",
navmenu($course, $cm));
}

View file

@ -22,11 +22,7 @@
/// Print the header
if ($course->category) {
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
}
print_header("$course->shortname: $strchats", "$course->fullname", "$navigation $strchats", "", "", true, "", navmenu($course));
print_header_simple($strchats, "", $strchats, "", "", true, "", navmenu($course));
/// Get all the appropriate data

View file

@ -33,12 +33,6 @@
add_to_log($course->id, "chat", "report", "report.php?id=$cm->id", "$chat->id", "$cm->id");
/// Print the page header
if ($course->category) {
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
}
$strchats = get_string("modulenameplural", "chat");
$strchat = get_string("modulename", "chat");
$strchatreport = get_string("chatreport", "chat");
@ -58,8 +52,8 @@
$groupparam = "";
}
print_header("$course->shortname: $chat->name: $strchatreport", "$course->fullname",
"$navigation <a href=\"index.php?id=$course->id\">$strchats</a> ->
print_header_simple("$chat->name: $strchatreport", "",
"<a href=\"index.php?id=$course->id\">$strchats</a> ->
<a href=\"view.php?id=$cm->id\">$chat->name</a> ->
<a href=\"report.php?id=$cm->id\">$strchatreport</a>",
"", "", true, "", navmenu($course, $cm));
@ -97,8 +91,8 @@
/// Print the Sessions display
print_header("$course->shortname: $chat->name: $strchatreport", "$course->fullname",
"$navigation <a href=\"index.php?id=$course->id\">$strchats</a> ->
print_header_simple("$chat->name: $strchatreport", "",
"<a href=\"index.php?id=$course->id\">$strchats</a> ->
<a href=\"view.php?id=$cm->id\">$chat->name</a> -> $strchatreport",
"", "", true, "", navmenu($course, $cm));

View file

@ -43,10 +43,6 @@
/// Print the page header
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strchats = get_string("modulenameplural", "chat");
$strchat = get_string("modulename", "chat");
$strenterchat = get_string("enterchat", "chat");
@ -54,8 +50,8 @@
$strcurrentusers = get_string("currentusers", "chat");
$strnextsession = get_string("nextsession", "chat");
print_header("$course->shortname: $chat->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strchats</A> -> $chat->name",
print_header_simple("$chat->name", "",
"<A HREF=index.php?id=$course->id>$strchats</A> -> $chat->name",
"", "", true, update_module_button($cm->id, $course->id, $strchat),
navmenu($course, $cm));

View file

@ -13,17 +13,11 @@
add_to_log($course->id, "choice", "view all", "index?id=$course->id", "");
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
} else {
$navigation = "";
}
$strchoice = get_string("modulename", "choice");
$strchoices = get_string("modulenameplural", "choice");
print_header("$course->shortname: $strchoices", "$course->fullname",
"$navigation $strchoices", "", "", true, "", navmenu($course));
print_header_simple("$strchoices", "",
"$strchoices", "", "", true, "", navmenu($course));
if (! $choices = get_all_instances_in_course("choice", $course)) {

View file

@ -61,13 +61,8 @@
add_to_log($course->id, "choice", "view", "view.php?id=$cm->id", $choice->id, $cm->id);
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
} else {
$navigation = "";
}
print_header("$course->shortname: $choice->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strchoices</A> -> $choice->name", "", "", true,
print_header_simple("$choice->name", "",
"<A HREF=index.php?id=$course->id>$strchoices</A> -> $choice->name", "", "", true,
update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm));
/// Check to see if groups are being used in this choice

View file

@ -37,17 +37,12 @@
// set up some general variables
$usehtmleditor = can_use_html_editor();
$navigation = "";
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strdialogues = get_string("modulenameplural", "dialogue");
$strdialogue = get_string("modulename", "dialogue");
// ... print the header and...
print_header("$course->shortname: $dialogue->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strdialogues</A> ->
print_header_simple("$dialogue->name", "",
"<A HREF=index.php?id=$course->id>$strdialogues</A> ->
<A HREF=\"view.php?id=$cm->id\">$dialogue->name</A>",
"", "", true);

View file

@ -13,17 +13,13 @@
require_login($course->id);
add_to_log($course->id, "dialogue", "view all", "index.php?id=$course->id", "");
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strdialogue = get_string("modulename", "dialogue");
$strdialogues = get_string("modulenameplural", "dialogue");
$strname = get_string("name");
$stropendialogues = get_string("open", "dialogue")." ".$strdialogues;
$strcloseddialogues = get_string("closed", "dialogue")." ".$strdialogues;
print_header("$course->shortname: $strdialogues", "$course->fullname", "$navigation $strdialogues",
print_header_simple("$strdialogues", "", "$strdialogues",
"", "", true, "", navmenu($course));

View file

@ -29,15 +29,11 @@
// set up some general variables
$usehtmleditor = can_use_html_editor();
if ($course->category) {
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
}
$strdialogue = get_string("modulename", "dialogue");
$strdialogues = get_string("modulenameplural", "dialogue");
print_header("$course->shortname: $dialogue->name", "$course->fullname",
"$navigation <a href=\"index.php?id=$course->id\">$strdialogues</a> -> $dialogue->name",
print_header_simple("$dialogue->name", "",
"<a href=\"index.php?id=$course->id\">$strdialogues</a> -> $dialogue->name",
"", "", true,
update_module_button($cm->id, $course->id, $strdialogue), navmenu($course, $cm));

View file

@ -51,18 +51,13 @@
require_login($course->id);
$navigation = "";
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strexercises = get_string("modulenameplural", "exercise");
$strexercise = get_string("modulename", "exercise");
$strassessments = get_string("assessments", "exercise");
// ... print the header and...
print_header("$course->shortname: $exercise->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strexercises</A> ->
print_header_simple("$exercise->name", "",
"<A HREF=index.php?id=$course->id>$strexercises</A> ->
<A HREF=\"view.php?id=$cm->id\">$exercise->name</A> -> $strassessments",
"", "", true);

View file

@ -13,10 +13,6 @@
require_login($course->id);
add_to_log($course->id, "exercise", "view all", "index.php?id=$course->id", "");
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strexercises = get_string("modulenameplural", "exercise");
$strexercise = get_string("modulename", "exercise");
$strweek = get_string("week");
@ -28,7 +24,7 @@
$strdeadline = get_string("deadline", "exercise");
$strsubmitted = get_string("submitted", "assignment");
print_header("$course->shortname: $strexercises", "$course->fullname", "$navigation $strexercises", "", "", true, "", navmenu($course));
print_header_simple("$strexercises", "", "$strexercises", "", "", true, "", navmenu($course));
if (! $exercises = get_all_instances_in_course("exercise", $course)) {
notice("There are no exercises", "../../course/view.php?id=$course->id");

View file

@ -41,17 +41,13 @@
require_login($course->id);
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strexercises = get_string("modulenameplural", "exercise");
$strexercise = get_string("modulename", "exercise");
$strsubmissions = get_string("submissions", "exercise");
// ... print the header and...
print_header("$course->shortname: $exercise->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strexercises</A> ->
print_header_simple("$exercise->name", "",
"$<A HREF=index.php?id=$course->id>$strexercises</A> ->
<A HREF=\"view.php?id=$cm->id\">$exercise->name</A> -> $strsubmissions",
"", "", true);

View file

@ -24,15 +24,12 @@
require_login($course->id);
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strexercises = get_string("modulenameplural", "exercise");
$strexercise = get_string("modulename", "exercise");
$strupload = get_string("upload");
print_header("$course->shortname: $exercise->name : $strupload", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strexercises</A> ->
print_header_simple("$exercise->name : $strupload", "",
"<A HREF=index.php?id=$course->id>$strexercises</A> ->
<A HREF=\"view.php?id=$cm->id\">$exercise->name</A> -> $strupload",
"", "", true);

View file

@ -39,16 +39,12 @@
// ...log activity...
add_to_log($course->id, "exercise", "view", "view.php?id=$cm->id", $exercise->id, $cm->id);
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strexercises = get_string("modulenameplural", "exercise");
$strexercise = get_string("modulename", "exercise");
// ...display header...
print_header("$course->shortname: $exercise->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strexercises</A> -> $exercise->name",
print_header_simple("$exercise->name", "",
"<A HREF=index.php?id=$course->id>$strexercises</A> -> $exercise->name",
"", "", true, update_module_button($cm->id, $course->id, $strexercise), navmenu($course, $cm));
// ...and if necessary set default action

View file

@ -43,16 +43,10 @@
$strsubscribers = get_string("subscribers", "forum");
$strforums = get_string("forums", "forum");
if ($course->category) {
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->
<a href=\"index.php?id=$course->id\">$strforums</a> ->
<a href=\"view.php?f=$forum->id\">$forum->name</a> -> $strsubscribers";
} else {
$navigation = "<a href=\"index.php?id=$course->id\">$strforums</a> ->
<a href=\"view.php?f=$forum->id\">$forum->name</a> -> $strsubscribers";
}
print_header("$course->shortname: $strsubscribers", "$course->fullname", "$navigation",
print_header_simple("$strsubscribers", "", "$navigation",
"", "", true, forum_update_subscriptions_button($course->id, $id));
/// Check to see if groups are being used in this forum

View file

@ -60,11 +60,8 @@
if ($course->category) {
require_login($course->id);
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->
<a href=\"index.php?id=$course->id\">$strforums</a> ->";
} else {
$navigation = "<a href=\"index.php?id=$course->id\">$strforums</a> ->";
}
$navigation = "<a href=\"index.php?id=$course->id\">$strforums</a> ->";
if ($forum->type == "teacher") {
if (!isteacher($course->id)) {
@ -78,7 +75,7 @@
add_to_log($course->id, "forum", "view forum", "view.php?f=$forum->id", "$forum->id");
}
print_header("$course->shortname: $forum->name", "$course->fullname",
print_header_simple("$forum->name", "",
"$navigation $forum->name", "", "", true, $buttontext, navmenu($course, $cm));
if (!$cm->visible and !isteacher($course->id)) {

View file

@ -46,11 +46,6 @@
}
add_to_log($course->id, "glossary", "view", "view.php?id=$cm->id", "$glossary->id",$cm->id);
/// Printing the page header
if ($course->category) {
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
}
switch ( $action ){
case "add":
$straction = get_string("addingcomment","glossary");
@ -66,8 +61,8 @@
$strglossary = get_string("modulename", "glossary");
$strcomments = get_string("comments", "glossary");
print_header(strip_tags("$course->shortname: $glossary->name"), "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strglossaries</A> -> <A HREF=view.php?id=$cm->id>$glossary->name</a> -> <A HREF=comments.php?id=$cm->id&eid=$entry->id>$strcomments</a> -> " . $straction,
print_header_simple(strip_tags("$glossary->name"), "",
"<A HREF=index.php?id=$course->id>$strglossaries</A> -> <A HREF=view.php?id=$cm->id>$glossary->name</a> -> <A HREF=comments.php?id=$cm->id&eid=$entry->id>$strcomments</a> -> " . $straction,
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
navmenu($course, $cm));

View file

@ -33,12 +33,6 @@
add_to_log($course->id, "glossary", "view", "view.php?id=$cm->id", "$glossary->id",$cm->id);
/// Printing the page header
if ($course->category) {
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
}
$strglossaries = get_string("modulenameplural", "glossary");
$strglossary = get_string("modulename", "glossary");
$strallcategories = get_string("allcategories", "glossary");
@ -50,8 +44,8 @@
$strcomments = get_string("comments", "glossary");
$straddcomment = get_string("addcomment", "glossary");
print_header(strip_tags("$course->shortname: $strcomments: $entry->concept"), "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strglossaries</A> -> <A HREF=view.php?id=$cm->id>$glossary->name</a> -> $strcomments",
print_header_simple(strip_tags("$strcomments: $entry->concept"), "",
"<A HREF=index.php?id=$course->id>$strglossaries</A> -> <A HREF=view.php?id=$cm->id>$glossary->name</a> -> $strcomments",
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
navmenu($course, $cm));

View file

@ -40,12 +40,8 @@
$entryfields = get_record("glossary_entries", "id", $entry);
$strareyousuredelete = get_string("areyousuredelete","glossary");
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
print_header("$course->shortname: $glossary->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strglossaries</A> -> $glossary->name",
print_header_simple("$glossary->name", "",
"<A HREF=index.php?id=$course->id>$strglossaries</A> -> $glossary->name",
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
navmenu($course, $cm));

View file

@ -36,15 +36,11 @@
// add_to_log($course->id, "glossary", "edit categories", "view.php?id=$cm->id", "$glossary->id", $cm->id);
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strglossaries = get_string("modulenameplural", "glossary");
$strglossary = get_string("modulename", "glossary");
print_header(strip_tags("$course->shortname: $glossary->name"), "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strglossaries</A> -> <A HREF=view.php?id=$cm->id&tab=GLOSSARY_CATEGORY_VIEW>$glossary->name</a> -> " . get_string("categories","glossary"),
print_header_simple(strip_tags("$glossary->name"), "",
"<A HREF=index.php?id=$course->id>$strglossaries</A> -> <A HREF=view.php?id=$cm->id&tab=GLOSSARY_CATEGORY_VIEW>$glossary->name</a> -> " . get_string("categories","glossary"),
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
navmenu($course, $cm));

View file

@ -39,12 +39,8 @@
$entryalreadyexist = get_string("entryalreadyexist","glossary");
$entryexported = get_string("entryexported","glossary");
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
print_header("$course->shortname: $glossary->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strglossaries</A> -> $glossary->name",
print_header_simple("$glossary->name", "",
"<A HREF=index.php?id=$course->id>$strglossaries</A> -> $glossary->name",
"", "", true, "",
navmenu($course, $cm));

View file

@ -32,10 +32,6 @@
error("You must be a teacher to use this page.");
}
if ($course->category) {
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
}
if ($dest != 'new' and $dest != 'current') {
$dest = 'current';
}
@ -48,8 +44,8 @@
$strsearchindefinition = get_string("searchindefinition", "glossary");
$strsearch = get_string("search");
print_header(strip_tags("$course->shortname: $glossary->name"), "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strglossaries</A> -> $glossary->name",
print_header_simple(strip_tags("$glossary->name"), "",
"<A HREF=index.php?id=$course->id>$strglossaries</A> -> $glossary->name",
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
navmenu($course, $cm));

View file

@ -27,11 +27,7 @@
/// Print the header
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
print_header("$course->shortname: $strglossarys", "$course->fullname", "$navigation $strglossarys", "", "", true, "", navmenu($course));
print_header_simple("$strglossarys", "", "$strglossarys", "", "", true, "", navmenu($course));
/// Get all the appropriate data

View file

@ -12,16 +12,12 @@
require_login($course->id);
add_to_log($course->id, "journal", "view all", "index.php?id=$course->id", "");
if ($course->category) {
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
}
$strjournal = get_string("modulename", "journal");
$strjournals = get_string("modulenameplural", "journal");
$strweek = get_string("week");
$strtopic = get_string("topic");
print_header("$course->shortname: $strjournals", "$course->fullname", "$navigation $strjournals",
print_header_simple("$strjournals", "", "$strjournals",
"", "", true, "", navmenu($course));

View file

@ -25,15 +25,11 @@
error("Course module is incorrect");
}
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strjournal = get_string("modulename", "journal");
$strjournals = get_string("modulenameplural", "journal");
print_header("$course->shortname: $journal->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strjournals</A> -> $journal->name", "", "", true,
print_header_simple("$journal->name", "",
"<A HREF=index.php?id=$course->id>$strjournals</A> -> $journal->name", "", "", true,
update_module_button($cm->id, $course->id, $strjournal), navmenu($course, $cm));
if (isteacher($course->id)) {

View file

@ -24,11 +24,7 @@
/// Print the header
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
print_header("$course->shortname: $strlessons", "$course->fullname", "$navigation $strlessons", "", "", true, "", navmenu($course));
print_header_simple("$strlessons", "", "$strlessons", "", "", true, "", navmenu($course));
/// Get all the appropriate data

View file

@ -26,15 +26,11 @@
/// Print the page header
if ($course->category) {
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
}
$strlessons = get_string("modulenameplural", "lesson");
$strlesson = get_string("modulename", "lesson");
print_header("$course->shortname: $lesson->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strlessons</A> -> <a href=\"view.php?id=$cm->id\">$lesson->name</a>",
print_header_simple("$lesson->name", "",
"<A HREF=index.php?id=$course->id>$strlessons</A> -> <a href=\"view.php?id=$cm->id\">$lesson->name</a>",
"", "", true, update_module_button($cm->id, $course->id, $strlesson),
navmenu($course, $cm));

View file

@ -54,15 +54,11 @@
// Print the page header
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strquizzes = get_string("modulenameplural", "quiz");
$strquiz = get_string("modulename", "quiz");
print_header("$course->shortname: $quiz->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strquizzes</A> ->
print_header_simple("$quiz->name", "",
"<A HREF=index.php?id=$course->id>$strquizzes</A> ->
<A HREF=\"view.php?id=$cm->id\">$quiz->name</A> -> $strattemptnum",
"", "", true);

View file

@ -30,11 +30,7 @@
: "";
$strquiz = get_string("modulename", "quiz");
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
print_header("$course->shortname: $strquizzes", "$course->fullname", "$navigation $strquizzes",
print_header_simple("$strquizzes", "", "$strquizzes",
"", "", true, $streditquestions, navmenu($course));
// Get all the appropriate data

View file

@ -46,16 +46,12 @@
/// Print the page header
if (empty($noheader)) {
if ($course->category) {
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
}
$strquizzes = get_string("modulenameplural", "quiz");
$strquiz = get_string("modulename", "quiz");
$strreport = get_string("report", "quiz");
print_header("$course->shortname: $quiz->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strquizzes</A>
print_header_simple("$quiz->name", "",
"<A HREF=index.php?id=$course->id>$strquizzes</A>
-> <a href=\"view.php?id=$cm->id\">$quiz->name</a> -> $strreport",
"", "", true, update_module_button($cm->id, $course->id, $strquiz), navmenu($course, $cm));

View file

@ -59,10 +59,6 @@
// Print the page header
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strquizzes = get_string("modulenameplural", "quiz");
$strquiz = get_string("modulename", "quiz");
$strreport = get_string("report", "quiz");
@ -76,8 +72,8 @@
$strtimecompleted = get_string("timecompleted", "quiz");
$stroverdue = get_string("overdue", "quiz");
print_header("$course->shortname: $quiz->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strquizzes</A>
print_header_simple("$quiz->name", "",
"<A HREF=index.php?id=$course->id>$strquizzes</A>
-> <a href=\"view.php?id=$cm->id\">$quiz->name</a> -> $strreview",
"", "", true);

View file

@ -42,15 +42,11 @@
// Print the page header
if ($course->category) {
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
}
$strquizzes = get_string("modulenameplural", "quiz");
$strquiz = get_string("modulename", "quiz");
print_header("$course->shortname: $quiz->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strquizzes</A> -> $quiz->name",
print_header_simple("$quiz->name", "",
"<A HREF=index.php?id=$course->id>$strquizzes</A> -> $quiz->name",
"", "", true, update_module_button($cm->id, $course->id, $strquiz), navmenu($course, $cm));
if (isteacher($course->id)) {

View file

@ -13,10 +13,6 @@
add_to_log($course->id, "survey", "view all", "index.php?id=$course->id", "");
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strsurveys = get_string("modulenameplural", "survey");
$strweek = get_string("week");
$strtopic = get_string("topic");
@ -25,7 +21,7 @@
$strdone = get_string("done", "survey");
$strnotdone = get_string("notdone", "survey");
print_header("$course->shortname: $strsurveys", "$course->fullname", "$navigation $strsurveys",
print_header_simple("$strsurveys", "", "$strsurveys",
"", "", true, "", navmenu($course));
if (! $surveys = get_all_instances_in_course("survey", $course)) {

View file

@ -25,15 +25,11 @@
$showscales = ($template->name != 'ciqname');
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strsurveys = get_string("modulenameplural", "survey");
$strsurvey = get_string("modulename", "survey");
print_header("$course->shortname: $survey->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strsurveys</A> -> $survey->name", "", "", true,
print_header_simple("$survey->name", "",
"<A HREF=index.php?id=$course->id>$strsurveys</A> -> $survey->name", "", "", true,
update_module_button($cm->id, $course->id, $strsurvey), navmenu($course, $cm));
/// Check to see if groups are being used in this survey

View file

@ -91,12 +91,6 @@
# The mighty Wiki itself
include_once($CFG->dirroot."/mod/wiki/ewiki/ewiki.php");
/// Print the page header
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strwikis = get_string("modulenameplural", "wiki");
$strwiki = get_string("modulename", "wiki");
@ -121,8 +115,8 @@
}
}
print_header("$course->shortname: $wiki_entry->pagename", "$course->fullname",
"$navigation <A HREF=\"index.php?id=$course->id\">$strwikis</A> -> <A HREF=\"view.php?id=$id\">$wiki->name</a> ->".
print_header_simple("$wiki_entry->pagename", "",
"<A HREF=\"index.php?id=$course->id\">$strwikis</A> -> <A HREF=\"view.php?id=$id\">$wiki->name</a> ->".
get_string("administration","wiki"),
$focus, "", true, update_module_button($cm->id, $course->id, $strwiki),
navmenu($course, $cm));

View file

@ -25,11 +25,7 @@
/// Print the header
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
print_header("$course->shortname: $strwikis", "$course->fullname", "$navigation $strwikis", "", "", true, "", navmenu($course));
print_header_simple("$strwikis", "", "$strwikis", "", "", true, "", navmenu($course));
/// Get all the appropriate data

View file

@ -215,15 +215,12 @@
/// Print the page header
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strwikis = get_string("modulenameplural", "wiki");
$strwiki = get_string("modulename", "wiki");
print_header("$course->shortname: ".($ewiki_title?$ewiki_title:$wiki->name), "$course->fullname",
"$navigation <A HREF=\"index.php?id=$course->id\">$strwikis</A> -> <A HREF=\"view.php?id=$moodleID\">$wiki->name</a>".($ewiki_title?" -> $ewiki_title":""),
print_header_simple(($ewiki_title?$ewiki_title:$wiki->name), "",
"<A HREF=\"index.php?id=$course->id\">$strwikis</A> -> <A HREF=\"view.php?id=$moodleID\">$wiki->name</a>".($ewiki_title?" -> $ewiki_title":""),
"", "", true, update_module_button($cm->id, $course->id, $strwiki),
navmenu($course, $cm));

View file

@ -13,10 +13,6 @@
require_login($course->id);
add_to_log($course->id, "workshop", "view all", "index.php?id=$course->id", "");
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strworkshops = get_string("modulenameplural", "workshop");
$strworkshop = get_string("modulename", "workshop");
$strweek = get_string("week");
@ -26,7 +22,7 @@
$strdeadline = get_string("deadline", "workshop");
$strsubmitted = get_string("submitted", "assignment");
print_header("$course->shortname: $strworkshops", "$course->fullname", "$navigation $strworkshops", "", "", true, "", navmenu($course));
print_header_simple("$strworkshops", "", "$strworkshops", "", "", true, "", navmenu($course));
if (! $workshops = get_all_instances_in_course("workshop", $course)) {
notice("There are no workshops", "../../course/view.php?id=$course->id");

View file

@ -55,17 +55,13 @@
require_login($course->id);
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strworkshops = get_string("modulenameplural", "workshop");
$strworkshop = get_string("modulename", "workshop");
$strsubmissions = get_string("submissions", "workshop");
// ... print the header and...
print_header("$course->shortname: $workshop->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strworkshops</A> ->
print_header_simple("$workshop->name", "",
"<A HREF=index.php?id=$course->id>$strworkshops</A> ->
<A HREF=\"view.php?a=$workshop->id\">$workshop->name</A> -> $strsubmissions",
"", "", true);

View file

@ -22,15 +22,12 @@
require_login($course->id);
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strworkshops = get_string("modulenameplural", "workshop");
$strworkshop = get_string("modulename", "workshop");
$strupload = get_string("upload");
print_header("$course->shortname: $workshop->name : $strupload", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strworkshops</A> ->
print_header_simple("$workshop->name : $strupload", "",
"<A HREF=index.php?id=$course->id>$strworkshops</A> ->
<A HREF=\"view.php?a=$workshop->id\">$workshop->name</A> -> $strupload",
"", "", true);
/****

View file

@ -54,16 +54,12 @@
// ...log activity...
add_to_log($course->id, "workshop", "view", "view.php?id=$cm->id", $workshop->id, $cm->id);
if ($course->category) {
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
}
$strworkshops = get_string("modulenameplural", "workshop");
$strworkshop = get_string("modulename", "workshop");
// ...display header...
print_header("$course->shortname: $workshop->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strworkshops</A> -> $workshop->name",
print_header_simple("$workshop->name", "",
"<A HREF=index.php?id=$course->id>$strworkshops</A> -> $workshop->name",
"", "", true, update_module_button($cm->id, $course->id, $strworkshop), navmenu($course, $cm));
// ...and if necessary set default action