From: nicolasconnault Date: Thu, 6 Aug 2009 08:22:15 +0000 (+0000) Subject: MDL-19816 Migrated calls to print_heading X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8d849394c88516f968ba6f8c957e11da9927c32d;p=moodle.git MDL-19816 Migrated calls to print_heading --- diff --git a/mod/survey/lib.php b/mod/survey/lib.php index f400c23e8c..b517d4cc72 100644 --- a/mod/survey/lib.php +++ b/mod/survey/lib.php @@ -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"; $options = explode( ",", $question->options); diff --git a/mod/survey/report.php b/mod/survey/report.php index 330eeaa3bf..968e598da5 100644 --- a/mod/survey/report.php +++ b/mod/survey/report.php @@ -129,7 +129,7 @@ switch ($action) { case "summary": - print_heading($strsummary); + echo $OUTPUT->heading($strsummary); if (survey_count_responses($survey->id, $currentgroup, $groupingid)) { echo "
"; @@ -141,7 +141,7 @@ break; case "scales": - print_heading($strscales); + echo $OUTPUT->heading($strscales); if (! $results = survey_get_responses($survey->id, $currentgroup, $groupingid) ) { notify(get_string("nobodyyet","survey")); @@ -182,16 +182,16 @@ 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) ) { @@ -270,7 +270,7 @@ $answers = explode(",", get_string($question->options, "survey")); - print_heading("$strquestion: $question->text"); + echo $OUTPUT->heading("$strquestion: $question->text"); $strname = get_string("name", "survey"); @@ -312,7 +312,7 @@ 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")); @@ -327,7 +327,7 @@ 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)) { @@ -424,7 +424,7 @@ break; case "download": - print_heading($strdownload); + echo $OUTPUT->heading($strdownload); require_capability('mod/survey:download', $context); diff --git a/mod/survey/view.php b/mod/survey/view.php index b8d462650f..e29d12c438 100644 --- a/mod/survey/view.php +++ b/mod/survey/view.php @@ -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 '
'; survey_print_graph("id=$cm->id&sid=$USER->id&group=$currentgroup&type=student.png"); echo '
';