* @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);
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&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);
$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&sid=$USER->id&group=$currentgroup&type=student.png");
echo '</div>';