Task #1765 - A transaction for the 1.8.7.1 release. Minor optimizations, replacement of the function calls include(), require(), include_once() and require_once() with the correspondent statements.

skala
Ivan Tcholakov 16 years ago
parent 2cf68e7b6a
commit 6458086e7a
  1. 21
      main/newscorm/aicc.class.php
  2. 2
      main/newscorm/aiccBlock.class.php
  3. 2
      main/newscorm/aiccItem.class.php
  4. 2
      main/newscorm/aiccObjective.class.php
  5. 8
      main/newscorm/aicc_api.php
  6. 8
      main/newscorm/aicc_hacp.php
  7. 2
      main/newscorm/audiorecorder.inc.php
  8. 14
      main/newscorm/back_compat.inc.php
  9. 12
      main/newscorm/display_audiorecorder.php
  10. 2
      main/newscorm/index.php
  11. 52
      main/newscorm/learnpath.class.php
  12. 4
      main/newscorm/learnpathItem.class.php
  13. 62
      main/newscorm/learnpath_functions.inc.php
  14. 6
      main/newscorm/lp_add.php
  15. 6
      main/newscorm/lp_add_item.php
  16. 8
      main/newscorm/lp_admin_view.php
  17. 14
      main/newscorm/lp_ajax_initialize.php
  18. 10
      main/newscorm/lp_ajax_last_update_status.php
  19. 4
      main/newscorm/lp_ajax_log.php
  20. 14
      main/newscorm/lp_ajax_save_item.php
  21. 14
      main/newscorm/lp_ajax_save_objectives.php
  22. 16
      main/newscorm/lp_ajax_switch_item.php
  23. 16
      main/newscorm/lp_ajax_switch_item_toc.php
  24. 6
      main/newscorm/lp_api.php
  25. 10
      main/newscorm/lp_author_image.php
  26. 6
      main/newscorm/lp_build.php
  27. 6
      main/newscorm/lp_comm.common.php
  28. 40
      main/newscorm/lp_comm.server.php
  29. 178
      main/newscorm/lp_controller.php
  30. 6
      main/newscorm/lp_edit.php
  31. 6
      main/newscorm/lp_edit_item.php
  32. 6
      main/newscorm/lp_edit_item_prereq.php
  33. 4
      main/newscorm/lp_footer.php
  34. 10
      main/newscorm/lp_header.php
  35. 24
      main/newscorm/lp_list.php
  36. 4
      main/newscorm/lp_log.php
  37. 8
      main/newscorm/lp_message.php
  38. 6
      main/newscorm/lp_move_item.php
  39. 10
      main/newscorm/lp_nav.php
  40. 32
      main/newscorm/lp_stats.php
  41. 10
      main/newscorm/lp_toc.php
  42. 18
      main/newscorm/lp_upload.php
  43. 4
      main/newscorm/lp_view.php
  44. 8
      main/newscorm/lp_view_item.php
  45. 8
      main/newscorm/openoffice_presentation.class.php
  46. 8
      main/newscorm/openoffice_text.class.php
  47. 8
      main/newscorm/openoffice_text_document.class.php
  48. 8
      main/newscorm/resourcelinker.inc.php
  49. 12
      main/newscorm/resourcelinker.php
  50. 28
      main/newscorm/scorm.class.php
  51. 2
      main/newscorm/scormItem.class.php
  52. 4
      main/newscorm/scormResource.class.php
  53. 6
      main/newscorm/scorm_admin.php
  54. 8
      main/newscorm/scorm_api.php

