From e20bd9ce8f84f3d4d783ccea9b86d900bc70e12a Mon Sep 17 00:00:00 2001 From: Eric Marguin Date: Wed, 29 Nov 2006 11:05:33 +0100 Subject: [PATCH] [svn r10245] add audiorecorder in student view --- main/newscorm/audiorecorder.inc.php | 11 ++++++----- main/newscorm/learnpath.class.php | 7 ++++++- main/newscorm/lp_nav.php | 11 +++++++++++ main/newscorm/lp_view.php | 2 +- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/main/newscorm/audiorecorder.inc.php b/main/newscorm/audiorecorder.inc.php index 1951d487a2..0d904ef638 100644 --- a/main/newscorm/audiorecorder.inc.php +++ b/main/newscorm/audiorecorder.inc.php @@ -6,12 +6,13 @@ * @author Eric Marguin */ -/** - * this url should be removed with a path to another Application - */ + -$params = "?lzt=swf&lzr=swf8&document_id=".$_GET['id']."&dbName=".$_SESSION["_course"]["dbName"]."&user_id=".$_SESSION["_user"]["user_id"] ; + +$params = "?lzt=swf&lzr=swf8&document_id=".$audio_recorder_item_id."&dbName=".$_SESSION["_course"]["dbName"]."&user_id=".$_SESSION["_user"]["user_id"].'?studentview='.$audio_recorder_studentview ; $path_to_lzx = api_get_setting('service_ppt2lp','path_to_lzx'); + + if(!empty($path_to_lzx)){ $path_to_lzx .= $params; @@ -29,7 +30,7 @@ if(!empty($path_to_lzx)){ bgcolor='#ffffff' WIDTH='540px' HEIGHT='140px' ALIGN='center' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'> - ", $path_to_lzx,Database::get_course_table('lp_item'),$_course["dbName"],$_user["user_id"],$path_to_lzx); + ", $path_to_lzx,$audio_recorder_item_id,$_course["dbName"],$_user["user_id"],$path_to_lzx); } ?> diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 1d0aa5f848..d3ccd0b7d9 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -5941,12 +5941,17 @@ class learnpath { $return .= 'Delete the current item Delete'; + + // get the audiorecorder. Use of ob_* functions since there are echos in the file ob_start(); - if(api_get_setting('service_ppt2lp','active')=='true'){ + $audio_recorder_studentview = false; + $audio_recorder_item_id = $item_id; + if(api_get_setting('service_ppt2lp','active')=='true' && api_get_setting('service_ppt2lp','path_to_lzx')!=''){ include('audiorecorder.inc.php'); } $return .= ob_get_contents(); ob_end_clean(); + // end of audiorecorder include $return .= ''; diff --git a/main/newscorm/lp_nav.php b/main/newscorm/lp_nav.php index 3e7e4f43eb..1672667ee5 100644 --- a/main/newscorm/lp_nav.php +++ b/main/newscorm/lp_nav.php @@ -51,6 +51,17 @@ include_once('../inc/reduced_header.inc.php'); ?> +
+ current; + if(api_get_setting('service_ppt2lp','active')=='true' && api_get_setting('service_ppt2lp','path_to_lzx')!=''){ + include('audiorecorder.inc.php'); + } + // end of audiorecorder include + ?> +
get_progress_bar(); ?> get_navigation_bar(); ?> diff --git a/main/newscorm/lp_view.php b/main/newscorm/lp_view.php index 482e0f1f08..1f45e74d4e 100644 --- a/main/newscorm/lp_view.php +++ b/main/newscorm/lp_view.php @@ -159,7 +159,7 @@ if($_SESSION['oLP']->mode == 'fullscreen'){ - +