From a44635dbd8b6b6e1002b867d56fa4676d10c69d1 Mon Sep 17 00:00:00 2001 From: Cristian Fasanando Date: Mon, 4 May 2009 18:10:06 +0200 Subject: [PATCH] [svn r20280] Removed button "Quit test" when you finished a test into lp - partial FS#4105 --- main/exercice/exercise_result.php | 13 +++++-------- main/exercice/exercise_show.php | 20 ++++++++------------ main/newscorm/blank.php | 28 ++++++++++++++++------------ main/newscorm/lp_view.php | 12 ++++-------- 4 files changed, 33 insertions(+), 40 deletions(-) diff --git a/main/exercice/exercise_result.php b/main/exercice/exercise_result.php index 753f4024ea..b833a95741 100644 --- a/main/exercice/exercise_result.php +++ b/main/exercice/exercise_result.php @@ -29,7 +29,7 @@ * @author Olivier Brouckaert, main author * @author Roan Embrechts, some refactoring * @author Julio Montoya Armas switchable fill in blank option added -* @version $Id: exercise_result.php 20231 2009-04-30 18:08:12Z cvargas1 $ +* @version $Id: exercise_result.php 20280 2009-05-04 16:10:06Z cfasanando $ * * @todo split more code up in functions, move functions to library? */ @@ -1058,14 +1058,11 @@ $exerciseTitle=api_parse_tex($exerciseTitle);

- - - -'.$href.''."\n"; } /* ============================================================================== diff --git a/main/exercice/exercise_show.php b/main/exercice/exercise_show.php index 7580d3a3c2..0780638376 100644 --- a/main/exercice/exercise_show.php +++ b/main/exercice/exercise_show.php @@ -4,7 +4,7 @@ * * @package dokeos.exercise * @author Julio Montoya Armas Added switchable fill in blank option added -* @version $Id: exercise_show.php 20236 2009-04-30 21:01:58Z iflorespaz $ +* @version $Id: exercise_show.php 20280 2009-05-04 16:10:06Z cfasanando $ * * @todo remove the debug code and use the general debug library * @todo use the Database:: functions @@ -1045,10 +1045,6 @@ if($origin!='learnpath') { } echo '!'; } -} else { - echo '

'; - Display::display_normal_message(get_lang('ExerciseFinished')); - echo '
'; } if (is_array($arrid) && is_array($arrmarks)) { @@ -1091,13 +1087,13 @@ if ($origin != 'learnpath') { //we are not in learnpath tool Display::display_footer(); } else { - $lp_mode = $_SESSION['lp_mode']; - if ($lp_mode == 'fullscreen') { -?> - - - -'.$href.''."\n"; //record the results in the learning path, using the SCORM interface (API) echo ''."\n"; diff --git a/main/newscorm/blank.php b/main/newscorm/blank.php index 0468e53210..b0d0351e34 100644 --- a/main/newscorm/blank.php +++ b/main/newscorm/blank.php @@ -23,19 +23,23 @@ include_once('../inc/reduced_header.inc.php');
'; - Display::display_error_message(get_lang('DocumentHasBeenDeleted')); - break; - case 'prerequisites': - echo '

'; - Display::display_normal_message(get_lang('_prereq_not_complete')); - break; - default: - break; +if (isset($_GET['error'])) { + switch($_GET['error']){ + case 'document_deleted': + echo '

'; + Display::display_error_message(get_lang('DocumentHasBeenDeleted')); + break; + case 'prerequisites': + echo '

'; + Display::display_normal_message(get_lang('_prereq_not_complete')); + break; + default: + break; + } +} else if(isset($_GET['msg']) && $_GET['msg']=='exerciseFinished') { + echo '

'; + Display::display_normal_message(get_lang('ExerciseFinished')); } - ?> diff --git a/main/newscorm/lp_view.php b/main/newscorm/lp_view.php index 8e98f3d8e6..4abc08a414 100644 --- a/main/newscorm/lp_view.php +++ b/main/newscorm/lp_view.php @@ -153,6 +153,8 @@ foreach($list as $toc) { } } +$ctok = $_SESSION['sec_token']; + // update status,total_time from lp_item_view table when you finish the exercises in learning path if ($type_quiz && !empty($_REQUEST['exeId']) && isset($_GET['lp_id']) && isset($_GET['lp_item_id'])) { global $src; @@ -193,14 +195,8 @@ if ($type_quiz && !empty($_REQUEST['exeId']) && isset($_GET['lp_id']) && isset($ api_sql_query($sql_upd_score,__FILE__,__LINE__); } } - if($_SESSION['oLP']->mode == 'fullscreen') { - $lp_next_item_id = $_SESSION['oLP']->get_next_item_id(); - $src = $_SESSION['oLP']->get_link('http',$lp_next_item_id); - $_SESSION['oLP']->current = $lp_next_item_id; - } else { - $src = api_get_path(WEB_CODE_PATH).'newscorm/lp_controller.php?action=stats'; - } - + + $src = 'blank.php?msg=exerciseFinished'; } $_SESSION['oLP']->set_previous_item($lp_item_id);