mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
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:
parent
6f885844fd
commit
afbe4592ad
2 changed files with 10 additions and 7 deletions
|
@ -972,6 +972,7 @@ class mod_quiz_renderer extends plugin_renderer_base {
|
||||||
// Highlight the highest grade if appropriate.
|
// Highlight the highest grade if appropriate.
|
||||||
if ($viewobj->overallstats && !$attemptobj->is_preview()
|
if ($viewobj->overallstats && !$attemptobj->is_preview()
|
||||||
&& $viewobj->numattempts > 1 && !is_null($viewobj->mygrade)
|
&& $viewobj->numattempts > 1 && !is_null($viewobj->mygrade)
|
||||||
|
&& $attemptobj->get_state() == quiz_attempt::FINISHED
|
||||||
&& $attemptgrade == $viewobj->mygrade
|
&& $attemptgrade == $viewobj->mygrade
|
||||||
&& $quiz->grademethod == QUIZ_GRADEHIGHEST) {
|
&& $quiz->grademethod == QUIZ_GRADEHIGHEST) {
|
||||||
$table->rowclasses[$attemptobj->get_attempt_number()] = 'bestrow';
|
$table->rowclasses[$attemptobj->get_attempt_number()] = 'bestrow';
|
||||||
|
|
|
@ -311,8 +311,9 @@ div.editq div.question div.content .singlequestion a .questiontext {
|
||||||
#page-mod-quiz-view #page .quizattemptsummary td p {
|
#page-mod-quiz-view #page .quizattemptsummary td p {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
table.quizattemptsummary .bestrow td {
|
#page-mod-quiz-view table.quizattemptsummary tr.bestrow td {
|
||||||
background-color: #e8e8e8;
|
border-color: #bce8f1;
|
||||||
|
background-color: #d9edf7;
|
||||||
}
|
}
|
||||||
table.quizattemptsummary .noreviewmessage {
|
table.quizattemptsummary .noreviewmessage {
|
||||||
color: gray;
|
color: gray;
|
||||||
|
@ -347,9 +348,10 @@ table.quizattemptsummary .noreviewmessage {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mod-quiz .gradedattempt,
|
body.path-mod-quiz .gradedattempt,
|
||||||
.mod-quiz tr.gradedattempt td {
|
body.path-mod-quiz table tbody tr.gradedattempt > td {
|
||||||
background-color: #e8e8e8;
|
border-color: #bce8f1;
|
||||||
|
background-color: #d9edf7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.quizattemptcounts {
|
.quizattemptcounts {
|
||||||
|
@ -431,8 +433,8 @@ table.quizreviewsummary td.cell {
|
||||||
background-color: #fcc;
|
background-color: #fcc;
|
||||||
}
|
}
|
||||||
#page-mod-quiz-report .highlight {
|
#page-mod-quiz-report .highlight {
|
||||||
border : medium solid yellow;
|
border: 1px solid #bce8f1;
|
||||||
background-color: lightYellow;
|
background-color: #d9edf7;
|
||||||
}
|
}
|
||||||
#page-mod-quiz-report .negcovar {
|
#page-mod-quiz-report .negcovar {
|
||||||
border : medium solid pink;
|
border : medium solid pink;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue