From 98b369f800b091ea5de1f3ce6e3761f99c420385 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Mon, 10 Aug 2009 04:53:59 +0000 Subject: [PATCH] MDL-19794 Converted print_box* to $OUTPUT->box* --- course/category.php | 8 ++++---- course/format/social/format.php | 4 ++-- course/index.php | 12 ++++++------ course/info.php | 20 ++++++++++---------- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/course/category.php b/course/category.php index 1fabef65a4..60e934f16c 100644 --- a/course/category.php +++ b/course/category.php @@ -179,9 +179,9 @@ /// Print current category description if (!$editingon && $category->description) { - print_box_start(); + echo $OUTPUT->box_start(); echo format_text($category->description); // for multilang filter - print_box_end(); + echo $OUTPUT->box_end(); } if ($editingon && has_capability('moodle/category:manage', $context)) { @@ -233,9 +233,9 @@ } } else if ($numcourses <= COURSE_MAX_SUMMARIES_PER_PAGE and !$page and !$editingon) { - print_box_start('courseboxes'); + echo $OUTPUT->box_start('courseboxes'); print_courses($category); - print_box_end(); + echo $OUTPUT->box_end(); } else { echo $OUTPUT->paging_bar(moodle_paging_bar::make($totalcount, $page, $perpage, "category.php?id=$category->id&perpage=$perpage")); diff --git a/course/format/social/format.php b/course/format/social/format.php index 8492a05383..b3ab1faf2a 100644 --- a/course/format/social/format.php +++ b/course/format/social/format.php @@ -12,9 +12,9 @@ if (trim($forum->intro) != '') { $options = new stdclass; $options->para = false; - print_box(format_text($forum->intro, FORMAT_MOODLE, $options), 'generalbox', 'intro'); + echo $OUTPUT->box(format_text($forum->intro, FORMAT_MOODLE, $options), 'generalbox', 'intro'); } - + $cm = get_coursemodule_from_instance('forum', $forum->id); $context = get_context_instance(CONTEXT_MODULE, $cm->id); echo ''; diff --git a/course/index.php b/course/index.php index cb2c0ffde4..a382017cb5 100644 --- a/course/index.php +++ b/course/index.php @@ -61,9 +61,9 @@ print_header("$site->shortname: $strcategories", $strcourses, $navigation, '', '', true, update_category_button()); echo $OUTPUT->heading($strcategories); echo skip_main_destination(); - print_box_start('categorybox'); + echo $OUTPUT->box_start('categorybox'); print_whole_category_list(); - print_box_end(); + echo $OUTPUT->box_end(); print_course_search(); } else { $strfulllistofcourses = get_string('fulllistofcourses'); @@ -71,9 +71,9 @@ build_navigation(array(array('name'=>$strfulllistofcourses, 'link'=>'','type'=>'misc'))), '', '', true, update_category_button()); echo skip_main_destination(); - print_box_start('courseboxes'); + echo $OUTPUT->box_start('courseboxes'); print_courses(0); - print_box_end(); + echo $OUTPUT->box_end(); } echo '
'; @@ -123,12 +123,12 @@ if ($data->fulldelete) { $deletedcourses = category_delete_full($deletecat, true); - + foreach($deletedcourses as $course) { notify(get_string('coursedeleted', '', $course->shortname), 'notifysuccess'); } notify(get_string('coursecategorydeleted', '', format_string($deletecat->name)), 'notifysuccess'); - + } else { category_delete_move($deletecat, $data->newparent, true); } diff --git a/course/info.php b/course/info.php index fc38200b4f..abc74cd77b 100644 --- a/course/info.php +++ b/course/info.php @@ -30,15 +30,15 @@ $context = get_context_instance(CONTEXT_COURSE, $course->id); if ((!course_parent_visible($course) || (! $course->visible)) && !has_capability('moodle/course:viewhiddencourses', $context)) { - print_error('coursehidden', '', $CFG->wwwroot .'/'); - } - + print_error('coursehidden', '', $CFG->wwwroot .'/'); + } + print_header(get_string("summaryof", "", $course->fullname)); echo $OUTPUT->heading(format_string($course->fullname) . '
(' . format_string($course->shortname) . ')'); if ($course->guest || $course->password) { - print_box_start('generalbox icons'); + echo $OUTPUT->box_start('generalbox icons'); if ($course->guest) { $strallowguests = get_string('allowguests'); echo "
\"\"old_icon_url('i/guest') . "\" /> $strallowguests
"; @@ -47,11 +47,11 @@ $strrequireskey = get_string('requireskey'); echo "
\"\"old_icon_url('i/key') . "\" /> $strrequireskey
"; } - print_box_end(); + echo $OUTPUT->box_end(); } - print_box_start('generalbox info'); + echo $OUTPUT->box_start('generalbox info'); echo format_text($course->summary, FORMAT_MOODLE, NULL, $course->id); @@ -63,13 +63,13 @@ $roleid = (int) $roleid; if ($users = get_role_users($roleid, $context, true, '', 'u.lastname ASC', $canseehidden)) { foreach ($users as $teacher) { - $fullname = fullname($teacher, has_capability('moodle/site:viewfullnames', $context)); + $fullname = fullname($teacher, has_capability('moodle/site:viewfullnames', $context)); $namesarray[] = format_string(role_get_name($role, $context)).': '.$fullname.''; } - } + } } - + if (!empty($namesarray)) { echo "