From c7a990842fd5bde92c4653f9f6e5e5ecd3977ea8 Mon Sep 17 00:00:00 2001 From: vyshane Date: Thu, 15 Feb 2007 06:15:24 +0000 Subject: [PATCH] Merged from 1.8. --- question/type/questiontype.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/question/type/questiontype.php b/question/type/questiontype.php index 14f44a59d45..846e9d9f397 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 ' ';