Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed problem with automatic feedback, when 3x 33.33% didn't yield "C…

…orrect" but "Partially correct". Now the displayed (rounded)values are used, so the text should be in sync with the awarded grade. See also http://moodle.org/mod/forum/discuss.php?d=26584
  • Loading branch information...
commit 56459ea6e1f454390f681ce755f714b591e85c62 1 parent a328acd
mindforge authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 mod/quiz/locallib.php
View
5 mod/quiz/locallib.php
@@ -646,11 +646,10 @@ function print_question_grading_details(&$question, &$state, $quiz, $options) {
$grade->max = $question->maxgrade;
$grade->raw = round($state->last_graded->raw_grade, $quiz->decimalpoints);
- // let student know wether the answer was correct
echo '<div class="correctness">';
- if ($state->last_graded->raw_grade >= $question->maxgrade) {
+ if ($grade->raw >= $grade->max) {
print_string('correct', 'quiz');
- } else if ($state->last_graded->raw_grade > 0) {
+ } else if ($grade->raw > 0) {
print_string('partiallycorrect', 'quiz');
} else {
print_string('incorrect', 'quiz');
Please sign in to comment.
Something went wrong with that request. Please try again.