Commit 69d77c23 authored by samhemelryk's avatar samhemelryk
Browse files

admin MDL-19787 Upgraded print_header and build_navigation calls to use PAGE and OUTPUT equivilants

parent a560785f
......@@ -20,10 +20,12 @@ error('TODO: rewrite db perf code'); // TODO: rewrite
$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", $navigation);
$PAGE->navbar->add($stradministration, null, null, navigation_node::TYPE_CUSTOM,
new moodle_url($CFG->wwwroot.'/admin/index.php'));
$PAGE->navbar->add($strdatabaseperformance);
$PAGE->set_title("$site->shortname: $strdatabaseperformance");
$PAGE->set_heading($site->fullname);
echo $OUTPUT->header();
exit;
}
......@@ -119,8 +119,11 @@ if (!core_tables_exist()) {
if (empty($agreelicense)) {
$strlicense = get_string('license');
$navigation = build_navigation(array(array('name'=>$strlicense, 'link'=>null, 'type'=>'misc')));
print_header($strinstallation.' - Moodle '.$CFG->target_release, $strinstallation, $navigation, '', '', false, ' ', ' ');
$PAGE->navbar->add($strlicense);
$PAGE->set_title($strinstallation.' - Moodle '.$CFG->target_release);
$PAGE->set_heading($strinstallation);
$PAGE->set_cacheable(false);
echo $OUTPUT->header();
echo $OUTPUT->heading('<a href="http://moodle.org">Moodle</a> - Modular Object-Oriented Dynamic Learning Environment');
echo $OUTPUT->heading(get_string('copyrightnotice'));
$copyrightnotice = text_to_html(get_string('gpl'));
......@@ -133,8 +136,11 @@ if (!core_tables_exist()) {
}
if (empty($confirmrelease)) {
$strcurrentrelease = get_string('currentrelease');
$navigation = build_navigation(array(array('name'=>$strcurrentrelease, 'link'=>null, 'type'=>'misc')));
print_header($strinstallation.' - Moodle '.$CFG->target_release, $strinstallation, $navigation, '', '', false, '&nbsp;', '&nbsp;');
$PAGE->navbar->add($strcurrentrelease);
$PAGE->set_title($strinstallation.' - Moodle '.$CFG->target_release);
$PAGE->set_heading($strinstallation);
$PAGE->set_cacheable(false);
echo $OUTPUT->header();
echo $OUTPUT->heading("Moodle $release");
$releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes');
$releasenoteslink = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $releasenoteslink); // extremely ugly validation hack
......@@ -153,9 +159,12 @@ if (!core_tables_exist()) {
}
$strdatabasesetup = get_string('databasesetup');
$navigation = build_navigation(array(array('name'=>$strdatabasesetup, 'link'=>null, 'type'=>'misc')));
upgrade_get_javascript();
print_header($strinstallation.' - Moodle '.$CFG->target_release, $strinstallation, $navigation, '', '', false, '&nbsp;', '&nbsp;');
$PAGE->navbar->add($strdatabasesetup);
$PAGE->set_title($strinstallation.' - Moodle '.$CFG->target_release);
$PAGE->heading($strinstallation);
$PAGE->set_cacheable(false);
echo $OUTPUT->header();
if (!$DB->setup_is_unicodedb()) {
if (!$DB->change_db_encoding()) {
......@@ -186,8 +195,11 @@ if ($version > $CFG->version) { // upgrade
$strdatabasechecking = get_string('databasechecking', '', $a);
if (empty($confirmupgrade)) {
$navigation = build_navigation(array(array('name'=>$strdatabasechecking, 'link'=>null, 'type'=>'misc')));
print_header($strdatabasechecking, $stradministration, $navigation, '', '', false, '&nbsp;', '&nbsp;');
$PAGE->navbar->add($strdatabasechecking);
$PAGE->set_title($strdatabasechecking);
$PAGE->heading($stradministration);
$PAGE->set_cacheable(false);
echo $OUTPUT->header();
$continueform = new html_form();
$continueform->method = 'get';
$continueform->url = new moodle_url('index.php', array('confirmupgrade' => 1));
......@@ -200,8 +212,11 @@ if ($version > $CFG->version) { // upgrade
} else if (empty($confirmrelease)){
$strcurrentrelease = get_string('currentrelease');
$navigation = build_navigation(array(array('name'=>$strcurrentrelease, 'link'=>null, 'type'=>'misc')));
print_header($strcurrentrelease, $strcurrentrelease, $navigation, '', '', false, '&nbsp;', '&nbsp;');
$PAGE->navbar->add($strcurrentrelease);
$PAGE->set_title($strcurrentrelease);
$PAGE->heading($strcurrentrelease);
$PAGE->set_cacheable(false);
echo $OUTPUT->header();
echo $OUTPUT->heading("Moodle $release");
$releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes');
$releasenoteslink = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $releasenoteslink); // extremely ugly validation hack
......@@ -225,8 +240,11 @@ if ($version > $CFG->version) { // upgrade
} elseif (empty($confirmplugins)) {
$strplugincheck = get_string('plugincheck');
$navigation = build_navigation(array(array('name'=>$strplugincheck, 'link'=>null, 'type'=>'misc')));
print_header($strplugincheck, $strplugincheck, $navigation, '', '', false, '&nbsp;', '&nbsp;');
$PAGE->navbar->add($strplugincheck);
$PAGE->set_title($strplugincheck);
$PAGE->heading($strplugincheck);
$PAGE->set_cacheable(false);
echo $OUTPUT->header();
echo $OUTPUT->heading($strplugincheck);
echo $OUTPUT->box_start('generalbox', 'notice');
print_string('pluginchecknotice');
......
......@@ -100,8 +100,6 @@
$title = $strlanguage;
break;
}
$navlinks[] = array('name' => $strlanguage, 'link' => "$CFG->wwwroot/$CFG->admin/lang.php", 'type' => 'misc');
$navigation = build_navigation($navlinks);
admin_externalpage_print_header();
......
<?php
$navlinks = array();
$navlinks[] = array('name' => $stradministration, 'link' => "$CFG->wwwroot/$CFG->admin/index.php", 'type' => 'misc');
$navlinks[] = array('name' => get_string('mnetsettings', 'mnet'), 'link' => "$CFG->wwwroot/$CFG->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);
$PAGE->navbar->add($stradministration, null, null, navigation_node::TYPE_CUSTOM,
new moodle_url($CFG->wwwroot.'/'.$CFG->admin.'/index.php'));
$PAGE->navbar->add(get_string('mnetsettings', 'mnet'), null, null, navigation_node::TYPE_CUSTOM,
new moodle_url($CFG->wwwroot.'/'.$CFG->admin.'/mnet/index.php'));
$PAGE->navbar->add(get_string('deletehost', 'mnet'));
$PAGE->set_title("$site->shortname: $strmnetsettings");
$PAGE->set_heading($site->fullname);
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('mnetsettings', 'mnet'));
?>
<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
......
......@@ -31,11 +31,6 @@
$strregistration = get_string("registration");
$strregistrationinfo = get_string("registrationinfo");
$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);
echo $OUTPUT->heading($strregistration);
echo $OUTPUT->box($strregistrationinfo);
......
......@@ -263,24 +263,20 @@
$fullname = fullname($user, has_capability('moodle/site:viewfullnames', $context));
/// course header
$navlinks = array();
$PAGE->set_title($title);
if ($courseid != SITEID) {
if (has_capability('moodle/course:viewparticipants', get_context_instance(CONTEXT_COURSE, $courseid))) {
$navlinks[] = array('name' => get_string('participants'), 'link' => "$CFG->wwwroot/user/index.php?id=$courseid", 'type' => 'misc');
$PAGE->navbar->add(get_string('participants'), null, null, navigation_node::TYPE_CUSTOM,
new moodle_url($CFG->wwwroot.'/user/index.php', array('id'=>$courseid)));
}
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid", 'type' => 'misc');
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header($title, $fullname, $navigation, '', '', true, '&nbsp;', navmenu($course));
/// site header
$PAGE->set_heading($fullname);
} else {
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid", 'type' => 'misc');
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header($title, $course->fullname, $navigation, '', '', true, '&nbsp;', navmenu($course));
$PAGE->set_heading($course->fullname);
}
$PAGE->navbar->add($fullname, null, null, navigation_node::TYPE_CUSTOM,
new moodle_url("$CFG->wwwroot/user/view.php", array('id'=>$userid,'course'=>$courseid)));
$PAGE->navbar->add($straction);
echo $OUTPUT->header();
$showroles = 1;
$currenttab = 'assign';
......
......@@ -105,25 +105,20 @@
$user = $DB->get_record('user', array('id' => $userid));
$fullname = fullname($user, has_capability('moodle/site:viewfullnames', $context));
/// course header
$navlinks = array();
$PAGE->set_title($title);
if ($courseid != SITEID) {
if (has_capability('moodle/course:viewparticipants', get_context_instance(CONTEXT_COURSE, $courseid))) {
$navlinks[] = array('name' => get_string('participants'), 'link' => "$CFG->wwwroot/user/index.php?id=$courseid", 'type' => 'misc');
$PAGE->navbar->add(get_string('participants'), null, null, navigation_node::TYPE_CUSTOM,
new moodle_url($CFG->wwwroot.'/user/index.php', array('id'=>$courseid)));
}
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid", 'type' => 'misc');
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header($title, $fullname, $navigation, '', '', true, '&nbsp;', navmenu($course));
/// site header
$PAGE->set_heading($fullname);
} else {
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid", 'type' => 'misc');
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header($title, $course->fullname, $navigation, "", "", true, "&nbsp;", navmenu($course));
$PAGE->set_heading($course->fullname);
}
$PAGE->navbar->add($fullname, null, null, navigation_node::TYPE_CUSTOM,
new moodle_url("$CFG->wwwroot/user/view.php", array('id'=>$userid,'course'=>$courseid)));
$PAGE->navbar->add($straction);
echo $OUTPUT->header();
$showroles = 1;
$currenttab = 'check';
......
......@@ -148,24 +148,21 @@
$user = $DB->get_record('user', array('id'=>$userid));
$fullname = fullname($user, has_capability('moodle/site:viewfullnames', $context));
/// course header
$navlinks = array();
if ($course->id != SITEID) {
$PAGE->set_title($title);
if ($courseid != SITEID) {
if (has_capability('moodle/course:viewparticipants', get_context_instance(CONTEXT_COURSE, $course->id))) {
$navlinks[] = array('name' => get_string('participants'), 'link' => "$CFG->wwwroot/user/index.php?id=$course->id", 'type' => 'misc');
$PAGE->navbar->add(get_string('participants'), null, null, navigation_node::TYPE_CUSTOM,
new moodle_url($CFG->wwwroot.'/user/index.php', array('id'=>$course->id)));
}
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid", 'type' => 'misc');
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header($title, "$fullname", $navigation, "", "", true, "&nbsp;", navmenu($course));
/// site header
$PAGE->set_heading($fullname);
} else {
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid", 'type' => 'misc');
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header($title, $course->fullname, $navigation, "", "", true, "&nbsp;", navmenu($course));
$PAGE->set_heading($course->fullname);
}
$PAGE->navbar->add($fullname, null, null, navigation_node::TYPE_CUSTOM,
new moodle_url("$CFG->wwwroot/user/view.php", array('id'=>$userid,'course'=>$courseid)));
$PAGE->navbar->add($straction);
echo $OUTPUT->header();
$showroles = 1;
$currenttab = 'override';
include_once($CFG->dirroot.'/user/tabs.php');
......
......@@ -44,23 +44,23 @@ if (!isset($availablefilters)) {
}
}
$navlinks = array();
if ($currenttab != 'update') {
switch ($context->contextlevel) {
case CONTEXT_SYSTEM:
$stradministration = get_string('administration');
$navlinks[] = array('name' => $stradministration, 'link' => '../index.php', 'type' => 'misc');
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
if (empty($title)) {
$title = $SITE->fullname;
}
print_header($title, "$SITE->fullname", $navigation);
$PAGE->navbar->add($stradministration, null, null, navigation_node::TYPE_SETTING, new moodle_url($CFG->wwwroot.'/admin/'));
$PAGE->navbar->add($straction);
$PAGE->set_title($title);
$PAGE->set_heading($SITE->fullname);
echo $OUTPUT->header();
break;
case CONTEXT_USER:
print_header();
echo $OUTPUT->header();
break;
case CONTEXT_COURSECAT:
......@@ -69,18 +69,15 @@ if ($currenttab != 'update') {
$strcategory = get_string("category");
$strcourses = get_string("courses");
$navlinks[] = array('name' => $strcategories,
'link' => "$CFG->wwwroot/course/index.php",
'type' => 'misc');
$navlinks[] = array('name' => $category->name,
'link' => "$CFG->wwwroot/course/category.php?id=$category->id",
'type' => 'misc');
$navigation = build_navigation($navlinks);
if (empty($title)) {
$title = "$SITE->shortname: $category->name";
}
print_header($title, "$SITE->fullname: $strcourses", $navigation, "", "", true);
$PAGE->navbar->add($strcategories, null, null, navigation_node::TYPE_SETTING, new moodle_url($CFG->wwwroot.'/course/index.php'));
$PAGE->navbar->add($category->name, null, null, navigation_node::TYPE_SETTING, new moodle_url($CFG->wwwroot.'/course/category.php', array('id'=>$category->id)));
$PAGE->set_title($title);
$PAGE->set_heading("$SITE->fullname: $strcourses");
echo $OUTPUT->header();
break;
case CONTEXT_COURSE:
......@@ -88,14 +85,14 @@ if ($currenttab != 'update') {
$course = $DB->get_record('course', array('id'=>$context->instanceid));
require_login($course);
$navlinks[] = array('name' => get_string('roles'),
'link' => "$CFG->wwwroot/$CFG->admin/roles/assign.php?contextid=$context->id",
'type' => 'misc');
$navigation = build_navigation($navlinks);
if (empty($title)) {
$title = get_string("editcoursesettings");
}
print_header($title, $course->fullname, $navigation);
$roleslink = new moodle_url("$CFG->wwwroot/$CFG->admin/roles/assign.php", array('contextid'=>$context->id));
$PAGE->navbar->add(get_string('roles'), null, null, navigation_node::TYPE_SETTING, $roleslink);
$PAGE->set_title($title);
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
}
break;
......@@ -108,12 +105,13 @@ if ($currenttab != 'update') {
}
require_login($course);
$navigation = build_navigation(get_string('roles'), $cm);
$PAGE->navigation->add(get_string('roles'));
if (empty($title)) {
$title = get_string("editinga", "moodle", $fullmodulename);
}
print_header_simple($title, '', $navigation, '', '', false);
print_header_simple($title, '', '', '', '', false);
break;
......@@ -122,8 +120,6 @@ if ($currenttab != 'update') {
$blockname = print_context_name($context);
$parentcontext = get_context_instance_by_id($blockinstance->parentcontextid);
$navlinks[] = array('name' => $blockname, 'link' => null, 'type' => 'misc');
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
switch ($parentcontext->contextlevel) {
case CONTEXT_SYSTEM:
break;
......@@ -150,7 +146,11 @@ if ($currenttab != 'update') {
}
print_header("$straction: $blockname", $PAGE->course->fullname, build_navigation($navlinks));
$PAGE->navbar->add($blockname);
$PAGE->navbar->add($straction);
$PAGE->set_title("$straction: $blockname");
$PAGE->set_heading($PAGE->course->fullname);
echo $OUTPUT->header();
}
break;
......
......@@ -122,24 +122,20 @@ $straction = get_string('thisusersroles', 'role');
$title = get_string('xroleassignments', 'role', $fullname);
/// Course header
$navlinks = array();
$PAGE->set_title($title);
if ($courseid != SITEID) {
$PAGE->set_heading($fullname);
if (has_capability('moodle/course:viewparticipants', $coursecontext)) {
$navlinks[] = array('name' => get_string('participants'), 'link' => "$CFG->wwwroot/user/index.php?id=$courseid", 'type' => 'misc');
$PAGE->navbar->add(get_string('participants'), null, null, navigation_node::TYPE_CUSTOM,
new moodle_url($CFG->wwwroot.'/user/index.php', array('id'=>$courseid)));
}
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid", 'type' => 'misc');
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header($title, $fullname, $navigation, '', '', true, '&nbsp;', navmenu($course));
/// Site header
} else {
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid", 'type' => 'misc');
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header($title, $course->fullname, $navigation, '', '', true, '&nbsp;', navmenu($course));
$PAGE->set_heading($course->fullname);
}
$PAGE->navbar->add($fullname, null, null, navigation_node::TYPE_CUSTOM,
new moodle_url("$CFG->wwwroot/user/view.php", array('id'=>$userid,'course'=>$courseid)));
$PAGE->navbar->add($straction);
echo $OUTPUT->header();
$showroles = 1;
$currenttab = 'usersroles';
......
......@@ -56,8 +56,12 @@ if ($PAGE->user_allowed_editing() && $adminediting != -1) {
}
/// print header stuff ------------------------------------------------------------
$PAGE->set_focuscontrol($focus);
if (empty($SITE->fullname)) {
print_header($settingspage->visiblename, $settingspage->visiblename, '', $focus);
$PAGE->set_title($settingspage->visiblename);
$PAGE->set_heading($settingspage->visiblename);
echo $OUTPUT->header();
echo $OUTPUT->box(get_string('configintrosite', 'admin'));
if ($errormsg !== '') {
......@@ -96,13 +100,11 @@ if (empty($SITE->fullname)) {
}
$visiblepathtosection = array_reverse($settingspage->visiblepath);
$navlinks = array();
foreach ($visiblepathtosection as $element) {
$navlinks[] = array('name' => $element, 'link' => null, 'type' => 'misc');
}
$navigation = build_navigation($navlinks);
print_header("$SITE->shortname: " . implode(": ",$visiblepathtosection), $SITE->fullname, $navigation, $focus, '', true, $buttons, '');
$PAGE->set_title("$SITE->shortname: " . implode(": ",$visiblepathtosection));
$PAGE->set_heading($SITE->fullname);
$PAGE->set_button($buttons);
echo $OUTPUT->header();
if ($errormsg !== '') {
echo $OUTPUT->notification($errormsg);
......
......@@ -18,8 +18,11 @@
$strusers = get_string("users");
$strall = get_string("all");
print_header($strtimezone, $strtimezone, build_navigation(array(array('name' => $strtimezone, 'link' => null, 'type' => 'misc'))));
$PAGE->set_title($strtimezone);
$PAGE->set_heading($strtimezone);
$PAGE->navbar->add($strtimezone);
echo $OUTPUT->header();
echo $OUTPUT->heading("");
if (data_submitted() and !empty($zone) and confirm_sesskey()) {
......
......@@ -232,11 +232,11 @@ class edit_field_save extends XMLDBAction {
$tempfield->setDefault($default);
/// Prepare the output
$site = get_site();
$navlinks = array();
$navlinks[] = array('name' => $this->str['administration'], 'link' => '../index.php', 'type' => 'misc');
$navlinks[] = array('name' => 'XMLDB', 'link' => 'index.php', 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header("$site->shortname: XMLDB", "$site->fullname", $navigation);
$PAGE->navbar->add($this->str['administration'], null, null. navigation_node::TYPE_CUSTOM, '../index.php');
$PAGE->navbar->add('XMLDB', null, null. navigation_node::TYPE_CUSTOM, 'index.php');
$PAGE->set_title("$site->shortname: XMLDB");
$PAGE->set_heading($site->fullname);
echo $OUTPUT->header();
notice ('<p>' .implode(', ', $errors) . '</p>
<p>' . $tempfield->readableInfo() . '</p>',
'index.php?action=edit_field&amp;field=' .$field->getName() . '&amp;table=' . $table->getName()
......
......@@ -164,11 +164,11 @@ class edit_index_save extends XMLDBAction {
$tempindex->setFields($fieldsarr);
/// Prepare the output
$site = get_site();
$navlinks = array();
$navlinks[] = array('name' => $this->str['administration'], 'link' => '../index.php', 'type' => 'misc');
$navlinks[] = array('name' => 'XMLDB', 'link' => 'index.php', 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header("$site->shortname: XMLDB", "$site->fullname", $navigation);
$PAGE->navbar->add($this->str['administration'], null, null. navigation_node::TYPE_CUSTOM, '../index.php');
$PAGE->navbar->add('XMLDB', null, null. navigation_node::TYPE_CUSTOM, 'index.php');
$PAGE->set_title("$site->shortname: XMLDB");
$PAGE->set_heading($site->fullname);
echo $OUTPUT->header();
notice ('<p>' .implode(', ', $errors) . '</p>
<p>' . $tempindex->readableInfo() . '</p>',
'index.php?action=edit_index&amp;index=' .$index->getName() . '&amp;table=' . $table->getName() . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)));
......
......@@ -240,11 +240,11 @@ class edit_key_save extends XMLDBAction {
}
/// Prepare the output
$site = get_site();
$navlinks = array();
$navlinks[] = array('name' => $this->str['administration'], 'link' => '../index.php', 'type' => 'misc');
$navlinks[] = array('name' => 'XMLDB', 'link' => 'index.php', 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header("$site->shortname: XMLDB", "$site->fullname", $navigation);
$PAGE->navbar->add($this->str['administration'], null, null. navigation_node::TYPE_CUSTOM, '../index.php');
$PAGE->navbar->add('XMLDB', null, null. navigation_node::TYPE_CUSTOM, 'index.php');
$PAGE->set_title("$site->shortname: XMLDB");
$PAGE->set_heading($site->fullname);
echo $OUTPUT->header();
notice ('<p>' .implode(', ', $errors) . '</p>
<p>' . $tempkey->readableInfo() . '</p>',
......
......@@ -120,11 +120,11 @@ class edit_sentence_save extends XMLDBAction {
if (!empty($errors)) {
/// Prepare the output
$site = get_site();
$navlinks = array();
$navlinks[] = array('name' => $this->str['administration'], 'link' => '../index.php', 'type' => 'misc');
$navlinks[] = array('name' => 'XMLDB', 'link' => 'index.php', 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header("$site->shortname: XMLDB", "$site->fullname", $navigation);
$PAGE->navbar->add($this->str['administration'], null, null. navigation_node::TYPE_CUSTOM, '../index.php');
$PAGE->navbar->add('XMLDB', null, null. navigation_node::TYPE_CUSTOM, 'index.php');
$PAGE->set_title("$site->shortname: XMLDB");
$PAGE->set_heading($site->fullname);
echo $OUTPUT->header();
notice ('<p>' .implode(', ', $errors) . '</p>
<p>' . s($sentence) . '</p>',
'index.php?action=edit_sentence&amp;sentence=' .$sentenceparam . '&amp;statement=' . urlencode($statementparam) . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)));
......
......@@ -103,13 +103,14 @@ class edit_table_save extends XMLDBAction {
if (!empty($errors)) {
$temptable = new xmldb_table($name);
/// Prepare the output
/// Prepare the output
$site = get_site();
$navlinks = array();
$navlinks[] = array('name' => $this->str['administration'], 'link' => '../index.php', 'type' => 'misc');
$navlinks[] = array('name' => 'XMLDB', 'link' => 'index.php', 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header("$site->shortname: XMLDB", "$site->fullname", $navigation);
$PAGE->navbar->add($this->str['administration'], null, null. navigation_node::TYPE_CUSTOM, '../index.php');
$PAGE->navbar->add('XMLDB', null, null. navigation_node::TYPE_CUSTOM, 'index.php');
$PAGE->set_title("$site->shortname: XMLDB");
$PAGE->set_heading($site->fullname);
echo $OUTPUT->header();
notice ('<p>' .implode(', ', $errors) . '</p>
<p>' . $temptable->readableInfo() . '</p>',
'index.php?action=edit_table&amp;table=' . $tableparam . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment