#question-preview .essay .answer textarea {
width: 400px;
}
+.incorrecthighlight {
+ background-color: #faa;
+}
+.partialcorrecthighlight {
+ background-color: #ff9;
+}
+.correcthighlight {
+ background-color: #afa;
+}
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 = '';