From: vyshane Date: Thu, 15 Feb 2007 06:15:24 +0000 (+0000) Subject: Merged from 1.8. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c7a990842fd5bde92c4653f9f6e5e5ecd3977ea8;p=moodle.git Merged from 1.8. --- diff --git a/question/type/questiontype.php b/question/type/questiontype.php index 14f44a59d4..846e9d9f39 100644 --- a/question/type/questiontype.php +++ b/question/type/questiontype.php @@ -752,7 +752,9 @@ class default_questiontype { } // print info about new penalty // penalty is relevant only if the answer is not correct and further attempts are possible - if (($state->last_graded->raw_grade < $question->maxgrade) and (QUESTION_EVENTCLOSEANDGRADE !== $state->event)) { + if (($state->last_graded->raw_grade < $question->maxgrade / 1.01) + and (QUESTION_EVENTCLOSEANDGRADE !== $state->event)) { + if ('' !== $state->last_graded->penalty && ((float)$state->last_graded->penalty) > 0.0) { // A penalty was applied so display it echo ' ';