require_once('config.php');
require_once($CFG->dirroot .'/course/lib.php');
require_once($CFG->dirroot .'/lib/blocklib.php');
-
+
if (!empty($THEME->customcorners)) {
require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
}
-
+
if (empty($SITE)) {
redirect($CFG->wwwroot .'/'. $CFG->admin .'/index.php');
}
}
- if (get_moodle_cookie() == '') {
+ if (get_moodle_cookie() == '') {
set_moodle_cookie('nobody'); // To help search for cookies on login page
}
$PAGE = page_create_object(PAGE_COURSE_VIEW, SITEID);
$pageblocks = blocks_setup($PAGE);
$editing = $PAGE->user_is_editing();
- $preferred_width_left = bounded_number(BLOCK_L_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]),
+ $preferred_width_left = bounded_number(BLOCK_L_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]),
BLOCK_L_MAX_WIDTH);
- $preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]),
+ $preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]),
BLOCK_R_MAX_WIDTH);
- print_header($SITE->fullname, $SITE->fullname, 'home', '',
+ $navigation = build_navigation(array(array('name' => get_string('home'), 'link'=> null, 'type' => 'misc')));
+ print_header($SITE->fullname, $SITE->fullname, $navigation, '',
'<meta name="description" content="'. s(strip_tags($SITE->summary)) .'" />',
true, '', user_login_string($SITE).$langmenu);
get_all_mods($SITE->id, $mods, $modnames, $modnamesplural, $modnamesused);
print_section($SITE, $section, $mods, $modnamesused, true);
-
+
if ($editing) {
print_section_add_menus($SITE, $section->section, $modnames);
}
return record_exists('user_admins', 'userid', $userid);
}
- $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
-
+ $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
+
return has_capability('moodle/legacy:admin', $context, $userid, false);
}
if ($courseid) {
$context = get_context_instance(CONTEXT_COURSE, $courseid);
} else {
- $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
+ $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
}
return (has_capability('moodle/legacy:teacher', $context, $userid, false)
/// Include admins if required
if ($includeadmin) {
- $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
+ $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
if (has_capability('moodle/legacy:admin', $context, $userid, false)) {
return true;
}
}
if (empty($courseid)) {
- $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
+ $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
} else {
$context = get_context_instance(CONTEXT_COURSE, $courseid);
}
return false;
}
- $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
+ $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
return (has_capability('moodle/legacy:coursecreator', $context, $userid, false)
or has_capability('moodle/legacy:admin', $context, $userid, false));
}
if ($courseid == 0) {
- $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
+ $context = get_context_instance(CONTEXT_SYSTEM, SITEID);
} else {
$context = get_context_instance(CONTEXT_COURSE, $courseid);
}
return false;
}
- $context = get_context_instance(CONTEXT_SYSTEM);
+ $context = get_context_instance(CONTEXT_SYSTEM);
return has_capability('moodle/legacy:guest', $context, $userid, false);
}
*/
function unenrol_student($userid, $courseid=0) {
global $CFG;
-
+
$status = true;
if ($courseid) {
}
/**
- * Add a teacher to a given course
+ * Add a teacher to a given course
*
* @param int $userid The id of the user that is being tested against. Set this to 0 if you would just like to test against the currently logged in user.
* @param int $courseid The id of the course that is being viewed, if any
function get_recent_enrolments($courseid, $timestart) {
global $CFG;
-
+
$context = get_context_instance(CONTEXT_COURSE, $courseid);
return get_records_sql("SELECT DISTINCT u.id, u.firstname, u.lastname, l.time
// make sure it works on the site course
$context = get_context_instance(CONTEXT_COURSE, $courseid);
- /// For the site course, old way was to check if $CFG->allusersaresitestudents was set to true.
+ /// For the site course, old way was to check if $CFG->allusersaresitestudents was set to true.
/// The closest comparible method using roles is if the $CFG->defaultuserroleid is set to the legacy
- /// student role. This function should be replaced where it is used with something more meaningful.
+ /// student role. This function should be replaced where it is used with something more meaningful.
if (($courseid == SITEID) && !empty($CFG->defaultuserroleid) && empty($CFG->nodefaultuserrolelists)) {
if ($roles = get_roles_with_capability('moodle/legacy:student', CAP_ALLOW, $context)) {
$hascap = false;
$sort = $sort .' '. $dir;
}
// Now we have to make sure site teachers are excluded
-
+
if ($teachers = get_course_teachers(SITEID)) {
foreach ($teachers as $teacher) {
$exceptions .= ','. $teacher->userid;
}
- $exceptions = ltrim($exceptions, ',');
-
- }
-
+ $exceptions = ltrim($exceptions, ',');
+
+ }
+
return get_users(true, $search, true, $exceptions, $sort, $firstinitial, $lastinitial,
$page, $recordsperpage, $fields ? $fields : '*');
}
// If not site, require specific course
$select.= "c.instanceid=$courseid AND ";
}
- $select.="rc.capability='moodle/legacy:student' AND rc.permission=".CAP_ALLOW." AND ";
+ $select.="rc.capability='moodle/legacy:student' AND rc.permission=".CAP_ALLOW." AND ";
$select .= ' u.deleted = \'0\' ';
{$CFG->prefix}context c ON c.id=ra.contextid LEFT OUTER JOIN
{$CFG->prefix}user_lastaccess ul on ul.userid=ra.userid
$groupmembers
- WHERE $select $search $sort $dir", $page, $recordsperpage);
+ WHERE $select $search $sort $dir", $page, $recordsperpage);
return $students;
}
*
* @param object $course The course in question as a course object.
* @param string $search ?
- * @param string $firstinitial ?
+ * @param string $firstinitial ?
* @param string $lastinitial ?
* @param ? $group ?
- * @param string $exceptions ?
+ * @param string $exceptions ?
* @return int
* @todo Finish documenting this function
*/
* @uses $CFG
* @param int $courseid The course in question.
* @param string $sort ?
- * @param string $exceptions ?
+ * @param string $exceptions ?
* @return object
* @todo Finish documenting this function
*/
function get_course_teachers($courseid, $sort='t.authority ASC', $exceptions='') {
global $CFG;
-
+
$sort = 'ul.timeaccess DESC';
-
+
$context = get_context_instance(CONTEXT_COURSE, $courseid);
/// For the site course, if the $CFG->defaultuserroleid is set to the legacy teacher role, then all
- /// users are teachers. This function should be replaced where it is used with something more
- /// meaningful.
+ /// users are teachers. This function should be replaced where it is used with something more
+ /// meaningful.
if (($courseid == SITEID) && !empty($CFG->defaultuserroleid) && empty($CFG->nodefaultuserrolelists)) {
if ($roles = get_roles_with_capability('moodle/legacy:teacher', CAP_ALLOW, $context)) {
$hascap = false;
$context = get_context_instance(CONTEXT_COURSE, $courseid);
/// If the course id is the SITEID, we need to return all the users if the "defaultuserroleid"
- /// has the capbility of accessing the site course. $CFG->nodefaultuserrolelists set to true can
+ /// has the capbility of accessing the site course. $CFG->nodefaultuserrolelists set to true can
/// over-rule using this.
if (($courseid == SITEID) && !empty($CFG->defaultuserroleid) && empty($CFG->nodefaultuserrolelists)) {
if ($roles = get_roles_with_capability('moodle/course:view', CAP_ALLOW, $context)) {
* @return object (changed to groupids)
*/
function get_group_students($groupids, $sort='ul.timeaccess DESC') {
-
+
if (is_array($groupids)){
$groups = $groupids;
// all groups must be from one course anyway...
/**
* Print a message in a standard themed box.
- * This old function used to implement boxes using tables. Now it uses a DIV, but the old
+ * This old function used to implement boxes using tables. Now it uses a DIV, but the old
* parameters remain. If possible, $align, $width and $color should not be defined at all.
* Preferably just use print_box() in weblib.php
*
/**
- * This old function used to implement boxes using tables. Now it uses a DIV, but the old
+ * This old function used to implement boxes using tables. Now it uses a DIV, but the old
* parameters remain. If possible, $align, $width and $color should not be defined at all.
* Even better, please use print_box_start() in weblib.php
*
* @param group ID, optional to include a test for this in the SQL.
* @return SQL string.
*/
-function groups_members_join_sql($groupid=false) {
+function groups_members_join_sql($groupid=false) {
$sql = ' JOIN '.groups_members_from_sql().' ON u.id = gm.userid ';
if ($groupid) {
$sql = "AND gm.groupid = '$groupid' ";
/**
* Returns SQL for a WHERE clause testing the group ID.
- * Optionally test the member's ID against another table's user ID column.
+ * Optionally test the member's ID against another table's user ID column.
* @param groupid
* @param userid_sql Optional user ID column selector, example "mdl_user.id", or false.
* @return SQL string.
}
/**
- * Add a user to a group, return true upon success or if user already a group
+ * Add a user to a group, return true upon success or if user already a group
* member
*
* @param int $groupid The group id to add user to
* @return object
* @todo Finish documenting this function
*/
-function get_group_users($groupid, $sort='u.lastaccess DESC', $exceptions='',
+function get_group_users($groupid, $sort='u.lastaccess DESC', $exceptions='',
$fields='u.*') {
global $CFG;
if (!empty($exceptions)) {
/**
* Returns the current group mode for a given course or activity module
- *
+ *
* Could be false, SEPARATEGROUPS or VISIBLEGROUPS (<-- Martin)
*/
function groupmode($course, $cm=null) {
/**
* Sets the current group in the session variable
- * When $SESSION->currentgroup[$courseid] is set to 0 it means, show all groups.
+ * When $SESSION->currentgroup[$courseid] is set to 0 it means, show all groups.
* Sets currentgroup[$courseid] in the session variable appropriately.
- * Does not do any permission checking.
+ * Does not do any permission checking.
* @uses $SESSION
- * @param int $courseid The course being examined - relates to id field in
+ * @param int $courseid The course being examined - relates to id field in
* 'course' table.
* @param int $groupid The group being examined.
* @return int Current group id which was set by this function
/**
- * Gets the current group - either from the session variable or from the database.
+ * Gets the current group - either from the session variable or from the database.
*
* @uses $USER
* @uses $SESSION
- * @param int $courseid The course being examined - relates to id field in
+ * @param int $courseid The course being examined - relates to id field in
* 'course' table.
- * @param bool $full If true, the return value is a full record object.
+ * @param bool $full If true, the return value is a full record object.
* If false, just the id of the record.
*/
function get_current_group($courseid, $full = false) {
*/
function get_and_set_current_group($course, $groupmode, $groupid=-1) {
- // Sets to the specified group, provided the current user has view permission
+ // Sets to the specified group, provided the current user has view permission
if (!$groupmode) { // Groups don't even apply
return false;
}
}
+/**
+ * Prints breadcrumb trail of links, called in theme/-/header.html
+ *
+ * @uses $CFG
+ * @param mixed $navigation The breadcrumb navigation string to be printed
+ * @param string $separator The breadcrumb trail separator. The default 0 leads to the use
+ * of $THEME->rarrow, themes could use '→', '/', or '' for a style-sheet solution.
+ * @param boolean $return False to echo the breadcrumb string (default), true to return it.
+ */
+function print_navigation ($navigation, $separator=0, $return=false) {
+ global $CFG, $THEME;
+ $output = '';
+
+ if (0 === $separator) {
+ $separator = get_separator();
+ }
+ else {
+ $separator = '<span class="sep">'. $separator .'</span>';
+ }
+
+ if ($navigation) {
+
+ if (is_newnav($navigation)) {
+ if ($return) {
+ return($navigation['navlinks']);
+ } else {
+ echo $navigation['navlinks'];
+ return;
+ }
+ } else {
+ debugging('Navigation needs to be updated to use build_navigation()', DEBUG_DEVELOPER);
+ }
+
+ if (!is_array($navigation)) {
+ $ar = explode('->', $navigation);
+ $navigation = array();
+
+ foreach ($ar as $a) {
+ if (strpos($a, '</a>') === false) {
+ $navigation[] = array('title' => $a, 'url' => '');
+ } else {
+ if (preg_match('/<a.*href="([^"]*)">(.*)<\/a>/', $a, $matches)) {
+ $navigation[] = array('title' => $matches[2], 'url' => $matches[1]);
+ }
+ }
+ }
+ }
+
+ if (! $site = get_site()) {
+ $site = new object();
+ $site->shortname = get_string('home');
+ }
+
+ //Accessibility: breadcrumb links now in a list, » replaced with a 'silent' character.
+ $nav_text = get_string('youarehere','access');
+ $output .= '<h2 class="accesshide">'.$nav_text."</h2><ul>\n";
+
+ $output .= '<li class="first">'."\n".'<a '.$CFG->frametarget.' onclick="this.target=\''.$CFG->framename.'\'" href="'
+ .$CFG->wwwroot.((!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))
+ && !empty($USER->id) && !empty($CFG->mymoodleredirect) && !isguest())
+ ? '/my' : '') .'/">'. format_string($site->shortname) ."</a>\n</li>\n";
+
+
+ foreach ($navigation as $navitem) {
+ $title = trim(strip_tags(format_string($navitem['title'], false)));
+ $url = $navitem['url'];
+
+ if (empty($url)) {
+ $output .= '<li class="first">'."$separator $title</li>\n";
+ } else {
+ $output .= '<li class="first">'."$separator\n<a ".$CFG->frametarget.' onclick="this.target=\''.$CFG->framename.'\'" href="'
+ .$url.'">'."$title</a>\n</li>\n";
+ }
+ }
+
+ $output .= "</ul>\n";
+ }
+
+ if ($return) {
+ return $output;
+ } else {
+ echo $output;
+ }
+}
+
?>
////////////////////////////////////////////////////////////////////////////////
-/**
- * This function will build the navigation string to be used by print_header
- * and others
- * @uses $CFG
- * @uses $THEME
- * @param $extranavlinks - array of associative arrays, keys: name, link, type
- * @return $navigation as an object so it can be differentiated from old style
- * navigation strings.
- */
-function build_navigation($extranavlinks) {
- global $CFG, $COURSE;
-
- $navigation = '';
- $navlinks = array();
-
- //Site name
- if ($site = get_site()) {
- $navlinks[] = array('name' => format_string($site->shortname),
- 'link' => "$CFG->wwwroot/",
- 'type' => 'home');
- }
-
-
- if ($COURSE) {
- if ($COURSE->id != SITEID) {
- //Course
- $navlinks[] = array('name' => format_string($COURSE->shortname),
- 'link' => "$CFG->wwwroot/course/view.php?id=$COURSE->id",
- 'type' => 'course');
- }
- }
-
- //Merge in extra navigation links
- $navlinks = array_merge($navlinks, $extranavlinks);
-
- //Construct an unordered list from $navlinks
- //Accessibility: heading hidden from visual browsers by default.
- $navigation = '<h2 class="accesshide">'.get_string('youarehere','access')."</h2> <ul>\n";
- $countlinks = count($navlinks);
- $i = 0;
- foreach ($navlinks as $navlink) {
- if ($i >= $countlinks || !is_array($navlink)) {
- continue;
- }
- // Check the link type to see if this link should appear in the trail
- $cap = has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $COURSE->id));
- $hidetype_is2 = $CFG->hideactivitytypenavlink == 2;
- $hidetype_is1 = $CFG->hideactivitytypenavlink == 1;
-
- if ($navlink['type'] == 'activity' &&
- $i+1 < $countlinks &&
- ($hidetype_is2 || ($hidetype_is1 && !$cap))) {
- continue;
- }
- $navigation .= '<li class="first">';
- if ($i > 0) {
- $navigation .= get_separator();
- }
- if ($navlink['link'] && $i+1 < $countlinks) {
- $navigation .= "<a onclick=\"this.target='$CFG->framename'\" href=\"{$navlink['link']}\">";
- }
- $navigation .= "{$navlink['name']}";
- if ($navlink['link'] && $i+1 < $countlinks) {
- $navigation .= "</a>";
- }
-
- $navigation .= "</li>";
- $i++;
- }
-
- $navigation .= "</ul>";
-
- return(array('newnav' => true, 'navlinks' => $navigation));
-}
function is_newnav($navigation) {
if (is_array($navigation) && $navigation['newnav']) {
global $USER, $CFG, $THEME, $SESSION, $ME, $SITE, $COURSE;
+ if (gettype($navigation) == 'string' && strlen($navigation) != 0) {
+ debugging("print_header() was sent a string as 3rd ($navigation) parameter. "
+ . "This is deprecated in favour of an array built by build_navigation(). Please upgrade your code.");
+ }
+
$heading = format_string($heading); // Fix for MDL-8582
/// This makes sure that the header is never repeated twice on a page
return ' '.link_arrow_right($text='/', $url='', $accesshide=true, 'sep').' ';
}
-
-
/**
- * Prints breadcrumb trail of links, called in theme/-/header.html
- *
+ * This function will build the navigation string to be used by print_header
+ * and others
* @uses $CFG
- * @param mixed $navigation The breadcrumb navigation string to be printed
- * @param string $separator The breadcrumb trail separator. The default 0 leads to the use
- * of $THEME->rarrow, themes could use '→', '/', or '' for a style-sheet solution.
- * @param boolean $return False to echo the breadcrumb string (default), true to return it.
+ * @uses $THEME
+ * @param $extranavlinks - array of associative arrays, keys: name, link, type
+ * @return $navigation as an object so it can be differentiated from old style
+ * navigation strings.
*/
-function print_navigation ($navigation, $separator=0, $return=false) {
- global $CFG, $THEME;
- $output = '';
+function build_navigation($extranavlinks) {
+ global $CFG, $COURSE;
- if (0 === $separator) {
- $separator = get_separator();
- }
- else {
- $separator = '<span class="sep">'. $separator .'</span>';
+ $navigation = '';
+ $navlinks = array();
+
+ //Site name
+ if ($site = get_site()) {
+ $navlinks[] = array('name' => format_string($site->shortname),
+ 'link' => "$CFG->wwwroot/",
+ 'type' => 'home');
}
- if ($navigation) {
- if (is_newnav($navigation)) {
- if ($return) {
- return($navigation['navlinks']);
- } else {
- echo $navigation['navlinks'];
- return;
- }
- } else {
- debugging('Navigation needs to be updated to use build_navigation()', DEBUG_DEVELOPER);
+ if ($COURSE) {
+ if ($COURSE->id != SITEID) {
+ //Course
+ $navlinks[] = array('name' => format_string($COURSE->shortname),
+ 'link' => "$CFG->wwwroot/course/view.php?id=$COURSE->id",
+ 'type' => 'course');
}
+ }
- if (!is_array($navigation)) {
- $ar = explode('->', $navigation);
- $navigation = array();
+ //Merge in extra navigation links
+ $navlinks = array_merge($navlinks, $extranavlinks);
- foreach ($ar as $a) {
- if (strpos($a, '</a>') === false) {
- $navigation[] = array('title' => $a, 'url' => '');
- } else {
- if (preg_match('/<a.*href="([^"]*)">(.*)<\/a>/', $a, $matches)) {
- $navigation[] = array('title' => $matches[2], 'url' => $matches[1]);
- }
- }
- }
+ //Construct an unordered list from $navlinks
+ //Accessibility: heading hidden from visual browsers by default.
+ $navigation = '<h2 class="accesshide">'.get_string('youarehere','access')."</h2> <ul>\n";
+ $countlinks = count($navlinks);
+ $i = 0;
+ foreach ($navlinks as $navlink) {
+ if ($i >= $countlinks || !is_array($navlink)) {
+ continue;
}
+ // Check the link type to see if this link should appear in the trail
+ $cap = has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $COURSE->id));
+ $hidetype_is2 = $CFG->hideactivitytypenavlink == 2;
+ $hidetype_is1 = $CFG->hideactivitytypenavlink == 1;
- if (! $site = get_site()) {
- $site = new object();
- $site->shortname = get_string('home');
+ if ($navlink['type'] == 'activity' &&
+ $i+1 < $countlinks &&
+ ($hidetype_is2 || ($hidetype_is1 && !$cap))) {
+ continue;
}
-
- //Accessibility: breadcrumb links now in a list, » replaced with a 'silent' character.
- $nav_text = get_string('youarehere','access');
- $output .= '<h2 class="accesshide">'.$nav_text."</h2><ul>\n";
-
- $output .= '<li class="first">'."\n".'<a '.$CFG->frametarget.' onclick="this.target=\''.$CFG->framename.'\'" href="'
- .$CFG->wwwroot.((!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))
- && !empty($USER->id) && !empty($CFG->mymoodleredirect) && !isguest())
- ? '/my' : '') .'/">'. format_string($site->shortname) ."</a>\n</li>\n";
-
-
- foreach ($navigation as $navitem) {
- $title = trim(strip_tags(format_string($navitem['title'], false)));
- $url = $navitem['url'];
-
- if (empty($url)) {
- $output .= '<li class="first">'."$separator $title</li>\n";
- } else {
- $output .= '<li class="first">'."$separator\n<a ".$CFG->frametarget.' onclick="this.target=\''.$CFG->framename.'\'" href="'
- .$url.'">'."$title</a>\n</li>\n";
- }
+ $navigation .= '<li class="first">';
+ if ($i > 0) {
+ $navigation .= get_separator();
+ }
+ if ($navlink['link'] && $i+1 < $countlinks) {
+ $navigation .= "<a onclick=\"this.target='$CFG->framename'\" href=\"{$navlink['link']}\">";
+ }
+ $navigation .= "{$navlink['name']}";
+ if ($navlink['link'] && $i+1 < $countlinks) {
+ $navigation .= "</a>";
}
- $output .= "</ul>\n";
+ $navigation .= "</li>";
+ $i++;
}
- if ($return) {
- return $output;
- } else {
- echo $output;
- }
+ $navigation .= "</ul>";
+
+ return(array('newnav' => true, 'navlinks' => $navigation));
}
+
/**
* Prints a string in a specified size (retained for backward compatibility)
*
<meta name="keywords" content="moodle, <?php echo $title ?> " />
<title><?php echo $title ?></title>
<link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" />
-
+
<?php include('ui/chameleon.php'); ?>
<?php include("$CFG->javascript"); ?>
</head>
echo " onload=\"setfocus()\"";
};
?>>
-
+
<div id="page">
-
-<?php if ($home) { // This is what gets printed on the home page only
+
+<?php if ($home) { // This is what gets printed on the home page only
?>
<div id="header-home" class="clearfix">
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
</div>
<div class="navbar clearfix">
-
+
</div>
-<?php } else { // This is what gets printed on any other page with a heading
+<?php } else { // This is what gets printed on any other page with a heading
?>
<div id="header" class="clearfix">
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="navbar clearfix">
<?php if ($navigation) { // This is the navigation table with breadcrumbs
?>
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="navbutton"><?php echo $button; ?></div>
<?php } ?>
</div>
<?php if ($navigation and false) { ?>
<div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="menu"><?php echo $menu; ?></div>
</div>
<?php } ?>
<h1 class="headermain"><img alt="[ REPLACE ME ]" src="<?php echo $CFG->wwwroot.'/theme/'.current_theme() ?>/images/logo.jpg" width="457" height="64" /></h1>
<div class="headermenu"><?php echo $menu ?></div>
</div>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
+<?php } else if ($heading) { // This is what gets printed on any other page with a heading
?>
<div id="header-home">
<h1 class="headermain"><img alt="[ REPLACE ME ]" src="<?php echo $CFG->wwwroot.'/theme/'.current_theme() ?>/images/logo.jpg" width="457" height="64" /></h1>
<?php //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
if ($navigation) { // This is the navigation bar with breadcrumbs ?>
<div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="navbutton"><?php echo $button; ?></div>
- </div>
+ </div>
<?php } else if ($heading) { // If no navigation, but a heading, then print a line ?>
<?php } ?>
$excludelist = array('mod-chat-view', 'mod-data-view', 'mod-quiz-view',
'my-index');
- if (!empty($PAGE) && (in_array($PAGE->type, $excludelist)) &&
+ if (!empty($PAGE) && (in_array($PAGE->type, $excludelist)) &&
(strstr($bodytags, ' nocoursepage'))) {
$bodytags = str_replace(' nocoursepage', '', $bodytags);
}
<div class="navbar clearfix">
<?php if ($navigation) { // This is the navigation table with breadcrumbs
?>
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="navbutton"><?php echo $button; ?></div>
<?php } ?>
</div>
<?php if ($navigation and false) { ?>
<div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="menu"><?php echo $menu; ?></div>
</div>
<?php } ?>
echo " onload=\"setfocus()\"";
}
?>>
-
+
<div id="page">
<?php //Accessibility: warning: ALT text will need editing if logo changes. 'headermain' is now H1, see theme/standard/styles_layout.css: .headermain
<h1 class="headermain"><img alt='Moodle' src='<?php echo $CFG->httpsthemewww .'/'. current_theme() ?>/logo.jpg' /></h1>
<div class="headermenu"><?php echo $menu ?></div>
</div>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
+<?php } else if ($heading) { // This is what gets printed on any other page with a heading
?>
<div id="header" class="clearfix">
<h1 class="headermain"><img alt='Moodle' src='<?php echo $CFG->httpsthemewww .'/'. current_theme() ?>/logo_small.jpg' /></h1>
<?php //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
if ($navigation) { // This is the navigation bar with breadcrumbs ?>
<div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="navbutton"><?php echo $button; ?></div>
</div>
-<?php } else if ($heading) { // If no navigation, but a heading, then print a line
+<?php } else if ($heading) { // If no navigation, but a heading, then print a line
?>
<hr />
<?php } ?>
echo " onload=\"setfocus()\"";
}
?>>
-
+
<div id="page">
-<?php if ($home) { // This is what gets printed on the home page only
+<?php if ($home) { // This is what gets printed on the home page only
?>
<div id="header-home">
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
</div>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
+<?php } else if ($heading) { // This is what gets printed on any other page with a heading
?>
<div id="header">
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="clearer"> </div>
<?php if ($navigation) { // This is the navigation table with breadcrumbs ?>
<div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="navbutton"><?php echo $button; ?></div>
</div>
-<?php } else if ($heading) { // If no navigation, but a heading, then print a line
+<?php } else if ($heading) { // If no navigation, but a heading, then print a line
?>
<hr />
<?php } ?>
<?php if ($navigation and false) { ?>
<div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="menu"><?php echo $menu; ?></div>
</div>
<?php } ?>
echo " onload=\"setfocus()\"";
}
?>>
-
+
<div id="page">
<?php //Accessibility: 'headermain' is now H1, see theme/standard/styles_layout.css: .headermain
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
</div>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
+<?php } else if ($heading) { // This is what gets printed on any other page with a heading
?>
<div id="header" class="clearfix">
<h1 class="headermain"><?php echo $heading ?></h1>
<?php //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
if ($navigation) { // This is the navigation bar with breadcrumbs ?>
<div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="navbutton"><?php echo $button; ?></div>
- </div>
-<?php } else if ($heading) { // If no navigation, but a heading, then print a line
+ </div>
+<?php } else if ($heading) { // If no navigation, but a heading, then print a line
?>
<hr />
<?php } ?>
echo " onload=\"setfocus()\"";
};
?>>
-
+
<div id="page">
-<?php if ($home) { // This is what gets printed on the home page only
+<?php if ($home) { // This is what gets printed on the home page only
?>
<div id="header-home">
<h1 class="headermain"><?php echo $heading ?></h1>
</div>
<div class="navbar">
</div>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
+<?php } else if ($heading) { // This is what gets printed on any other page with a heading
?>
<div id="header">
<h1 class="headermain"><?php echo $heading ?></h1>
<?php if ($navigation) { // This is the navigation table with breadcrumbs
?>
<div class="navbar">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="navbutton"><?php echo $button; ?></div>
</div>
<?php } ?>
echo " onload=\"setfocus()\"";
};
?>>
-
+
<div id="page">
-<?php if ($home) { // This is what gets printed on the home page only
+<?php if ($home) { // This is what gets printed on the home page only
?>
<div id="header-home">
<h1 class="headermain"><?php echo $heading ?></h1>
</div>
<div class="navbar">
</div>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
+<?php } else if ($heading) { // This is what gets printed on any other page with a heading
?>
<div id="header">
<h1 class="headermain"><?php echo $heading ?></h1>
<?php if ($navigation) { // This is the navigation table with breadcrumbs
?>
<div class="navbar">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="navbutton"><?php echo $button; ?></div>
</div>
<?php } ?>
<?php if ($navigation and false) { ?>
<div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="menu"><?php echo $menu; ?></div>
</div>
<?php } ?>
echo " onload=\"setfocus()\"";
}
?>>
-
+
<div id="page">
<?php //Accessibility: 'headermain' is now H1, see theme/standard/styles_layout.css: .headermain
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
</div>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
+<?php } else if ($heading) { // This is what gets printed on any other page with a heading
?>
<div id="header" class="clearfix">
<h1 class="headermain"><?php echo $heading ?></h1>
<?php //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
if ($navigation) { // This is the navigation bar with breadcrumbs ?>
<div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="navbutton"><?php echo $button; ?></div>
- </div>
-<?php } else if ($heading) { // If no navigation, but a heading, then print a line
+ </div>
+<?php } else if ($heading) { // If no navigation, but a heading, then print a line
?>
<hr />
<?php } ?>
echo " onload=\"setfocus()\"";
}
?>>
-
+
<div id="page">
<?php //Accessibility: 'headermain' is now H1, see theme/standard/styles_layout.css: .headermain
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
</div>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
+<?php } else if ($heading) { // This is what gets printed on any other page with a heading
?>
<div id="header" class="clearfix">
<h1 class="headermain"><?php echo $heading ?></h1>
<?php //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
if ($navigation) { // This is the navigation bar with breadcrumbs ?>
<div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="navbutton"><?php echo $button; ?></div>
- </div>
-<?php } else if ($heading) { // If no navigation, but a heading, then print a line
+ </div>
+<?php } else if ($heading) { // If no navigation, but a heading, then print a line
?>
<hr />
<?php } ?>
echo " onload=\"setfocus()\"";
}
?>>
-
+
<div id="page">
<?php //Accessibility: 'headermain' is now H1, see theme/standard/styles_layout.css: .headermain
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
</div>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
+<?php } else if ($heading) { // This is what gets printed on any other page with a heading
?>
<div id="header" class="clearfix">
<h1 class="headermain"><?php echo $heading ?></h1>
<?php //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
if ($navigation) { // This is the navigation bar with breadcrumbs ?>
<div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="navbutton"><?php echo $button; ?></div>
- </div>
-<?php } else if ($heading) { // If no navigation, but a heading, then print a line
+ </div>
+<?php } else if ($heading) { // If no navigation, but a heading, then print a line
?>
<hr />
<?php } ?>
echo " onload=\"setfocus()\"";
}
?>>
-
+
<div id="page">
-<?php if ($home) { // This is what gets printed on the home page only
+<?php if ($home) { // This is what gets printed on the home page only
if (file_exists($CFG->dirroot.'/logo.jpg')) {
$standardlogo = $CFG->httpswwwroot.'/logo.jpg';
} else if (file_exists($CFG->dirroot.'/logo.gif')) {
} else {
$standardlogo = $CFG->httpsthemewww .'/'. current_theme().'/logo.gif';
}
-
+
//Accessibility: warning: ALT text will need editing if logo changes. 'headermain' is now H1.
?>
<div id="header-home" class="clearfix">
<h1 class="headermain"><img alt="Moodle" src="<?php echo $standardlogo ?>" /></h1>
<div class="headermenu"><?php echo $menu ?></div>
</div>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
+<?php } else if ($heading) { // This is what gets printed on any other page with a heading
?>
<div id="header" class="clearfix">
<h1 class="headermain"><?php echo $heading ?></h1>
<?php //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
if ($navigation) { // This is the navigation table with breadcrumbs ?>
<div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="navbutton"><?php echo $button; ?></div>
</div>
-<?php } else if ($heading) { // If no navigation, but a heading, then print a line
+<?php } else if ($heading) { // If no navigation, but a heading, then print a line
?>
<hr />
<?php } ?>
echo " onload=\"setfocus()\"";
}
?>>
-
+
<div id="page">
<?php //Accessibility: 'headermain' is now H1, see theme/standard/styles_layout.css: .headermain
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
</div>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
+<?php } else if ($heading) { // This is what gets printed on any other page with a heading
?>
<div id="header" class="clearfix">
<h1 class="headermain"><?php echo $heading ?></h1>
<?php //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
if ($navigation) { // This is the navigation bar with breadcrumbs ?>
<div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="navbutton"><?php echo $button; ?></div>
- </div>
-<?php } else if ($heading) { // If no navigation, but a heading, then print a line
+ </div>
+<?php } else if ($heading) { // If no navigation, but a heading, then print a line
?>
<hr />
<?php } ?>
echo " onload=\"setfocus()\"";
}
?>>
-
+
<div id="page">
<?php //Accessibility: 'headermain' is now H1, see theme/standard/styles_layout.css: .headermain
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
</div>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
+<?php } else if ($heading) { // This is what gets printed on any other page with a heading
?>
<div id="header" class="clearfix">
<h1 class="headermain"><?php echo $heading ?></h1>
<?php //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
if ($navigation) { // This is the navigation bar with breadcrumbs ?>
<div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="navbutton"><?php echo $button; ?></div>
- </div>
-<?php } else if ($heading) { // If no navigation, but a heading, then print a line
+ </div>
+<?php } else if ($heading) { // If no navigation, but a heading, then print a line
?>
<hr />
<?php } ?>
echo " onload=\"setfocus()\"";
}
?>>
-
+
<div id="page">
-<?php if ($home) { // This is what gets printed on the home page only
+<?php if ($home) { // This is what gets printed on the home page only
?>
<div id="header-home" class="clearfix">
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
</div>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
+<?php } else if ($heading) { // This is what gets printed on any other page with a heading
?>
<div id="header" class="clearfix">
<h1 class="headermain"><?php echo $heading ?></h1>
<?php } ?>
<?php if ($navigation) { // This is the navigation table with breadcrumbs ?>
<div class="navbar clearfix">
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="breadcrumb"><?php echo $navigation['navlinks']; ?></div>
<div class="navbutton"><?php echo $button; ?></div>
</div>
-<?php } else if ($heading) { // If no navigation, but a heading, then print a line
+<?php } else if ($heading) { // If no navigation, but a heading, then print a line
?>
<hr />
<?php } ?>