diff --git a/question/addquestion.php b/question/addquestion.php index cdba0607ecc..0f6599dde4f 100644 --- a/question/addquestion.php +++ b/question/addquestion.php @@ -96,9 +96,9 @@ if ($cm !== null) { } // Display a form to choose the question type. -print_box_start('generalbox boxwidthnormal boxaligncenter', 'chooseqtypebox'); +echo $OUTPUT->box_start('generalbox boxwidthnormal boxaligncenter', 'chooseqtypebox'); print_choose_qtype_to_add_form($hiddenparams); -print_box_end(); +echo $OUTPUT->box_end(); echo $OUTPUT->footer(); ?> diff --git a/question/category_class.php b/question/category_class.php index 65eb1fa4d6f..10203b27a14 100644 --- a/question/category_class.php +++ b/question/category_class.php @@ -260,10 +260,10 @@ class question_category_object { foreach ($this->editlists as $context => $list){ $listhtml = $list->to_html(0, array('str'=>$this->str)); if ($listhtml){ - print_box_start('boxwidthwide boxaligncenter generalbox questioncategories contextlevel' . $list->context->contextlevel); + echo $OUTPUT->box_start('boxwidthwide boxaligncenter generalbox questioncategories contextlevel' . $list->context->contextlevel); echo $OUTPUT->heading(get_string('questioncatsfor', 'question', print_context_name(get_context_instance_by_id($context))), 3); echo $listhtml; - print_box_end(); + echo $OUTPUT->box_end(); } } echo $list->display_page_numbers(); @@ -369,10 +369,11 @@ class question_category_object { } public function display_move_form($questionsincategory, $category){ + global $OUTPUT; $vars = new stdClass; $vars->name = $category->name; $vars->count = $questionsincategory; - print_box(get_string('categorymove', 'quiz', $vars), 'generalbox boxaligncenter'); + echo $OUTPUT->box(get_string('categorymove', 'quiz', $vars), 'generalbox boxaligncenter'); $this->moveform->display(); } diff --git a/question/contextmove.php b/question/contextmove.php index f742b2db2fb..1662132b76b 100644 --- a/question/contextmove.php +++ b/question/contextmove.php @@ -235,9 +235,9 @@ $cattomove->toareaname = $toareaname; $cattomove->fromareaname = $fromareaname; - print_box(get_string('movingcategoryandfiles', 'question', $cattomove), 'boxwidthnarrow boxaligncenter generalbox'); + echo $OUTPUT->box(get_string('movingcategoryandfiles', 'question', $cattomove), 'boxwidthnarrow boxaligncenter generalbox'); } else { - print_box(get_string('movingcategorynofiles', 'question', $cattomove), 'boxwidthnarrow boxaligncenter generalbox'); + echo $OUTPUT->box(get_string('movingcategorynofiles', 'question', $cattomove), 'boxwidthnarrow boxaligncenter generalbox'); } $contextmoveform->display(); echo $OUTPUT->footer(); diff --git a/question/contextmoveq.php b/question/contextmoveq.php index f2fa3fefe90..6620e078562 100644 --- a/question/contextmoveq.php +++ b/question/contextmoveq.php @@ -235,9 +235,9 @@ if (count($urls)){ $questionsstr->toareaname = $toareaname; - print_box(get_string('movingquestionsandfiles', 'question', $questionsstr), 'boxwidthnarrow boxaligncenter generalbox'); + echo $OUTPUT->box(get_string('movingquestionsandfiles', 'question', $questionsstr), 'boxwidthnarrow boxaligncenter generalbox'); } else { - print_box(get_string('movingquestionsnofiles', 'question', $questionsstr), 'boxwidthnarrow boxaligncenter generalbox'); + echo $OUTPUT->box(get_string('movingquestionsnofiles', 'question', $questionsstr), 'boxwidthnarrow boxaligncenter generalbox'); } $contextmoveform->display(); echo $OUTPUT->footer(); diff --git a/question/editlib.php b/question/editlib.php index 97dca302d5c..f833bc72bf2 100644 --- a/question/editlib.php +++ b/question/editlib.php @@ -1130,7 +1130,7 @@ class question_bank_view { } protected function get_current_category($categoryandcontext) { - global $DB; + global $DB, $OUTPUT; list($categoryid, $contextid) = explode(',', $categoryandcontext); if (!$categoryid) { $this->print_choose_category_message($categoryandcontext); @@ -1139,9 +1139,9 @@ class question_bank_view { if (!$category = $DB->get_record('question_categories', array('id' => $categoryid, 'contextid' => $contextid))) { - print_box_start('generalbox questionbank'); + echo $OUTPUT->box_start('generalbox questionbank'); notify('Category not found!'); - print_box_end(); + echo $OUTPUT->box_end(); return false; } diff --git a/question/type/questiontype.php b/question/type/questiontype.php index c6935cbfd94..abf79ef7548 100644 --- a/question/type/questiontype.php +++ b/question/type/questiontype.php @@ -247,7 +247,7 @@ class default_questiontype { $html .= '