From: tjhunt Date: Tue, 22 Apr 2008 16:17:01 +0000 (+0000) Subject: MDL-14352 - General feedback for descriptions not showing up on the review page,... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e31a98a6e15626317ab61d003a7354536d8278d1;p=moodle.git MDL-14352 - General feedback for descriptions not showing up on the review page, as it should. --- diff --git a/lang/en_utf8/help/quiz/description.html b/lang/en_utf8/help/quiz/description.html index d3f530ac94..5da94aeb6f 100644 --- a/lang/en_utf8/help/quiz/description.html +++ b/lang/en_utf8/help/quiz/description.html @@ -1,14 +1,11 @@

Description

- -

This type of question is not really a question.

- -

All it does is print some text without requiring any answers.

- -

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 71d7dc58ee..6353f5ad0c 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 0ac008c493..85ec40dce8 100644 --- a/question/type/description/questiontype.php +++ b/question/type/description/questiontype.php @@ -43,6 +43,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; if (!empty($cmoptions->id)) { $cm = get_coursemodule_from_instance('quiz', $cmoptions->id); @@ -65,6 +66,12 @@ class description_qtype extends default_questiontype { $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"; } diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css index 89708702ba..8b7fd2c48e 100644 --- a/theme/standard/styles_layout.css +++ b/theme/standard/styles_layout.css @@ -2582,11 +2582,16 @@ body.notes .notesgroup { .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; }