@ -9,11 +9,12 @@
* Defines the "aicc" child of class "learnpath"
* @package dokeos.learnpath.aicc
*/
require_once('aiccItem.class.php');
//require_once('aiccMetadata.class.php');
//require_once('aiccOrganization.class.php');
require_once('aiccResource.class.php');
require_once('aiccBlock.class.php');
require_once 'aiccItem.class.php';
//require_once 'aiccMetadata.class.php';
//require_once 'aiccOrganization.class.php';
require_once 'aiccResource.class.php';
require_once 'aiccBlock.class.php';
class aicc extends learnpath {
var $config = array();
@ -663,11 +664,11 @@ class aicc extends learnpath {
//error_log('New LP - in export_zip()',0);
//zip everything that is in the corresponding scorm dir
//write the zip file somewhere (might be too big to return)
require_once (api_get_path(LIBRARY_PATH)."fileUpload.lib.php");
require_once (api_get_path(LIBRARY_PATH)."fileManage.lib.php");
require_once (api_get_path(LIBRARY_PATH)."document.lib.php");
require_once (api_get_path(LIBRARY_PATH)."pclzip/pclzip.lib.php");
require_once ("learnpath_functions.inc.php");
require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH).'document.lib.php';
require_once api_get_path(LIBRARY_PATH).'pclzip/pclzip.lib.php';
require_once 'learnpath_functions.inc.php';
$tbl_lp = Database::get_course_table(TABLE_LP_MAIN);
$_course = Database::get_course_info(api_get_course_id());

@ -9,7 +9,7 @@
* Class defining the Block elements in an AICC Course Structure file
*
*/
require_once('learnpathItem.class.php');
require_once 'learnpathItem.class.php';
class aiccBlock extends learnpathItem{
var $identifier = '';
var $members = array();

@ -8,7 +8,7 @@
/**
* This class handles the elements from an AICC Descriptor file.
*/
require_once('learnpathItem.class.php');
require_once 'learnpathItem.class.php';
class aiccItem extends learnpathItem{
var $identifier = '';//AICC AU's system_id
var $identifierref = '';

@ -9,7 +9,7 @@
* Class defining the Block elements in an AICC Course Structure file
*
*/
require_once('learnpathItem.class.php');
require_once 'learnpathItem.class.php';
class aiccObjective extends learnpathItem{
var $identifier = '';
var $members = array();

@ -31,12 +31,12 @@
$use_anonymous = true;
//Load common libraries using a compatibility script to bridge between 1.6 and 1.8
require_once('back_compat.inc.php');
require_once 'back_compat.inc.php';
//Load learning path libraries so we can use the objects to define the initial values
//of the API
require_once('learnpath.class.php');
require_once('learnpathItem.class.php');
require_once('aicc.class.php');
require_once 'learnpath.class.php';
require_once 'learnpathItem.class.php';
require_once 'aicc.class.php';
// Is this needed? This is probabaly done in the header file
// $_user = $_SESSION['_user'];

@ -47,13 +47,13 @@ if(!empty($_REQUEST['aicc_sid']))
if($debug>1){error_log('New LP - '.__FILE__.','.__LINE__.' - reusing session ID '.$_REQUEST['aicc_sid'],0);}
}
//Load common libraries using a compatibility script to bridge between 1.6 and 1.8
require_once('back_compat.inc.php');
require_once 'back_compat.inc.php';
if($debug>2){error_log('New LP - '.__FILE__.','.__LINE__.' - Current session ID: '.session_id(),0);}
//Load learning path libraries so we can use the objects to define the initial values
//of the API
require_once('learnpath.class.php');
require_once('learnpathItem.class.php');
require_once('aicc.class.php');
require_once 'learnpath.class.php';
require_once 'learnpathItem.class.php';
require_once 'aicc.class.php';
// Is this needed? This is probabaly done in the header file
//$_user = $_SESSION['_user'];

@ -12,7 +12,7 @@ $web_path = api_get_path(WEB_CODE_PATH);
$getid3_path = api_get_path(LIBRARY_PATH);
require_once($getid3_path."getid3/getid3.php");
require_once $getid3_path.'getid3/getid3.php';
function getFLVDuration($flv_path) {
$getid3 = new getID3;

@ -6,11 +6,11 @@
* something like lp_includes.inc.php
* @package dokeos.learnpath
*/
require_once('../inc/global.inc.php');
require_once(api_get_path(LIBRARY_PATH) . 'database.lib.php');
require_once(api_get_path(LIBRARY_PATH) . 'document.lib.php');
require_once(api_get_path(LIBRARY_PATH) . 'fileDisplay.lib.php');
require_once(api_get_path(LIBRARY_PATH) . 'fileUpload.lib.php'); //replace_dangerous_char()
require_once(api_get_path(LIBRARY_PATH) . 'fileManage.lib.php'); //check_name_exists()
require_once(api_get_path(LIBRARY_PATH) . 'pclzip/pclzip.lib.php');
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'database.lib.php';
require_once api_get_path(LIBRARY_PATH).'document.lib.php';
require_once api_get_path(LIBRARY_PATH).'fileDisplay.lib.php';
require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php'; //replace_dangerous_char()
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php'; //check_name_exists()
require_once api_get_path(LIBRARY_PATH).'pclzip/pclzip.lib.php';
?>

@ -8,10 +8,10 @@
*/
//flag to allow for anonymous user - needs to be set before global.inc.php
$use_anonymous = true;
require_once('back_compat.inc.php');
require_once('learnpath.class.php');
require_once('scorm.class.php');
require_once('aicc.class.php');
require_once 'back_compat.inc.php';
require_once 'learnpath.class.php';
require_once 'scorm.class.php';
require_once 'aicc.class.php';
if(isset($_SESSION['lpobject']))
{
@ -26,7 +26,7 @@ $charset = $_SESSION['oLP']->encoding;
$lp_theme_css=$_SESSION['oLP']->get_theme();
$scorm_css_header=true;
include_once('../inc/reduced_header.inc.php');
include_once '../inc/reduced_header.inc.php';
echo '<html>
<body>';
@ -34,7 +34,7 @@ echo '<html>
$audio_recorder_studentview = 'true';
$audio_recorder_item_id = $_SESSION['oLP']->current;
if(api_get_setting('service_visio','active')=='true'){
include('audiorecorder.inc.php');
include 'audiorecorder.inc.php';
}
echo '</div>';
// end of audiorecorder include

@ -11,6 +11,6 @@
//flag to allow for anonymous user - needs to be set before global.inc.php
$use_anonymous = true;
require('back_compat.inc.php');
require 'back_compat.inc.php';
header('location: lp_controller.php?'.api_get_cidReq().'&action=list');
?>

@ -226,8 +226,8 @@ class learnpath {
break;
case 2 :
require_once ('scorm.class.php');
require_once ('scormItem.class.php');
require_once 'scorm.class.php';
require_once 'scormItem.class.php';
$oItem = new scormItem('db', $row['id']);
if (is_object($oItem)) {
$my_item_id = $oItem->get_id();
@ -245,7 +245,7 @@ class learnpath {
case 1 :
default :
require_once ('learnpathItem.class.php');
require_once 'learnpathItem.class.php';
$oItem = new learnpathItem($row['id'], $user_id);
if (is_object($oItem)) {
$my_item_id = $oItem->get_id();
@ -552,7 +552,7 @@ class learnpath {
}
// upload the file in the documents tool
include_once (api_get_path(LIBRARY_PATH) . 'fileUpload.lib.php');
include_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
$file_path = handle_uploaded_document($_course, $_FILES['mp3'], api_get_path(SYS_COURSE_PATH) . $_course['path'] . '/document', '/audio', api_get_user_id(), '', '', '', '', '', false);
// getting the filename only
@ -882,7 +882,7 @@ class learnpath {
//TODO: also delete items and item-views
if (api_get_setting('search_enabled') == 'true') {
require_once (api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php');
require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
$r = delete_all_values_for_item($this->cc, TOOL_LEARNPATH, $this->lp_id);
}
}
@ -967,7 +967,7 @@ class learnpath {
$res = Database::query($sql);
if (Database :: num_rows($res) > 0) {
$row2 = Database :: fetch_array($res);
require_once (api_get_path(LIBRARY_PATH) . 'search/DokeosIndexer.class.php');
require_once api_get_path(LIBRARY_PATH).'search/DokeosIndexer.class.php';
$di = new DokeosIndexer();
$di->remove_document((int) $row2['search_did']);
}
@ -1362,7 +1362,7 @@ class learnpath {
* @return array Array of terms
*/
function get_common_index_terms_by_prefix($prefix) {
require_once api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php';
require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
$terms = get_specific_field_values_list_by_prefix($prefix, $this->cc, TOOL_LEARNPATH, $this->lp_id);
$prefix_terms = array ();
foreach ($terms as $term) {
@ -2605,7 +2605,7 @@ class learnpath {
}
$html .= '<div id="inner_lp_toc" class="inner_lp_toc">' . "\n";
require_once ('resourcelinker.inc.php');
require_once 'resourcelinker.inc.php';
//temp variables
$mycurrentitemid = $this->get_current_item_id();
@ -2819,7 +2819,7 @@ class learnpath {
if ($lp_item_type == 'dokeos_chapter') {
$file = 'lp_content.php?type=dir';
} else {
require_once ('resourcelinker.inc.php');
require_once 'resourcelinker.inc.php';
$file = rl_get_resource_link_for_learnpath(api_get_course_id(), $this->get_id(), $item_id);
// check how much attempts of a exercise exits in lp
@ -2897,7 +2897,7 @@ class learnpath {
$decoded = html_entity_decode($lp_item_path);
list ($decoded) = explode('?', $decoded);
if (!is_file(realpath($sys_course_path . '/scorm/' . $lp_path . '/' . $decoded))) {
require_once ('resourcelinker.inc.php');
require_once 'resourcelinker.inc.php';
$file = rl_get_resource_link_for_learnpath(api_get_course_id(), $this->get_id(), $item_id);
if (empty($file)) {
$file = 'blank.php?error=document_not_found';
@ -3781,10 +3781,10 @@ class learnpath {
if ((count(array_diff($terms, $stored_terms)) == 0) && (count(array_diff($stored_terms, $terms)) == 0))
return FALSE;
require_once ('xapian.php'); //TODO try catch every xapian use or make wrappers on api
require_once (api_get_path(LIBRARY_PATH) . 'search/DokeosIndexer.class.php');
require_once (api_get_path(LIBRARY_PATH) . 'search/xapian/XapianQuery.php');
require_once (api_get_path(LIBRARY_PATH) . 'search/IndexableChunk.class.php');
require_once 'xapian.php'; //TODO try catch every xapian use or make wrappers on api
require_once api_get_path(LIBRARY_PATH).'search/DokeosIndexer.class.php';
require_once api_get_path(LIBRARY_PATH).'search/xapian/XapianQuery.php';
require_once api_get_path(LIBRARY_PATH).'search/IndexableChunk.class.php';
$items_table = Database :: get_course_table(TABLE_LP_ITEM);
//TODO: make query secure agains XSS : use member attr instead of post var
@ -5852,7 +5852,7 @@ class learnpath {
$return .= ' </div>
</div>';
require_once (api_get_path(LIBRARY_PATH) . 'formvalidator/FormValidator.class.php');
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
$form = new FormValidator('form', 'POST', api_get_self() . "?" . $_SERVER["QUERY_STRING"]);
//$defaults["title"] = api_convert_encoding($item_title, $charset, $this->encoding);
$defaults["title"] = api_html_entity_decode(api_convert_encoding($item_title, $charset, $this->encoding), ENT_QUOTES, $charset);
@ -6081,7 +6081,7 @@ class learnpath {
if (isset ($_GET['edit']) && $_GET['edit'] == 'true') {
$return .= Display :: return_warning_message('<strong>' . get_lang("Warning") . ' !</strong><br />' . get_lang("WarningEditingDocument"), false);
}
require_once (api_get_path(LIBRARY_PATH) . 'formvalidator/FormValidator.class.php');
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
$form = new FormValidator('form', 'POST', api_get_self() . "?" . $_SERVER["QUERY_STRING"], '', 'enctype="multipart/form-data"');
$defaults["title"] = Security :: remove_XSS(api_convert_encoding($item_title, api_get_system_encoding() ,$this->encoding));
if (empty ($item_title)) {
@ -6974,7 +6974,7 @@ class learnpath {
$return .= $this->display_manipulate($item_id, $row['item_type']);
$return .= $this->display_student_publication_form('move', $item_id, $row);
break;
case TOOL_FORUM :
case TOOL_FORUM :
$return .= $this->display_manipulate($item_id, $row['item_type']);
$return .= $this->display_forum_form('move', $item_id, $row);
break;
@ -7253,7 +7253,7 @@ class learnpath {
*/
function write_resources_tree($resources_sorted, $num = 0) {
require_once (api_get_path(LIBRARY_PATH) . 'fileDisplay.lib.php');
require_once api_get_path(LIBRARY_PATH).'fileDisplay.lib.php';
if (count($resources_sorted) > 0) {
foreach ($resources_sorted as $key => $resource) {
if (is_int($resource['id'])) {
@ -7398,8 +7398,8 @@ class learnpath {
* @return string
*/
function get_forums() {
include ('../forum/forumfunction.inc.php');
include ('../forum/forumconfig.inc.php');
include '../forum/forumfunction.inc.php';
include '../forum/forumconfig.inc.php';
global $table_forums, $table_threads, $table_posts, $table_item_property, $table_users;
$table_forums = Database :: get_course_table(TABLE_FORUM);
$table_threads = Database :: get_course_table(TABLE_FORUM_THREAD);
@ -7926,7 +7926,7 @@ class learnpath {
}
elseif($item->type == TOOL_QUIZ)
{
require_once(api_get_path(SYS_CODE_PATH).'exercice/exercise.class.php');
require_once api_get_path(SYS_CODE_PATH).'exercice/exercise.class.php';
$exe_id = $item->path; //should be using ref when everything will be cleaned up in this regard
$exe = new Exercise();
$exe->read($exe_id);
@ -7969,7 +7969,7 @@ class learnpath {
}
//include export scripts
require_once(api_get_path(SYS_CODE_PATH).'exercice/export/scorm/scorm_export.php');
require_once api_get_path(SYS_CODE_PATH).'exercice/export/scorm/scorm_export.php';
//get the path of the file(s) from the course directory root
//$my_file_path = $item->get_file_path('scorm/'.$this->path.'/');
@ -8110,7 +8110,7 @@ class learnpath {
//file path is courses/DOKEOS/document/....
$info_file_path=explode('/',$file_path);
if ($info_file_path[0]=='courses') {//add character "/" in file path
$file_path_dest='document/'.$file_path;
$file_path_dest='document/'.$file_path;
}
//error_log('Reduced path: '.$file_path,0);
@ -8124,7 +8124,7 @@ class learnpath {
$zip_files[] = $my_sub_dir.'/'.$doc_info[0];
$my_dep_file->setAttribute('href',$doc_info[0]);
$my_dep->setAttribute('xml:base',$my_xml_sub_dir);
}
}
break;
default:
@ -8316,7 +8316,7 @@ EOD;
}
//Send file to client
//$name = 'scorm_export_'.$this->lp_id.'.zip';
require_once(api_get_path(LIBRARY_PATH).'fileUpload.lib.php');
require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
$name = preg_replace('([^a-zA-Z0-9_\.])','-',html_entity_decode($this->get_name(),ENT_QUOTES)).'.zip';
DocumentManager::file_send_for_download($temp_zip_file,true,$name);
}
@ -8391,7 +8391,7 @@ EOD;
//$result= @move_uploaded_file($image_array['tmp_name'], $new_path);
// resize the image
include_once (api_get_path(LIBRARY_PATH) . 'image.lib.php');
include_once api_get_path(LIBRARY_PATH).'image.lib.php';
$temp = new image($image_array['tmp_name']);
$picture_infos=@getimagesize($image_array['tmp_name']); // $picture_infos[0]-> width
if ($picture_infos[0] > 104) {

@ -223,7 +223,7 @@ class learnpathItem {
if (api_get_setting('search_enabled') == 'true') {
if (!is_null($this->search_did)) {
require_once(api_get_path(LIBRARY_PATH) .'search/DokeosIndexer.class.php');
require_once api_get_path(LIBRARY_PATH).'search/DokeosIndexer.class.php';
$di = new DokeosIndexer();
$di->remove_document($this->search_did);
}
@ -2022,7 +2022,7 @@ class learnpathItem {
function set_terms($terms) {
global $charset;
$lp_item = Database::get_course_table(TABLE_LP_ITEM);
require_once(api_get_path(LIBRARY_PATH).'search/DokeosIndexer.class.php');
require_once api_get_path(LIBRARY_PATH).'search/DokeosIndexer.class.php';
$a_terms = split(',',$terms);
$i_terms = split(',',$this->get_terms());
foreach ( $i_terms as $term ) {

@ -543,7 +543,7 @@ function display_learnpath_chapters($parent_item_id = 0, $tree = array (), $leve
{
$row_items = $row;
echo "<tr>\n <td colspan='2' valign='top'>";
//require('resourcelinker.inc.php');
//require 'resourcelinker.inc.php';
display_addedresource_link_in_learnpath($row_items["item_type"], $row_items["ref"], '', $row_items["id"], 'builder', 'icon', $level);
if ($row_items["description"])
@ -1405,10 +1405,10 @@ function export_exercise($item_id)
$exerciseId = $item_id;
require_once ('../exercice/exercise.class.php');
require_once ('../exercice/question.class.php');
require_once ('../exercice/answer.class.php');
require_once ('../exercice/exercise.lib.php');
require_once '../exercice/exercise.class.php';
require_once '../exercice/question.class.php';
require_once '../exercice/answer.class.php';
require_once '../exercice/exercise.lib.php';
// answer types
define('UNIQUE_ANSWER', 1);
@ -1417,7 +1417,7 @@ function export_exercise($item_id)
define('MATCHING', 4);
define('FREE_ANSWER', 5);
include_once (api_get_path(LIBRARY_PATH).'/text.lib.php');
include_once api_get_path(LIBRARY_PATH).'text.lib.php';
$TBL_EXERCISES = Database :: get_course_table(TABLE_QUIZ_TEST);
@ -1609,27 +1609,27 @@ function exportitem($id, $item_id, $item_type, $add_scorm_communications = false
global $timeNoSecFormat, $dateFormatLong, $language_interface, $langPubl, $langDone, $langThisCourseDescriptionIsEmpty, $lang_course_description, $lang_introduction_text, $_cid, $langHotPotatoesFinished, $lang_author, $lang_date, $lang_groups, $lang_users, $lang_ass, $lang_dropbox, $test, $langQuestion;
// $_course=$_SESSION['course'];
require_once (api_get_path(LIBRARY_PATH)."database.lib.php");
require_once api_get_path(LIBRARY_PATH).'database.lib.php';
//$tbl_learnpath_item = Database::get_course_learnpath_item_table();
include_once ('exercise.class.php');
include_once ('question.class.php');
include_once ('answer.class.php');
include_once ('exercise.lib.php');
include_once ('../lang/english/announcements.inc.php'); //this line is here only for $langPubl in announcements
include_once ("../lang/".$language_interface."/announcements.inc.php"); //this line is here only for $langPubl in announcements
include_once ('../lang/english/course_description.inc.php'); //this line is here only for $langThisCourseDescriptionIsEmpty
include_once ("../lang/".$language_interface."/course_description.inc.php"); // -||-
include_once ('../lang/english/resourcelinker.inc.php');
include_once ("../lang/".$language_interface."/resourcelinker.inc.php");
include_once ('../lang/english/learnpath.inc.php');
include_once ("../lang/".$language_interface."/learnpath.inc.php");
include_once ('../lang/english/exercice.inc.php');
include_once ("../lang/".$language_interface."/exercice.inc.php");
include_once (api_get_path(LIBRARY_PATH).'text.lib.php');
include_once ("../resourcelinker/resourcelinker.inc.php");
include_once 'exercise.class.php';
include_once 'question.class.php';
include_once 'answer.class.php';
include_once 'exercise.lib.php';
include_once '../lang/english/announcements.inc.php'; //this line is here only for $langPubl in announcements
include_once '../lang/'.$language_interface.'/announcements.inc.php'; //this line is here only for $langPubl in announcements
include_once '../lang/english/course_description.inc.php'; //this line is here only for $langThisCourseDescriptionIsEmpty
include_once '../lang/'.$language_interface.'/course_description.inc.php'; // -||-
include_once '../lang/english/resourcelinker.inc.php';
include_once '../lang/'.$language_interface.'/resourcelinker.inc.php';
include_once '../lang/english/learnpath.inc.php';
include_once '../lang/'.$language_interface.'/learnpath.inc.php';
include_once '../lang/english/exercice.inc.php';
include_once '../lang/'.$language_interface.'/exercice.inc.php';
include_once api_get_path(LIBRARY_PATH).'text.lib.php';
include_once '../resourcelinker/resourcelinker.inc.php';
$LPname = display_addedresource_link_in_learnpath($item_type, $item_id, '', $id, 'builder', 'nolink');
@ -2200,7 +2200,7 @@ function exportpath($learnpath_id)
$add_scorm_button = true;
//2 Get the name of the LP
include_once (api_get_path(LIBRARY_PATH)."fileUpload.lib.php");
include_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
$sql = "SELECT * FROM $tbl_learnpath_main WHERE (lp_id=$learnpath_id)";
$result = Database::query($sql);
$row = Database::fetch_array($result);
@ -2286,7 +2286,7 @@ function exportpath($learnpath_id)
createimsmanifest($circle1_files, $learnpath_id);
//8 put the files in the exportdir into a zip and force download
include_once (api_get_path(LIBRARY_PATH)."pclzip/pclzip.lib.php");
include_once api_get_path(LIBRARY_PATH).'pclzip/pclzip.lib.php';
//create zipfile of given directory
$zip_folder = new PclZip(api_get_path(SYS_COURSE_PATH).$_course['path']."/temp/".$LPnamesafe.".zip");
@ -2304,7 +2304,7 @@ function exportpath($learnpath_id)
DocumentManager :: file_send_for_download($zipfilename, false, basename($LPnamesafe.".zip"));
//9 Delete the temporary zip file and directory
include_once (api_get_path(LIBRARY_PATH)."fileManage.lib.php");
include_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
// in fileManage.lib.php
my_delete($zipfilename);
my_delete($zipfoldername);
@ -2335,7 +2335,7 @@ function exportSCORM($scormname, $course)
$zipfilename = $zipfoldername.".zip";
//create zipfile of given directory
include_once (api_get_path(LIBRARY_PATH)."pclzip/pclzip.lib.php");
include_once api_get_path(LIBRARY_PATH).'pclzip/pclzip.lib.php';
$zip_folder = new PclZip($zipfilename);
$list = 1;
//$list = $zip_folder->create($zipfoldername."/",PCLZIP_OPT_REMOVE_PATH,$tmpname.$scormname."/"); // whitout folder
@ -2349,7 +2349,7 @@ function exportSCORM($scormname, $course)
DocumentManager :: file_send_for_download($zipfilename, false, basename($scormname.".zip"));
//clear
include_once (api_get_path(LIBRARY_PATH)."fileManage.lib.php");
include_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
my_delete($zipfilename);
}
@ -2418,7 +2418,7 @@ function createimsmanifest($circle1_files, $learnpath_id)
$tbl_learnpath_item = Database :: get_course_table(TABLE_LEARNPATH_ITEM);
$tbl_learnpath_chapter = Database :: get_course_table(TABLE_LEARNPATH_CHAPTER);
include_once ('../metadata/md_funcs.php'); // RH: export metadata
include_once '../metadata/md_funcs.php'; // RH: export metadata
//1.1 header
/*

@ -49,9 +49,9 @@ api_protect_course_script();
//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');
include 'learnpath_functions.inc.php';
//include '../resourcelinker/resourcelinker.inc.php';
include 'resourcelinker.inc.php';
//rewrite the language file, sadly overwritten by resourcelinker.inc.php
// name of the language file that needs to be included
$language_file = 'learnpath';

@ -26,9 +26,9 @@ api_protect_course_script();
//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');
include 'learnpath_functions.inc.php';
//include '../resourcelinker/resourcelinker.inc.php';
include 'resourcelinker.inc.php';
//rewrite the language file, sadly overwritten by resourcelinker.inc.php
// name of the language file that needs to be included
$language_file = 'learnpath';

@ -50,9 +50,9 @@ api_protect_course_script();
//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');
include 'learnpath_functions.inc.php';
//include '../resourcelinker/resourcelinker.inc.php';
include 'resourcelinker.inc.php';
//rewrite the language file, sadly overwritten by resourcelinker.inc.php
$language_file = "learnpath";
@ -261,7 +261,7 @@ if (isset($_POST['save_audio']))
}
// upload the file in the documents tool
include_once(api_get_path(LIBRARY_PATH) . 'fileUpload.lib.php');
include_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
$file_path = handle_uploaded_document($_course, $_FILES[$key],api_get_path(SYS_COURSE_PATH).$_course['path'].'/document','/audio',api_get_user_id(),'','','','','',false);
// getting the filename only

@ -14,7 +14,7 @@
$use_anonymous = true;
// name of the language file that needs to be included
$language_file[] = 'learnpath';
require_once('back_compat.inc.php');
require_once 'back_compat.inc.php';
/**
* Get one item's details
* @param integer LP ID
@ -36,12 +36,12 @@ function initialize_item($lp_id,$user_id,$view_id,$next_item)
* -'last'
* - a real item ID
*/
require_once('learnpath.class.php');
require_once('scorm.class.php');
require_once('aicc.class.php');
require_once('learnpathItem.class.php');
require_once('scormItem.class.php');
require_once('aiccItem.class.php');
require_once 'learnpath.class.php';
require_once 'scorm.class.php';
require_once 'aicc.class.php';
require_once 'learnpathItem.class.php';
require_once 'scormItem.class.php';
require_once 'aiccItem.class.php';
$mylp = '';
if (isset($_SESSION['lpobject'])) {
if ($debug>1) {error_log('////$_SESSION[lpobject] is set',0);}

@ -22,7 +22,7 @@
$use_anonymous = true;
// name of the language file that needs to be included
$language_file[] = 'learnpath';
require_once('back_compat.inc.php');
require_once 'back_compat.inc.php';
/**
* Writes an item's new values into the database and returns the operation result
* @param integer Learnpath ID
@ -38,10 +38,10 @@ function last_update_status($lp_id,$user_id,$view_id,$item_id)
$debug=0;
$return = '';
if($debug>0){error_log('In last_update_status('.$lp_id.','.$user_id.','.$view_id.','.$item_id.')',0);}
require_once('learnpath.class.php');
require_once('scorm.class.php');
require_once('learnpathItem.class.php');
require_once('scormItem.class.php');
require_once 'learnpath.class.php';
require_once 'scorm.class.php';
require_once 'learnpathItem.class.php';
require_once 'scormItem.class.php';
$mylp = '';
if(isset($_SESSION['lpobject']))
{

@ -14,7 +14,7 @@
$use_anonymous = true;
// name of the language file that needs to be included
$language_file[] = 'learnpath';
require_once('back_compat.inc.php');
require_once 'back_compat.inc.php';
/**
* Write a log with the current message
* @param string Message
@ -25,7 +25,7 @@ function lp_ajax_log($msg, $level) {
$return = '';
if ($debug>0) {error_log('In log('.$msg.')',0);}
if ($level == 0) {
//error_log('Logging level too low, not writing files in '.__FILE__);
//error_log('Logging level too low, not writing files in '.__FILE__);
return $return;
}
$msg = str_replace('<br />',"\r\n", $msg);

@ -13,7 +13,7 @@
$use_anonymous = true;
// name of the language file that needs to be included
$language_file[] = 'learnpath';
require_once('back_compat.inc.php');
require_once 'back_compat.inc.php';
/**
* Writes an item's new values into the database and returns the operation result
* @param integer Learnpath ID
@ -37,12 +37,12 @@ function save_item($lp_id,$user_id,$view_id,$item_id,$score=-1,$max=-1,$min=-1,$
$return = '';
if($debug>0){error_log('In save_item('.$lp_id.','.$user_id.','.$view_id.','.$item_id.','.$score.','.$max.','.$min.',"'.$status.'",'.$time.',"'.$suspend.'","'.$location.'","'.(count($interactions)>0?$interactions[0]:'').'","'.$core_exit.'")',0);}
//$objResponse = new xajaxResponse();
require_once('learnpath.class.php');
require_once('scorm.class.php');
require_once('aicc.class.php');
require_once('learnpathItem.class.php');
require_once('scormItem.class.php');
require_once('aiccItem.class.php');
require_once 'learnpath.class.php';
require_once 'scorm.class.php';
require_once 'aicc.class.php';
require_once 'learnpathItem.class.php';
require_once 'scormItem.class.php';
require_once 'aiccItem.class.php';
$mylp = '';
if(isset($_SESSION['lpobject']))
{

@ -13,7 +13,7 @@
$use_anonymous = true;
// name of the language file that needs to be included
$language_file[] = 'learnpath';
require_once('back_compat.inc.php');
require_once 'back_compat.inc.php';
/**
* Writes an item's new values into the database and returns the operation result
* @param integer Learnpath ID
@ -29,12 +29,12 @@ function save_objectives($lp_id,$user_id,$view_id,$item_id,$objectives=array())
$return = '';
if($debug>0){error_log('In xajax_save_objectives('.$lp_id.','.$user_id.','.$view_id.','.$item_id.',"'.(count($objectives)>0?count($objectives):'').'")',0);}
//$objResponse = new xajaxResponse();
require_once('learnpath.class.php');
require_once('scorm.class.php');
require_once('aicc.class.php');
require_once('learnpathItem.class.php');
require_once('scormItem.class.php');
require_once('aiccItem.class.php');
require_once 'learnpath.class.php';
require_once 'scorm.class.php';
require_once 'aicc.class.php';
require_once 'learnpathItem.class.php';
require_once 'scormItem.class.php';
require_once 'aiccItem.class.php';
$mylp = '';
if(isset($_SESSION['lpobject']))
{

@ -13,7 +13,7 @@
$use_anonymous = true;
// name of the language file that needs to be included
$language_file[] = 'learnpath';
require_once('back_compat.inc.php');
require_once 'back_compat.inc.php';
/**
* Get one item's details
* @param integer LP ID
@ -35,12 +35,12 @@ function switch_item_details($lp_id,$user_id,$view_id,$current_item,$next_item)
* -'last'
* - a real item ID
*/
require_once('learnpath.class.php');
require_once('scorm.class.php');
require_once('aicc.class.php');
require_once('learnpathItem.class.php');
require_once('scormItem.class.php');
require_once('aiccItem.class.php');
require_once 'learnpath.class.php';
require_once 'scorm.class.php';
require_once 'aicc.class.php';
require_once 'learnpathItem.class.php';
require_once 'scormItem.class.php';
require_once 'aiccItem.class.php';
$mylp = '';
if(isset($_SESSION['lpobject']))
{
@ -148,7 +148,7 @@ function switch_item_details($lp_id,$user_id,$view_id,$current_item,$next_item)
* remain). However, due to numerous technical issues with SCORM, we prefer
* leaving it as a double-lock security. If removing, please test carefully
* with both SCORM and dokeos learning path tracking.
*/
*/
$return .=
"olms.score=".$myscore.";" .
"olms.max=".$mymax.";" .

@ -2,7 +2,7 @@
/**
* This script contains the server part of the xajax interaction process. The client part is located
* in lp_api.php or other api's.
* This script updated the TOC of the SCORM without updating the SCO's attributes
* This script updated the TOC of the SCORM without updating the SCO's attributes
* @package dokeos.learnpath
* @author Yannick Warnier <ywarnier@beeznest.org>
*/
@ -13,7 +13,7 @@
$use_anonymous = true;
// name of the language file that needs to be included
$language_file[] = 'learnpath';
require_once('back_compat.inc.php');
require_once 'back_compat.inc.php';
/**
* Get one item's details
* @param integer LP ID
@ -27,12 +27,12 @@ function switch_item_toc($lp_id,$user_id,$view_id,$current_item,$next_item)
$debug=0;
$return = '';
if($debug>0){error_log('In xajax_switch_item_toc('.$lp_id.','.$user_id.','.$view_id.','.$current_item.','.$next_item.')',0);}
require_once('learnpath.class.php');
require_once('scorm.class.php');
require_once('aicc.class.php');
require_once('learnpathItem.class.php');
require_once('scormItem.class.php');
require_once('aiccItem.class.php');
require_once 'learnpath.class.php';
require_once 'scorm.class.php';
require_once 'aicc.class.php';
require_once 'learnpathItem.class.php';
require_once 'scormItem.class.php';
require_once 'aiccItem.class.php';
$mylp = '';
if(isset($_SESSION['lpobject']))
{

@ -11,11 +11,11 @@
//flag to allow for anonymous user - needs to be set before global.inc.php
$use_anonymous = true;
require_once('back_compat.inc.php');
//require_once('lp_comm.common.php'); //xajax functions
require_once 'back_compat.inc.php';
//require_once 'lp_comm.common.php'; //xajax functions
//$htmlHeadXtra[] = $xajax->getJavascript('../inc/lib/xajax/')."\n";
//$htmlHeadXtra[] = '<script language="javascript">var myxajax = window.parent.oxajax;</script>';
include_once('../inc/reduced_header.inc.php');
include_once '../inc/reduced_header.inc.php';
?>
<body>
<!--div id="clickme" style="border: 1px solid black; width:10px; height:7px;" onclick="myxajax.xajax_get_statuses();"></div-->

@ -6,10 +6,10 @@
*/
$use_anonymous = true;
require_once('back_compat.inc.php');
require_once('learnpath.class.php');
require_once('scorm.class.php');
require_once('aicc.class.php');
require_once 'back_compat.inc.php';
require_once 'learnpath.class.php';
require_once 'scorm.class.php';
require_once 'aicc.class.php';
//Getting the LP
if(isset($_SESSION['lpobject']))
{
@ -25,7 +25,7 @@ $lp_theme_css=$_SESSION['oLP']->get_theme();
*/
$scorm_css_header=true;
// scorm.css loaded
include_once('../inc/reduced_header.inc.php');
include_once '../inc/reduced_header.inc.php';
echo '<html>
<body>';

@ -52,9 +52,9 @@ api_protect_course_script();
//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');
include 'learnpath_functions.inc.php';
//include '../resourcelinker/resourcelinker.inc.php';
include 'resourcelinker.inc.php';
//rewrite the language file, sadly overwritten by resourcelinker.inc.php
// name of the language file that needs to be included
$language_file = "learnpath";

@ -12,10 +12,10 @@
//flag to allow for anonymous user - needs to be set before global.inc.php
$use_anonymous = true;
require_once('back_compat.inc.php');
require_once('learnpath.class.php');
require_once 'back_compat.inc.php';
require_once 'learnpath.class.php';
require('../inc/lib/xajax/xajax.inc.php');
require '../inc/lib/xajax/xajax.inc.php';
$xajax = new xajax(api_get_path(WEB_CODE_PATH).'newscorm/lp_comm.server.php');
$xajax->registerFunction("save_item");
$xajax->registerFunction("save_objectives");

@ -13,7 +13,7 @@
$use_anonymous = true;
// name of the language file that needs to be included
$language_file[] = 'learnpath';
require_once('back_compat.inc.php');
require_once 'back_compat.inc.php';
/**
* Backup an item's values into the javascript API as "old" values (so we still have them at hand)
* @param integer Learnpath ID
@ -64,12 +64,12 @@ function save_item($lp_id,$user_id,$view_id,$item_id,$score=-1,$max=-1,$min=-1,$
$debug=0;
if($debug>0){error_log('In xajax_save_item('.$lp_id.','.$user_id.','.$view_id.','.$item_id.','.$score.','.$max.','.$min.',"'.$status.'",'.$time.',"'.$suspend.'","'.$location.'","'.(count($interactions)>0?$interactions[0]:'').'","'.$core_exit.'")',0);}
$objResponse = new xajaxResponse();
require_once('learnpath.class.php');
require_once('scorm.class.php');
require_once('aicc.class.php');
require_once('learnpathItem.class.php');
require_once('scormItem.class.php');
require_once('aiccItem.class.php');
require_once 'learnpath.class.php';
require_once 'scorm.class.php';
require_once 'aicc.class.php';
require_once 'learnpathItem.class.php';
require_once 'scormItem.class.php';
require_once 'aiccItem.class.php';
$mylp = '';
if(isset($_SESSION['lpobject']))
{
@ -205,12 +205,12 @@ function save_objectives($lp_id,$user_id,$view_id,$item_id,$objectives=array())
$debug=0;
if($debug>0){error_log('In xajax_save_objectives('.$lp_id.','.$user_id.','.$view_id.','.$item_id.',"'.(count($objectives)>0?count($objectives):'').'")',0);}
$objResponse = new xajaxResponse();
require_once('learnpath.class.php');
require_once('scorm.class.php');
require_once('aicc.class.php');
require_once('learnpathItem.class.php');
require_once('scormItem.class.php');
require_once('aiccItem.class.php');
require_once 'learnpath.class.php';
require_once 'scorm.class.php';
require_once 'aicc.class.php';
require_once 'learnpathItem.class.php';
require_once 'scormItem.class.php';
require_once 'aiccItem.class.php';
$mylp = '';
if(isset($_SESSION['lpobject']))
{
@ -260,12 +260,12 @@ function switch_item_details($lp_id,$user_id,$view_id,$current_item,$next_item)
* -'last'
* - a real item ID
*/
require_once('learnpath.class.php');
require_once('scorm.class.php');
require_once('aicc.class.php');
require_once('learnpathItem.class.php');
require_once('scormItem.class.php');
require_once('aiccItem.class.php');
require_once 'learnpath.class.php';
require_once 'scorm.class.php';
require_once 'aicc.class.php';
require_once 'learnpathItem.class.php';
require_once 'scormItem.class.php';
require_once 'aiccItem.class.php';
$mylp = '';
if(isset($_SESSION['lpobject']))
{
@ -450,6 +450,6 @@ function start_timer()
return $objResponse;
}
require('lp_comm.common.php');
require 'lp_comm.common.php';
$xajax->processRequests();
?>

@ -55,20 +55,20 @@ $use_anonymous = true;
//include class definitions before session_start() to ensure availability when touching
//session vars containing learning paths
require_once('learnpath.class.php');
require_once 'learnpath.class.php';
if($debug>0) error_log('New LP - Included learnpath',0);
require_once('learnpathItem.class.php');
require_once 'learnpathItem.class.php';
if($debug>0) error_log('New LP - Included learnpathItem',0);
require_once('scorm.class.php');
require_once 'scorm.class.php';
if($debug>0) error_log('New LP - Included scorm',0);
require_once('scormItem.class.php');
require_once 'scormItem.class.php';
if($debug>0) error_log('New LP - Included scormItem',0);
require_once('aicc.class.php');
require_once 'aicc.class.php';
if($debug>0) error_log('New LP - Included aicc',0);
require_once('aiccItem.class.php');
require_once 'aiccItem.class.php';
if($debug>0) error_log('New LP - Included aiccItem',0);
require_once('back_compat.inc.php');
require_once 'back_compat.inc.php';
if($debug>0) error_log('New LP - Included back_compat',0);
if (!$is_allowed_in_course) {
@ -215,7 +215,7 @@ switch($action)
if(!$lp_found){
//check if the learnpath ID was defined, otherwise send back to list
error_log('New LP - No learnpath given for add item', 0);
require('lp_list.php');
require 'lp_list.php';
} else {
$_SESSION['refresh'] = 1;
@ -224,7 +224,7 @@ switch($action)
if(isset($_SESSION['post_time']) && $_SESSION['post_time'] == $_POST['post_time']) {
//check post_time to ensure ??? (counter-hacking measure?)
require('lp_add_item.php');
require 'lp_add_item.php';
} else {
$_SESSION['post_time'] = $_POST['post_time'];
@ -243,10 +243,10 @@ switch($action)
}
//display
require('lp_add_item.php');
require 'lp_add_item.php';
}
} else {
require('lp_add_item.php');
require 'lp_add_item.php';
}
}
@ -268,7 +268,7 @@ switch($action)
if(isset($_SESSION['post_time']) && $_SESSION['post_time'] == $_REQUEST['post_time'])
{
require('lp_add.php');
require 'lp_add.php';
}
else
{
@ -286,12 +286,12 @@ switch($action)
//$_SESSION['oLP']->add_item(0,-1,'dokeos_chapter',$_REQUEST['path'],'Default');
require('lp_build.php');
require 'lp_build.php';
}
}
}
else
require('lp_add.php');
require 'lp_add.php';
break;
@ -303,12 +303,12 @@ switch($action)
if($debug>0) error_log('New LP - admin_view action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for admin_view', 0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for admin_view', 0); require 'lp_list.php'; }
else
{
$_SESSION['refresh'] = 1;
require('lp_admin_view.php');
require 'lp_admin_view.php';
}
break;
@ -321,12 +321,12 @@ switch($action)
if($debug > 0) error_log('New LP - build action triggered', 0);
if(!$lp_found){ error_log('New LP - No learnpath given for build', 0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for build', 0); require 'lp_list.php'; }
else
{
$_SESSION['refresh'] = 1;
require('lp_build.php');
require 'lp_build.php';
}
break;
@ -339,7 +339,7 @@ switch($action)
if($debug > 0) error_log('New LP - delete item action triggered', 0);
if(!$lp_found){ error_log('New LP - No learnpath given for delete item', 0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for delete item', 0); require 'lp_list.php'; }
else
{
$_SESSION['refresh'] = 1;
@ -353,11 +353,11 @@ switch($action)
if(isset($_GET['view']) && $_GET['view'] == 'build')
{
require('lp_build.php');
require 'lp_build.php';
}
else
{
require('lp_admin_view.php');
require 'lp_admin_view.php';
}
}
@ -371,7 +371,7 @@ switch($action)
if($debug > 0) error_log('New LP - edit item action triggered', 0);
if(!$lp_found){ error_log('New LP - No learnpath given for edit item', 0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for edit item', 0); require 'lp_list.php'; }
else
{
$_SESSION['refresh'] = 1;
@ -391,11 +391,11 @@ switch($action)
if(isset($_GET['view']) && $_GET['view'] == 'build')
{
require('lp_edit_item.php');
require 'lp_edit_item.php';
}
else
{
require('lp_admin_view.php');
require 'lp_admin_view.php';
}
}
@ -409,7 +409,7 @@ switch($action)
if($debug > 0) error_log('New LP - edit item prereq action triggered', 0);
if(!$lp_found){ error_log('New LP - No learnpath given for edit item prereq', 0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for edit item prereq', 0); require 'lp_list.php'; }
else
{
if(isset($_POST['submit_button']))
@ -419,7 +419,7 @@ switch($action)
$_SESSION['oLP']->edit_item_prereq($_GET['id'], $_POST['prerequisites'], $_POST['min_' . $_POST['prerequisites']], $_POST['max_' . $_POST['prerequisites']]);
}
require('lp_edit_item_prereq.php');
require 'lp_edit_item_prereq.php';
}
break;
@ -432,7 +432,7 @@ switch($action)
if ($debug > 0) error_log('New LP - move item action triggered', 0);
if (!$lp_found) { error_log('New LP - No learnpath given for move item', 0); require('lp_list.php'); }
if (!$lp_found) { error_log('New LP - No learnpath given for move item', 0); require 'lp_list.php'; }
else {
$_SESSION['refresh'] = 1;
@ -442,7 +442,7 @@ switch($action)
}
if (isset($_GET['view']) && $_GET['view'] == 'build') {
require('lp_move_item.php');
require 'lp_move_item.php';
} else {
//avoids weird behaviours see CT#967
$check = Security::check_token('get');
@ -450,7 +450,7 @@ switch($action)
$_SESSION['oLP']->move_item($_GET['id'], $_GET['direction']);
}
Security::clear_token();
require('lp_admin_view.php');
require 'lp_admin_view.php';
}
}
@ -462,10 +462,10 @@ switch($action)
}
if($debug>0) error_log('New LP - view_item action triggered', 0);
if(!$lp_found){
error_log('New LP - No learnpath given for view item', 0); require('lp_list.php');
error_log('New LP - No learnpath given for view item', 0); require 'lp_list.php';
} else {
$_SESSION['refresh'] = 1;
require('lp_view_item.php');
require 'lp_view_item.php';
}
break;
@ -476,21 +476,21 @@ switch($action)
}
if($debug>0) error_log('New LP - upload action triggered',0);
$cwdir = getcwd();
require('lp_upload.php');
require 'lp_upload.php';
//reinit current working directory as many functions in upload change it
chdir($cwdir);
require('lp_list.php');
require 'lp_list.php';
break;
case 'export':
if(!$is_allowed_to_edit){
api_not_allowed(true);
}
if($debug>0) error_log('New LP - export action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for export',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for export',0); require 'lp_list.php'; }
else{
$_SESSION['oLP']->scorm_export();
exit();
//require('lp_list.php');
//require 'lp_list.php';
}
break;
case 'delete':
@ -498,14 +498,14 @@ switch($action)
api_not_allowed(true);
}
if($debug>0) error_log('New LP - delete action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for delete',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for delete',0); require 'lp_list.php'; }
else{
$_SESSION['refresh'] = 1;
//remove lp from homepage if it is there
//$_SESSION['oLP']->toggle_visibility((int)$_GET['lp_id'],'i');
$_SESSION['oLP']->delete(null,(int)$_GET['lp_id'],'remove');
api_session_unregister('oLP');
require('lp_list.php');
require 'lp_list.php';
}
break;
case 'toggle_visible': //change lp visibility (inside lp tool)
@ -513,10 +513,10 @@ switch($action)
api_not_allowed(true);
}
if($debug>0) error_log('New LP - visibility action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for visibility',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for visibility',0); require 'lp_list.php'; }
else{
learnpath::toggle_visibility($_REQUEST['lp_id'],$_REQUEST['new_status']);
require('lp_list.php');
require 'lp_list.php';
}
break;
case 'toggle_publish': //change lp published status (visibility on homepage)
@ -524,10 +524,10 @@ switch($action)
api_not_allowed(true);
}
if($debug>0) error_log('New LP - publish action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for publish',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for publish',0); require 'lp_list.php'; }
else{
learnpath::toggle_publish($_REQUEST['lp_id'],$_REQUEST['new_status']);
require('lp_list.php');
require 'lp_list.php';
}
break;
case 'move_lp_up': //change lp published status (visibility on homepage)
@ -538,12 +538,12 @@ switch($action)
if(!$lp_found)
{
error_log('New LP - No learnpath given for publish',0);
require('lp_list.php');
require 'lp_list.php';
}
else
{
learnpath::move_up($_REQUEST['lp_id']);
require('lp_list.php');
require 'lp_list.php';
}
break;
case 'move_lp_down': //change lp published status (visibility on homepage)
@ -553,12 +553,12 @@ switch($action)
if($debug>0) error_log('New LP - publish action triggered',0);
if(!$lp_found){
error_log('New LP - No learnpath given for publish',0);
require('lp_list.php');
require 'lp_list.php';
}
else
{
learnpath::move_down($_REQUEST['lp_id']);
require('lp_list.php');
require 'lp_list.php';
}
break;
case 'edit':
@ -567,10 +567,10 @@ switch($action)
api_not_allowed(true);
}
if($debug>0) error_log('New LP - edit action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for edit',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for edit',0); require 'lp_list.php'; }
else{
$_SESSION['refresh'] = 1;
require('lp_edit.php');
require 'lp_edit.php';
}
break;
case 'update_lp':
@ -578,7 +578,7 @@ switch($action)
api_not_allowed(true);
}
if($debug>0) error_log('New LP - update_lp action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for edit',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for edit',0); require 'lp_list.php'; }
else{
$_SESSION['refresh'] = 1;
$lp_name=Security::remove_XSS($_REQUEST['lp_name']);
@ -615,7 +615,7 @@ switch($action)
if (api_get_setting('search_enabled') === 'true')
{
require_once(api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php');
require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
$specific_fields = get_specific_field_list();
foreach ($specific_fields as $specific_field) {
$_SESSION['oLP']->set_terms_by_prefix($_REQUEST[$specific_field['code']], $specific_field['code']);
@ -634,7 +634,7 @@ switch($action)
}
}
require('lp_list.php');
require 'lp_list.php';
}
break;
case 'add_sub_item': //add an item inside a chapter
@ -642,16 +642,16 @@ switch($action)
api_not_allowed(true);
}
if($debug>0) error_log('New LP - add sub item action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for add sub item',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for add sub item',0); require 'lp_list.php'; }
else{
$_SESSION['refresh'] = 1;
if(!empty($_REQUEST['parent_item_id'])){
$_SESSION['from_learnpath']='yes';
$_SESSION['origintoolurl'] = 'lp_controller.php?action=admin_view&lp_id='.Security::remove_XSS($_REQUEST['lp_id']);
require('resourcelinker.php');
require 'resourcelinker.php';
//$_SESSION['oLP']->add_sub_item($_REQUEST['parent_item_id'],$_REQUEST['previous'],$_REQUEST['type'],$_REQUEST['path'],$_REQUEST['title']);
}else{
require('lp_admin_view.php');
require 'lp_admin_view.php';
}
}
break;
@ -661,13 +661,13 @@ switch($action)
api_not_allowed(true);
}
if($debug>0) error_log('New LP - delete item action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for delete item',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for delete item',0); require 'lp_list.php'; }
else{
$_SESSION['refresh'] = 1;
if(!empty($_REQUEST['id'])){
$_SESSION['oLP']->delete_item($_REQUEST['id']);
}
require('lp_admin_view.php');
require 'lp_admin_view.php';
}
break;
case 'edititemprereq':
@ -676,64 +676,64 @@ switch($action)
api_not_allowed(true);
}
if($debug>0) error_log('New LP - edit item prereq action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for edit item prereq',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for edit item prereq',0); require 'lp_list.php'; }
else{
if(!empty($_REQUEST['id']) && !empty($_REQUEST['submit_item'])){
$_SESSION['refresh'] = 1;
$_SESSION['oLP']->edit_item_prereq($_REQUEST['id'],$_REQUEST['prereq']);
}
require('lp_admin_view.php');
require 'lp_admin_view.php';
}
break;
case 'restart':
if($debug>0) error_log('New LP - restart action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for restart',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for restart',0); require 'lp_list.php'; }
else{
$_SESSION['oLP']->restart();
require('lp_view.php');
require 'lp_view.php';
}
break;
case 'last':
if($debug>0) error_log('New LP - last action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for last',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for last',0); require 'lp_list.php'; }
else{
$_SESSION['oLP']->last();
require('lp_view.php');
require 'lp_view.php';
}
break;
case 'first':
if($debug>0) error_log('New LP - first action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for first',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for first',0); require 'lp_list.php'; }
else{
$_SESSION['oLP']->first();
require('lp_view.php');
require 'lp_view.php';
}
break;
case 'next':
if($debug>0) error_log('New LP - next action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for next',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for next',0); require 'lp_list.php'; }
else{
$_SESSION['oLP']->next();
require('lp_view.php');
require 'lp_view.php';
}
break;
case 'previous':
if($debug>0) error_log('New LP - previous action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for previous',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for previous',0); require 'lp_list.php'; }
else{
$_SESSION['oLP']->previous();
require('lp_view.php');
require 'lp_view.php';
}
break;
case 'content':
if($debug>0) error_log('New LP - content action triggered',0);
if($debug>0) error_log('New LP - Item id is '.$_GET['item_id'],0);
if(!$lp_found){ error_log('New LP - No learnpath given for content',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for content',0); require 'lp_list.php'; }
else{
$_SESSION['oLP']->save_last();
$_SESSION['oLP']->set_current_item($_GET['item_id']);
$_SESSION['oLP']->start_current_item();
require('lp_content.php');
require 'lp_content.php';
}
break;
case 'view':
@ -742,7 +742,7 @@ switch($action)
if(!$lp_found)
{
error_log('New LP - No learnpath given for view', 0);
require('lp_list.php');
require 'lp_list.php';
}
else
{
@ -751,20 +751,20 @@ switch($action)
{
$_SESSION['oLP']->set_current_item($_REQUEST['item_id']);
}
require('lp_view.php');
require 'lp_view.php';
}
break;
case 'save':
if($debug>0) error_log('New LP - save action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for save',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for save',0); require 'lp_list.php'; }
else{
$_SESSION['oLP']->save_item();
require('lp_save.php');
require 'lp_save.php';
}
break;
case 'stats':
if($debug>0) error_log('New LP - stats action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for stats',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for stats',0); require 'lp_list.php'; }
else{
$_SESSION['oLP']->save_current();
$_SESSION['oLP']->save_last();
@ -773,7 +773,7 @@ switch($action)
$list = $_SESSION['oLP']->get_flat_ordered_items_list($lp_id);
$user_id = api_get_user_id();
$stats_charset = $_SESSION['oLP']->encoding;
require('lp_stats.php');
require 'lp_stats.php';
}
break;
case 'list':
@ -782,7 +782,7 @@ switch($action)
$_SESSION['refresh'] = 1;
$_SESSION['oLP']->save_last();
}
require('lp_list.php');
require 'lp_list.php';
break;
case 'mode':
//switch between fullscreen and embedded mode
@ -793,35 +793,35 @@ switch($action)
}else{
$_SESSION['oLP']->mode = 'embedded';
}
require('lp_view.php');
require 'lp_view.php';
break;
case 'switch_view_mode':
if($debug>0) error_log('New LP - switch_view_mode action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for switch',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for switch',0); require 'lp_list.php'; }
$_SESSION['refresh'] = 1;
$_SESSION['oLP']->update_default_view_mode();
require('lp_list.php');
require 'lp_list.php';
break;
case 'switch_force_commit':
if($debug>0) error_log('New LP - switch_force_commit action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for switch',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for switch',0); require 'lp_list.php'; }
$_SESSION['refresh'] = 1;
$_SESSION['oLP']->update_default_scorm_commit();
require('lp_list.php');
require 'lp_list.php';
break;
case 'switch_reinit':
if($debug>0) error_log('New LP - switch_reinit action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for switch',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for switch',0); require 'lp_list.php'; }
$_SESSION['refresh'] = 1;
$_SESSION['oLP']->update_reinit();
require('lp_list.php');
require 'lp_list.php';
break;
case 'switch_scorm_debug':
if($debug>0) error_log('New LP - switch_scorm_debug action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for switch',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for switch',0); require 'lp_list.php'; }
$_SESSION['refresh'] = 1;
$_SESSION['oLP']->update_scorm_debug();
require('lp_list.php');
require 'lp_list.php';
break;
case 'intro_cmdAdd':
if($debug>0) error_log('New LP - intro_cmdAdd action triggered',0);
@ -829,14 +829,14 @@ switch($action)
break;
case 'js_api_refresh':
if($debug>0) error_log('New LP - js_api_refresh action triggered',0);
if(!$lp_found){ error_log('New LP - No learnpath given for js_api_refresh',0); require('lp_message.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for js_api_refresh',0); require 'lp_message.php'; }
if(isset($_REQUEST['item_id'])){
$htmlHeadXtra[] = $_SESSION['oLP']->get_js_info($_REQUEST['item_id']);
}
require('lp_message.php');
require 'lp_message.php';
break;
case 'return_to_course_homepage':
if(!$lp_found){ error_log('New LP - No learnpath given for stats',0); require('lp_list.php'); }
if(!$lp_found){ error_log('New LP - No learnpath given for stats',0); require 'lp_list.php'; }
else{
$_SESSION['oLP']->save_current();
$_SESSION['oLP']->save_last();
@ -858,7 +858,7 @@ switch($action)
default:
if($debug>0) error_log('New LP - default action triggered',0);
//$_SESSION['refresh'] = 1;
require('lp_list.php');
require 'lp_list.php';
break;
}
if(!empty($_SESSION['oLP'])){

@ -5,8 +5,8 @@
* @author Yannick Warnier <ywarnier@beeznest.org>
*/
require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
require_once(api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php');
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
global $charset;
@ -75,7 +75,7 @@ foreach($encodings as $encoding){
$origin_select = &$form->addElement('select', 'lp_maker', get_lang('Origin'));
$lp_orig = $_SESSION['oLP']->get_maker();
include('content_makers.inc.php');
include 'content_makers.inc.php';
foreach($content_origins as $origin){
if($lp_orig == $origin){
$s_selected_origin = $origin;

@ -54,9 +54,9 @@ api_protect_course_script();
//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');
include 'learnpath_functions.inc.php';
//include '../resourcelinker/resourcelinker.inc.php';
include 'resourcelinker.inc.php';
//rewrite the language file, sadly overwritten by resourcelinker.inc.php
// name of the language file that needs to be included
$language_file = "learnpath";

@ -52,9 +52,9 @@ api_protect_course_script();
//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');
include 'learnpath_functions.inc.php';
//include '../resourcelinker/resourcelinker.inc.php';
include 'resourcelinker.inc.php';
//rewrite the language file, sadly overwritten by resourcelinker.inc.php
// name of the language file that needs to be included
$language_file = "learnpath";

@ -9,7 +9,7 @@
*/
//flag to allow for anonymous user - needs to be set before global.inc.php
$use_anonymous = true;
require_once('back_compat.inc.php');
include_once('../inc/reduced_header.inc.php');
require_once 'back_compat.inc.php';
include_once '../inc/reduced_header.inc.php';
Display::display_footer();
?>

@ -11,10 +11,10 @@
$use_anonymous = true;
// name of the language file that needs to be included
$language_file[] = "scormdocument";
require_once('back_compat.inc.php');
require_once('learnpath.class.php');
require_once('scorm.class.php');
require_once('aicc.class.php');
require_once 'back_compat.inc.php';
require_once 'learnpath.class.php';
require_once 'scorm.class.php';
require_once 'aicc.class.php';
if(isset($_SESSION['lpobject'])){
$temp = $_SESSION['lpobject'];
$_SESSION['oLP'] = unserialize($temp);
@ -68,7 +68,7 @@ if($show_link)
$interbreadcrumb[] = array("url"=>"./lp_controller.php?action=view&lp_id=".$path_id,'name'=>$path_name);
$noPHP_SELF = true;
$lp_theme_css=$_SESSION['oLP']->get_theme();
include('../inc/reduced_header.inc.php');
include '../inc/reduced_header.inc.php';
echo '<div style="font-size:14px;padding-left: 17px;">';
echo '<table ><tr><td>';
echo '<a href="./lp_controller.php?action=return_to_course_homepage" target="_self" onclick="window.parent.API.save_asset();">';

@ -17,14 +17,14 @@ if(empty($lp_controller_touched) || $lp_controller_touched!=1){
header('location: lp_controller.php?action=list');
}
require_once('back_compat.inc.php');
require_once 'back_compat.inc.php';
$courseDir = api_get_course_path().'/scorm';
$baseWordDir = $courseDir;
$display_progress_bar = true;
require_once('learnpathList.class.php');
require_once('learnpath.class.php');
require_once('learnpathItem.class.php');
require_once 'learnpathList.class.php';
require_once 'learnpath.class.php';
require_once 'learnpathItem.class.php';
/**
* Display initialisation and security checks
@ -98,7 +98,7 @@ if ($is_allowed_to_edit) {
Display::display_normal_message(api_failure::get_last_failure());
}
//include('content_makers.inc.php');
//include 'content_makers.inc.php';
echo '<div class="actions">';
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=add_lp">'.
'<img src="../img/wizard.gif" border="0" align="absmiddle" alt="'.get_lang('_add_learnpath').
@ -184,12 +184,12 @@ if (is_array($flat_list)) {
// This is a student and this path is invisible, skip
continue;
}
// check if the learnpath is visible for student
if (!$is_allowed_to_edit && !learnpath::is_lp_visible_for_student($id,api_get_user_id())) {
continue;
}
$counter++;
if (($counter % 2)==0) { $oddclass="row_odd"; } else { $oddclass="row_even"; }
@ -239,7 +239,7 @@ if (is_array($flat_list)) {
$dsp_progress = '<td width="140px" style="padding-top:1em;">'.learnpath::get_db_progress($id,api_get_user_id(),'both').'</td>';
}
if($is_allowed_to_edit) {
/*
if ($current_session == $details['lp_session']) {
$dsp_desc = '<td valign="middle" style="color: grey; padding-top:1em;"><em>'.$details['lp_maker'].'</em> &nbsp;&nbsp; '.$details['lp_proximity'].' &nbsp;&nbsp; '.$details['lp_encoding'].'<a href="lp_controller.php?'.api_get_cidreq().'&action=edit&lp_id='.$id.'">&nbsp;&nbsp;<img src="../img/edit.gif" border="0" title="'.get_lang('_edit_learnpath').'"></a></td>'."\n";
@ -247,7 +247,7 @@ if (is_array($flat_list)) {
$dsp_desc = '<td valign="middle" style="color: grey; padding-top:1em;"><em>'.$details['lp_maker'].'</em> &nbsp;&nbsp; '.$details['lp_proximity'].' &nbsp;&nbsp; '.$details['lp_encoding'].'<img src="../img/edit_na.gif" border="0" title="'.get_lang('_edit_learnpath').'"></td>'."\n";
}
*/
$dsp_desc = '<td valign="middle" style="color: grey; padding-top:1em;"><em>'.$details['lp_maker'].'</em> &nbsp;&nbsp; '.$details['lp_proximity'].' &nbsp;&nbsp; '.$details['lp_encoding'].'</td>'."\n";
/* export */
@ -276,15 +276,15 @@ if (is_array($flat_list)) {
$dsp_edit = '<td align="center">';
$dsp_edit_close = '</td>';
// EDIT LP
if ($current_session == $details['lp_session']) {
$dsp_edit_lp = '<a href="lp_controller.php?'.api_get_cidreq().'&action=edit&lp_id='.$id.'">&nbsp;&nbsp;<img src="../img/edit.gif" border="0" title="'.get_lang('_edit_learnpath').'"></a>&nbsp;';
} else {
$dsp_edit_lp = '<img src="../img/edit_na.gif" border="0" title="'.get_lang('_edit_learnpath').'">&nbsp;';
}
// BUILD
// BUILD
if ($current_session == $details['lp_session']) {
if($details['lp_type']==1 || $details['lp_type']==2){
$dsp_build = '<a href="lp_controller.php?'.api_get_cidreq().'&amp;action=build&amp;lp_id='.$id.'"><img src="../img/wizard.gif" border="0" title="'.get_lang("Build").'"></a>&nbsp;';

@ -18,7 +18,7 @@
*/
//flag to allow for anonymous user - needs to be set before global.inc.php
$use_anonymous = true;
require_once('back_compat.inc.php');
require_once 'back_compat.inc.php';
$htmlHeadXtra[] = '<script language="javascript">
function cleanlog(){
@ -31,7 +31,7 @@ function cleanlog(){
$scorm_css_header=true;
$display_mode='';
$lp_theme_log=true;
include_once('../inc/reduced_header.inc.php');
include_once '../inc/reduced_header.inc.php';
?>
<body>
<div id="log_content">

@ -20,9 +20,9 @@
$use_anonymous = true;
// name of the language file that needs to be included
$language_file = "learnpath";
require_once('back_compat.inc.php');
require_once('learnpath.class.php');
require_once('scorm.class.php');
require_once 'back_compat.inc.php';
require_once 'learnpath.class.php';
require_once 'scorm.class.php';
if(empty($debug)){$debug=0;}
$error = '';
$display_mode = '';
@ -39,7 +39,7 @@ $htmlHeadXtra[] = '<script language="JavaScript" type="text/javascript">
</script>';
$lp_theme_css=$_SESSION['oLP']->get_theme();
$scorm_css_header=true;
include_once('../inc/reduced_header.inc.php');
include_once '../inc/reduced_header.inc.php';
//close the session immediately to avoid concurrent access problems
session_write_close();
?>

@ -23,9 +23,9 @@ api_protect_course_script();
//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');
include 'learnpath_functions.inc.php';
//include '../resourcelinker/resourcelinker.inc.php';
include 'resourcelinker.inc.php';
//rewrite the language file, sadly overwritten by resourcelinker.inc.php
// name of the language file that needs to be included
$language_file = "learnpath";

@ -14,10 +14,10 @@ $use_anonymous = true;
$language_file[] = "scormdocument";
$language_file[] = "scorm";
$language_file[] = "learnpath";
require_once('back_compat.inc.php');
require_once('learnpath.class.php');
require_once('scorm.class.php');
require_once('aicc.class.php');
require_once 'back_compat.inc.php';
require_once 'learnpath.class.php';
require_once 'scorm.class.php';
require_once 'aicc.class.php';
//error_log('New LP - Loaded lp_nav: '.$_SERVER['REQUEST_URI'],0);
$htmlHeadXtra[] = '<script language="JavaScript" type="text/javascript">
var dokeos_xajax_handler = window.parent.oxajax;
@ -40,7 +40,7 @@ if(isset($_SESSION['lpobject'])) {
$scorm_css_header = true;
$lp_theme_css = $_SESSION['oLP']->get_theme();
//Setting up the CSS theme if exists
include_once('../inc/reduced_header.inc.php');
include_once '../inc/reduced_header.inc.php';
if (!empty($lp_theme_css) && !empty($mycourselptheme) && $mycourselptheme!=-1 && $mycourselptheme== 1 ) {
global $lp_theme_css;

@ -9,7 +9,7 @@
*/
require_once 'learnpath.class.php';
//require_once('scorm.class.php');
//require_once 'scorm.class.php';
require_once 'resourcelinker.inc.php';
require_once api_get_path(LIBRARY_PATH).'tracking.lib.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
@ -189,8 +189,8 @@ if (is_array($list) && count($list) > 0) {
$result = Database::query($sql);
$num = Database :: num_rows($result);
$time_for_total = 'NaN';
$is_allowed_to_edit = api_is_allowed_to_edit(null,true);
$is_allowed_to_edit = api_is_allowed_to_edit(null,true);
if (($extend_this || $extend_all) && $num > 0) {
$row = Database :: fetch_array($result);
@ -233,7 +233,7 @@ if (is_array($list) && count($list) > 0) {
}
$counter++;
do {
$row['iv_view_count'];
//check if there are interactions below
@ -298,8 +298,8 @@ if (is_array($list) && count($list) > 0) {
);
$my_lesson_status = api_convert_encoding(get_lang($mylanglist[$lesson_status]), $lp_charset, $dokeos_charset);
if ($row['item_type'] != 'dokeos_chapter') {
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
@ -374,7 +374,7 @@ if (is_array($list) && count($list) > 0) {
}
}
} while ($row = Database :: fetch_array($result));
} elseif ($num > 0) {
$row = Database :: fetch_array($result);
$my_id = $row['myid'];
@ -486,7 +486,7 @@ if (is_array($list) && count($list) > 0) {
} else {
$score = 0;
$subtotal_time = 0;
}
//echo $subtotal_time ;
//$time = learnpathItem :: get_scorm_time('js', $subtotal_time);
@ -573,7 +573,7 @@ if (is_array($list) && count($list) > 0) {
if ($row['item_type'] == 'quiz') {
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$output .= Display::return_icon('invisible.gif', get_lang('ResultsHiddenByExerciseSetting'));
$output .= Display::return_icon('invisible.gif', get_lang('ResultsHiddenByExerciseSetting'));
} else {
$output .= ($score == 0 ? '0/'.float_format($maxscore, 1) : ($maxscore == 0 ? $score : float_format($score, 1) . '/' . float_format($maxscore, 1)));
}
@ -655,7 +655,7 @@ if (is_array($list) && count($list) > 0) {
$mytime = ((int)$mktime_exe_date-(int)$mktime_start_date);
$time_attemp = learnpathItem :: get_scorm_time('js', $mytime);
$time_attemp = str_replace('NaN', '00' . $h . '00\'00"', $time_attemp);
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$view_score = Display::return_icon('invisible.gif', get_lang('ResultsHiddenByExerciseSetting'));
} else {
@ -681,7 +681,7 @@ if (is_array($list) && count($list) > 0) {
} else {
$output .= '<td><a href="../exercice/exercise_show.php?origin=student_progress&myid='.$my_orig_lp.'&my_lp_id='.$my_orig_lp_item.'&id=' . $my_exe_id . '&cidReq=' . $course_code . '&student=' . $student_id .$from_link. '" target="_parent"><img src="' . api_get_path(WEB_IMG_PATH) . 'quiz.gif" alt="'.api_convert_encoding(get_lang('ShowAttempt'), $lp_charset, $dokeos_charset).'" title="'.api_convert_encoding(get_lang('ShowAttempt'), $lp_charset, $dokeos_charset).'"></a></td>';
}
} else {
} else {
if (!$is_allowed_to_edit && $result_disabled_ext_all ) {
$output .= '<td><img src="' . api_get_path(WEB_IMG_PATH) . 'quiz_na.gif" alt="'.api_convert_encoding(get_lang('ShowAndQualifyAttempt'), $lp_charset, $dokeos_charset).'" title="'.api_convert_encoding(get_lang('ShowAndQualifyAttempt'), $lp_charset, $dokeos_charset).'"></td>';
} else {
@ -718,18 +718,18 @@ if (!empty($a_my_id)) {
}
$total_score = Tracking::get_avg_student_score($my_studen_id, $my_course_id, $a_my_id);
} else {
if ($origin == 'tracking') {
$my_studen_id = $student_id;
$my_course_id = Database::escape_string($_GET['course']);
if (!empty($my_studen_id) && !empty($my_course_id)) {
$total_score = Tracking::get_avg_student_score($my_studen_id, $my_course_id, array(intval($_GET['lp_id'])));
} else {
$total_score = 0;
}
$total_score = 0;
}
} else {
$total_score = 0;
}
}
}
$total_time = learnpathItem :: get_scorm_time('js', $total_time);
@ -743,7 +743,7 @@ if(!$is_allowed_to_edit && $result_disabled_ext_all) {
} else {
if (is_numeric($total_score))
$final_score = $total_score.'%';
else
else
$final_score = $total_score;
}

@ -10,10 +10,10 @@ $use_anonymous = true;
$language_file[] = "scormdocument";
$language_file[] = "scorm";
$language_file[] = "learnpath";
require_once('back_compat.inc.php');
require_once('learnpath.class.php');
require_once('scorm.class.php');
require_once('aicc.class.php');
require_once 'back_compat.inc.php';
require_once 'learnpath.class.php';
require_once 'scorm.class.php';
require_once 'aicc.class.php';
if(isset($_SESSION['lpobject']))
{
@ -33,7 +33,7 @@ $htmlHeadXtra[] = '<script language="JavaScript" type="text/javascript">
$scorm_css_header=true;
$display_mode='';
$lp_theme_css=$_SESSION['oLP']->get_theme();
include_once('../inc/reduced_header.inc.php');
include_once '../inc/reduced_header.inc.php';
?>
<body>
<?php echo $_SESSION['oLP']->get_html_toc();?><br/>

@ -10,7 +10,7 @@
*/
//flag to allow for anonymous user - needs to be set before global.inc.php
$use_anonymous = true;
require_once('back_compat.inc.php');
require_once 'back_compat.inc.php';
$course_dir = api_get_course_path().'/scorm';
$course_sys_dir = api_get_path(SYS_COURSE_PATH).$course_dir;
if ( empty($_POST['current_dir']) ) {
@ -48,11 +48,11 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST'
$new_dir = replace_dangerous_char(trim($file_base_name),'strict');
require_once('learnpath.class.php');
require_once 'learnpath.class.php';
$type = learnpath::get_package_type($_FILES['user_file']['tmp_name'],$_FILES['user_file']['name']);
switch($type){
case 'scorm':
require_once('scorm.class.php');
require_once 'scorm.class.php';
$oScorm = new scorm();
$manifest = $oScorm->import_package($_FILES['user_file'],$current_dir);
if (!$manifest) { //if api_set_failure
@ -74,7 +74,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST'
$oScorm->set_jslib('scorm_api.php');
break;
case 'aicc':
require_once('aicc.class.php');
require_once 'aicc.class.php';
$oAICC = new aicc();
$config_dir = $oAICC->import_package($_FILES['user_file']);
if(!empty($config_dir)){
@ -90,13 +90,13 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST'
$oAICC->set_jslib('aicc_api.php');
break;
case 'oogie':
require_once('openoffice_presentation.class.php');
require_once 'openoffice_presentation.class.php';
$take_slide_name = empty($_POST['take_slide_name']) ? false : true;
$o_ppt = new OpenofficePresentation($take_slide_name);
$first_item_id = $o_ppt -> convert_document($_FILES['user_file']);
break;
case 'woogie':
require_once('openoffice_text.class.php');
require_once 'openoffice_text.class.php';
$split_steps = $_POST['split_steps'];
$o_doc = new OpenofficeText($split_steps);
$first_item_id = $o_doc -> convert_document($_FILES['user_file']);
@ -124,12 +124,12 @@ elseif($_SERVER['REQUEST_METHOD'] == 'POST')
$file_base_name = str_replace('.'.$extension,'',$filename);
$new_dir = replace_dangerous_char(trim($file_base_name),'strict');
require_once('learnpath.class.php');
require_once 'learnpath.class.php';
$type = learnpath::get_package_type($s,basename($s));
switch($type){
case 'scorm':
require_once('scorm.class.php');
require_once 'scorm.class.php';
$oScorm = new scorm();
$manifest = $oScorm->import_local_package($s,$current_dir);
if ($manifest === false ) { //if api_set_failure
@ -149,7 +149,7 @@ elseif($_SERVER['REQUEST_METHOD'] == 'POST')
$oScorm->set_jslib('scorm_api.php');
break;
case 'aicc':
require_once('aicc.class.php');
require_once 'aicc.class.php';
$oAICC = new aicc();
$config_dir = $oAICC->import_local_package($s,$current_dir);
if(!empty($config_dir)){

@ -29,11 +29,11 @@ if ($lp_controller_touched != 1){
Libraries
*/
require_once 'back_compat.inc.php';
//require_once('../learnpath/learnpath_functions.inc.php');
//require_once '../learnpath/learnpath_functions.inc.php';
require_once 'scorm.lib.php';
require_once 'learnpath.class.php';
require_once 'learnpathItem.class.php';
//require_once('lp_comm.common.php'); //xajax functions
//require_once 'lp_comm.common.php'; //xajax functions
if (!$is_allowed_in_course) api_not_allowed();

@ -13,13 +13,13 @@
//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
require_once '../inc/global.inc.php';
require_once '../inc/global.inc.php';
api_protect_course_script();
//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;
@ -46,7 +46,7 @@ api_protect_course_script();
//libraries are included by default
require_once 'learnpath_functions.inc.php';
//include('../resourcelinker/resourcelinker.inc.php');
//include '../resourcelinker/resourcelinker.inc.php';
require_once 'resourcelinker.inc.php';
//rewrite the language file, sadly overwritten by resourcelinker.inc.php
// name of the language file that needs to be included

@ -11,11 +11,11 @@
* Defines the "OpenofficePresentation" child of class "OpenofficeDocument"
* @package dokeos.learnpath.OpenofficeDocument
*/
require_once('openoffice_document.class.php');
require_once 'openoffice_document.class.php';
if (api_get_setting('search_enabled')=='true') {
require_once(api_get_path(LIBRARY_PATH).'search/DokeosIndexer.class.php');
require_once(api_get_path(LIBRARY_PATH).'search/IndexableChunk.class.php');
require_once(api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php');
require_once api_get_path(LIBRARY_PATH).'search/DokeosIndexer.class.php';
require_once api_get_path(LIBRARY_PATH).'search/IndexableChunk.class.php';
require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
}
class OpenofficePresentation extends OpenofficeDocument {

@ -10,11 +10,11 @@
* Defines the "OpenofficeText" child of class "learnpath"
* @package dokeos.learnpath.OpenofficeDocument
*/
require_once('openoffice_document.class.php');
require_once 'openoffice_document.class.php';
if (api_get_setting('search_enabled')=='true') {
require_once(api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php');
require_once(api_get_path(LIBRARY_PATH).'search/DokeosIndexer.class.php');
require_once(api_get_path(LIBRARY_PATH).'search/IndexableChunk.class.php');
require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
require_once api_get_path(LIBRARY_PATH).'search/DokeosIndexer.class.php';
require_once api_get_path(LIBRARY_PATH).'search/IndexableChunk.class.php';
}
class OpenofficeText extends OpenofficeDocument {

@ -10,10 +10,10 @@
* Defines the "OpenOfficeTextDocument" child of class "learnpath"
* @package dokeos.learnpath.openofficedocument
*/
require_once('openoffice_document.class.php');
require_once(api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php');
require_once(api_get_path(LIBRARY_PATH).'search/DokeosIndexer.class.php');
require_once(api_get_path(LIBRARY_PATH).'search/IndexableChunk.class.php');
require_once 'openoffice_document.class.php';
require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
require_once api_get_path(LIBRARY_PATH).'search/DokeosIndexer.class.php';
require_once api_get_path(LIBRARY_PATH).'search/IndexableChunk.class.php';
class OpenOfficeTextDocument extends OpenofficeDocument {

@ -44,12 +44,12 @@
//flag to allow for anonymous user - needs to be set before global.inc.php
$use_anonymous = true;
require_once('back_compat.inc.php');
include(api_get_path(SYS_CODE_PATH).'lang/english/resourcelinker.inc.php');
require_once 'back_compat.inc.php';
include api_get_path(SYS_CODE_PATH).'lang/english/resourcelinker.inc.php';
if(!empty($_course['language'])){
include(api_get_path(SYS_CODE_PATH).'lang/'.$_course['language'].'/resourcelinker.inc.php');
include api_get_path(SYS_CODE_PATH).'lang/'.$_course['language'].'/resourcelinker.inc.php';
}
include('../exercice/hotpotatoes.lib.php');
include '../exercice/hotpotatoes.lib.php';
/*
==============================================================================

@ -42,7 +42,7 @@
$use_anonymous = true;
// name of the language file that needs to be included
$language_file = 'resourcelinker';
require_once('back_compat.inc.php');
require_once 'back_compat.inc.php';
$this_section=SECTION_COURSES;
api_protect_course_script();
@ -52,7 +52,7 @@ api_protect_course_script();
Libraries
-----------------------------------------------------------
*/
include ('resourcelinker.inc.php');
include 'resourcelinker.inc.php';
/*
-----------------------------------------------------------
@ -737,7 +737,7 @@ if ($from_learnpath != 'yes')
// Agenda items -->
if ($content == "Agenda")
{
include (api_get_path(LIBRARY_PATH)."text.lib.php");
include api_get_path(LIBRARY_PATH).'text.lib.php';
$TABLEAGENDA = Database::get_course_table(TABLE_AGENDA);
$TABLE_ITEM_PROPERTY = Database::get_course_table(TABLE_ITEM_PROPERTY);
@ -815,7 +815,7 @@ if ($content == "Document" OR (empty($content) AND (is_allowed_to_edit() OR in_a
*/
if ($content == "Ad_Valvas")
{
include (api_get_path(LIBRARY_PATH)."text.lib.php");
include api_get_path(LIBRARY_PATH).'text.lib.php';
$tbl_announcement = Database :: get_course_table(TABLE_ANNOUNCEMENT);
$sql = "SELECT * FROM ".$tbl_announcement." a, ".$item_property_table." i WHERE i.tool = '".TOOL_ANNOUNCEMENT."' AND a.id=i.ref AND i.visibility='1' AND i.to_group_id = 0 AND i.to_user_id IS NULL ORDER BY a.display_order ASC";
//error_log($sql,0);
@ -918,10 +918,10 @@ if ($content == "Forum")
if ($content == "Link")
{
// including the links language file
include ("../lang/$language/link.inc.php");
include "../lang/$language/link.inc.php";
// including the links functions file
include ("../link/linkfunctions.php");
include '../link/linkfunctions.php';
$tbl_categories = Database::get_course_table(TABLE_LINK_CATEGORY);
if (($learnpath_id != '') and ($content == 'Link'))

@ -10,10 +10,10 @@
* Defines the "scorm" child of class "learnpath"
* @package chamilo.learnpath
*/
require_once('scormItem.class.php');
require_once('scormMetadata.class.php');
require_once('scormOrganization.class.php');
require_once('scormResource.class.php');
require_once 'scormItem.class.php';
require_once 'scormMetadata.class.php';
require_once 'scormOrganization.class.php';
require_once 'scormResource.class.php';
class scorm extends learnpath {
var $manifest = array();
@ -487,9 +487,9 @@ class scorm extends learnpath {
// code for indexing, now only index specific fields like terms and the title
if (!empty($_POST['index_document'])) {
require_once(api_get_path(LIBRARY_PATH).'search/DokeosIndexer.class.php');
require_once(api_get_path(LIBRARY_PATH).'search/IndexableChunk.class.php');
require_once(api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php');
require_once api_get_path(LIBRARY_PATH).'search/DokeosIndexer.class.php';
require_once api_get_path(LIBRARY_PATH).'search/IndexableChunk.class.php';
require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
$di = new DokeosIndexer();
isset($_POST['language'])? $lang=Database::escape_string($_POST['language']): $lang = 'english';
@ -562,7 +562,7 @@ class scorm extends learnpath {
function import_package($zip_file_info,$current_dir = '')
{
if($this->debug>0){error_log('In scorm::import_package('.print_r($zip_file_info,true).',"'.$current_dir.'") method',0);}
require_once(api_get_path(LIBRARY_PATH).'document.lib.php');
require_once api_get_path(LIBRARY_PATH).'document.lib.php';
$maxFilledSpace = DocumentManager :: get_course_quota();
//$maxFilledSpace = 1000000000;
@ -650,7 +650,7 @@ class scorm extends learnpath {
}
if (! enough_size($realFileSize, $course_sys_dir, $maxFilledSpace) )
{
{
if($this->debug>1){error_log('New LP - Not enough space to store package',0);}
return api_failure::set_failure('not_enough_space');
}
@ -864,11 +864,11 @@ class scorm extends learnpath {
//error_log('New LP - in export_zip()',0);
//zip everything that is in the corresponding scorm dir
//write the zip file somewhere (might be too big to return)
require_once (api_get_path(LIBRARY_PATH)."fileUpload.lib.php");
require_once (api_get_path(LIBRARY_PATH)."fileManage.lib.php");
require_once (api_get_path(LIBRARY_PATH)."document.lib.php");
require_once (api_get_path(LIBRARY_PATH)."pclzip/pclzip.lib.php");
require_once ("learnpath_functions.inc.php");
require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH).'document.lib.php';
require_once api_get_path(LIBRARY_PATH).'pclzip/pclzip.lib.php';
require_once 'learnpath_functions.inc.php';
$tbl_lp = Database::get_course_table(TABLE_LP_MAIN);
$_course = Database::get_course_info(api_get_course_id());

@ -7,7 +7,7 @@
/**
* This class handles the <item> elements from an imsmanifest file.
*/
require_once('learnpathItem.class.php');
require_once 'learnpathItem.class.php';
class scormItem extends learnpathItem{
var $identifier = '';
var $identifierref = '';

@ -188,7 +188,7 @@ class scormResource {
{
if(!empty($this->href))
{
require_once('learnpath.class.php');
require_once 'learnpath.class.php';
return learnpath::escape_string($this->href);
}else{
return '';
@ -201,7 +201,7 @@ class scormResource {
function get_scorm_type()
{
if(!empty($this->scormtype)){
require_once('learnpath.class.php');
require_once 'learnpath.class.php';
return learnpath::escape_string($this->scormtype);
}else{
return '';

@ -42,9 +42,9 @@ $use_anonymous = true;
$language_file = "scormdocument";
$uncompress=1; //this variable shouldn't be found here (find its usage before removal)
require_once('back_compat.inc.php');
include('learnpath_functions.inc.php');
include_once('scorm.lib.php');
require_once 'back_compat.inc.php';
include 'learnpath_functions.inc.php';
include_once 'scorm.lib.php';
$is_allowedToEdit = api_is_allowed_to_edit();

@ -26,10 +26,10 @@
//flag to allow for anonymous user - needs to be set before global.inc.php
$use_anonymous = true;
require_once('back_compat.inc.php');
require_once('learnpath.class.php');
require_once('learnpathItem.class.php');
require_once('scorm.class.php');
require_once 'back_compat.inc.php';
require_once 'learnpath.class.php';
require_once 'learnpathItem.class.php';
require_once 'scorm.class.php';
// Is this needed? This is probabaly done in the header file
//$_user = $_SESSION['_user'];

Loading…
Cancel
Save