From: nicolasconnault Date: Thu, 6 Aug 2009 08:19:03 +0000 (+0000) Subject: MDL-19789 Migrated calls to print_heading X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e11adf4884fe2b766617249d45eadcf243073302;p=moodle.git MDL-19789 Migrated calls to print_heading --- diff --git a/backup/backup.php b/backup/backup.php index ba02d5cf97..1078b76743 100644 --- a/backup/backup.php +++ b/backup/backup.php @@ -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 ''.format_string($course->fullname).' ('.format_string($course->shortname).')
'."\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 diff --git a/backup/restore.php b/backup/restore.php index 5639776408..e619679bd8 100644 --- a/backup/restore.php +++ b/backup/restore.php @@ -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 diff --git a/backup/restore_check.html b/backup/restore_check.html index f5decdd211..7cc1293087 100644 --- a/backup/restore_check.html +++ b/backup/restore_check.html @@ -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 diff --git a/backup/restore_form.html b/backup/restore_form.html index cc59e9e4fb..fcad656e67 100644 --- a/backup/restore_form.html +++ b/backup/restore_form.html @@ -600,7 +600,7 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
heading(get_string('rolemappings')); $xml_file = $CFG->dataroot."/temp/backup/".$backup_unique_code."/moodle.xml"; $info = restore_read_xml_info($xml_file); diff --git a/backup/restorelib.php b/backup/restorelib.php index 5ab23648c2..e64358129c 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -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 {