]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19789 Migrated calls to print_heading
authornicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 08:19:03 +0000 (08:19 +0000)
committernicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 08:19:03 +0000 (08:19 +0000)
backup/backup.php
backup/restore.php
backup/restore_check.html
backup/restore_form.html
backup/restorelib.php

index ba02d5cf9730c29cfcd51fa2eb87cce70fa20d5a..1078b767432ec7584436270de8c3d820f75b524e 100644 (file)
         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
index 5639776408e548beb9db16c4feafde6c48a5e34f..e619679bd8828ef104fec25be9db744fdbb3c746 100644 (file)
 
     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
index f5decdd211c684c4e11ce7b32114ae4297cc4a21..7cc1293087649cceaf0a46ab54bcc7f62996b571 100644 (file)
     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
index cc59e9e4fb2e0c636db49da87e9bb141abd3b9f9..fcad656e6750a4deadb69eb1a62bde77fa9cdb80 100644 (file)
@@ -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);
index 5ab23648c2bb9b77d2bee43095b3a3e6d8443c79..e64358129c7595eae55e9ac295d887a953f3f225 100644 (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 {