]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19816 Migrated calls to print_heading
authornicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 08:22:15 +0000 (08:22 +0000)
committernicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 08:22:15 +0000 (08:22 +0000)
mod/survey/lib.php
mod/survey/report.php
mod/survey/view.php

index f400c23e8cc1a73dc31f2edc8cf75307aea1b56f..b517d4cc726213cb14479bc3e0692ed1a40b65b1 100644 (file)
@@ -520,14 +520,14 @@ function survey_shorten_name ($name, $numwords) {
  * @param object $question
  */
 function survey_print_multi($question) {
-    global $USER, $DB, $qnum, $checklist, $DB;
+    global $USER, $DB, $qnum, $checklist, $DB, $OUTPUT;
 
     $stripreferthat = get_string("ipreferthat", "survey");
     $strifoundthat = get_string("ifoundthat", "survey");
     $strdefault    = get_string('default');
     $strresponses  = get_string('responses', 'survey');
 
-    print_heading($question->text, null, 3, 'questiontext');
+    echo $OUTPUT->heading($question->text, 3, 'questiontext');
     echo "\n<table width=\"90%\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\">";
 
     $options = explode( ",", $question->options);
index 330eeaa3bf9e38415870bbda90d2fdadf934a250..968e598da57bdaebd4782bad5e2c50aa4bf1a6da 100644 (file)
     switch ($action) {
 
       case "summary":
-        print_heading($strsummary);
+        echo $OUTPUT->heading($strsummary);
 
         if (survey_count_responses($survey->id, $currentgroup, $groupingid)) {
             echo "<div class='reportsummary'><a href=\"report.php?action=scales&amp;id=$id\">";
         break;
 
       case "scales":
-        print_heading($strscales);
+        echo $OUTPUT->heading($strscales);
 
         if (! $results = survey_get_responses($survey->id, $currentgroup, $groupingid) ) {
             notify(get_string("nobodyyet","survey"));
 
             if ($scale = $DB->get_records("survey_questions", array("multi"=>$qid))) {
                 $scale = array_pop($scale);
-                print_heading("$scale->text - $strselectedquestions");
+                echo $OUTPUT->heading("$scale->text - $strselectedquestions");
             } else {
-                print_heading($strselectedquestions);
+                echo $OUTPUT->heading($strselectedquestions);
             }
 
         } else {        // get all top-level questions
             $questions = $DB->get_records_list("survey_questions", "id", explode(',',$survey->questions));
             $questionorder = explode(",", $survey->questions);
 
-            print_heading($strallquestions);
+            echo $OUTPUT->heading($strallquestions);
         }
 
         if (! $results = survey_get_responses($survey->id, $currentgroup, $groupingid) ) {
 
         $answers =  explode(",", get_string($question->options, "survey"));
 
-        print_heading("$strquestion: $question->text");
+        echo $OUTPUT->heading("$strquestion: $question->text");
 
 
         $strname = get_string("name", "survey");
 
       case "students":
 
-         print_heading(get_string("analysisof", "survey", get_string('participants')));
+         echo $OUTPUT->heading(get_string("analysisof", "survey", get_string('participants')));
 
          if (! $results = survey_get_responses($survey->id, $currentgroup, $groupingid) ) {
              notify(get_string("nobodyyet","survey"));
              print_error('invaliduserid');
          }
 
-         print_heading(get_string("analysisof", "survey", fullname($user)));
+         echo $OUTPUT->heading(get_string("analysisof", "survey", fullname($user)));
 
          if ($notes != '' and confirm_sesskey()) {
              if (survey_get_analysis($survey->id, $user->id)) {
          break;
 
       case "download":
-        print_heading($strdownload);
+        echo $OUTPUT->heading($strdownload);
 
         require_capability('mod/survey:download', $context);
 
index b8d462650f26e0fb802ab81137ef33656c1a1632..e29d12c438d5df0f28b48f8bb597ae7129c65658 100644 (file)
@@ -71,8 +71,8 @@
         $numusers = survey_count_responses($survey->id, $currentgroup, $groupingid);
 
         if ($showscales) {
-            print_heading(get_string("surveycompleted", "survey"));
-            print_heading(get_string("peoplecompleted", "survey", $numusers));
+            echo $OUTPUT->heading(get_string("surveycompleted", "survey"));
+            echo $OUTPUT->heading(get_string("peoplecompleted", "survey", $numusers));
             echo '<div class="resultgraph">';
             survey_print_graph("id=$cm->id&amp;sid=$USER->id&amp;group=$currentgroup&amp;type=student.png");
             echo '</div>';