diff --git a/main/newscorm/aicc.class.php b/main/newscorm/aicc.class.php index 5f384e4431..7229bfe4db 100755 --- a/main/newscorm/aicc.class.php +++ b/main/newscorm/aicc.class.php @@ -323,7 +323,7 @@ class aicc extends learnpath { } /** - * Imports a zip file (presumably AICC) into the Dokeos structure + * Imports a zip file (presumably AICC) into the Chamilo structure * @param string Zip file info as given by $_FILES['userFile'] * @return string Absolute path to the AICC config files directory or empty string on error */ diff --git a/main/newscorm/aicc_hacp.php b/main/newscorm/aicc_hacp.php index 0eba1700e2..f99f1042a2 100755 --- a/main/newscorm/aicc_hacp.php +++ b/main/newscorm/aicc_hacp.php @@ -16,7 +16,7 @@ * This script is divided into three sections. * The first section (below) is the initialisation part. * The second section is the AICC object part - * The third section defines the event handlers for Dokeos' internal messaging + * The third section defines the event handlers for Chamilo's internal messaging * and frames refresh * * This script implements the HACP messaging for AICC. The API messaging is diff --git a/main/newscorm/learnpathItem.class.php b/main/newscorm/learnpathItem.class.php index 54d1891c88..74855bf432 100755 --- a/main/newscorm/learnpathItem.class.php +++ b/main/newscorm/learnpathItem.class.php @@ -283,7 +283,7 @@ class learnpathItem { /** * Gets the credit information (rather scorm-stuff) based on current status and reinit - * autorization. Credit tells the sco(content) if Dokeos will record the data it is sent (credit) or not (no-credit) + * autorization. Credit tells the sco(content) if Chamilo will record the data it is sent (credit) or not (no-credit) * @return string 'credit' or 'no-credit'. Defaults to 'credit' because if we don't know enough about this item, it's probably because it was never used before. */ public function get_credit() { @@ -479,7 +479,7 @@ class learnpathItem { /** * Gets the launch_data field found in imsmanifests (this is SCORM- or AICC-related, really) - * @return string Launch data as found in imsmanifest and stored in Dokeos (read only). Defaults to ''. + * @return string Launch data as found in imsmanifest and stored in Chamilo (read only). Defaults to ''. */ public function get_launch_data() { if (self::debug > 0) { error_log('New LP - In learnpathItem::get_launch_data()', 0); } @@ -501,7 +501,7 @@ class learnpathItem { /** * Gets the lesson_mode (scorm feature, but might be used by aicc as well as dokeos paths) * - * The "browse" mode is not supported yet (because there is no such way of seeing a sco in Dokeos) + * The "browse" mode is not supported yet (because there is no such way of seeing a sco in Chamilo) * @return string 'browse','normal' or 'review'. Defaults to 'normal' */ public function get_lesson_mode() { @@ -647,7 +647,7 @@ class learnpathItem { * The list will generally include pictures, flash objects, java applets, or any other * stuff included in the source of the current item. The current item is expected * to be an HTML file. If it is not, then the function will return and empty list. - * @param string type (one of the Dokeos tools) - optional (otherwise takes the current item's type) + * @param string type (one of the Chamilo tools) - optional (otherwise takes the current item's type) * @param string path (absolute file path) - optional (otherwise takes the current item's path) * @param int level of recursivity we're in * @return array List of file paths. An additional field containing 'local' or 'remote' helps determine if the file should be copied into the zip or just linked @@ -1185,7 +1185,7 @@ class learnpathItem { * @param string The prerequisites string as it figures in imsmanifest.xml * @param Array Array of items in the current learnpath object. Although we're in the learnpathItem object, it's necessary to have a list of all items to be able to check the current item's prerequisites * @param Array List of references (the "ref" column in the lp_item table) that are strings used in the expression of prerequisites. - * @param integer The user ID. In some cases like Dokeos quizzes, it's necessary to have the user ID to query other tables (like the results of quizzes) + * @param integer The user ID. In some cases like Chamilo quizzes, it's necessary to have the user ID to query other tables (like the results of quizzes) * @return boolean True if the list of prerequisites given is entirely satisfied, false otherwise */ public function parse_prereq($prereqs_string, $items, $refs_list, $user_id) { diff --git a/main/newscorm/learnpath_functions.inc.php b/main/newscorm/learnpath_functions.inc.php index 8e913b007a..5576c3a3f6 100755 --- a/main/newscorm/learnpath_functions.inc.php +++ b/main/newscorm/learnpath_functions.inc.php @@ -1161,7 +1161,7 @@ function exporttofile($filename, $LPname, $LPid, $content) { } /** - * This function exports the given Dokeos test + * This function exports the given Chamilo test * @param integer Test ID * @return string The test itself as an HTML string */ @@ -1378,7 +1378,7 @@ function exportitem($id, $item_id, $item_type, $add_scorm_communications = false $LPname = display_addedresource_link_in_learnpath($item_type, $item_id, '', $id, 'builder', 'nolink'); $expcontent = " - -
> - + +
> +
@@ -346,7 +348,7 @@ if($_SESSION['oLP']->mode == 'fullscreen') {
mode == 'fullscreen') { + if ($_SESSION['oLP']->mode == 'fullscreen') { echo ''; } else { echo ''; @@ -356,11 +358,11 @@ if($_SESSION['oLP']->mode == 'fullscreen') {
- cleaning and update for new SCORM tool -* @package chamilo.learnpath -*/ -//Prevents FF 3.6 + Adobe Reader 9 bug see BT#794 when calling a pdf file in a LP -if(isset($_GET['src'])) { - // including the global file +/** + * This is a learning path creation and player tool in Chamilo - previously learnpath_handler.php + * + * @author Patrick Cool + * @author Denes Nagy + * @author Roan Embrechts, refactoring and code cleaning + * @author Yannick Warnier - cleaning and update for new SCORM tool + * @package chamilo.learnpath + */ + +// Prevents FF 3.6 + Adobe Reader 9 bug see BT#794 when calling a pdf file in a LP. +if (isset($_GET['src'])) { + // Including the global initialization file. require_once '../inc/global.inc.php'; api_protect_course_script(); - //get parameter only came from lp_view.php + // Get parameter only came from lp_view.php. $url_info = parse_url($_GET['src']); $real_url_info = parse_url(api_get_path(WEB_PATH)); - //the host must be the same + // The host must be the same. if ($url_info['host'] == $real_url_info['host']) { header("Location: ".urldecode(Security::remove_XSS($_GET['src']))); exit; @@ -29,21 +30,20 @@ if(isset($_GET['src'])) { } } +/* INIT SECTION */ -/* INIT SECTION */ $_SESSION['whereami'] = 'lp/build'; -if(isset($_SESSION['oLP']) && isset($_GET['id'])) { +if (isset($_SESSION['oLP']) && isset($_GET['id'])) { $_SESSION['oLP'] -> current = intval($_GET['id']); } $this_section=SECTION_COURSES; api_protect_course_script(); -/* - Libraries -*/ -//the main_api.lib.php, database.lib.php and display.lib.php -//libraries are included by default +/* Libraries */ + +// The main_api.lib.php, database.lib.php and display.lib.php +// libraries are included by default. require_once 'learnpath_functions.inc.php'; //include '../resourcelinker/resourcelinker.inc.php'; @@ -52,16 +52,15 @@ require_once 'resourcelinker.inc.php'; // name of the language file that needs to be included $language_file = "learnpath"; - -/* Header and action code */ -/* Constants and variables */ -$is_allowed_to_edit = api_is_allowed_to_edit(null,true); +/* Header and action code */ +/* Constants and variables */ +$is_allowed_to_edit = api_is_allowed_to_edit(null, true); $tbl_lp = Database::get_course_table(TABLE_LP_MAIN); $tbl_lp_item = Database::get_course_table(TABLE_LP_ITEM); $tbl_lp_view = Database::get_course_table(TABLE_LP_VIEW); -$isStudentView = (empty($_REQUEST['isStudentView'])?0:(int) $_REQUEST['isStudentView']); +$isStudentView = (empty($_REQUEST['isStudentView']) ? 0 : (int) $_REQUEST['isStudentView']); $learnpath_id = (int) $_REQUEST['lp_id']; /* $chapter_id = $_GET['chapter_id']; @@ -76,20 +75,18 @@ $moduleid = $_REQUEST['moduleid']; $prereq = $_REQUEST['prereq']; $type = $_REQUEST['type']; */ -/* - MAIN CODE -*/ -// using the resource linker as a tool for adding resources to the learning path -if ($action=="add" and $type=="learnpathitem") -{ + +/* MAIN CODE */ + +// Using the resource linker as a tool for adding resources to the learning path. +if ($action == 'add' && $type == 'learnpathitem') { $htmlHeadXtra[] = ""; } -if ( (! $is_allowed_to_edit) or ($isStudentView) ) -{ +if ((!$is_allowed_to_edit) || ($isStudentView)) { error_log('New LP - User not authorized in lp_view_item.php'); header('location:lp_controller.php?action=view&lp_id='.$learnpath_id); } -//from here on, we are admin because of the previous condition, so don't check anymore +// From here on, we are admin because of the previous condition, so don't check anymore. $sql_query = "SELECT * FROM $tbl_lp WHERE id = $learnpath_id"; $result=Database::query($sql_query); @@ -97,33 +94,29 @@ $therow=Database::fetch_array($result); //$admin_output = ''; /* ------------------------------------------------------------ Course admin section - all the functions not available for students - always available in this case (page only shown to admin) ------------------------------------------------------------ */ -/* SHOWING THE ADMIN TOOLS */ - +/* SHOWING THE ADMIN TOOLS */ -/* prerequisites setting end */ -if (isset($_SESSION['gradebook'])){ - $gradebook= $_SESSION['gradebook']; +if (isset($_SESSION['gradebook'])) { + $gradebook = $_SESSION['gradebook']; } -if (!empty($gradebook) && $gradebook=='view') { - $interbreadcrumb[]= array ( +if (!empty($gradebook) && $gradebook == 'view') { + $interbreadcrumb[] = array ( 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('ToolGradebook') ); } -$interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); -$interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); +$interbreadcrumb[] = array('url' => 'lp_controller.php?action=list', 'name' => get_lang('_learning_path')); +$interbreadcrumb[] = array('url' => api_get_self()."?action=build&lp_id=$learnpath_id", 'name' => stripslashes("{$therow['name']}")); -//Theme calls -$show_learn_path=true; -$lp_theme_css=$_SESSION['oLP']->get_theme(); +// Theme calls +$show_learn_path = true; +$lp_theme_css = $_SESSION['oLP']->get_theme(); Display::display_header(null,'Path'); //api_display_tool_title($therow['name']); @@ -154,14 +147,14 @@ function confirmation(name) { //echo $admin_output; -/* DISPLAY SECTION */ +/* DISPLAY SECTION */ echo $_SESSION['oLP']->build_action_menu(); echo ''; echo ''; echo ''; @@ -171,6 +164,6 @@ echo '
'; echo '
'; - //build the tree with the menu items in it + // Build the tree with the menu items in it. echo $_SESSION['oLP']->build_tree(); echo '
'; echo '
'; echo ''; echo '
'; -/* FOOTER */ +/* FOOTER */ + Display::display_footer(); -?> \ No newline at end of file