From 69476fe7968550e75235c5edde8e1aeee3a4d418 Mon Sep 17 00:00:00 2001 From: Hubert Borderiou Date: Mon, 28 Jan 2013 15:39:02 +0100 Subject: [PATCH] Display Not attempted if test not attempted and score not displayed --- main/exercice/exercice.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main/exercice/exercice.php b/main/exercice/exercice.php index dd09716a12..0db2cf8815 100644 --- a/main/exercice/exercice.php +++ b/main/exercice/exercice.php @@ -700,7 +700,15 @@ if (!empty($exercise_list)) { $attempt_text = get_lang('NotAttempted'); } } else { - $attempt_text = get_lang('CantShowResults'); + // if we don't show the score + if ($num > 0) { + // if the exercice has been attempted + $attempt_text = get_lang('CantShowResults'); + } + else { + // if the exercice hasn't been attempted + $attempt_text = get_lang('NotAttempted'); + } } $class_tip = '';