<h1>Description</h1>
-
-
<p>This type of question is not really a question. </p>
-
-
<p>All it does is print some text without requiring any answers.</p>
-
-
<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>
+
\ No newline at end of file
<img class="qimage" src="<?php echo $image; ?>" alt="" />
<?php } ?>
</div>
+ <?php if ($generalfeedback) { ?>
+ <div class="generalfeedback">
+ <?php echo $generalfeedback ?>
+ </div>
+ <?php } ?>
</div>
function print_question(&$question, &$state, $number, $cmoptions, $options) {
global $CFG;
+ $isfinished = question_state_is_graded($state->last_graded) || $state->event == QUESTION_EVENTCLOSE;
if (!empty($cmoptions->id)) {
$cm = get_coursemodule_from_instance('quiz', $cmoptions->id);
$questiontext = $this->format_text($question->questiontext, $question->questiontextformat, $cmoptions);
$image = get_question_image($question);
+ $generalfeedback = '';
+ if ($isfinished && $options->generalfeedback) {
+ $generalfeedback = $this->format_text($question->generalfeedback,
+ $question->questiontextformat, $cmoptions);
+ }
+
include "$CFG->dirroot/question/type/description/question.html";
}
.que.description .info {
display: none;
}
-.que.description .content {
+.que.description .content,
+.que.description .generalfeedback {
margin-left: 1.2em;
+ margin-bottom: 0.5em;
float: none;
width: auto;
}
+.que.description .qtext {
+ margin-bottom: 0;
+}
.que .qtext {
margin-bottom: 1.5em;
}