mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Bug #5559: Move CLOZE qtype hightight colours into CSS insted of hardcoding, so themes can override. Merged from 1.6stable.
This commit is contained in:
parent
b65f13b510
commit
042e68477d
2 changed files with 12 additions and 3 deletions
|
@ -100,3 +100,12 @@ body#mod-quiz-grading table#grading td
|
||||||
#question-preview .essay .answer textarea {
|
#question-preview .essay .answer textarea {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
|
.incorrecthighlight {
|
||||||
|
background-color: #faa;
|
||||||
|
}
|
||||||
|
.partialcorrecthighlight {
|
||||||
|
background-color: #ff9;
|
||||||
|
}
|
||||||
|
.correcthighlight {
|
||||||
|
background-color: #afa;
|
||||||
|
}
|
||||||
|
|
|
@ -286,15 +286,15 @@ class embedded_cloze_qtype extends default_questiontype {
|
||||||
if (!isset($chosenanswer->fraction)
|
if (!isset($chosenanswer->fraction)
|
||||||
|| $chosenanswer->fraction <= 0.0) {
|
|| $chosenanswer->fraction <= 0.0) {
|
||||||
// The response must have been totally wrong:
|
// The response must have been totally wrong:
|
||||||
$style = 'style="background-color:red"';
|
$style = 'class="incorrecthighlight"';
|
||||||
|
|
||||||
} else if ($chosenanswer->fraction >= 1.0) {
|
} else if ($chosenanswer->fraction >= 1.0) {
|
||||||
// The response was correct!!
|
// The response was correct!!
|
||||||
$style = 'style="background-color:lime"';
|
$style = 'class="correcthighlight"';
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// This response did at least give some credit:
|
// This response did at least give some credit:
|
||||||
$style = 'style="background-color:yellow"';
|
$style = 'class="partialcorrecthighlight"';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$style = '';
|
$style = '';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue