Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added extra CSS hooks to distinguish different correctness responses
  • Loading branch information
moodler committed Nov 28, 2005
1 parent 03877b0 commit 0bfa18b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mod/quiz/questiontypes/questiontype.php
Expand Up @@ -560,12 +560,15 @@ function print_question_grading_details(&$question, &$state, $cmoptions, $option
$grade->raw = round($state->last_graded->raw_grade, $cmoptions->decimalpoints);

// let student know wether the answer was correct
echo '<div class="correctness">';
echo '<div class="correctness ';
if ($state->last_graded->raw_grade >= $question->maxgrade) {
echo ' correct">';
print_string('correct', 'quiz');
} else if ($state->last_graded->raw_grade > 0) {
echo ' partiallycorrect">';
print_string('partiallycorrect', 'quiz');
} else {
echo ' incorrect">';
print_string('incorrect', 'quiz');
}
echo '</div>';
Expand Down

0 comments on commit 0bfa18b

Please sign in to comment.