From 291fa827f2c6f49c3a4a8dc11a568516d3a49876 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Mon, 10 Aug 2009 04:54:32 +0000 Subject: [PATCH] MDL-19797 Converted print_box* to $OUTPUT->box* --- grade/edit/outcome/import.php | 22 +++++++++++----------- grade/edit/settings/index.php | 4 ++-- grade/edit/tree/index.php | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/grade/edit/outcome/import.php b/grade/edit/outcome/import.php index e760c2e848..d01ca29a92 100644 --- a/grade/edit/outcome/import.php +++ b/grade/edit/outcome/import.php @@ -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) ."
". var_export($header, true)); + //echo $OUTPUT->box(var_export($csv_data, true) ."
". 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 diff --git a/grade/edit/settings/index.php b/grade/edit/settings/index.php index 4a38b99131..6f92c10c45 100644 --- a/grade/edit/settings/index.php +++ b/grade/edit/settings/index.php @@ -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(); diff --git a/grade/edit/tree/index.php b/grade/edit/tree/index.php index df7a2f27b6..93b45029d3 100644 --- a/grade/edit/tree/index.php +++ b/grade/edit/tree/index.php @@ -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 '
'; echo '
'; @@ -326,7 +326,7 @@ echo '
'; echo '
'; -print_box_end(); +echo $OUTPUT->box_end(); // Print action buttons echo '
'; -- 2.39.5