diff --git a/main/newscorm/lp_ajax_initialize.php b/main/newscorm/lp_ajax_initialize.php index 1548d3f57a..8b66a843d0 100644 --- a/main/newscorm/lp_ajax_initialize.php +++ b/main/newscorm/lp_ajax_initialize.php @@ -20,6 +20,11 @@ $use_anonymous = true; // Name of the language file that needs to be included. $language_file[] = 'learnpath'; require_once '../inc/global.inc.php'; + +$app['template.show_footer'] = false; +$app['template.show_header'] = false; +$app['default_layout'] = 'default/layout/blank.tpl'; + require_once 'learnpath.class.php'; require_once 'scorm.class.php'; require_once 'aicc.class.php'; @@ -27,6 +32,7 @@ require_once 'learnpathItem.class.php'; require_once 'scormItem.class.php'; require_once 'aiccItem.class.php'; + /** * Get one item's details * @param integer LP ID diff --git a/main/newscorm/lp_ajax_last_update_status.php b/main/newscorm/lp_ajax_last_update_status.php index 7839919642..be1e99b185 100644 --- a/main/newscorm/lp_ajax_last_update_status.php +++ b/main/newscorm/lp_ajax_last_update_status.php @@ -31,6 +31,10 @@ $language_file[] = 'learnpath'; require_once '../inc/global.inc.php'; +$app['template.show_footer'] = false; +$app['template.show_header'] = false; +$app['default_layout'] = 'default/layout/blank.tpl'; + /** * Writes an item's new values into the database and returns the operation result * @param integer Learnpath ID diff --git a/main/newscorm/lp_ajax_log.php b/main/newscorm/lp_ajax_log.php index d2f8af5fd0..9b538d5094 100644 --- a/main/newscorm/lp_ajax_log.php +++ b/main/newscorm/lp_ajax_log.php @@ -19,6 +19,10 @@ $language_file[] = 'learnpath'; require_once '../inc/global.inc.php'; +$app['template.show_footer'] = false; +$app['template.show_header'] = false; +$app['default_layout'] = 'default/layout/blank.tpl'; + /** * Write a log with the current message * @param string Message diff --git a/main/newscorm/lp_ajax_save_item.php b/main/newscorm/lp_ajax_save_item.php index 61a8dfd456..692584354a 100644 --- a/main/newscorm/lp_ajax_save_item.php +++ b/main/newscorm/lp_ajax_save_item.php @@ -23,6 +23,10 @@ $language_file[] = 'learnpath'; // Including the global initialization file. require_once '../inc/global.inc.php'; +$app['template.show_footer'] = false; +$app['template.show_header'] = false; +$app['default_layout'] = 'default/layout/blank.tpl'; + require_once 'learnpath.class.php'; require_once 'scorm.class.php'; require_once 'aicc.class.php'; diff --git a/main/newscorm/lp_ajax_save_objectives.php b/main/newscorm/lp_ajax_save_objectives.php index 019bd0f954..260e1a30a6 100644 --- a/main/newscorm/lp_ajax_save_objectives.php +++ b/main/newscorm/lp_ajax_save_objectives.php @@ -18,6 +18,10 @@ $language_file[] = 'learnpath'; require_once '../inc/global.inc.php'; +$app['template.show_footer'] = false; +$app['template.show_header'] = false; +$app['default_layout'] = 'default/layout/blank.tpl'; + /** * Writes an item's new values into the database and returns the operation result * @param integer Learnpath ID diff --git a/main/newscorm/lp_ajax_start_timer.php b/main/newscorm/lp_ajax_start_timer.php index 9c16335f9c..87df3dbdd7 100644 --- a/main/newscorm/lp_ajax_start_timer.php +++ b/main/newscorm/lp_ajax_start_timer.php @@ -11,6 +11,10 @@ * var asset_timer * @return string JavaScript time intializer */ +$app['template.show_footer'] = false; +$app['template.show_header'] = false; +$app['default_layout'] = 'default/layout/blank.tpl'; + function start_timer() { $time = time(); return $time; //"olms.asset_timer='$time'; olms.asset_timer_total = 0;"; diff --git a/main/newscorm/lp_ajax_switch_item.php b/main/newscorm/lp_ajax_switch_item.php index cc08d889ca..bc103a2bb1 100644 --- a/main/newscorm/lp_ajax_switch_item.php +++ b/main/newscorm/lp_ajax_switch_item.php @@ -19,6 +19,10 @@ $language_file[] = 'learnpath'; require_once '../inc/global.inc.php'; +$app['template.show_footer'] = false; +$app['template.show_header'] = false; +$app['default_layout'] = 'default/layout/blank.tpl'; + require_once 'learnpath.class.php'; require_once 'scorm.class.php'; require_once 'aicc.class.php'; diff --git a/main/newscorm/lp_ajax_switch_item_toc.php b/main/newscorm/lp_ajax_switch_item_toc.php index d7681767f7..7f4a38712e 100644 --- a/main/newscorm/lp_ajax_switch_item_toc.php +++ b/main/newscorm/lp_ajax_switch_item_toc.php @@ -18,6 +18,10 @@ $language_file[] = 'learnpath'; require_once '../inc/global.inc.php'; +$app['template.show_footer'] = false; +$app['template.show_header'] = false; +$app['default_layout'] = 'default/layout/blank.tpl'; + /** * Get one item's details * @param integer LP ID diff --git a/main/newscorm/lp_upload.php b/main/newscorm/lp_upload.php index 777734ee0b..487217ae93 100644 --- a/main/newscorm/lp_upload.php +++ b/main/newscorm/lp_upload.php @@ -20,19 +20,19 @@ if (empty($_POST['current_dir'])) { } $uncompress = 1; -//error_log('New LP - lp_upload.php', 0); /* * Check the request method in place of a variable from POST * because if the file size exceed the maximum file upload * size set in php.ini, all variables from POST are cleared ! */ -$user_file = Request::is_post() ? Request::file('user_file') : array(); +$user_file = isset($_POST) ? isset($_FILES['user_file']) : array(); $user_file = $user_file ? $user_file : array(); $is_error = isset($user_file['error']) ? $user_file['error'] : false; -if( Request::is_post() && $is_error){ + +if (isset($_POST) && $is_error) { return api_failure::set_failure('upload_file_too_big'); - unset($_FILEs['user_file']); + unset($_FILES['user_file']); } else if ($_SERVER['REQUEST_METHOD'] == 'POST' && count($_FILES) > 0 && !empty($_FILES['user_file']['name'])) { // A file upload has been detected, now deal with the file... diff --git a/main/newscorm/scorm_api.php b/main/newscorm/scorm_api.php index c43ab1dd85..a3f25ea4ea 100644 --- a/main/newscorm/scorm_api.php +++ b/main/newscorm/scorm_api.php @@ -37,7 +37,6 @@ $app['template.show_footer'] = false; $app['template.show_header'] = false; $app['default_layout'] = 'default/layout/blank.tpl'; - $file = (empty($_SESSION['file'])?'':$_SESSION['file']); $oLP = unserialize($_SESSION['lpobject']); $oItem = $oLP->items[$oLP->current]; diff --git a/main/upload/form.scorm.php b/main/upload/form.scorm.php index 9844c95637..60beeac5df 100644 --- a/main/upload/form.scorm.php +++ b/main/upload/form.scorm.php @@ -38,7 +38,7 @@ $nameTools = get_lang("FileUpload"); $interbreadcrumb[] = array("url" => "../newscorm/lp_controller.php?action=list", "name" => get_lang("ToolLearnpath")); Display::display_header($nameTools, "Path"); -require_once '../newscorm/content_makers.inc.php'; +require_once api_get_path(SYS_CODE_PATH).'newscorm/content_makers.inc.php'; require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; echo '