diff --git a/lang/en_utf8/help/quiz/description.html b/lang/en_utf8/help/quiz/description.html index d3f530ac941..1765284e08c 100644 --- a/lang/en_utf8/help/quiz/description.html +++ b/lang/en_utf8/help/quiz/description.html @@ -12,3 +12,6 @@

It can be used to print a descriptive text to be used by a following group of questions.

+

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.

+ \ No newline at end of file diff --git a/question/type/description/question.html b/question/type/description/question.html index 71d7dc58ee4..6353f5ad0c4 100644 --- a/question/type/description/question.html +++ b/question/type/description/question.html @@ -11,4 +11,9 @@ + +
+ +
+ diff --git a/question/type/description/questiontype.php b/question/type/description/questiontype.php index 7d548f9f7da..23fbad9495c 100644 --- a/question/type/description/questiontype.php +++ b/question/type/description/questiontype.php @@ -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"; }