As for displaying the feedback in the body of the HTML page, yes, it is possible, if you hack the Moodle code just a little. However, the crude solution I am suggesting causes the feedback message to be displayed immediately after each question, which means it intrudes with the rest of the text, if there is any. See attached screen shot (which shows both javascript-enabled popup feedback and feedback included in text as per modifications show below).
modifications to:
- Moodle 1.5.4 file \mod\quiz\questiontypes\multianswer\questiontype.php
- Moodle 1.6 file \question\type\multianswer\questiontype.php
around line 300, add the instructions in red.
// Print the input control
switch ($wrapped->qtype) {
case 'shortanswer':
case 'numerical':
echo (" <input $style $readonly $popup name=\"$inputname\"
type=\"text\" value=\"$response\" size=\"12\"/><strong>".$feedback."</strong>");
break;
case 'multichoice':
$outputoptions = '<option></option>'; // Default empty option
foreach ($answers as $mcanswer) {
$selected = $response == $mcanswer->id
? ' selected="selected" ' : '';
$outputoptions .= "<option value=\"$mcanswer->id\" $selected>$mcanswer->answer</option>";
}
echo "<select $popup $readonly $style name=\"$inputname\">";
echo $outputoptions;
echo ('</select><strong>'.$feedback.'</strong>');
break;
default:
error("Unable to recognize questiontype ($wrapped->qtype) of
question part $positionkey.");
break;
}
Joseph