MDL-19794 Migrated calls to print_heading
This commit is contained in:
+1
-1
@@ -226,7 +226,7 @@
|
||||
|
||||
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) {
|
||||
|
||||
+2
-2
@@ -72,12 +72,12 @@
|
||||
|
||||
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");
|
||||
|
||||
|
||||
+1
-1
@@ -142,7 +142,7 @@
|
||||
|
||||
$navigation = build_navigation($navlinks);
|
||||
print_header($title, $fullname, $navigation, $editform->focus());
|
||||
print_heading($streditcoursesettings);
|
||||
echo $OUTPUT->heading($streditcoursesettings);
|
||||
|
||||
$editform->display();
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ if ($id) {
|
||||
|
||||
$navigation = build_navigation($navlinks);
|
||||
print_header($title, $fullname, $navigation, $mform->focus());
|
||||
print_heading($strtitle);
|
||||
echo $OUTPUT->heading($strtitle);
|
||||
|
||||
$mform->display();
|
||||
|
||||
|
||||
@@ -211,10 +211,10 @@
|
||||
|
||||
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;
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
$cat_courses = array();
|
||||
}
|
||||
|
||||
print_heading(get_string("importactivities"));
|
||||
echo $OUTPUT->heading(get_string("importactivities"));
|
||||
|
||||
$options = array();
|
||||
foreach ($taught_courses as $tcourse) {
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
/// 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");
|
||||
|
||||
+5
-5
@@ -59,7 +59,7 @@
|
||||
$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();
|
||||
@@ -101,7 +101,7 @@
|
||||
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));
|
||||
@@ -112,14 +112,14 @@
|
||||
} 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);
|
||||
@@ -214,7 +214,7 @@
|
||||
|
||||
/// 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');
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
|
||||
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');
|
||||
|
||||
+3
-3
@@ -809,7 +809,7 @@ function print_log_graph($course, $userid=0, $type="course.png", $date=0) {
|
||||
|
||||
|
||||
function print_overview($courses) {
|
||||
global $CFG, $USER, $DB;
|
||||
global $CFG, $USER, $DB, $OUTPUT;
|
||||
|
||||
$htmlarray = array();
|
||||
if ($modules = $DB->get_records('modules')) {
|
||||
@@ -829,7 +829,7 @@ function print_overview($courses) {
|
||||
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;
|
||||
@@ -2090,7 +2090,7 @@ function print_courses($category) {
|
||||
}
|
||||
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();
|
||||
|
||||
+2
-2
@@ -156,9 +156,9 @@
|
||||
|
||||
$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';
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@
|
||||
$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();
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
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) {
|
||||
@@ -134,7 +134,7 @@
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
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);
|
||||
|
||||
@@ -8,15 +8,15 @@
|
||||
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>';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
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');
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
$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)) : ''));
|
||||
|
||||
|
||||
+3
-3
@@ -58,7 +58,7 @@
|
||||
|
||||
} 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;
|
||||
@@ -92,8 +92,8 @@
|
||||
|
||||
/// Show the request form.
|
||||
print_header($strtitle, $strtitle, build_navigation($strtitle), $requestform->focus());
|
||||
print_heading($strtitle);
|
||||
echo $OUTPUT->heading($strtitle);
|
||||
$requestform->display();
|
||||
print_footer();
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
+2
-2
@@ -45,7 +45,7 @@ if ($mform->is_cancelled()) {
|
||||
|
||||
} 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);
|
||||
@@ -74,7 +74,7 @@ if ($mform->is_cancelled()) {
|
||||
}
|
||||
|
||||
print_header($course->fullname.': '.$strresetcourse, $course->fullname.': '.$strresetcourse, $navigation);
|
||||
print_heading($strresetcourse);
|
||||
echo $OUTPUT->heading($strresetcourse);
|
||||
|
||||
print_simple_box(get_string('resetinfo'), 'center', '60%');
|
||||
|
||||
|
||||
+5
-5
@@ -35,7 +35,7 @@
|
||||
$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>";
|
||||
@@ -49,7 +49,7 @@
|
||||
}
|
||||
|
||||
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\">(";
|
||||
@@ -61,7 +61,7 @@
|
||||
$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>";
|
||||
@@ -79,12 +79,12 @@
|
||||
}
|
||||
|
||||
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>";
|
||||
|
||||
+3
-3
@@ -211,7 +211,7 @@
|
||||
|
||||
$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
|
||||
@@ -349,10 +349,10 @@
|
||||
|
||||
} 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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
|
||||
if ($user->deleted) {
|
||||
print_header();
|
||||
print_heading(get_string('userdeleted'));
|
||||
echo $OUTPUT->heading(get_string('userdeleted'));
|
||||
print_footer();
|
||||
die;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user