From 5c3a8f26548f70fa77783d4795b91e4f83553aaa Mon Sep 17 00:00:00 2001 From: tjhunt Date: Tue, 22 Apr 2008 16:17:00 +0000 Subject: [PATCH] MDL-14352 - General feedback for descriptions not showing up on the review page, as it should. --- lang/en_utf8/help/quiz/description.html | 3 +++ question/type/description/question.html | 5 +++++ question/type/description/questiontype.php | 7 +++++++ 3 files changed, 15 insertions(+) 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"; }