diff --git a/question/type/questiontype.php b/question/type/questiontype.php index ad6c4b37131..ae1f55879ff 100644 --- a/question/type/questiontype.php +++ b/question/type/questiontype.php @@ -786,7 +786,7 @@ 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 / 1.01) - and (QUESTION_EVENTCLOSEANDGRADE !== $state->event)) { + and (QUESTION_EVENTCLOSEANDGRADE != $state->event)) { if ('' !== $state->last_graded->penalty && ((float)$state->last_graded->penalty) > 0.0) { // A penalty was applied so display it diff --git a/question/type/shortanswer/questiontype.php b/question/type/shortanswer/questiontype.php index 4fdbd715a06..9e553d79675 100644 --- a/question/type/shortanswer/questiontype.php +++ b/question/type/shortanswer/questiontype.php @@ -411,7 +411,7 @@ class question_shortanswer_qtype extends 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) 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 ' ';