if (!$courses) {
if (empty($subcategorieswereshown)) {
- print_heading(get_string("nocoursesyet"));
+ echo $OUTPUT->heading(get_string("nocoursesyet"));
}
} else if ($numcourses <= COURSE_MAX_SUMMARIES_PER_PAGE and !$page and !$editingon) {
print_header("$site->shortname: $strdeletingcourse", $site->fullname, $navigation);
- print_heading($strdeletingcourse);
+ echo $OUTPUT->heading($strdeletingcourse);
delete_course($course);
fix_course_sortorder(); //update course count in catagories
- print_heading( get_string("deletedcourse", "", format_string($course->shortname)) );
+ echo $OUTPUT->heading( get_string("deletedcourse", "", format_string($course->shortname)) );
print_continue("category.php?id=$course->category");
$navigation = build_navigation($navlinks);
print_header($title, $fullname, $navigation, $editform->focus());
- print_heading($streditcoursesettings);
+ echo $OUTPUT->heading($streditcoursesettings);
$editform->display();
$navigation = build_navigation($navlinks);
print_header($title, $fullname, $navigation, $mform->focus());
-print_heading($strtitle);
+echo $OUTPUT->heading($strtitle);
$mform->display();
echo '<div class="content">';
if (!has_capability('moodle/course:viewhiddensections', $context) and !$thissection->visible) { // Hidden for students
- print_heading($currenttext.$weekperiod.' ('.get_string('notavailable').')', null, 3, 'weekdates');
+ echo $OUTPUT->heading($currenttext.$weekperiod.' ('.get_string('notavailable').')', 3, 'weekdates');
} else {
- print_heading($currenttext.$weekperiod, null, 3, 'weekdates');
+ echo $OUTPUT->heading($currenttext.$weekperiod, 3, 'weekdates');
echo '<div class="summary">';
$summaryformatoptions->noclean = true;
$cat_courses = array();
}
- print_heading(get_string("importactivities"));
+ echo $OUTPUT->heading(get_string("importactivities"));
$options = array();
foreach ($taught_courses as $tcourse) {
/// Print a help notice about the need to use this page
- print_heading(get_string('childcourses'));
+ echo $OUTPUT->heading(get_string('childcourses'));
if (!$frm = data_submitted()) {
$note = get_string("importmetacoursenote");
$navlinks[] = array('name'=>$strcategories,'link'=>'','type'=>'misc');
$navigation = build_navigation($navlinks);
print_header("$site->shortname: $strcategories", $strcourses, $navigation, '', '', true, update_category_button());
- print_heading($strcategories);
+ echo $OUTPUT->heading($strcategories);
echo skip_main_destination();
print_box_start('categorybox');
print_whole_category_list();
require_capability('moodle/category:manage', $context);
require_capability('moodle/category:manage', get_category_or_system_context($deletecat->parent));
- $heading = get_string('deletecategory', '', format_string($deletecat->name));
+ $heading = get_string('deletecategory', format_string($deletecat->name));
require_once('delete_category_form.php');
$mform = new delete_category_form(null, $deletecat);
$mform->set_data(array('delete'=>$delete));
} else if (!$data= $mform->get_data()) {
require_once($CFG->libdir . '/questionlib.php');
admin_externalpage_print_header();
- print_heading($heading);
+ echo $OUTPUT->heading($heading);
$mform->display();
admin_externalpage_print_footer();
exit();
}
admin_externalpage_print_header();
- print_heading($heading);
+ echo $OUTPUT->heading($heading);
if ($data->fulldelete) {
$deletedcourses = category_delete_full($deletecat, true);
/// Print headings
admin_externalpage_print_header();
- print_heading($strcategories);
+ echo $OUTPUT->heading($strcategories);
/// Print out the categories with all the knobs
$strcategories = get_string('categories');
print_header(get_string("summaryof", "", $course->fullname));
- print_heading(format_string($course->fullname) . '<br />(' . format_string($course->shortname) . ')');
+ echo $OUTPUT->heading(format_string($course->fullname) . '<br />(' . format_string($course->shortname) . ')');
if ($course->guest || $course->password) {
print_box_start('generalbox icons');
function print_overview($courses) {
- global $CFG, $USER, $DB;
+ global $CFG, $USER, $DB, $OUTPUT;
$htmlarray = array();
if ($modules = $DB->get_records('modules')) {
if (empty($course->visible)) {
$linkcss = 'class="dimmed"';
}
- print_heading('<a title="'. format_string($course->fullname).'" '.$linkcss.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'. format_string($course->fullname).'</a>');
+ echo $OUTPUT->heading('<a title="'. format_string($course->fullname).'" '.$linkcss.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'. format_string($course->fullname).'</a>');
if (array_key_exists($course->id,$htmlarray)) {
foreach ($htmlarray[$course->id] as $modname => $html) {
echo $html;
}
echo "</ul>\n";
} else {
- print_heading(get_string("nocoursesyet"));
+ echo $OUTPUT->heading(get_string("nocoursesyet"));
$context = get_context_instance(CONTEXT_SYSTEM);
if (has_capability('moodle/course:create', $context)) {
$options = array();
$pending = $DB->get_records('course_request');
if (empty($pending)) {
- print_heading(get_string('nopendingcourses'));
+ echo $OUTPUT->heading(get_string('nopendingcourses'));
} else {
- print_heading(get_string('coursespending'));
+ echo $OUTPUT->heading(get_string('coursespending'));
/// Build a table of all the requests.
$table->class = 'pendingcourserequests generaltable';
$navlinks[] = array('name' => $userinfo, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header("$course->shortname: $strrecentactivity", $course->fullname, $navigation, '', $meta);
- print_heading(format_string($course->fullname) . ": $userinfo", '', 3);
+ echo $OUTPUT->heading(format_string($course->fullname) . ": $userinfo", 3);
$mform->display();
print_header($course->shortname .': '. $strlogs, $course->fullname, $navigation);
}
- print_heading(format_string($course->fullname) . ": $userinfo, $dateinfo (".usertimezone().")");
+ echo $OUTPUT->heading(format_string($course->fullname) . ": $userinfo, $dateinfo (".usertimezone().")");
print_mnet_log_selector_form($hostid, $course, $user, $date, $modname, $modid, $modaction, $group, $showcourses, $showusers, $logformat);
if($hostid == $CFG->mnet_localhost_id) {
print_header($course->shortname .': '. $strlogs, $course->fullname, $navigation, '');
}
- print_heading(get_string('chooselogs') .':');
+ echo $OUTPUT->heading(get_string('chooselogs') .':');
print_log_selector_form($course, $user, $date, $modname, $modid, $modaction, $group, $showcourses, $showusers, $logformat);
}
print_header($course->shortname .': '. $strlogs, $course->fullname, $navigation, '');
}
- print_heading(get_string('loglive', 'coursereport_log'));
+ echo $OUTPUT->heading(get_string('loglive', 'coursereport_log'));
echo '<div class="info">';
link_to_popup_window('/course/report/log/live.php?id='. $course->id,'livelog', get_string('livelogs'), 500, 800);
require_once($CFG->dirroot.'/course/report/log/lib.php');
if (has_capability('coursereport/log:view', $context)) {
- print_heading(get_string('chooselogs') .':');
+ echo $OUTPUT->heading(get_string('chooselogs') .':');
print_log_selector_form($course);
}
if (has_capability('coursereport/log:viewlive', $context)) {
- print_heading(get_string('chooselivelogs') .':');
+ echo $OUTPUT->heading(get_string('chooselivelogs') .':');
echo '<p>';
link_to_popup_window('/course/report/log/live.php?id='. $course->id,'livelog', get_string('livelogs'), 500, 800);
echo '</p>';
}
-?>
\ No newline at end of file
+?>
print_header("$course->shortname: $stractivityreport", $course->fullname, $navigation);
- print_heading(format_string($course->fullname));
+ echo $OUTPUT->heading(format_string($course->fullname));
if (!$logstart = $DB->get_field_sql("SELECT MIN(time) FROM {log}")) {
print_error('logfilenotavailable');
$stats = stats_fix_zeros($stats,$param->timeafter,$param->table,(!empty($param->line2)));
- print_heading(format_string($course->shortname).' - '.get_string('statsreport'.$report)
+ echo $OUTPUT->heading(format_string($course->shortname).' - '.get_string('statsreport'.$report)
.((!empty($user)) ? ' '.get_string('statsreportforuser').' ' .fullname($user,true) : '')
.((!empty($roleid)) ? ' '.$DB->get_field('role','name', array('id'=>$roleid)) : ''));
} else if ($data = $requestform->get_data()) {
print_header($strtitle, $strtitle, build_navigation($strtitle), $requestform->focus());
- print_heading($strtitle);
+ echo $OUTPUT->heading($strtitle);
/// Record the request.
$data->requester = $USER->id;
/// Show the request form.
print_header($strtitle, $strtitle, build_navigation($strtitle), $requestform->focus());
- print_heading($strtitle);
+ echo $OUTPUT->heading($strtitle);
$requestform->display();
print_footer();
-?>
\ No newline at end of file
+?>
} else {
print_header($course->fullname.': '.$strresetcourse, $course->fullname.': '.$strresetcourse, $navigation);
- print_heading($strresetcourse);
+ echo $OUTPUT->heading($strresetcourse);
$data->reset_start_date_old = $course->startdate;
$status = reset_course_userdata($data);
}
print_header($course->fullname.': '.$strresetcourse, $course->fullname.': '.$strresetcourse, $navigation);
-print_heading($strresetcourse);
+echo $OUTPUT->heading($strresetcourse);
print_simple_box(get_string('resetinfo'), 'center', '60%');
$scalemenu = make_menu_from_list($scale->scale);
print_simple_box_start("center");
- print_heading($scale->name);
+ echo $OUTPUT->heading($scale->name);
echo "<center>";
choose_from_menu($scalemenu, "", "", "");
echo "</center>";
}
if ($scales = $DB->get_records("scale", array("courseid"=>$course->id), "name ASC")) {
- print_heading($strcustomscales);
+ echo $OUTPUT->heading($strcustomscales);
if (has_capability('moodle/course:managescales', $context)) {
echo "<p align=\"center\">(";
$scalemenu = make_menu_from_list($scale->scale);
print_simple_box_start("center");
- print_heading($scale->name);
+ echo $OUTPUT->heading($scale->name);
echo "<center>";
choose_from_menu($scalemenu, "", "", "");
echo "</center>";
}
if ($scales = $DB->get_records("scale", array("courseid"=>0), "name ASC")) {
- print_heading($strstandardscales);
+ echo $OUTPUT->heading($strstandardscales);
foreach ($scales as $scale) {
$scalemenu = make_menu_from_list($scale->scale);
print_simple_box_start("center");
- print_heading($scale->name);
+ echo $OUTPUT->heading($scale->name);
echo "<center>";
choose_from_menu($scalemenu, "", "", "");
echo "</center>";
$lastcategory = -1;
if ($courses) {
- print_heading("$strsearchresults: $totalcount");
+ echo $OUTPUT->heading("$strsearchresults: $totalcount");
$encodedsearch = urlencode($search);
///add the module parameter to the paging bar if they exists
} else {
if (!empty($search)) {
- print_heading(get_string("nocoursesfound", "", s($search)));
+ echo $OUTPUT->heading(get_string("nocoursesfound", s($search)));
}
else {
- print_heading( $strnovalidcourses );
+ echo $OUTPUT->heading( $strnovalidcourses );
}
}
if ($user->deleted) {
print_header();
- print_heading(get_string('userdeleted'));
+ echo $OUTPUT->heading(get_string('userdeleted'));
print_footer();
die;
}