]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19797 Converted print_box* to $OUTPUT->box*
authornicolasconnault <nicolasconnault>
Mon, 10 Aug 2009 04:54:32 +0000 (04:54 +0000)
committernicolasconnault <nicolasconnault>
Mon, 10 Aug 2009 04:54:32 +0000 (04:54 +0000)
grade/edit/outcome/import.php
grade/edit/settings/index.php
grade/edit/tree/index.php

index e760c2e84847649776c525fff842967b9b8c7853..d01ca29a9241966255bffd0ded459bd589f40e22 100644 (file)
@@ -133,10 +133,10 @@ if ($handle = fopen($imported_file['userfile']['tmp_name'], 'r')) {
                 }
             }
             if ($error) {
-                print_box_start('generalbox importoutcomenofile');
+                echo $OUTPUT->box_start('generalbox importoutcomenofile');
                 echo get_string('importoutcomenofile', 'grades', $line);
                 echo print_single_button($CFG->wwwroot.'/grade/edit/outcome/index.php', array('id'=> $courseid), get_string('back'), 'get', '_self', true);
-                print_box_end();
+                echo $OUTPUT->box_end();
                 $fatal_error = true;
                 break;
             }
@@ -152,22 +152,22 @@ if ($handle = fopen($imported_file['userfile']['tmp_name'], 'r')) {
         // sanity check #2: every line must have the same number of columns as there are
         // headers.  If not, processing stops.
         if ( count($csv_data) != count($file_headers) ) {
-            print_box_start('generalbox importoutcomenofile');
+            echo $OUTPUT->box_start('generalbox importoutcomenofile');
             echo get_string('importoutcomenofile', 'grades', $line);
             echo print_single_button($CFG->wwwroot.'/grade/edit/outcome/index.php', array('id'=> $courseid), get_string('back'), 'get', '_self', true);
-            print_box_end();
+            echo $OUTPUT->box_end();
             $fatal_error = true;
-            //print_box(var_export($csv_data, true) ."<br />". var_export($header, true));
+            //echo $OUTPUT->box(var_export($csv_data, true) ."<br />". var_export($header, true));
             break;
         }
 
         // sanity check #3: all required fields must be present on the current line.
         foreach ($headers as $header => $position) {
             if ($csv_data[$imported_headers[$header]] == '') {
-                print_box_start('generalbox importoutcomenofile');
+                echo $OUTPUT->box_start('generalbox importoutcomenofile');
                 echo get_string('importoutcomenofile', 'grades', $line);
                 echo print_single_button($CFG->wwwroot.'/grade/edit/outcome/index.php', array('id'=> $courseid), get_string('back'), 'get', '_self', true);
-                print_box_end();
+                echo $OUTPUT->box_end();
                 $fatal_error = true;
                 break;
             }
@@ -193,7 +193,7 @@ if ($handle = fopen($imported_file['userfile']['tmp_name'], 'r')) {
 
         if ($outcome) {
             // already exists, print a message and skip.
-            print_box(get_string('importskippedoutcome', 'grades', $csv_data[$imported_headers['outcome_shortname']]));
+            echo $OUTPUT->box(get_string('importskippedoutcome', 'grades', $csv_data[$imported_headers['outcome_shortname']]));
             continue;
         }
 
@@ -207,7 +207,7 @@ if ($handle = fopen($imported_file['userfile']['tmp_name'], 'r')) {
             $scale_id = key($scale);
         } else {
             if (!has_capability('moodle/course:managescales', $context)) {
-                print_box(get_string('importskippednomanagescale', 'grades', $csv_data[$imported_headers['outcome_shortname']]));
+                echo $OUTPUT->box(get_string('importskippednomanagescale', 'grades', $csv_data[$imported_headers['outcome_shortname']]));
                 continue;
             } else {
                 // scale doesn't exists : create it.
@@ -244,10 +244,10 @@ if ($handle = fopen($imported_file['userfile']['tmp_name'], 'r')) {
         $outcome_success_strings = new StdClass();
         $outcome_success_strings->name = $outcome_data['fullname'];
         $outcome_success_strings->id = $outcome_id;
-        print_box(get_string('importoutcomesuccess', 'grades', $outcome_success_strings));
+        echo $OUTPUT->box(get_string('importoutcomesuccess', 'grades', $outcome_success_strings));
     }
 } else {
-    print_box(get_string('importoutcomenofile', 'grades', 0));
+    echo $OUTPUT->box(get_string('importoutcomenofile', 'grades', 0));
 }
 
 // finish
index 4a38b99131cd6f9d3c075054bf029117d2de7ccd..6f92c10c4582f6454e3ec45b5028cf0accbb8dbe 100644 (file)
@@ -68,9 +68,9 @@ if ($mform->is_cancelled()) {
 
 print_grade_page_head($courseid, 'settings', 'coursesettings', get_string('coursesettings', 'grades'));
 
-print_box_start('generalbox boxaligncenter boxwidthnormal centerpara');
+echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthnormal centerpara');
 echo get_string('coursesettingsexplanation', 'grades');
-print_box_end();
+echo $OUTPUT->box_end();
 
 $mform->display();
 
index df7a2f27b67dfdd88764c4ae553c30fc813e0d79..93b45029d372d674e7511069414c31f05a78440b 100644 (file)
@@ -287,7 +287,7 @@ if ($data = data_submitted() and confirm_sesskey()) {
 }
 
 // Print Table of categories and items
-print_box_start('gradetreebox generalbox');
+echo $OUTPUT->box_start('gradetreebox generalbox');
 
 echo '<form id="gradetreeform" method="post" action="'.$returnurl.'">';
 echo '<div>';
@@ -326,7 +326,7 @@ echo '</div>';
 
 echo '</div></form>';
 
-print_box_end();
+echo $OUTPUT->box_end();
 
 // Print action buttons
 echo '<div class="buttons">';