course)) { error("Course is misconfigured"); } require_login($course->id); if (! $survey = get_record("survey", "id", $cm->instance)) { error("Survey ID was incorrect"); } print_header("$course->shortname: $survey->name", "$course->fullname", "id>$course->shortname -> id>Surveys -> $survey->name", "", "", true, update_module_icon($cm->id, $course->id)); if (isteacher($course->id)) { echo "
"; } // Check the survey hasn't already been filled out. if (survey_already_done($survey->id, $USER->id)) { add_to_log($course->id, "survey", "view graph", "view.php?id=$cm->id", "$survey->id"); print_heading("You've completed this survey. The graph below shows a summary of your results compared to the class averages."); $numusers = count_completed_surveys($survey->id); print_heading("$numusers people have completed the survey so far"); echo " 
\n"; echo "$question->text
"; echo "$question->intro | ";
} else {
echo "||||||||
$question->intro | ";
}
while (list ($key, $val) = each ($options)) {
echo "$val | \n";
}
echo "body\">  | ||||||
$qnum | ";
echo "$q->text | ";
for ($i=1;$i<=$numoptions;$i++) {
echo "id VALUE=$i> | "; } echo "id VALUE=0 checked> | "; $checklist["q$P$q->id"] = $numoptions; } else { echo "$qnum | ";
echo "I prefer that | ";
echo "$q->text | ";
for ($i=1;$i<=$numoptions;$i++) {
echo "id VALUE=$i> | "; } echo "body\">id VALUE=0 checked> | "; echo "
I found that | ";
for ($i=1;$i<=$numoptions;$i++) {
echo "id VALUE=$i> | "; } echo "body\">id VALUE=0 checked> | "; $checklist["qP$q->id"] = $numoptions; $checklist["q$q->id"] = $numoptions; } echo "
 
\n"; echo "$qnum | "; echo "$question->text | \n";
echo "\n";
if ($question->type == 0) { // Plain text field
echo "";
} else if ($question->type > 0) { // Choose one of a number
echo "";
} else if ($question->type < 0) { // Choose several of a number
$options = explode( ",", $question->options);
echo " THIS TYPE OF QUESTION NOT SUPPORTED YET |