Skip to content

Commit

Permalink
MDL-19794 Migrated calls to print_heading
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasconnault committed Aug 6, 2009
1 parent 9cb990e commit 7c5286c
Show file tree
Hide file tree
Showing 22 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion course/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions course/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
2 changes: 1 addition & 1 deletion course/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@

$navigation = build_navigation($navlinks);
print_header($title, $fullname, $navigation, $editform->focus());
print_heading($streditcoursesettings);
echo $OUTPUT->heading($streditcoursesettings);

$editform->display();

Expand Down
2 changes: 1 addition & 1 deletion course/editcategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@

$navigation = build_navigation($navlinks);
print_header($title, $fullname, $navigation, $mform->focus());
print_heading($strtitle);
echo $OUTPUT->heading($strtitle);

$mform->display();

Expand Down
4 changes: 2 additions & 2 deletions course/format/weeks/format.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion course/import/activities/mod.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion course/importstudents.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
10 changes: 5 additions & 5 deletions course/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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));
Expand All @@ -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);
Expand Down Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion course/info.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
6 changes: 3 additions & 3 deletions course/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')) {
Expand All @@ -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;
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions course/pending.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion course/recent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions course/report/log/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion course/report/log/indexlive.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions course/report/log/mod.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>';
}
?>
?>
2 changes: 1 addition & 1 deletion course/report/outline/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion course/report/stats/report.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) : ''));

Expand Down
6 changes: 3 additions & 3 deletions course/request.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();

?>
?>
4 changes: 2 additions & 2 deletions course/reset.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

} 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);
Expand Down Expand Up @@ -74,7 +74,7 @@
}

print_header($course->fullname.': '.$strresetcourse, $course->fullname.': '.$strresetcourse, $navigation);
print_heading($strresetcourse);
echo $OUTPUT->heading($strresetcourse);

print_simple_box(get_string('resetinfo'), 'center', '60%');

Expand Down
10 changes: 5 additions & 5 deletions course/scales.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>";
Expand All @@ -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\">(";
Expand All @@ -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>";
Expand All @@ -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>";
Expand Down
6 changes: 3 additions & 3 deletions course/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 );
}
}

Expand Down
2 changes: 1 addition & 1 deletion course/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

if ($user->deleted) {
print_header();
print_heading(get_string('userdeleted'));
echo $OUTPUT->heading(get_string('userdeleted'));
print_footer();
die;
}
Expand Down

0 comments on commit 7c5286c

Please sign in to comment.