mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-10870 All files updated to new build_navigation() method.
This commit is contained in:
parent
d8c684de7e
commit
f1af7aaaf5
14 changed files with 125 additions and 91 deletions
|
@ -18,9 +18,11 @@
|
|||
$stradministration = get_string("administration");
|
||||
$site = get_site();
|
||||
|
||||
$navigation = build_navigation(array(
|
||||
array('name'=>$stradministration, 'link'=>'index.php', 'type'=>'misc'),
|
||||
array('name'=>$strdatabaseperformance, 'link'=>null, 'type'=>'misc')));
|
||||
if (!empty($topframe)) {
|
||||
print_header("$site->shortname: $strdatabaseperformance", "$site->fullname",
|
||||
"<a $CFG->frametarget href=\"index.php\">$stradministration</a> -> Database performance");
|
||||
print_header("$site->shortname: $strdatabaseperformance", "$site->fullname", $navigation);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,8 @@
|
|||
error_reporting($CFG->debug);
|
||||
if (empty($agreelicense)) {
|
||||
$strlicense = get_string('license');
|
||||
print_header($strlicense, $strlicense, $strlicense, "", "", false, " ", " ");
|
||||
$navigation = build_navigation(array(array('name'=>$strlicense, 'link'=>null, 'type'=>'misc')));
|
||||
print_header($strlicense, $strlicense, $navigation, "", "", false, " ", " ");
|
||||
print_heading("<a href=\"http://moodle.org\">Moodle</a> - Modular Object-Oriented Dynamic Learning Environment");
|
||||
print_heading(get_string('copyrightnotice'));
|
||||
print_box(text_to_html(get_string('gpl')), 'copyrightnotice');
|
||||
|
@ -141,7 +142,8 @@
|
|||
}
|
||||
if (empty($confirmrelease)) {
|
||||
$strcurrentrelease = get_string("currentrelease");
|
||||
print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, " ", " ");
|
||||
$navigation = build_navigation(array(array('name'=>$strcurrentrelease, 'link'=>null, 'type'=>'misc')));
|
||||
print_header($strcurrentrelease, $strcurrentrelease, $navigation, "", "", false, " ", " ");
|
||||
print_heading("Moodle $release");
|
||||
print_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'), 'generalbox boxaligncenter boxwidthwide');
|
||||
echo '<form action="index.php"><div>';
|
||||
|
@ -157,7 +159,8 @@
|
|||
|
||||
$strdatabasesetup = get_string("databasesetup");
|
||||
$strdatabasesuccess = get_string("databasesuccess");
|
||||
print_header($strdatabasesetup, $strdatabasesetup, $strdatabasesetup,
|
||||
$navigation = build_navigation(array(array('name'=>$strdatabasesetup, 'link'=>null, 'type'=>'misc')));
|
||||
print_header($strdatabasesetup, $strdatabasesetup, $navigation,
|
||||
"", upgrade_get_javascript(), false, " ", " ");
|
||||
/// return to original debugging level
|
||||
$CFG->debug = $origdebug;
|
||||
|
@ -267,7 +270,8 @@
|
|||
}
|
||||
|
||||
if (empty($confirmupgrade)) {
|
||||
print_header($strdatabasechecking, $stradministration, $strdatabasechecking,
|
||||
$navigation = build_navigation(array(array('name'=>$strdatabasechecking, 'link'=>null, 'type'=>'misc')));
|
||||
print_header($strdatabasechecking, $stradministration, $navigation,
|
||||
"", "", false, " ", " ");
|
||||
|
||||
notice_yesno(get_string('upgradesure', 'admin', $a->newversion), 'index.php?confirmupgrade=1', 'index.php');
|
||||
|
@ -275,7 +279,8 @@
|
|||
|
||||
} else if (empty($confirmrelease)){
|
||||
$strcurrentrelease = get_string("currentrelease");
|
||||
print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, " ", " ");
|
||||
$navigation = build_navigation(array(array('name'=>$strcurrentrelease, 'link'=>null, 'type'=>'misc')));
|
||||
print_header($strcurrentrelease, $strcurrentrelease, $navigation, "", "", false, " ", " ");
|
||||
print_heading("Moodle $release");
|
||||
print_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'));
|
||||
|
||||
|
@ -300,7 +305,8 @@
|
|||
die;
|
||||
} else {
|
||||
$strdatabasesuccess = get_string("databasesuccess");
|
||||
print_header($strdatabasechecking, $stradministration, $strdatabasechecking,
|
||||
$navigation = build_navigation(array(array('name'=>$strdatabasesuccess, 'link'=>null, 'type'=>'misc')));
|
||||
print_header($strdatabasechecking, $stradministration, $navigation,
|
||||
"", upgrade_get_javascript(), false, " ", " ");
|
||||
|
||||
/// return to original debugging level
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
<?php
|
||||
print_header("$site->shortname: $strmnetsettings", "$site->fullname",
|
||||
'<a href="'.$CFG->wwwroot.'/admin/index.php">'.$stradministration.'</a> -> '.
|
||||
'<a href="'.$CFG->wwwroot.'/admin/mnet/index.php">'.get_string('mnetsettings', 'mnet').'</a> -> Delete host');
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $stradministration, 'link' => $CFG->wwwroot.'/admin/index.php', 'type' => 'misc');
|
||||
$navlinks[] = array('name' => get_string('mnetsettings', 'mnet'), 'link' => $CFG->wwwroot.'/admin/mnet/index.php', 'type' => 'misc');
|
||||
$navlinks[] = array('name' => get_string('deletehost', 'mnet'), 'link' => null, 'type' => 'misc');
|
||||
$navigation = build_navigation($navlinks);
|
||||
print_header("$site->shortname: $strmnetsettings", "$site->fullname", $navigation);
|
||||
|
||||
print_heading(get_string('mnetsettings', 'mnet'));
|
||||
?>
|
||||
|
|
|
@ -33,9 +33,11 @@
|
|||
$stradministration = get_string("administration");
|
||||
$strregistration = get_string("registration");
|
||||
$strregistrationinfo = get_string("registrationinfo");
|
||||
|
||||
print_header("$site->shortname: $strregistration", $site->fullname,
|
||||
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> $strregistration");
|
||||
$navlinks = array();
|
||||
$navlinks[] = array('name' => $stradministration, 'link' => "../$CFG->admin/index.php", 'type' => 'misc');
|
||||
$navlinks[] = array('name' => $strregistration, 'link' => null, 'type' => 'misc');
|
||||
$navigation = build_navigation($navlinks);
|
||||
print_header("$site->shortname: $strregistration", $site->fullname, $navigation);
|
||||
|
||||
print_heading($strregistration);
|
||||
|
||||
|
|
|
@ -122,16 +122,22 @@
|
|||
|
||||
if ($context->contextlevel == CONTEXT_USER) {
|
||||
/// course header
|
||||
$navlinks = array();
|
||||
if ($courseid != SITEID) {
|
||||
print_header("$fullname", "$fullname",
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->
|
||||
<a href=\"$CFG->wwwroot/user/index.php?id=$course->id\">$strparticipants</a> -> <a href=\"$CFG->wwwroot/user/view.php?id=$userid&course=$courseid\">$fullname</a> ->".$straction,
|
||||
"", "", true, " ", navmenu($course));
|
||||
$navlinks[] = array('name' => $course->shortname, 'link' => "$CFG->wwwroot/course/view.php?id=$course->id", 'type' => 'course');
|
||||
$navlinks[] = array('name' => $strparticipants, 'link' => "$CFG->wwwroot/user/index.php?id=$course->id", 'type' => 'misc');
|
||||
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&course=$courseid", 'type' => 'misc');
|
||||
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
|
||||
$navigation = build_navigation($navlinks);
|
||||
|
||||
print_header("$fullname", "$fullname", $navigation, "", "", true, " ", navmenu($course));
|
||||
|
||||
/// site header
|
||||
} else {
|
||||
print_header("$course->fullname: $fullname", $course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/user/view.php?id=$userid&course=$courseid\">$fullname</a> -> $straction", "", "", true, " ", navmenu($course));
|
||||
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&course=$courseid", 'type' => 'misc');
|
||||
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
|
||||
$navigation = build_navigation($navlinks);
|
||||
print_header("$course->fullname: $fullname", $course->fullname, $navigation, "", "", true, " ", navmenu($course));
|
||||
}
|
||||
|
||||
$showroles = 1;
|
||||
|
|
|
@ -116,18 +116,22 @@
|
|||
/// Print the header and tabs
|
||||
|
||||
if ($context->contextlevel == CONTEXT_USER) {
|
||||
|
||||
$navlinks = array();
|
||||
/// course header
|
||||
if ($course->id != SITEID) {
|
||||
print_header("$fullname", "$fullname",
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->
|
||||
<a href=\"$CFG->wwwroot/user/index.php?id=$course->id\">$strparticipants</a> -> <a href=\"$CFG->wwwroot/user/view.php?id=$userid&course=$course->id\">$fullname</a> -> $straction",
|
||||
"", "", true, " ", navmenu($course));
|
||||
$navlinks[] = array('name' => $course->shortname, 'link' => "$CFG->wwwroot/course/view.php?id=$course->id", 'type' => 'course');
|
||||
$navlinks[] = array('name' => $strparticipants, 'link' => "$CFG->wwwroot/user/index.php?id=$course->id", 'type' => 'misc');
|
||||
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&course=$courseid", 'type' => 'misc');
|
||||
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
|
||||
$navigation = build_navigation($navlinks);
|
||||
print_header("$fullname", "$fullname", $navigation, "", "", true, " ", navmenu($course));
|
||||
|
||||
/// site header
|
||||
} else {
|
||||
print_header("$course->fullname: $fullname", $course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/user/view.php?id=$userid&course=$course->id\">$fullname</a> -> $straction", "", "", true, " ", navmenu($course));
|
||||
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&course=$courseid", 'type' => 'misc');
|
||||
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
|
||||
$navigation = build_navigation($navlinks);
|
||||
print_header("$course->fullname: $fullname", $course->fullname, $navigation, "", "", true, " ", navmenu($course));
|
||||
}
|
||||
$showroles = 1;
|
||||
$currenttab = 'override';
|
||||
|
|
|
@ -13,7 +13,10 @@ if ($currenttab != 'update') {
|
|||
|
||||
case CONTEXT_SYSTEM:
|
||||
$stradministration = get_string('administration');
|
||||
print_header($SITE->fullname, "$SITE->fullname","<a href=\"../index.php\">$stradministration</a> -> $straction");
|
||||
$navlinks[] = array('name' => $stradministration, 'link' => '../index.php', 'type' => 'misc');
|
||||
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
|
||||
$navigation = build_navigation($navlinks);
|
||||
print_header($SITE->fullname, "$SITE->fullname", $navigation);
|
||||
break;
|
||||
|
||||
case CONTEXT_PERSONAL:
|
||||
|
|
|
@ -47,8 +47,12 @@
|
|||
$blocks = blocks_setup($PAGE,BLOCKS_PINNED_TRUE);
|
||||
$blocks_preferred_width = bounded_number(180, blocks_preferred_width($blocks[BLOCK_POS_LEFT]), 210);
|
||||
|
||||
print_header($strtitle,$strtitle,'<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/index.php">'.
|
||||
get_string('administration').'</a> -> '.$strtitle);
|
||||
$navlinks = array(array('name' => get_string('administration'),
|
||||
'link' => "$CFG->wwwroot/$CFG->admin/index.php",
|
||||
'type' => 'misc'));
|
||||
$navlinks[] = array('name' => $strtitle, 'link' => null, 'type' => 'misc');
|
||||
$navigation = build_navigation($navlinks);
|
||||
print_header($strtitle,$strtitle,$navigation);
|
||||
|
||||
echo '<table border="0" cellpadding="3" cellspacing="0" width="100%" id="layout-table">';
|
||||
echo '<tr valign="top">';
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
$strusers = get_string("users");
|
||||
$strall = get_string("all");
|
||||
|
||||
print_header($strtimezone, $strtimezone, $strtimezone);
|
||||
print_header($strtimezone, $strtimezone, build_navigation(array(array('name' => $strtimezone, 'link' => null, 'type' => 'misc'))));
|
||||
|
||||
print_heading("");
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ $string['selectahost'] = 'Please select a remote Moodle host.';
|
|||
$string['selectaccesslevel'] = 'Please select an access level from the list.';
|
||||
$string['noaclentries'] = 'No entries in the SSO access control list';
|
||||
$string['deleteaserver'] = 'Deleting a Server';
|
||||
$string['deletehost'] = 'Delete host';
|
||||
$string['nosite'] = 'Could not find site-level course';
|
||||
$string['postrequired'] = 'The delete function requires a POST request.';
|
||||
$string['hostdeleted'] = 'Ok - host deleted';
|
||||
|
|
|
@ -2784,6 +2784,9 @@ function admin_externalpage_setup($section) {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO document
|
||||
*/
|
||||
function admin_externalpage_print_header() {
|
||||
|
||||
global $CFG, $PAGE, $SITE, $THEME;
|
||||
|
|
|
@ -2248,7 +2248,7 @@ function get_html_lang($dir = false) {
|
|||
* @uses $SESSION
|
||||
* @param string $title Appears at the top of the window
|
||||
* @param string $heading Appears at the top of the page
|
||||
* @param string $navigation Premade navigation string (for use as breadcrumbs links)
|
||||
* @param array $navigation Array of $navlinks arrays (keys: name, link, type) for use as breadcrumbs links
|
||||
* @param string $focus Indicates form element to get cursor focus on load eg inputform.password
|
||||
* @param string $meta Meta tags to be added to the header
|
||||
* @param boolean $cache Should this page be cacheable?
|
||||
|
|
|
@ -98,7 +98,7 @@ class assignment_base {
|
|||
$this->navigation[] = array('name' => $this->strassignment, 'link' => '', 'type' => 'activityinstance');
|
||||
$navigation = build_navigation($this->navigation);
|
||||
|
||||
print_header($pagetitle, $this->course->fullname, "$this->navigation $this->strassignment",
|
||||
print_header($pagetitle, $this->course->fullname, $this->navigation,
|
||||
"", "", true, '', navmenu($this->course, $this->cm));
|
||||
notice(get_string("activityiscurrentlyhidden"), "$CFG->wwwroot/course/view.php?id={$this->course->id}");
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<form method="post" action="module.php" id="form">
|
||||
<div">
|
||||
<div>
|
||||
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue