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();
}
//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
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;
//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;
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
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))) {
}
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
<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);
//This function prints the contents from the info parammeter passed
function restore_print_info ($info) {
- global $CFG;
+ global $CFG, $OUTPUT;
$status = true;
if ($info) {
}
}
//Print title
- print_heading(get_string("backup").":");
+ echo $OUTPUT->heading(get_string("backup").":");
$table->data = $tab;
//Print backup general info
print_table($table);
}
$table->data = $tab;
//Print title
- print_heading(get_string("backupdetails").":");
+ echo $OUTPUT->heading(get_string("backupdetails").":");
//Print backup general info
print_table($table);
} else {
//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();
$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 {