Removing require_once already loaded with composer.

1.10.x
Julio Montoya 10 years ago
parent fe219a6e94
commit 57eeea7543
  1. 2
      composer.json
  2. 2
      composer.lock
  3. 9
      custompages/registration-dist.php
  4. 3
      main/admin/access_url_edit_course_category_to_url.php
  5. 4
      main/admin/access_urls.php
  6. 6
      main/admin/career_dashboard.php
  7. 4
      main/admin/configure_homepage.php
  8. 3
      main/admin/configure_inscription.php
  9. 3
      main/admin/course_add.php
  10. 1
      main/admin/course_category.php
  11. 3
      main/admin/course_edit.php
  12. 1
      main/admin/course_import.php
  13. 3
      main/admin/course_list.php
  14. 6
      main/admin/course_request_edit.php
  15. 5
      main/admin/course_request_rejected.php
  16. 5
      main/admin/course_request_review.php
  17. 1
      main/admin/group_edit.php
  18. 3
      main/admin/ldap_import_students.php
  19. 2
      main/admin/ldap_import_students_to_session.php
  20. 3
      main/admin/session_import.php
  21. 1
      main/admin/session_list.php
  22. 3
      main/admin/session_user_import.php
  23. 3
      main/admin/skills_import.php
  24. 3
      main/admin/system_announcements.php
  25. 3
      main/admin/user_add.php
  26. 4
      main/admin/user_edit.php
  27. 5
      main/admin/user_import.php
  28. 6
      main/admin/user_update_import.php
  29. 3
      main/announcements/announcements.php
  30. 2
      main/auth/cas/logincas.php
  31. 1
      main/auth/cas/logout.php
  32. 5
      main/auth/courses.php
  33. 3
      main/auth/external_login/functions.inc.php
  34. 4
      main/auth/external_login/newUser.php
  35. 2
      main/auth/external_login/updateUser.php
  36. 2
      main/auth/inscription.php
  37. 1
      main/auth/lostPassword.php
  38. 2
      main/auth/my_progress.php
  39. 7
      main/auth/profile.php
  40. 4
      main/conference/api.php
  41. 1
      main/conference/checksession.php
  42. 5
      main/course_description/index.php
  43. 1
      main/course_info/infocours.php
  44. 1
      main/coursecopy/classes/CourseSelectForm.class.php
  45. 7
      main/create_course/add_course.php
  46. 1
      main/cron/document/finddoc.php
  47. 2
      main/cron/document/index_all_docs.php
  48. 3
      main/document/remote.php
  49. 5
      main/dropbox/dropbox_download.php
  50. 5
      main/dropbox/dropbox_init.inc.php
  51. 8
      main/exercice/addlimits.php
  52. 5
      main/exercice/admin.php
  53. 8
      main/exercice/adminhp.php
  54. 7
      main/exercice/aiken.php
  55. 9
      main/exercice/exercice.php
  56. 18
      main/exercice/exercise.class.php
  57. 7
      main/exercice/exercise_admin.php
  58. 16
      main/exercice/exercise_reminder.php
  59. 7
      main/exercice/exercise_report.php
  60. 16
      main/exercice/exercise_result.php
  61. 8
      main/exercice/exercise_show.php
  62. 6
      main/exercice/exercise_submit.php
  63. 5
      main/exercice/exercise_submit_modal.php
  64. 9
      main/exercice/export/aiken/aiken_classes.php
  65. 9
      main/exercice/export/exercise_import.php
  66. 23
      main/exercice/export/qti2/qti2_classes.php
  67. 17
      main/exercice/export/scorm/scorm_classes.php
  68. 11
      main/exercice/feedback.php
  69. 7
      main/exercice/hotpotatoes_exercise_report.php
  70. 11
      main/exercice/hotspot_actionscript.as.php
  71. 10
      main/exercice/hotspot_actionscript_admin.as.php
  72. 8
      main/exercice/hotspot_answers.as.php
  73. 10
      main/exercice/hotspot_save.inc.php
  74. 8
      main/exercice/hotspot_savescore.inc.php
  75. 4
      main/exercice/hotspot_updatescore.inc.php
  76. 5
      main/exercice/live_stats.php
  77. 10
      main/exercice/mark_free_answer.php
  78. 3
      main/exercice/overview.php
  79. 56
      main/exercice/qti2.php
  80. 24
      main/exercice/question.class.php
  81. 5
      main/exercice/question_create.php
  82. 4
      main/exercice/question_pool.php
  83. 9
      main/exercice/result.php
  84. 11
      main/exercice/savescores.php
  85. 4
      main/exercice/stats.php
  86. 7
      main/exercice/upload_exercise.php
  87. 3
      main/forum/forumfunction.inc.php
  88. 5
      main/inc/ajax/course.ajax.php
  89. 4
      main/inc/ajax/exercise.ajax.php
  90. 1
      main/inc/email_editor.php
  91. 9
      main/inc/global.inc.php
  92. 9
      main/inc/lib/WCAG/WCAG_rendering.php
  93. 4
      main/inc/lib/add_course.lib.inc.php
  94. 44
      main/inc/lib/api.lib.php
  95. 3
      main/inc/lib/auth.lib.php
  96. 7
      main/inc/lib/classmanager.lib.php
  97. 1
      main/inc/lib/course.lib.php
  98. 6
      main/inc/lib/course_description.lib.php
  99. 1
      main/inc/lib/course_request.lib.php
  100. 1
      main/inc/lib/display.lib.php
  101. Some files were not shown because too many files have changed in this diff Show More

@ -17,6 +17,8 @@
"main/admin",
"main/cron/lang",
"main/coursecopy",
"main/course_description",
"main/dropbox",
"main/exercice",
"main/gradebook/lib",
"main/newscorm",

2
composer.lock generated

