MDL-44492 quiz: fix hilighting of graded attempt
In various places, when showing several attempts, we try to hilight the most significant one (the one that gave the final grade if the quiz is set to first/last/best attempt). That was not working because the table zebra stripes were a more specific rule. Also, the colour was inconsistent, not nice, and not very bootstrapy, so I changed it.
This commit is contained in:
@@ -973,6 +973,7 @@ class mod_quiz_renderer extends plugin_renderer_base {
|
||||
// Highlight the highest grade if appropriate.
|
||||
if ($viewobj->overallstats && !$attemptobj->is_preview()
|
||||
&& $viewobj->numattempts > 1 && !is_null($viewobj->mygrade)
|
||||
&& $attemptobj->get_state() == quiz_attempt::FINISHED
|
||||
&& $attemptgrade == $viewobj->mygrade
|
||||
&& $quiz->grademethod == QUIZ_GRADEHIGHEST) {
|
||||
$table->rowclasses[$attemptobj->get_attempt_number()] = 'bestrow';
|
||||
|
||||
+9
-7
@@ -311,8 +311,9 @@ div.editq div.question div.content .singlequestion a .questiontext {
|
||||
#page-mod-quiz-view #page .quizattemptsummary td p {
|
||||
margin-top: 0;
|
||||
}
|
||||
table.quizattemptsummary .bestrow td {
|
||||
background-color: #e8e8e8;
|
||||
#page-mod-quiz-view table.quizattemptsummary tr.bestrow td {
|
||||
border-color: #bce8f1;
|
||||
background-color: #d9edf7;
|
||||
}
|
||||
table.quizattemptsummary .noreviewmessage {
|
||||
color: gray;
|
||||
@@ -347,9 +348,10 @@ table.quizattemptsummary .noreviewmessage {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.mod-quiz .gradedattempt,
|
||||
.mod-quiz tr.gradedattempt td {
|
||||
background-color: #e8e8e8;
|
||||
body.path-mod-quiz .gradedattempt,
|
||||
body.path-mod-quiz table tbody tr.gradedattempt > td {
|
||||
border-color: #bce8f1;
|
||||
background-color: #d9edf7;
|
||||
}
|
||||
|
||||
.quizattemptcounts {
|
||||
@@ -431,8 +433,8 @@ table.quizreviewsummary td.cell {
|
||||
background-color: #fcc;
|
||||
}
|
||||
#page-mod-quiz-report .highlight {
|
||||
border : medium solid yellow;
|
||||
background-color: lightYellow;
|
||||
border: 1px solid #bce8f1;
|
||||
background-color: #d9edf7;
|
||||
}
|
||||
#page-mod-quiz-report .negcovar {
|
||||
border : medium solid pink;
|
||||
|
||||
Reference in New Issue
Block a user