mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-19789 Migrated calls to print_heading
This commit is contained in:
parent
587a4eb0e0
commit
e11adf4884
@ -72,14 +72,14 @@
|
||||
print_header("$site->shortname: $strcoursebackup", $site->fullname, $navigation);
|
||||
|
||||
if ($courses = get_courses('all','c.shortname','c.id,c.shortname,c.fullname')) {
|
||||
print_heading(get_string("choosecourse"));
|
||||
echo $OUTPUT->heading(get_string("choosecourse"));
|
||||
print_simple_box_start("center");
|
||||
foreach ($courses as $course) {
|
||||
echo '<a href="backup.php?id='.$course->id.'">'.format_string($course->fullname).' ('.format_string($course->shortname).')</a><br />'."\n";
|
||||
}
|
||||
print_simple_box_end();
|
||||
} else {
|
||||
print_heading(get_string("nocoursesyet"));
|
||||
echo $OUTPUT->heading(get_string("nocoursesyet"));
|
||||
print_continue("$CFG->wwwroot/$CFG->admin/index.php");
|
||||
}
|
||||
print_footer();
|
||||
@ -107,7 +107,7 @@
|
||||
}
|
||||
|
||||
//Print form
|
||||
print_heading(format_string("$strcoursebackup: $course->fullname ($course->shortname)"));
|
||||
echo $OUTPUT->heading(format_string("$strcoursebackup: $course->fullname ($course->shortname)"));
|
||||
print_simple_box_start("center");
|
||||
|
||||
//Adjust some php variables to the execution of this script
|
||||
|
@ -104,7 +104,7 @@
|
||||
|
||||
if (!$file) {
|
||||
print_header("$site->shortname: $strcourserestore", $site->fullname, $navigation);
|
||||
print_heading(get_string("nofilesselected"));
|
||||
echo $OUTPUT->heading(get_string("nofilesselected"));
|
||||
print_continue("$CFG->wwwroot/$CFG->admin/index.php");
|
||||
print_footer();
|
||||
exit;
|
||||
@ -113,7 +113,7 @@
|
||||
//If cancel has been selected, inform and end
|
||||
if ($cancel) {
|
||||
print_header("$site->shortname: $strcourserestore", $site->fullname, $navigation);
|
||||
print_heading(get_string("restorecancelled"));
|
||||
echo $OUTPUT->heading(get_string("restorecancelled"));
|
||||
print_continue("$CFG->wwwroot/course/view.php?id=".$id);
|
||||
print_footer();
|
||||
exit;
|
||||
@ -135,7 +135,7 @@
|
||||
print_header("$course->shortname: $strcourserestore", $course->fullname, $navigation);
|
||||
}
|
||||
//Print form
|
||||
print_heading("$strcourserestore".((empty($to) ? ': '.basename($file) : '')));
|
||||
echo $OUTPUT->heading("$strcourserestore".((empty($to) ? ': '.basename($file) : '')));
|
||||
print_simple_box_start('center');
|
||||
|
||||
//Adjust some php variables to the execution of this script
|
||||
|
@ -237,7 +237,7 @@
|
||||
if (empty($restore->course_id) && ($restore->restoreto == RESTORETO_EXISTING_DELETING || $restore->restoreto == RESTORETO_EXISTING_ADDING)) {
|
||||
|
||||
if ($courses = $mycourses) {
|
||||
print_heading(get_string("choosecourse"));
|
||||
echo $OUTPUT->heading(get_string("choosecourse"));
|
||||
print_simple_box_start("center");
|
||||
foreach ($courses as $course) {
|
||||
if (!has_capability('moodle/site:restore', get_context_instance(CONTEXT_COURSE, $course->id))) {
|
||||
@ -252,7 +252,7 @@
|
||||
}
|
||||
print_simple_box_end();
|
||||
} else {
|
||||
print_heading(get_string("nocoursesyet"));
|
||||
echo $OUTPUT->heading(get_string("nocoursesyet"));
|
||||
print_continue("$CFG->wwwroot/$CFG->admin/index.php");
|
||||
}
|
||||
//Checks everything and execute restore
|
||||
|
@ -600,7 +600,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
|
||||
<hr />
|
||||
<?php
|
||||
|
||||
print_heading(get_string('rolemappings'));
|
||||
echo $OUTPUT->heading(get_string('rolemappings'));
|
||||
$xml_file = $CFG->dataroot."/temp/backup/".$backup_unique_code."/moodle.xml";
|
||||
|
||||
$info = restore_read_xml_info($xml_file);
|
||||
|
@ -496,7 +496,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
|
||||
//This function prints the contents from the info parammeter passed
|
||||
function restore_print_info ($info) {
|
||||
|
||||
global $CFG;
|
||||
global $CFG, $OUTPUT;
|
||||
|
||||
$status = true;
|
||||
if ($info) {
|
||||
@ -530,7 +530,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
|
||||
}
|
||||
}
|
||||
//Print title
|
||||
print_heading(get_string("backup").":");
|
||||
echo $OUTPUT->heading(get_string("backup").":");
|
||||
$table->data = $tab;
|
||||
//Print backup general info
|
||||
print_table($table);
|
||||
@ -641,7 +641,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
|
||||
}
|
||||
$table->data = $tab;
|
||||
//Print title
|
||||
print_heading(get_string("backupdetails").":");
|
||||
echo $OUTPUT->heading(get_string("backupdetails").":");
|
||||
//Print backup general info
|
||||
print_table($table);
|
||||
} else {
|
||||
@ -653,7 +653,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
|
||||
|
||||
//This function prints the contents from the course_header parammeter passed
|
||||
function restore_print_course_header ($course_header) {
|
||||
|
||||
global $OUTPUT;
|
||||
$status = true;
|
||||
if ($course_header) {
|
||||
$table = new object();
|
||||
@ -670,7 +670,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
|
||||
$tab[1][1] = $course_header->course_summary;
|
||||
$table->data = $tab;
|
||||
//Print title
|
||||
print_heading(get_string("course").":");
|
||||
echo $OUTPUT->heading(get_string("course").":");
|
||||
//Print backup course header info
|
||||
print_table($table);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user