From 6ef3c25c63c6799ee1526c3db236c39f825d5d19 Mon Sep 17 00:00:00 2001 From: Cristian Fasanando Date: Tue, 31 Mar 2009 19:33:09 +0200 Subject: [PATCH] [svn r19463] Logic changes - Remove frames, changed by div tags and fixed navigation element - see FS#3909 --- main/newscorm/learnpath.class.php | 26 ++- main/newscorm/lp_view.php | 293 +++++++++++++++++++++--------- main/newscorm/scorm_api.php | 5 +- 3 files changed, 226 insertions(+), 98 deletions(-) diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 02f3d92dfa..694dbf38f9 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -2648,7 +2648,7 @@ class learnpath { unset($mych); } - $html.= '
'."\n" ; + $html.= '
'."\n" ; //$html.= '
'.mb_convert_encoding($this->get_name(),$this->encoding,$mych).'
'; @@ -2724,11 +2724,25 @@ class learnpath { //$html .= ''.$title.'' ; //$html .= ''.$title.'' ; - //  - $html .= ''.stripslashes($title).'' ; + // background:#aaa; + $html .= ''.stripslashes($title).'' ; } elseif($item['type']=='dokeos_module' || $item['type']=='dokeos_chapter') { diff --git a/main/newscorm/lp_view.php b/main/newscorm/lp_view.php index 13d3b40c3c..e0d95c4462 100644 --- a/main/newscorm/lp_view.php +++ b/main/newscorm/lp_view.php @@ -23,6 +23,7 @@ */ $_SESSION['whereami'] = 'lp/view'; +$this_section=SECTION_COURSES; if($lp_controller_touched!=1){ header('location: lp_controller.php?action=view&item_id='.$_REQUEST['item_id']); @@ -51,17 +52,31 @@ $charset = 'ISO-8859-1'; $oLearnpath = false; $course_code = api_get_course_id(); $user_id = api_get_user_id(); - +$platform_theme = api_get_setting('stylesheets'); // plataform's css +$my_style=$platform_theme; //escape external variables /* ----------------------------------------------------------- Header ----------------------------------------------------------- */ -//$htmlHeadXtra[] = ''; +$htmlHeadXtra[] = ''; //$htmlHeadXtra[] = $xajax->getJavascript('../inc/lib/xajax/')."\n"; $htmlHeadXtra[] = ''; //jQuery +$htmlHeadXtra[] = ''; + +$htmlHeadXtra[] = ''; + + $_SESSION['oLP']->error = ''; $lp_type = $_SESSION['oLP']->get_type(); $lp_item_id = $_SESSION['oLP']->get_current_item_id(); @@ -81,67 +96,64 @@ unset($_SESSION['questionList']); /** * Get a link to the corresponding document */ -$src = ''; -switch($lp_type) -{ - case 1: - $_SESSION['oLP']->stop_previous_item(); - $htmlHeadXtra[] = ''; - $prereq_check = $_SESSION['oLP']->prerequisites_match($lp_item_id); - if($prereq_check === true){ - $src = $_SESSION['oLP']->get_link('http',$lp_item_id); - $_SESSION['oLP']->start_current_item(); //starts time counter manually if asset - }else{ - $src = 'blank.php?error=prerequisites'; - } - break; - case 2: - //save old if asset - $_SESSION['oLP']->stop_previous_item(); //save status manually if asset - $htmlHeadXtra[] = ''; - $prereq_check = $_SESSION['oLP']->prerequisites_match($lp_item_id); - if($prereq_check === true){ - $src = $_SESSION['oLP']->get_link('http',$lp_item_id); - $_SESSION['oLP']->start_current_item(); //starts time counter manually if asset - }else{ - $src = 'blank.php'; - } - break; - case 3: - //aicc - $_SESSION['oLP']->stop_previous_item(); //save status manually if asset - $htmlHeadXtra[] = ''; - $prereq_check = $_SESSION['oLP']->prerequisites_match($lp_item_id); - if($prereq_check === true){ - $src = $_SESSION['oLP']->get_link('http',$lp_item_id); - $_SESSION['oLP']->start_current_item(); //starts time counter manually if asset - }else{ - $src = 'blank.php'; - } - break; - case 4: - break; -} -// update status from lp_item_view table when you finish the exercises in learning path -if (isset($_GET['lp_id']) && isset($_GET['lp_item_id'])) { - $TBL_LP_ITEM_VIEW = Database::get_course_table(TABLE_LP_ITEM_VIEW); - $TBL_LP_VIEW = Database::get_course_table(TABLE_LP_VIEW); - $learnpath_item_id = Security::remove_XSS($_GET['lp_item_id']); - $learnpath_id = Security::remove_XSS($_GET['lp_id']); - - $sql = "UPDATE $TBL_LP_ITEM_VIEW SET status = 'completed' WHERE lp_item_id = '".Database::escape_string($learnpath_item_id)."' - AND lp_view_id = (SELECT lp_view.id FROM $TBL_LP_VIEW lp_view WHERE user_id = '".Database::escape_string($user_id)."' AND lp_id='".Database::escape_string($learnpath_id)."')"; - api_sql_query($sql,__FILE__,__LINE__); + +if (!isset($src)) + { + $src = ''; + switch($lp_type) + { + case 1: + $_SESSION['oLP']->stop_previous_item(); + $htmlHeadXtra[] = ''; + $prereq_check = $_SESSION['oLP']->prerequisites_match($lp_item_id); + if($prereq_check === true){ + $src = $_SESSION['oLP']->get_link('http',$lp_item_id); + $_SESSION['oLP']->start_current_item(); //starts time counter manually if asset + }else{ + $src = 'blank.php?error=prerequisites'; + } + break; + case 2: + //save old if asset + $_SESSION['oLP']->stop_previous_item(); //save status manually if asset + $htmlHeadXtra[] = ''; + $prereq_check = $_SESSION['oLP']->prerequisites_match($lp_item_id); + if($prereq_check === true){ + $src = $_SESSION['oLP']->get_link('http',$lp_item_id); + $_SESSION['oLP']->start_current_item(); //starts time counter manually if asset + }else{ + $src = 'blank.php'; + } + break; + case 3: + //aicc + $_SESSION['oLP']->stop_previous_item(); //save status manually if asset + $htmlHeadXtra[] = ''; + $prereq_check = $_SESSION['oLP']->prerequisites_match($lp_item_id); + if($prereq_check === true){ + $src = $_SESSION['oLP']->get_link('http',$lp_item_id); + $_SESSION['oLP']->start_current_item(); //starts time counter manually if asset + }else{ + $src = 'blank.php'; + } + break; + case 4: + break; + } } $_SESSION['oLP']->set_previous_item($lp_item_id); $nameTools = $_SESSION['oLP']->get_name(); $save_setting = get_setting("show_navigation_menu"); global $_setting; -$_setting['show_navigation_menu'] = false; +$_setting['show_navigation_menu'] = 'false'; -$scorm_css_header=true; +$interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); +$interbreadcrumb[]= array ("url"=>api_get_self()."?action=view&lp_id=$learnpath_id", "name" => stripslashes($_SESSION['_course']['name'])); + + +$scorm_css_header=true; $lp_theme_css=$_SESSION['oLP']->get_theme(); //sets the css theme of the LP this call is also use at the frames (toc, nav, message) if($_SESSION['oLP']->mode == 'fullscreen') @@ -162,22 +174,16 @@ if($_SESSION['oLP']->mode == 'fullscreen') - + This page relies heavily on frames. If your browser doesn't support frames, please try to find a better one. Some are available for free and run on multiple platforms. We recommend you try <a href="http://www.mozilla.com/firefox/">Firefox</a>. Get it from its official website by clicking the link. - current; + $audio_recorder_item_id = $_SESSION['oLP']->current; $docs = Database::get_course_table(TABLE_DOCUMENT); $select = "SELECT * FROM $docs " . " WHERE path like BINARY '/audio/lpi".Database::escape_string($audio_recorder_item_id)."-%' AND filetype='file' " . - " ORDER BY path DESC"; + " ORDER BY path DESC"; $res = api_sql_query($select); if(Database::num_rows($res)>0) - { - $show_audioplayer=true; + { + $audio_record_width='85,'; + $show_audioplayer=true; } + else + $audio_record_width=''; } - */ + else + $audio_record_width=''; + ?> - - - - - - - - - - - - - - This page relies heavily on frames. If your browser doesn't support frames, please try to find a better one. Some are available for free and run on multiple platforms. We recommend you try <a href="http://www.mozilla.com/firefox/">Firefox</a>. Get it from its official website by clicking the link. - - + +
+
+ + + + + +
+ + + +
+
+ +
+ + + + +
+ get_preview_image()!=''): ?> + + +
+
+ get_author(); ?> +
+
+ +
+ current; + if(api_get_setting('service_visio','active')=='true'){ + include('audiorecorder.inc.php'); + } + ?> +
+ +
+ + + + + +
+ get_progress_bar('',-1,'',true); ?> + + get_navigation_bar(); ?> +
+
+
+ error; ?> +
+
get_html_toc(); ?>
+
+
+
.
+
+
+ +
+ + + &action=view&lp_id='+lms_lp_id; } if(lms_lp_type==1 || lms_item_type=='asset'){ xajax_start_timer();