]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19794 Migrated calls to print_heading
authornicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 08:15:43 +0000 (08:15 +0000)
committernicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 08:15:43 +0000 (08:15 +0000)
22 files changed:
course/category.php
course/delete.php
course/edit.php
course/editcategory.php
course/format/weeks/format.php
course/import/activities/mod.php
course/importstudents.php
course/index.php
course/info.php
course/lib.php
course/pending.php
course/recent.php
course/report/log/index.php
course/report/log/indexlive.php
course/report/log/mod.php
course/report/outline/index.php
course/report/stats/report.php
course/request.php
course/reset.php
course/scales.php
course/search.php
course/user.php

index ee2f2e71a3c3539d970d25aed139bac9afb3e6c8..7c517503046449aaa38fa9e30f9de61ea5b48cd8 100644 (file)
 
     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) {
index e367ad05f114065f17138422d0439c918ddcaeea..16b7a877513a9b9f648fa926d08e7c0accdfb7ac 100644 (file)
 
     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");
 
index 5ba15b74fb78302e97bc778d4d46cfea20f3e2c8..904da6a6e2e2b8600e1472446ae83229a246d21c 100644 (file)
 
     $navigation = build_navigation($navlinks);
     print_header($title, $fullname, $navigation, $editform->focus());
-    print_heading($streditcoursesettings);
+    echo $OUTPUT->heading($streditcoursesettings);
 
     $editform->display();
 
index 2335258010a1542b8701a74e35e58316fbcae11f..fa446c1bf071531b78bb6b739d9c3dd530114ea5 100644 (file)
@@ -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();
 
index c671a51ecf5b15fb7f80d43a0541e2cca6a0fca8..d75ef476af0122d95a50e19934a9fc986c586edc 100644 (file)
 
             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;
index 741d1cd04154d32918c77fc77cc88dae898ee8f7..944aa1a2a474abe5eefb8bf950545f9b2313175d 100644 (file)
@@ -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) {
index e6a20b7669d53bab261ea26c104289309153c757..b63a96f018685f66af21ee7ef59ed2ddcb9e7535 100644 (file)
@@ -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");
index 98896519c887f4477113f9329fd83d35b2509f8b..219a2711baf3cffa25835f04bbbfc05361aee635 100644 (file)
@@ -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();
         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');
index 2397aa57d4d25c36edbf1b7a74bd3b7cc6ce2186..cbb1d0fc550ca976e31dbc48d2238fbd5f5c642a 100644 (file)
@@ -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');
index 576d3eb2b33294b9d3be354ead6df47902b184e7..85385cdb69b1e9302a6923182aa0a750710ae5b0 100644 (file)
@@ -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();
index bc13b3d2874b650fbad3ba14cd6ce0c64b70d417..3dcf75b6538701f232f2ba9ba4d06cfb975fca81 100644 (file)
 
     $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';
index d97672ddbd2f0a2428f5d77fc7ed8b31fa2eaedf..bae1101d08978c6f6cafc2c3f91fab1adb1be7a0 100644 (file)
@@ -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();
 
index 052a5716af4a9a0bc707288223925793d9f1189e..39232cb7301e096d8385ae29480765ba2a600676 100644 (file)
@@ -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) {
             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);
     }
index 67aa3c6f210d2b622334f776231cf6da5f0989af..c0d909721af80b14044b5741e193c2a0621a55fe 100644 (file)
@@ -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);
index 970253b84c18841e59ebce5dcb4eeaf95349f7c1..84177a421c8b332cb4157b718deb58ed0627f779 100644 (file)
@@ -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>';
     }
-?>
\ No newline at end of file
+?>
index 26c9204994830f9176bf077a7ff8990d3a6192f0..fe949fa1067cf85ccab8b2809f60a54c5d3aff20 100644 (file)
@@ -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');
index c048ba8f7c3f4278a1908bc73108da184722d554..961724cdefc2f068f3a0e35606c4c0947f909ff8 100644 (file)
 
             $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)) : ''));
 
index 73eb6a28c6909cb0a4c615361c3cea90b6c0f54d..80bdb8015ae241f848628fd03bc69de448228884 100644 (file)
@@ -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();
 
-?>
\ No newline at end of file
+?>
index bce5ea64ba7c5d614c1f689e67591118749bf0b6..28abd8037a0ba4ed1f77d86a2d7817f04ac2263b 100755 (executable)
@@ -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%');
 
index b06af3d15441b68caf2a5ef6aa35aa876b06f9de..da8e88679df487580cfe77c613ab961ce23192ce 100644 (file)
@@ -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>";
     }
 
     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>";
index 06c33ad39c2f4407c0dfd832ac78bd2bfa1f1527..f7a0a7ee7b3ce15bdfb7951bf2fc69c5a7cb732d 100644 (file)
 
     $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 );
         }
     }
 
index 904e2b75b3ce9525ca4924c6867129a5d5a73d62..a770b1bf3e81021767b00a68e7772d391a5d4764 100644 (file)
@@ -33,7 +33,7 @@
 
     if ($user->deleted) {
         print_header();
-        print_heading(get_string('userdeleted'));
+        echo $OUTPUT->heading(get_string('userdeleted'));
         print_footer();
         die;
     }