From a28e48a79e082f4a3d5167d809def12eb8ba4cdd Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Mon, 25 Jul 2011 15:39:49 +0200 Subject: [PATCH] Fixing fatal error due the audio record include code see #3658 --- main/newscorm/audiorecorder.inc.php | 13 +++---------- main/newscorm/display_audiorecorder.php | 19 +++++++++---------- main/newscorm/learnpath.class.php | 2 +- main/newscorm/lp_edit_item_prereq.php | 23 +---------------------- 4 files changed, 14 insertions(+), 43 deletions(-) diff --git a/main/newscorm/audiorecorder.inc.php b/main/newscorm/audiorecorder.inc.php index 638bb05a72..59912f8d6b 100755 --- a/main/newscorm/audiorecorder.inc.php +++ b/main/newscorm/audiorecorder.inc.php @@ -9,9 +9,6 @@ * @author Arnaud Ligot * @package chamilo.learnpath */ -/** - * Code - */ global $_configuration; $web_path = api_get_path(WEB_CODE_PATH); $getid3_path = api_get_path(LIBRARY_PATH); @@ -66,19 +63,15 @@ if (!empty($path_to_lzx)) { "", $path_to_lzx, $path_to_lzx); if ($audio_recorder_studentview == 'false') { echo ' - '; + '; // Commented the audio for the version stable. //echo ''; //echo '
'; } else { echo $recorder_content; } -} +} \ No newline at end of file diff --git a/main/newscorm/display_audiorecorder.php b/main/newscorm/display_audiorecorder.php index abb7a57a62..e37d3a6c5a 100755 --- a/main/newscorm/display_audiorecorder.php +++ b/main/newscorm/display_audiorecorder.php @@ -33,13 +33,12 @@ require_once '../inc/reduced_header.inc.php'; echo ''; - echo '
'; - $audio_recorder_studentview = 'true'; - $audio_recorder_item_id = $_SESSION['oLP']->current; - if (api_get_setting('service_visio', 'active') == 'true') { - include 'audiorecorder.inc.php'; - } - echo '
'; - // end of audiorecorder include - -echo ''; + echo '
'; + $audio_recorder_studentview = 'true'; + $audio_recorder_item_id = $_SESSION['oLP']->current; + if (api_get_setting('service_visio', 'active') == 'true') { + require_once 'audiorecorder.inc.php'; + } + echo '
'; + // end of audiorecorder include +echo ''; \ No newline at end of file diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 6adcc7fb97..fb7cfce7e8 100755 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -7181,7 +7181,7 @@ class learnpath { $audio_recorder_studentview = 'false'; $audio_recorder_item_id = $item_id; if (api_get_setting('service_visio', 'active') == 'true') { - include 'audiorecorder.inc.php'; + require_once 'audiorecorder.inc.php'; } $return .= ob_get_contents(); ob_end_clean(); diff --git a/main/newscorm/lp_edit_item_prereq.php b/main/newscorm/lp_edit_item_prereq.php index 059cdeac1d..d68aea4515 100755 --- a/main/newscorm/lp_edit_item_prereq.php +++ b/main/newscorm/lp_edit_item_prereq.php @@ -9,10 +9,6 @@ * @author Yannick Warnier - cleaning and update for new SCORM tool * @package chamilo.learnpath */ -/** - * Code - */ -/* INIT SECTION */ $this_section = SECTION_COURSES; @@ -20,9 +16,6 @@ api_protect_course_script(); /* Libraries */ -// The main_api.lib.php, database.lib.php and display.lib.php -// libraries are included by default. - include 'learnpath_functions.inc.php'; //include '../resourcelinker/resourcelinker.inc.php'; include 'resourcelinker.inc.php'; @@ -41,19 +34,6 @@ $tbl_lp_view = Database::get_course_table(TABLE_LP_VIEW); $isStudentView = (int) $_REQUEST['isStudentView']; $learnpath_id = (int) $_REQUEST['lp_id']; $submit = $_POST['submit_button']; -/* -$chapter_id = $_GET['chapter_id']; -$title = $_POST['title']; -$description = $_POST['description']; -$Submititem = $_POST['Submititem']; -$action = $_REQUEST['action']; -$id = (int) $_REQUEST['id']; -$type = $_REQUEST['type']; -$direction = $_REQUEST['direction']; -$moduleid = $_REQUEST['moduleid']; -$prereq = $_REQUEST['prereq']; -$type = $_REQUEST['type']; -*/ /* MAIN CODE */ @@ -158,5 +138,4 @@ echo ''; echo '
'; /* FOOTER */ - -Display::display_footer(); +Display::display_footer(); \ No newline at end of file