From 03d5d2b190bff1393a3404d9bc3ca5fe772b2092 Mon Sep 17 00:00:00 2001 From: Hubert Borderiou Date: Fri, 10 Feb 2012 10:40:17 +0100 Subject: [PATCH] Add text when finished after a test in learning path - ref #4227 --- main/exercice/exercise_result.php | 4 +++- main/exercice/exercise_show.php | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/main/exercice/exercise_result.php b/main/exercice/exercise_result.php index 6601852fbc..67fa82c532 100644 --- a/main/exercice/exercise_result.php +++ b/main/exercice/exercise_result.php @@ -153,8 +153,10 @@ if ($show_results || $show_only_score) { Display :: display_confirmation_message(get_lang('Saved').'
',false); // Display text when test is finished #4074 +// Don't display the text when finished message if we are from a LP #4227 +// but display it from page exercice_show.php $end_of_message = $objExercise->selectTextWhenFinished(); -if (!empty($end_of_message)) { +if (!empty($end_of_message) && ($origin != 'learnpath')) { Display::display_normal_message($end_of_message, false); echo "
 
"; } diff --git a/main/exercice/exercise_show.php b/main/exercice/exercise_show.php index 6207226e73..6bc8847e7a 100644 --- a/main/exercice/exercise_show.php +++ b/main/exercice/exercise_show.php @@ -258,6 +258,13 @@ if (!empty($track_exercise_info['data_tracking']) && !empty($track_exercise_info } } +// Display the text when finished message if we are on a LP #4227 +$end_of_message = $objExercise->selectTextWhenFinished(); +if (!empty($end_of_message) && ($origin == 'learnpath')) { + Display::display_normal_message($end_of_message, false); + echo "
 
"; +} + // for each question $total_weighting = 0; foreach ($questionList as $questionId) {