mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
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:
parent
64c3e85374
commit
90fcc576ea
49 changed files with 1530 additions and 1709 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue