From c8da9339ffbb5ae476487b933cbca4e517024d8e Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Wed, 15 Feb 2017 13:24:58 +0100 Subject: [PATCH] Exercise UI changes see BT#12292 --- app/Resources/public/css/themes/rainbow/default.css | 8 ++++++-- main/exercise/exercise_result.php | 12 ++++++------ main/inc/lib/exercise.lib.php | 10 +++++++--- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/app/Resources/public/css/themes/rainbow/default.css b/app/Resources/public/css/themes/rainbow/default.css index 8b4a94fbd1..7ae916119f 100755 --- a/app/Resources/public/css/themes/rainbow/default.css +++ b/app/Resources/public/css/themes/rainbow/default.css @@ -593,7 +593,7 @@ legend{ /* Large desktop */ @media (min-width: 1200px) { - + } /* Portrait tablet to landscape and desktop */ @@ -636,7 +636,7 @@ legend{ /* Landscape phone to portrait tablet */ @media (max-width: 767px) { - + } /* Landscape phones and down */ @@ -749,3 +749,7 @@ legend{ margin: 10px 0; } } + +.question-result .dl-horizontal { + display:none; +} \ No newline at end of file diff --git a/main/exercise/exercise_result.php b/main/exercise/exercise_result.php index a5975703a1..db82ff7778 100755 --- a/main/exercise/exercise_result.php +++ b/main/exercise/exercise_result.php @@ -161,11 +161,6 @@ if ($objExercise->selectAttempts() > 0) { ); $attemptMessage = sprintf(get_lang('RemainingXAttempts'), $remainingAttempts); $remainingMessage = sprintf("

%s

%s", $attemptMessage, $attemptButton); - - Display::display_normal_message( - $remainingMessage, - false - ); } } } @@ -180,7 +175,12 @@ $max_score = $objExercise->get_max_score(); Display::display_normal_message(get_lang('Saved').'
',false); // Display and save questions -ExerciseLib::display_question_list_by_attempt($objExercise, $exe_id, true); +ExerciseLib::display_question_list_by_attempt( + $objExercise, + $exe_id, + true, + $remainingMessage +); //Unset session for clock time ExerciseLib::exercise_time_control_delete( diff --git a/main/inc/lib/exercise.lib.php b/main/inc/lib/exercise.lib.php index 289a5b864a..a6668aeb8c 100644 --- a/main/inc/lib/exercise.lib.php +++ b/main/inc/lib/exercise.lib.php @@ -3466,11 +3466,13 @@ HOTSPOT; * @param Exercise $objExercise * @param int $exe_id * @param bool $save_user_result save users results (true) or just show the results (false) + * @param string $remainingMessage */ public static function display_question_list_by_attempt( $objExercise, $exe_id, - $save_user_result = false + $save_user_result = false, + $remainingMessage = '' ) { global $origin; @@ -3755,7 +3757,6 @@ HOTSPOT; $exercise_content ); - echo $total_score_text; // Ofaj change BT#11784 @@ -3769,8 +3770,11 @@ HOTSPOT; echo $total_score_text; } - if ($save_user_result) { + if (!empty($remainingMessage)) { + Display::display_normal_message($remainingMessage, false); + } + if ($save_user_result) { // Tracking of results $learnpath_id = $exercise_stat_info['orig_lp_id']; $learnpath_item_id = $exercise_stat_info['orig_lp_item_id'];