]> git.mjollnir.org Git - moodle.git/commitdiff
Bug #5559: Move CLOZE qtype hightight colours into CSS insted of hardcoding, so theme...
authortjhunt <tjhunt>
Fri, 2 Jun 2006 15:39:41 +0000 (15:39 +0000)
committertjhunt <tjhunt>
Fri, 2 Jun 2006 15:39:41 +0000 (15:39 +0000)
mod/quiz/styles.php
question/type/multianswer/questiontype.php

index abe58e098d2a621f1242e9c1c3b803d82956658a..798b2df7e192b409161d567ea269794e6f3b1547 100644 (file)
@@ -100,3 +100,12 @@ body#mod-quiz-grading table#grading td
 #question-preview .essay .answer textarea {
   width: 400px;
 }
+.incorrecthighlight {
+    background-color: #faa;
+}
+.partialcorrecthighlight {
+    background-color: #ff9;
+}
+.correcthighlight {
+    background-color: #afa;
+}
index 2ce32cbb9751ebad744b417f8eaf61a55fad8258..1b02974ad4467a1245bbd75007dbdef6fd51dc8e 100644 (file)
@@ -286,15 +286,15 @@ class embedded_cloze_qtype extends default_questiontype {
                     if (!isset($chosenanswer->fraction)
                             || $chosenanswer->fraction <= 0.0) {
                         // The response must have been totally wrong:
-                        $style = 'style="background-color:red"';
+                        $style = 'class="incorrecthighlight"';
 
                     } else if ($chosenanswer->fraction >= 1.0) {
                         // The response was correct!!
-                        $style = 'style="background-color:lime"';
+                        $style = 'class="correcthighlight"';
 
                     } else {
                         // This response did at least give some credit:
-                        $style = 'style="background-color:yellow"';
+                        $style = 'class="partialcorrecthighlight"';
                     }
                 } else {
                     $style = '';