MDL-14352 - General feedback for descriptions not showing up on the review page, as it should.

This commit is contained in:
tjhunt
2008-04-22 16:17:00 +00:00
parent 85becf9549
commit 5c3a8f2654
3 changed files with 15 additions and 0 deletions
+3
View File
@@ -12,3 +12,6 @@
<p>It can be used to print a descriptive text to be used by a following group of questions.</p>
<p>The General feedback can be used if you have some text that you want to appear on the review
page only. The 'Question text' appears both during the attempt and on the review page.</p>
+5
View File
@@ -11,4 +11,9 @@
<img class="qimage" src="<?php echo $image; ?>" alt="" />
<?php } ?>
</div>
<?php if ($generalfeedback) { ?>
<div class="generalfeedback">
<?php echo $generalfeedback ?>
</div>
<?php } ?>
</div>
@@ -40,6 +40,7 @@ class description_qtype extends default_questiontype {
function print_question(&$question, &$state, $number, $cmoptions, $options) {
global $CFG;
$isfinished = question_state_is_graded($state->last_graded) || $state->event == QUESTION_EVENTCLOSE;
// For editing teachers print a link to an editing popup window
$editlink = '';
@@ -52,6 +53,12 @@ class description_qtype extends default_questiontype {
$questiontext = $this->format_text($question->questiontext, $question->questiontextformat, $cmoptions);
$image = get_question_image($question, $cmoptions->course);
$generalfeedback = '';
if ($isfinished && $options->generalfeedback) {
$generalfeedback = $this->format_text($question->generalfeedback,
$question->questiontextformat, $cmoptions);
}
include "$CFG->dirroot/question/type/description/question.html";
}