@ -4,7 +4,7 @@
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "b9a64081b907e6968045cc2c894d141f",
"hash": "37cea40c8d66240c56600ba583a25719",
"packages": [
{
"name": "aferrandini/phpqrcode",

@ -7,15 +7,10 @@
* Copyright: CBlue SPRL, 20XX (GNU/GPLv3)
* @package chamilo.custompages
**/
/**
* Initialization
*/
require_once('language.php');
require_once('../inc/global.inc.php');
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
require_once api_get_path(CONFIGURATION_PATH).'profile.conf.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
/**
* Removes some unwanted elementend of the form object
*/

@ -12,9 +12,6 @@ $language_file = 'admin';
$cidReset = true;
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'urlmanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'course_category.lib.php';
require_once api_get_path(LIBRARY_PATH).'xajax/xajax.inc.php';
$xajax = new xajax();
$xajax->registerFunction(array('searchCourseCategoryAjax', 'UrlManager', 'searchCourseCategoryAjax'));

@ -24,10 +24,6 @@ $interbreadcrumb[] = array ("url" => 'index.php', 'name' => get_lang('PlatformAd
$tool_name = get_lang('MultipleAccessURLs');
Display :: display_header($tool_name);
require_once api_get_path(LIBRARY_PATH).'urlmanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'usergroup.lib.php';
require_once api_get_path(LIBRARY_PATH).'course_category.lib.php';
$my_user_url_list = api_get_access_url_from_user(api_get_user_id());
$current_access_url_id = api_get_current_access_url_id();
$url_list = UrlManager::get_url_data();

@ -13,12 +13,6 @@ $language_file = array('courses', 'index', 'admin');
$cidReset = true;
require_once '../inc/global.inc.php';
$libpath = api_get_path(LIBRARY_PATH);
require_once $libpath.'career.lib.php';
require_once $libpath.'promotion.lib.php';
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpathList.class.php';
require_once api_get_path(SYS_CODE_PATH).'exercice/exercise.lib.php';
require_once api_get_path(SYS_CODE_PATH).'exercice/exercise.class.php';
api_protect_admin_script();

@ -56,10 +56,6 @@ $this_page = '';
api_protect_admin_script();
require_once api_get_path(LIBRARY_PATH).'WCAG/WCAG_rendering.php';
require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
require_once api_get_path(LIBRARY_PATH).'course_category.lib.php';
$htmlHeadXtra[] = '<script>
$(function() {
$("#all_langs").change(function() {

@ -12,9 +12,6 @@ require_once '../inc/global.inc.php';
api_protect_admin_script();
require_once api_get_path(CONFIGURATION_PATH).'profile.conf.php';
require_once api_get_path(INCLUDE_PATH).'lib/mail.lib.inc.php';
// Load terms & conditions from the current lang
if (get_setting('allow_terms_conditions') == 'true') {
$get = array_keys($_GET);

@ -16,9 +16,6 @@ $this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH).'course_category.lib.php';
$tool_name = get_lang('AddCourse');
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
$interbreadcrumb[] = array('url' => 'course_list.php', 'name' => get_lang('CourseList'));

@ -10,7 +10,6 @@
$language_file = 'admin';
$cidReset = true;
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'course_category.lib.php';
$this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();

@ -12,9 +12,6 @@ $this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();
require_once api_get_path(LIBRARY_PATH) . 'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH) . 'course_category.lib.php';
$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$course_table = Database::get_main_table(TABLE_MAIN_COURSE);

@ -63,7 +63,6 @@ function validate_data($courses)
// 4. Check whether course category exists.
if (isset($course['CourseCategory']) && strlen($course['CourseCategory']) != 0) {
require_once api_get_path(LIBRARY_PATH).'course_category.lib.php';
$categoryInfo = getCategory($course['CourseCategory']);
if (empty($categoryInfo)) {
//@todo this is so bad even all lang variables are wrong ...

@ -14,9 +14,6 @@ require_once '../inc/global.inc.php';
$this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();
require_once '../gradebook/lib/be/gradebookitem.class.php';
require_once '../gradebook/lib/be/category.class.php';
require_once api_get_path(LIBRARY_PATH).'course_category.lib.php';
$sessionId = isset($_GET['session_id']) ? $_GET['session_id'] : null;

@ -19,16 +19,10 @@ api_protect_admin_script();
require_once api_get_path(LIBRARY_PATH).'add_course.lib.inc.php';
require_once api_get_path(CONFIGURATION_PATH).'course_info.conf.php';
require_once api_get_path(LIBRARY_PATH).'course_request.lib.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'course_category.lib.php';
// Including a configuration file.
require_once api_get_path(CONFIGURATION_PATH).'add_course.conf.php';
// Including additional libraries.
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
// A check whether the course validation feature is enabled.
$course_validation_feature = api_get_setting('course_validation') == 'true';

@ -24,15 +24,10 @@ api_protect_admin_script();
require_once api_get_path(LIBRARY_PATH).'add_course.lib.inc.php';
require_once api_get_path(CONFIGURATION_PATH).'course_info.conf.php';
require_once api_get_path(LIBRARY_PATH).'course_request.lib.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
// Including a configuration file.
require api_get_path(CONFIGURATION_PATH).'add_course.conf.php';
// Including additional libraries.
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
// A check whether the course validation feature is enabled.
$course_validation_feature = api_get_setting('course_validation') == 'true';

@ -21,15 +21,10 @@ api_protect_admin_script();
require_once api_get_path(LIBRARY_PATH).'add_course.lib.inc.php';
require_once api_get_path(CONFIGURATION_PATH).'course_info.conf.php';
require_once api_get_path(LIBRARY_PATH).'course_request.lib.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
// Including a configuration file.
require_once api_get_path(CONFIGURATION_PATH).'add_course.conf.php';
// Including additional libraries.
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
// The delete action should be deactivated in this page.
// Better reject the target request, after that you can delete it.
// see DELETE_ACTION_ENABLED constant in main_api.lib.php

@ -12,7 +12,6 @@ $this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();
$libpath = api_get_path(LIBRARY_PATH);
require_once $libpath.'mail.lib.inc.php';
$group_id = isset($_GET['id']) ? intval($_GET['id']) : intval($_POST['id']);
$tool_name = get_lang('GroupEdit');

@ -16,8 +16,7 @@ $cidReset=true;
require_once('../inc/global.inc.php');
// setting the section (for the tabs)
$this_section = SECTION_PLATFORM_ADMIN;
require_once(api_get_path(LIBRARY_PATH).'course.lib.php');
require_once(api_get_path(LIBRARY_PATH).'usermanager.lib.php');
// Access restrictions
api_protect_admin_script();
require('../auth/ldap/authldap.php');

@ -16,8 +16,6 @@ $cidReset=true;
require_once('../inc/global.inc.php');
// setting the section (for the tabs)
$this_section = SECTION_PLATFORM_ADMIN;
require_once(api_get_path(LIBRARY_PATH).'course.lib.php');
require_once(api_get_path(LIBRARY_PATH).'usermanager.lib.php');
// Access restrictions
api_protect_admin_script();
require('../auth/ldap/authldap.php');

@ -13,9 +13,6 @@ require_once '../inc/global.inc.php';
$this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script(true);
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
$form_sent = 0;
$error_message = ''; // Avoid conflict with the global variable $error_msg (array type) in add_course.conf.php.
if (isset($_GET['action']) && $_GET['action'] == 'show_message') {

@ -48,7 +48,6 @@ $url = api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=search_course';
$courseList = array();
$courseId = isset($_GET['course_id']) ? $_GET['course_id'] : null;
if (!empty($courseId)) {
require_once api_get_path(LIBRARY_PATH).'course_category.lib.php';
$courseInfo = api_get_course_info_by_id($courseId);
$parents = getParentsToString($courseInfo['categoryCode']);
$courseList[] = array('id' => $courseInfo['id'], 'text' => $parents.$courseInfo['title']);

@ -15,9 +15,6 @@ set_time_limit(0);
$this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script(true);
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
$form_sent = 0;
$error_message = ''; // Avoid conflict with the global variable $error_msg (array type) in add_course.conf.php.
if (isset($_GET['action']) && $_GET['action'] == 'show_message') {

@ -12,9 +12,6 @@ $language_file = array ('admin', 'registration');
$cidReset = true;
require '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH).'import.lib.php';
function validate_data($skills) {
$errors = array();

@ -17,9 +17,6 @@ $cidReset = true;
// Including the global initialization file.
require_once '../inc/global.inc.php';
// Including additional libraries.
require_once api_get_path(LIBRARY_PATH).'WCAG/WCAG_rendering.php';
// Setting the section (for the tabs).
$this_section = SECTION_PLATFORM_ADMIN;
$_SESSION['this_section']=$this_section;

@ -10,9 +10,6 @@ $cidReset = true;
// Including necessary libraries.
require_once '../inc/global.inc.php';
$libpath = api_get_path(LIBRARY_PATH);
require_once $libpath.'fileManage.lib.php';
require_once $libpath.'fileUpload.lib.php';
require_once $libpath.'mail.lib.inc.php';
// Section for the tabs
$this_section = SECTION_PLATFORM_ADMIN;

@ -73,10 +73,6 @@ function confirmation(name) {
</script>';
$libpath = api_get_path(LIBRARY_PATH);
require_once $libpath.'fileManage.lib.php';
require_once $libpath.'fileUpload.lib.php';
require_once $libpath.'mail.lib.inc.php';
$noPHP_SELF = true;
$tool_name = get_lang('ModifyUserInfo');

@ -13,11 +13,6 @@ $language_file = array('admin', 'registration');
$cidReset = true;
require '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH).'classmanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'usergroup.lib.php';
require_once api_get_path(LIBRARY_PATH).'import.lib.php';
// Set this option to true to enforce strict purification for usenames.
$purification_option_for_usernames = false;

@ -13,11 +13,6 @@ $language_file = array ('admin', 'registration');
$cidReset = true;
require '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH).'classmanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'usergroup.lib.php';
require_once api_get_path(LIBRARY_PATH).'import.lib.php';
// Set this option to true to enforce strict purification for usenames.
$purification_option_for_usernames = false;
@ -146,7 +141,6 @@ function updateUsers($users)
if (!isset($inserted_in_course)) {
$inserted_in_course = array();
}
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
$usergroup = new UserGroup();
$send_mail = $_POST['sendMail'] ? true : false;
if (is_array($users)) {

@ -56,9 +56,6 @@ $tbl_item_property = Database::get_course_table(TABLE_ITEM_PROPERTY);
/* Libraries */
$lib = api_get_path(LIBRARY_PATH); //avoid useless function calls
require_once $lib.'mail.lib.inc.php';
require_once $lib.'tracking.lib.php';
require_once 'announcements.inc.php';
$course_id = api_get_course_int_id();

@ -12,7 +12,7 @@
//----------------------------------------------------------------------
// Load required
require('../../inc/global.inc.php');
require_once (api_get_path(LIBRARY_PATH).'events.lib.inc.php');
require_once('authcas.php');
use \ChamiloSession as Session;
global $cas_auth_ver, $cas_auth_server, $cas_auth_port, $cas_auth_uri;

@ -6,7 +6,6 @@
because of security reason.
*/
require('../..//inc/global.inc.php');
require_once (api_get_path(LIBRARY_PATH).'events.lib.inc.php');
require_once('authcas.php');

@ -19,11 +19,6 @@ require_once '../inc/global.inc.php';
$ctok = Security::get_existing_token();
require_once api_get_path(LIBRARY_PATH).'auth.lib.php';
require_once api_get_path(LIBRARY_PATH).'app_view.php';
require_once 'courses_controller.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') {
$htmlHeadXtra[] = '
<script>

@ -1,8 +1,5 @@
<?php
require_once api_get_path(LIBRARY_PATH) . 'usermanager.lib.php';
require_once api_get_path(LIBRARY_PATH) . 'course.lib.php';
//define('USERINFO_TABLE', 'danone_userinfo');
//define('DEFAULT_PASSWORD', 'danonelearning');
//TODO : Please implements this function for this module to work.

@ -1,5 +1,4 @@
<?php
/*
Template to automatically create a new user with information from anywhere.
This file is loaded by main/inc/local.inc.php
@ -11,11 +10,8 @@
use \ChamiloSession as Session;
require_once(api_get_path(LIBRARY_PATH) . 'usermanager.lib.php');
require_once(api_get_path(LIBRARY_PATH) . 'course.lib.php');
require_once(dirname(__FILE__) . '/functions.inc.php');
//MAIN CODE
//$login and $password variables are setted in main/inc/local.inc.php

@ -7,8 +7,6 @@
use \ChamiloSession as Session;
require_once(api_get_path(LIBRARY_PATH) . 'usermanager.lib.php');
require_once(api_get_path(LIBRARY_PATH) . 'course.lib.php');
require_once(dirname(__FILE__) . '/functions.inc.php');
//MAIN CODE

@ -15,8 +15,6 @@ if (!empty($_POST['language'])) {
$_GET['language'] = $_POST['language'];
}
require_once '../inc/global.inc.php';
require_once api_get_path(CONFIGURATION_PATH).'profile.conf.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
$htmlHeadXtra[] = api_get_password_checker_js('#username', '#pass1');

@ -21,7 +21,6 @@
$language_file = array('registration', 'index');
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
// Custom pages
// Had to move the form handling in here, because otherwise there would

@ -12,8 +12,6 @@ $language_file = array('registration', 'tracking', 'exercice', 'admin', 'learnpa
$cidReset = true;
require_once '../inc/global.inc.php';
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpath.class.php';
require_once api_get_path(SYS_CODE_PATH).'exercice/exercise.lib.php';
$this_section = SECTION_TRACKING;

@ -93,13 +93,6 @@ if (api_get_setting('allow_message_tool') == 'true') {
EOF;
}
// Configuration file
require_once api_get_path(CONFIGURATION_PATH).'profile.conf.php';
// Libraries
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
$tool_name = is_profile_editable() ? get_lang('ModifProfile') : get_lang('ViewProfile');
$table_user = Database :: get_main_table(TABLE_MAIN_USER);

@ -43,10 +43,6 @@ if ($_SERVER['HTTP_USER_AGENT'] == 'Shockwave Flash') {
/*==== INCLUDE ====*/
require_once '../inc/global.inc.php';
api_block_anonymous_users();
require_once (api_get_path(LIBRARY_PATH)."course.lib.php");
require_once (api_get_path(LIBRARY_PATH)."document.lib.php");
require_once (api_get_path(LIBRARY_PATH)."fileUpload.lib.php");
require_once ("../newscorm/learnpath.class.php");
require_once ("../newscorm/openoffice_presentation.class.php");
/*==== Variables initialisation ====*/

@ -29,7 +29,6 @@ api_block_anonymous_users();
$confkey = api_get_setting('service_visio','visio_pass');
$challenge = api_generate_password(32); //generate a 32 characters-long challenge key
require_once (api_get_path(LIBRARY_PATH)."course.lib.php");
printf ('<?xml version="1.0" encoding="UTF-8" ?>');
printf('<dokeosobject>');

@ -14,11 +14,6 @@ $language_file = array ('course_description', 'accessibility');
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_COURSE_DESCRIPTION;
require_once api_get_path(LIBRARY_PATH).'course_description.lib.php';
require_once api_get_path(LIBRARY_PATH).'app_view.php';
require_once 'course_description_controller.php';
require_once api_get_path(LIBRARY_PATH).'WCAG/WCAG_rendering.php';
// defining constants
define('ADD_BLOCK', 8);

@ -24,7 +24,6 @@ $nameTools = get_lang('ModifInfo');
/* Libraries */
require_once api_get_path(INCLUDE_PATH).'conf/course_info.conf.php';
require_once api_get_path(LIBRARY_PATH).'course_category.lib.php';
api_protect_course_script(true);
api_block_anonymous_users();

@ -607,7 +607,6 @@ class CourseSelectForm
//get destination course title
if(!empty($hidden_fields['destination_course'])) {
require_once(api_get_path(LIBRARY_PATH).'course.lib.php');
if (!empty($hidden_fields['destination_session'])) {
$sessionTitle = ' (' . api_get_session_name($hidden_fields['destination_session']) . ')';
} else {

@ -21,7 +21,6 @@ $cidReset = true;
// Including the global initialization file.
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'course_category.lib.php';
// Section for the tabs.
$this_section = SECTION_COURSES;
@ -35,14 +34,8 @@ if (api_get_setting('course_validation') == 'true' && !api_is_platform_admin())
}
// Require additional libraries.
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(CONFIGURATION_PATH).'course_info.conf.php';
if ($course_validation_feature) {
require_once api_get_path(LIBRARY_PATH).'course_request.lib.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
}
$htmlHeadXtra[] = '<script type="text/javascript">
function setFocus(){
$("#title").focus();

@ -7,7 +7,6 @@
*/
die();
require '../../inc/global.inc.php';
require_once '../../inc/lib/course.lib.php';
if (empty($_GET['doc'])) {
echo "To add a document name to search, add ?doc=abc to the URL";
} else {

@ -7,8 +7,6 @@
*/
die();
require '../../inc/global.inc.php';
require_once '../../inc/lib/course.lib.php';
require_once '../../inc/lib/document.lib.php';
if (empty($_GET['doc'])) {
echo "To add a document name to search, add ?doc=abc to the URL\n";
} else {

@ -31,9 +31,6 @@ if ($debug>0) {
/*==== INCLUDE ====*/
require_once '../inc/global.inc.php';
api_block_anonymous_users();
require_once (api_get_path(LIBRARY_PATH).'course.lib.php');
require_once (api_get_path(LIBRARY_PATH).'document.lib.php');
require_once ('../newscorm/learnpath.class.php');
/*==== Variables initialisation ====*/
$action = $_REQUEST['action']; //safe as only used in if()'s
$seek = array('/','%2F','..');

@ -19,11 +19,6 @@ require_once 'dropbox_config.inc.php';
// the dropbox file that contains additional functions
require_once 'dropbox_functions.inc.php';
// the dropbox class
require_once 'dropbox_class.inc.php';
require_once api_get_path(LIBRARY_PATH).'document.lib.php';
/* DOWNLOAD A FOLDER */
$course_id = api_get_course_int_id();
$user_id = api_get_user_id();

@ -138,17 +138,12 @@ Session::write('dropbox_conf', $dropbox_cnf);
// the dropbox file that contains additional functions
require_once 'dropbox_functions.inc.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
// protecting the script
api_protect_course_script();
/* Libraries */
// including the library for the dropbox
require_once 'dropbox_class.inc.php';
// including some libraries that are also used in the documents tool
require_once api_get_path(SYS_CODE_PATH).'document/document.inc.php'; // we use a function build_document_icon_tag

@ -11,14 +11,6 @@
*/
require_once '../inc/global.inc.php';
/*
Including necessary files
*/
require_once 'exercise.class.php';
require_once 'question.class.php';
require_once 'answer.class.php';
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
// name of the language file that needs to be included
$language_file='exercice';

@ -47,15 +47,10 @@
use \ChamiloSession as Session;
require_once 'exercise.class.php';
require_once 'question.class.php';
require_once 'answer.class.php';
// Name of the language file that needs to be included
$language_file = 'exercice';
require_once '../inc/global.inc.php';
require_once 'exercise.lib.php';
$current_course_tool = TOOL_QUIZ;
$this_section = SECTION_COURSES;

@ -6,17 +6,11 @@
* @author Istvan Mandak
* @version $Id: adminhp.php 20089 2009-04-24 21:12:54Z cvargas1 $
*/
/**
* Code
*/
require_once 'exercise.class.php';
require_once 'question.class.php';
require_once 'answer.class.php';
// name of the language file that needs to be included
$language_file='exercice';
require_once '../inc/global.inc.php';
require_once 'exercise.lib.php';
$this_section=SECTION_COURSES;

@ -16,15 +16,8 @@ $language_file = array('exercice', 'gradebook');
require_once '../inc/global.inc.php';
$lib_path = api_get_path(LIBRARY_PATH);
$main_path = api_get_path(SYS_CODE_PATH);
require_once $lib_path.'document.lib.php';
require_once $lib_path.'fileUpload.lib.php';
require_once $lib_path.'fileManage.lib.php';
// including additional libraries
require_once 'exercise.class.php';
require_once 'question.class.php';
require_once 'answer.class.php';
require_once 'unique_answer.class.php';
require_once $main_path.'exercice/export/aiken/aiken_import.inc.php';
require_once $main_path.'exercice/export/aiken/aiken_classes.php';

@ -33,15 +33,8 @@ $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/qtip2/j
api_protect_course_script(true);
// including additional libraries
require_once 'exercise.class.php';
require_once 'exercise.lib.php';
require_once 'question.class.php';
require_once 'answer.class.php';
require_once 'testcategory.class.php';
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
require_once 'hotpotatoes.lib.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
/* Constants and variables */
$is_allowedToEdit = api_is_allowed_to_edit(null, true);

@ -1,23 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
define('ALL_ON_ONE_PAGE', 1);
define('ONE_PER_PAGE', 2);
define('EXERCISE_FEEDBACK_TYPE_END', 0); //Feedback - show score and expected answers
define('EXERCISE_FEEDBACK_TYPE_DIRECT', 1); //DirectFeedback - Do not show score nor answers
define('EXERCISE_FEEDBACK_TYPE_EXAM', 2); //NoFeedback - Show score only
define('RESULT_DISABLE_SHOW_SCORE_AND_EXPECTED_ANSWERS', 0); //show score and expected answers
define('RESULT_DISABLE_NO_SCORE_AND_EXPECTED_ANSWERS', 1); //Do not show score nor answers
define('RESULT_DISABLE_SHOW_SCORE_ONLY', 2); //Show score only
define('RESULT_DISABLE_SHOW_FINAL_SCORE_ONLY_WITH_CATEGORIES', 3); //Show final score only with categories
define('EXERCISE_MAX_NAME_SIZE', 80);
$debug = false; //All exercise scripts should depend in this debug variable
require_once dirname(__FILE__).'/../inc/lib/exercise_show_functions.lib.php';
/**
* Class Exercise
*
@ -60,6 +43,7 @@ class Exercise
public $exercise_was_added_in_lp = false;
public $force_edit_exercise_in_lp = false;
public $sessionId = 0;
public $debug = false;
/**
* Constructor of the class

@ -14,13 +14,8 @@
use \ChamiloSession as Session;
$language_file='exercice';
require_once 'exercise.class.php';
require_once 'question.class.php';
require_once 'answer.class.php';
$language_file = 'exercice';
require_once '../inc/global.inc.php';
require_once 'exercise.lib.php';
$this_section = SECTION_COURSES;
if (!api_is_allowed_to_edit(null,true)) {

@ -7,24 +7,8 @@
* @author Julio Montoya Armas switchable fill in blank option added
*/
require_once 'exercise.class.php';
require_once 'question.class.php';
require_once 'answer.class.php';
$language_file = 'exercice';
require_once '../inc/global.inc.php';
require_once 'exercise.lib.php';
if ($_GET['origin']=='learnpath') {
require_once '../newscorm/learnpath.class.php';
require_once '../newscorm/learnpathItem.class.php';
require_once '../newscorm/scorm.class.php';
require_once '../newscorm/scormItem.class.php';
require_once '../newscorm/aicc.class.php';
require_once '../newscorm/aiccItem.class.php';
}
require_once api_get_path(LIBRARY_PATH).'exercise_show_functions.lib.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
$this_section = SECTION_COURSES;

@ -27,14 +27,7 @@ $htmlHeadXtra[] = api_get_datepicker_js();
api_protect_course_script(true, false, true);
// including additional libraries
require_once 'exercise.class.php';
require_once 'exercise.lib.php';
require_once 'question.class.php';
require_once 'answer.class.php';
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
require_once 'hotpotatoes.lib.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
// need functions of statsutils lib to display previous exercices scores
require_once api_get_path(LIBRARY_PATH).'statsUtils.lib.inc.php';

@ -17,26 +17,10 @@
use \ChamiloSession as Session;
require_once 'exercise.class.php';
require_once 'question.class.php';
require_once 'answer.class.php';
// Name of the language file that needs to be included
$language_file = 'exercice';
require_once '../inc/global.inc.php';
require_once 'exercise.lib.php';
if ($_GET['origin']=='learnpath') {
require_once '../newscorm/learnpath.class.php';
require_once '../newscorm/learnpathItem.class.php';
require_once '../newscorm/scorm.class.php';
require_once '../newscorm/scormItem.class.php';
require_once '../newscorm/aicc.class.php';
require_once '../newscorm/aiccItem.class.php';
}
require_once api_get_path(LIBRARY_PATH).'exercise_show_functions.lib.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
$this_section = SECTION_COURSES;

@ -1,5 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Shows the exercise results
*
@ -17,14 +18,7 @@ use \ChamiloSession as Session;
$language_file = array('exercice');
// including additional libraries
require_once 'exercise.class.php';
require_once 'question.class.php'; //also defines answer type constants
require_once 'answer.class.php';
require_once '../inc/global.inc.php';
require_once 'exercise.lib.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
if (empty($origin) ) {
$origin = isset($_REQUEST['origin']) ? $_REQUEST['origin'] : null;

@ -1,5 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Exercise submission
* This script allows to run an exercise. According to the exercise type, questions
@ -27,16 +28,11 @@
use \ChamiloSession as Session;
require_once 'exercise.class.php';
require_once 'question.class.php';
require_once 'answer.class.php';
// name of the language file that needs to be included
$language_file = 'exercice';
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_QUIZ;
require_once 'exercise.lib.php';
$this_section = SECTION_COURSES;

@ -20,11 +20,6 @@ Display::display_reduced_header();
$dbg_local = 0;
require_once 'exercise.class.php';
require_once 'question.class.php';
require_once 'answer.class.php';
require_once 'exercise.lib.php';
if (empty ($exerciseResult)) {
$exerciseResult = $_SESSION['exerciseResult'];
}

@ -6,22 +6,15 @@
* @author César Perales <cesar.perales@gmail.com> Updated function names and import files for Aiken format support
* @package chamilo.exercise
*/
/**
* Code
*/
if ( count( get_included_files() ) == 1 ) die( '---' );
if (!function_exists('mime_content_type')) {
require_once api_get_path(LIBRARY_PATH).'document.lib.php';
function mime_content_type($filename) {
return DocumentManager::file_get_mime_type((string)$filename);
}
}
require_once(api_get_path(SYS_CODE_PATH).'/exercice/answer.class.php');
require_once(api_get_path(SYS_CODE_PATH).'/exercice/exercise.class.php');
require_once(api_get_path(SYS_CODE_PATH).'/exercice/question.class.php');
require_once(api_get_path(SYS_CODE_PATH).'/exercice/unique_answer.class.php');
/**
* Aiken2Question transformation class
*/

@ -17,14 +17,7 @@ if (api_is_platform_admin()) {
api_not_allowed();
}
//DECLARE NEEDED LIBRARIES
require_once api_get_path(LIBRARY_PATH) . 'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH) . 'fileUpload.lib.php';
require_once 'exercise_import.inc.php';
include_once '../exercise.class.php';
include_once '../question.class.php';
//SQL table name
@ -34,8 +27,6 @@ $tbl_rel_exercise_question = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION
// tool libraries
include_once '../exercise.class.php';
//Tool title
$nameTools = get_lang('ImportExercise');

@ -1,32 +1,11 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @author Claro Team <cvs@claroline.net>
* @author Yannick Warnier <yannick.warnier@beeznest.com> - updated ImsAnswerHotspot to match QTI norms
* @package chamilo.exercise
*/
/**
* Code
*/
require_once(api_get_path(SYS_CODE_PATH).'/exercice/answer.class.php');
require_once(api_get_path(SYS_CODE_PATH).'/exercice/exercise.class.php');
require_once(api_get_path(SYS_CODE_PATH).'/exercice/question.class.php');
require_once(api_get_path(SYS_CODE_PATH).'/exercice/hotspot.class.php');
require_once(api_get_path(SYS_CODE_PATH).'/exercice/unique_answer.class.php');
require_once(api_get_path(SYS_CODE_PATH).'/exercice/multiple_answer.class.php');
//require_once(api_get_path(SYS_CODE_PATH).'/exercice/multiple_answer_combination.class.php');
require_once(api_get_path(SYS_CODE_PATH).'/exercice/matching.class.php');
require_once(api_get_path(SYS_CODE_PATH).'/exercice/freeanswer.class.php');
require_once(api_get_path(SYS_CODE_PATH).'/exercice/fill_blanks.class.php');
//include_once $path . '/../../lib/answer_multiplechoice.class.php';
//include_once $path . '/../../lib/answer_truefalse.class.php';
//include_once $path . '/../../lib/answer_fib.class.php';
//include_once $path . '/../../lib/answer_matching.class.php';
/**
*
* @package chamilo.exercise
*/
class Ims2Question extends Question
{
/**

@ -5,23 +5,6 @@
* @author Yannick Warnier <yannick.warnier@beeznest.com>
* @package chamilo.exercise.scorm
*/
/**
* Code
*/
if ( count( get_included_files() ) == 1 ) die( '---' );
require_once api_get_path(SYS_CODE_PATH).'exercice/exercise.class.php';
require_once api_get_path(SYS_CODE_PATH).'exercice/question.class.php';
require_once api_get_path(SYS_CODE_PATH).'exercice/testcategory.class.php';
require_once api_get_path(SYS_CODE_PATH).'exercice/answer.class.php';
require_once api_get_path(SYS_CODE_PATH).'exercice/unique_answer.class.php';
require_once api_get_path(SYS_CODE_PATH).'exercice/multiple_answer.class.php';
require_once api_get_path(SYS_CODE_PATH).'exercice/multiple_answer_combination.class.php';
require_once api_get_path(SYS_CODE_PATH).'exercice/fill_blanks.class.php';
require_once api_get_path(SYS_CODE_PATH).'exercice/freeanswer.class.php';
require_once api_get_path(SYS_CODE_PATH).'exercice/hotspot.class.php';
require_once api_get_path(SYS_CODE_PATH).'exercice/matching.class.php';
require_once api_get_path(SYS_CODE_PATH).'exercice/hotspot.class.php';
/**
* The ScormQuestion class is a gateway to getting the answers exported

@ -7,14 +7,6 @@
* @author
* @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
*/
/**
* Code
*/
include('exercise.class.php');
include('question.class.php');
include('answer.class.php');
include('exercise.lib.php');
// name of the language file that needs to be included
$language_file='exercice';
@ -22,9 +14,6 @@ $language_file='exercice';
include("../inc/global.inc.php");
$this_section=SECTION_COURSES;
include_once(api_get_path(LIBRARY_PATH).'fileUpload.lib.php');
include_once(api_get_path(LIBRARY_PATH).'document.lib.php');
include_once(api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
$nameTools=get_lang('ExerciseManagement');
if (isset($_SESSION['gradebook'])){

@ -25,14 +25,7 @@ $htmlHeadXtra[] = api_get_jqgrid_js();
api_protect_course_script(true, false, true);
// including additional libraries
require_once 'exercise.class.php';
require_once 'exercise.lib.php';
require_once 'question.class.php';
require_once 'answer.class.php';
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
require_once 'hotpotatoes.lib.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
// need functions of statsutils lib to display previous exercices scores
require_once api_get_path(LIBRARY_PATH) . 'statsUtils.lib.inc.php';

@ -1,18 +1,15 @@
<?php //$id:$
<?php
/* For licensing terms, see /license.txt */
/**
* This file generates the ActionScript variables code used by the HotSpot .swf
* @package chamilo.exercise
* @author Toon Keppens
* @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
*/
/**
* Code
*/
session_cache_limiter("none");
include('exercise.class.php');
include('question.class.php');
include('answer.class.php');
include('../inc/global.inc.php');
// set vars

@ -1,18 +1,14 @@
<?php //$id:$
<?php
/* For licensing terms, see /license.txt */
/**
* This file generates the ActionScript variables code used by the HotSpot .swf
* @package chamilo.exercise
* @author Toon Keppens
* @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
*/
/**
* Code
*/
include('exercise.class.php');
include('question.class.php');
include('answer.class.php');
include('../inc/global.inc.php');
// set vars
$questionId = intval($_GET['modifyAnswers']);
$objQuestion = Question::read($questionId);

@ -1,17 +1,13 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This file generates the ActionScript variables code used by the
* HotSpot .swf
* @package chamilo.exercise
* @author Toon Keppens, Julio Montoya adding hotspot "medical" support
*/
/**
* Code
*/
include('exercise.class.php');
include('question.class.php');
include('answer.class.php');
include('../inc/global.inc.php');
// Set vars

@ -1,17 +1,13 @@
<?php //$id:$
<?php
/* For licensing terms, see /license.txt */
/**
*
* @package chamilo.exercise
* @author Toon Keppens
* @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
*/
/**
* Code
*/
include('exercise.class.php');
include('question.class.php');
include('answer.class.php');
include('../inc/global.inc.php');
$TBL_ANSWER = Database::get_course_table(TABLE_QUIZ_ANSWER);

@ -1,19 +1,13 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This file saves every click in the hotspot tool into track_e_hotspots
* @package chamilo.exercise
* @author Toon Keppens
* @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
*/
/**
* Code
*/
include('exercise.class.php');
include('question.class.php');
include('answer.class.php');
include('../inc/global.inc.php');
include('../inc/lib/database.lib.php');
$courseCode = $_GET['coursecode'];
$questionId = $_GET['questionId'];
$coordinates = $_GET['coord'];

@ -7,9 +7,7 @@
* @author Toon Keppens
* @version $Id: admin.php 10680 2007-01-11 21:26:23Z pcool $
*/
include 'exercise.class.php';
include 'question.class.php';
include 'answer.class.php';
include '../inc/global.inc.php';
$courseCode = $_GET['coursecode'];

@ -1,12 +1,9 @@
<?php
/* See license terms in /license.txt */
require_once 'exercise.class.php';
require_once 'question.class.php';
require_once 'answer.class.php';
$language_file = array('exercice','tracking');
require_once '../inc/global.inc.php';
require_once 'exercise.lib.php';
$this_section = SECTION_COURSES;
$exercise_id = (isset($_GET['exerciseId']) && !empty($_GET['exerciseId'])) ? intval($_GET['exerciseId']) : 0;

@ -1,5 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Free answer marking script
* This script allows a course tutor to mark a student's free answer.
@ -9,20 +10,13 @@
*
* @todo respect coding guidelines
*/
/**
* Code
*/
// name of the language file that needs to be included
$language_file='exercice';
// name of the language file that needs to be included
include('../inc/global.inc.php');
// including additional libraries
require_once 'exercise.class.php';
require_once 'question.class.php';
require_once 'answer.class.php';
//debug param. 0: no display - 1: debug display
$debug=0;
if($debug>0){echo str_repeat('&nbsp;',0).'Entered exercise_result.php'."<br />\n";var_dump($_POST);}

@ -11,9 +11,8 @@
use \ChamiloSession as Session;
$language_file = 'exercice';
require_once 'exercise.class.php';
require_once '../inc/global.inc.php';
require_once 'exercise.lib.php';
$current_course_tool = TOOL_QUIZ;
// Clear the exercise session just in case

@ -1,11 +1,11 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Code for Qti2 import integration.
* @package chamilo.exercise
* @author Ronny Velasquez
* @version $Id: qti2.php 2010-03-12 12:14:25Z $
*/
* Code for Qti2 import integration.
* @package chamilo.exercise
* @author Ronny Velasquez
* @version $Id: qti2.php 2010-03-12 12:14:25Z $
*/
/**
* Code
*/
@ -14,19 +14,13 @@ $language_file = array('exercice', 'document');
// including the global Chamilo file
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'document.lib.php';
// including additional libraries
require_once 'exercise.class.php';
require_once 'question.class.php';
require_once 'answer.class.php';
// section (for the tabs)
$this_section = SECTION_COURSES;
// access restriction: only teachers are allowed here
if (!api_is_allowed_to_edit(null, true)) {
api_not_allowed();
api_not_allowed();
}
// the breadcrumbs
@ -41,11 +35,11 @@ $is_allowedToEdit = api_is_allowed_to_edit(null, true);
*/
function ch_qti2_display_form()
{
$name_tools = get_lang('ImportQtiQuiz');
$form = '<div class="actions">';
$form .= '<a href="'.api_get_path(WEB_CODE_PATH).'exercice/exercice.php?show=test&'.api_get_cidreq().'">'.
Display :: return_icon('back.png', get_lang('BackToExercisesList'),'',ICON_SIZE_MEDIUM).'</a>';
$form .= '</div>';
$name_tools = get_lang('ImportQtiQuiz');
$form = '<div class="actions">';
$form .= '<a href="'.api_get_path(WEB_CODE_PATH).'exercice/exercice.php?show=test&'.api_get_cidreq().'">'.
Display :: return_icon('back.png', get_lang('BackToExercisesList'),'',ICON_SIZE_MEDIUM).'</a>';
$form .= '</div>';
$formValidator = new FormValidator(
'qti_upload',
'post',
@ -57,7 +51,7 @@ function ch_qti2_display_form()
$formValidator->addElement('file', 'userFile', get_lang('DownloadFile'));
$formValidator->addElement('style_submit_button', 'submit', get_lang('Send'), 'class="upload"');
$form .= $formValidator->return_form();
echo $form;
echo $form;
}
/**
@ -66,25 +60,25 @@ function ch_qti2_display_form()
*/
function ch_qti2_import_file($array_file)
{
$unzip = 0;
$lib_path = api_get_path(LIBRARY_PATH);
require_once $lib_path.'fileUpload.lib.php';
require_once $lib_path.'fileManage.lib.php';
$unzip = 0;
$lib_path = api_get_path(LIBRARY_PATH);
require_once $lib_path.'fileUpload.lib.php';
require_once $lib_path.'fileManage.lib.php';
$process = process_uploaded_file($array_file, false);
$process = process_uploaded_file($array_file, false);
if (preg_match('/\.zip$/i', $array_file['name'])) {
// if it's a zip, allow zip upload
$unzip = 1;
}
if (preg_match('/\.zip$/i', $array_file['name'])) {
// if it's a zip, allow zip upload
$unzip = 1;
}
if ($process && $unzip == 1) {
$main_path = api_get_path(SYS_CODE_PATH);
require_once $main_path.'exercice/export/exercise_import.inc.php';
if ($process && $unzip == 1) {
$main_path = api_get_path(SYS_CODE_PATH);
require_once $main_path.'exercice/export/exercise_import.inc.php';
require_once $main_path.'exercice/export/qti2/qti2_classes.php';
return import_exercise($array_file['name']);
}
}
return 'langFileError';
}

@ -1,30 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
// Question types
define('UNIQUE_ANSWER', 1);
define('MULTIPLE_ANSWER', 2);
define('FILL_IN_BLANKS', 3);
define('MATCHING', 4);
define('FREE_ANSWER', 5);
define('HOT_SPOT', 6);
define('HOT_SPOT_ORDER', 7);
define('HOT_SPOT_DELINEATION', 8);
define('MULTIPLE_ANSWER_COMBINATION', 9);
define('UNIQUE_ANSWER_NO_OPTION', 10);
define('MULTIPLE_ANSWER_TRUE_FALSE', 11);
define('MULTIPLE_ANSWER_COMBINATION_TRUE_FALSE', 12);
define('ORAL_EXPRESSION', 13);
define('GLOBAL_MULTIPLE_ANSWER', 14);
define('MEDIA_QUESTION', 15);
define('CALCULATED_ANSWER', 16);
//Some alias used in the QTI exports
define('MCUA', 1);
define('TF', 1);
define('MCMA', 2);
define('FIB', 3);
/**
* Class Question
*

@ -9,13 +9,8 @@
// name of the language file that needs to be included
$language_file='exercice';
// including global Dokeos file
require_once '../inc/global.inc.php';
// including additional libraries
require_once 'question.class.php';
require_once 'exercise.class.php';
// the section (tabs)
$this_section=SECTION_COURSES;

@ -17,11 +17,7 @@ use \ChamiloSession as Session;
$language_file = 'exercice';
require_once 'exercise.class.php';
require_once 'question.class.php';
require_once 'answer.class.php';
require_once '../inc/global.inc.php';
require_once 'exercise.lib.php';
$this_section = SECTION_COURSES;

@ -7,19 +7,10 @@
*
*/
/**
* Code
*/
// name of the language file that needs to be included
$language_file = array('exercice');
// including additional libraries
require_once 'exercise.class.php';
require_once 'question.class.php';
require_once 'answer.class.php';
require_once '../inc/global.inc.php';
require_once 'exercise.lib.php';
if (empty($origin)) {
$origin = $_REQUEST['origin'];

@ -9,22 +9,11 @@
// name of the language file that needs to be included
$language_file = 'learnpath';
if (isset($_GET['origin']) && $_GET['origin'] == 'learnpath') {
require_once '../newscorm/learnpath.class.php';
require_once '../newscorm/learnpathItem.class.php';
require_once '../newscorm/scorm.class.php';
require_once '../newscorm/scormItem.class.php';
require_once '../newscorm/aicc.class.php';
require_once '../newscorm/aiccItem.class.php';
}
require_once '../inc/global.inc.php';
$courseInfo = api_get_course_info();
$_user = api_get_user_info();
$this_section = SECTION_COURSES;
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
$documentPath = api_get_path(SYS_COURSE_PATH).$courseInfo['path']."/document";
$test = $_REQUEST['test'];

@ -1,12 +1,8 @@
<?php
/* See license terms in /license.txt */
require_once 'exercise.class.php';
require_once 'question.class.php';
require_once 'answer.class.php';
$language_file = array('exercice', 'tracking');
require_once '../inc/global.inc.php';
require_once 'exercise.lib.php';
$this_section = SECTION_COURSES;
$exercise_id = (isset($_GET['exerciseId']) && !empty($_GET['exerciseId'])) ? intval($_GET['exerciseId']) : 0;

@ -16,13 +16,8 @@ $help_content = 'exercise_upload';
// including the global Dokeos file
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH) . 'fileUpload.lib.php';
require_once api_get_path(LIBRARY_PATH) . 'pear/excelreader/reader.php';
require_once 'exercise.class.php';
require_once 'question.class.php';
require_once 'unique_answer.class.php';
require_once '../newscorm/learnpath.class.php';
require_once '../newscorm/learnpathItem.class.php';
// Security check
$is_allowed_to_edit = api_is_allowed_to_edit(null, true);

@ -23,9 +23,6 @@
use \ChamiloSession as Session;
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/gradebook_functions.inc.php';
define('FORUM_NEW_POST', 0);
get_notifications_of_user();

@ -39,7 +39,6 @@ switch ($action) {
}
break;
case 'search_category':
require_once api_get_path(LIBRARY_PATH).'course_category.lib.php';
if (api_is_platform_admin() || api_is_allowed_to_create_course()) {
$results = searchCategoryByKeyword($_REQUEST['q']);
if (!empty($results)) {
@ -77,11 +76,7 @@ switch ($action) {
}
$results = array();
require_once api_get_path(LIBRARY_PATH).'course_category.lib.php';
if (!empty($courseList)) {
foreach ($courseList as $courseInfo) {
$title = $courseInfo['title'];

@ -5,11 +5,7 @@
* Responses to AJAX calls
*/
require_once '../../exercice/exercise.class.php';
require_once '../../exercice/question.class.php';
require_once '../../exercice/answer.class.php';
require_once '../global.inc.php';
require_once '../../exercice/exercise.lib.php';
api_protect_course_script(true);

@ -16,7 +16,6 @@ use \ChamiloSession as Session;
$language_file = array('index', 'admin', 'registration');
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
if (empty($_user['user_id'])) {
api_not_allowed(true);

@ -98,6 +98,7 @@ ini_set('auto_detect_line_endings', '1');
// Include the libraries that are necessary everywhere
require_once dirname(__FILE__).'/../../vendor/autoload.php';
// @todo convert this libs in classes
require_once $lib_path.'database.lib.php';
require_once $lib_path.'text.lib.php';
require_once $lib_path.'array.lib.php';
@ -108,6 +109,9 @@ require_once $lib_path.'banner.lib.php';
require_once $lib_path.'fileManage.lib.php';
require_once $lib_path.'fileUpload.lib.php';
require_once $lib_path.'fileDisplay.lib.php';
require_once $lib_path.'mail.lib.inc.php';
require_once api_get_path(SYS_CODE_PATH).'exercice/exercise.lib.php';
require_once $lib_path.'course_category.lib.php';
define('_MPDF_TEMP_PATH', api_get_path(SYS_ARCHIVE_PATH).'mpdf/');
if (!is_dir(_MPDF_TEMP_PATH)) {
@ -329,6 +333,11 @@ if (file_exists($mail_conf)) {
require_once $mail_conf;
}
$profileConf = api_get_path(CONFIGURATION_PATH).'profile.conf.php';
if (file_exists($profileConf)) {
require_once $profileConf;
}
if (api_get_setting('server_type') == 'test') {
ini_set('display_errors', '1');
ini_set('log_errors', '1');

@ -21,11 +21,6 @@
/**
* @package chamilo.include
*/
/**
* Code
*/
include_once ('../inc/global.inc.php');
include_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
/**
* helper for WCAG rendering.
@ -34,7 +29,8 @@ include_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'
* @version 1.0
* @package chamilo.include
*/
class WCAG_Rendering {
class WCAG_Rendering
{
function editor_header() {
return '<div id="WCAG-editor"><div class="title">'.get_lang('WCAGEditor').'</div><div class="body">';
@ -194,4 +190,3 @@ function &create_xhtml($xhtml) {
}
} // end class WAI_Rendering
?>

@ -8,10 +8,6 @@
* @todo Clean up horrible structure, script is unwieldy, for example easier way to deal with
* different tool visibility settings: ALL_TOOLS_INVISIBLE, ALL_TOOLS_VISIBLE, CORE_TOOLS_VISIBLE...
*/
/**
* Code
*/
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
/* FUNCTIONS */

@ -404,6 +404,49 @@ define('GROUP_IMAGE_SIZE_SMALL', 4);
define('GROUP_TITLE_LENGTH', 50);
// Exercise
// @todo move into a class
define('ALL_ON_ONE_PAGE', 1);
define('ONE_PER_PAGE', 2);
define('EXERCISE_FEEDBACK_TYPE_END', 0); //Feedback - show score and expected answers
define('EXERCISE_FEEDBACK_TYPE_DIRECT', 1); //DirectFeedback - Do not show score nor answers
define('EXERCISE_FEEDBACK_TYPE_EXAM', 2); //NoFeedback - Show score only
define('RESULT_DISABLE_SHOW_SCORE_AND_EXPECTED_ANSWERS', 0); //show score and expected answers
define('RESULT_DISABLE_NO_SCORE_AND_EXPECTED_ANSWERS', 1); //Do not show score nor answers
define('RESULT_DISABLE_SHOW_SCORE_ONLY', 2); //Show score only
define('RESULT_DISABLE_SHOW_FINAL_SCORE_ONLY_WITH_CATEGORIES', 3); //Show final score only with categories
define('EXERCISE_MAX_NAME_SIZE', 80);
// Question types
// @todo move into a class
define('UNIQUE_ANSWER', 1);
define('MULTIPLE_ANSWER', 2);
define('FILL_IN_BLANKS', 3);
define('MATCHING', 4);
define('FREE_ANSWER', 5);
define('HOT_SPOT', 6);
define('HOT_SPOT_ORDER', 7);
define('HOT_SPOT_DELINEATION', 8);
define('MULTIPLE_ANSWER_COMBINATION', 9);
define('UNIQUE_ANSWER_NO_OPTION', 10);
define('MULTIPLE_ANSWER_TRUE_FALSE', 11);
define('MULTIPLE_ANSWER_COMBINATION_TRUE_FALSE', 12);
define('ORAL_EXPRESSION', 13);
define('GLOBAL_MULTIPLE_ANSWER', 14);
define('MEDIA_QUESTION', 15);
define('CALCULATED_ANSWER', 16);
//Some alias used in the QTI exports
define('MCUA', 1);
define('TF', 1);
define('MCMA', 2);
define('FIB', 3);
/**
* Inclusion of internationalization libraries
*/
@ -1270,7 +1313,6 @@ function _api_format_user($user, $add_password = false)
$last_login = $user['last_login'];
} else {
if (!isset($user['lastLogin']) && !isset($user['last_login'])) {
require_once api_get_path(LIBRARY_PATH).'tracking.lib.php';
$timestamp = Tracking::get_last_connection_date($result['user_id'], false, true);
// Convert the timestamp back into a datetime
// NOTE: this timestamp has ALREADY been converted to the local timezone in the get_last_connection_date function

@ -1,9 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
require_once api_get_path(LIBRARY_PATH).'tracking.lib.php';
require_once api_get_path(LIBRARY_PATH).'course_category.lib.php';
/**
* Class Auth
* Auth can be used to instantiate objects or as a library to manage courses

@ -1,11 +1,8 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This is the static class library for this application.
* @package chamilo.library
*/
/**
* Code
* Class ClassManager
*/
class ClassManager
{

@ -2547,7 +2547,6 @@ class CourseManager
*/
public static function select_and_sort_categories($element, $defaultCode = null, $parentCode = null , $padding = null)
{
require_once api_get_path(LIBRARY_PATH).'course_category.lib.php';
setCategoriesInForm($element, $defaultCode, $parentCode , $padding);
}

@ -7,11 +7,9 @@
* @author Christian Fasanando <christian1827@gmail.com>
* @package chamilo.course_description
*/
/**
* Code
*/
/**
* CourseDescription can be used to instanciate objects or as a library to manage course descriptions
* Class CourseDescription Lanage course descriptions
* @package chamilo.course_description
*/
class CourseDescription

@ -1,5 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Course request manager
* @package chamilo.library

@ -1370,7 +1370,6 @@ class Display
}
// If it's a learning path, ensure it is currently visible to the user
if ($item_property['tool'] == TOOL_LEARNPATH) {
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpath.class.php';
if (!learnpath::is_lp_visible_for_student($item_property['ref'], $user_id, $course_code)) {
continue;
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save