Removing libraries that are already included in global.inc.php

skala
Julio Montoya 13 years ago
parent 209d07265c
commit b3a9e4f2ab
  1. 2
      index.php
  2. 1
      main/course_info/infocours.php
  3. 1
      main/create_course/add_course.php
  4. 1
      main/exercice/exercise.lib.php
  5. 1
      main/exercice/exercise_result.php
  6. 1
      main/exercice/exercise_show.php
  7. 1
      main/exercice/question_pool.php
  8. 2
      main/gradebook/exercise_jump.php
  9. 6
      main/inc/ajax/course_home.ajax.php
  10. 1
      main/inc/ajax/social.ajax.php
  11. 1
      main/inc/footer.inc.php
  12. 4
      main/inc/global.inc.php
  13. 7
      main/inc/lib/course.lib.php
  14. 7
      main/inc/local.inc.php
  15. 1
      main/mySpace/course.php
  16. 1
      main/mySpace/index.php
  17. 2
      main/mySpace/lp_tracking.php
  18. 1
      main/mySpace/myStudents.php
  19. 1
      main/mySpace/student.php
  20. 1
      main/newscorm/lp_stats.php
  21. 2
      main/search/index.php
  22. 1
      main/session/index.php
  23. 1
      main/social/profile.php
  24. 2
      main/survey/create_new_survey.php
  25. 3
      main/survey/fillsurvey.php
  26. 1
      main/tracking/courseLog.php
  27. 1
      main/tracking/exams.php
  28. 1
      main/tracking/lp_results_by_user.php
  29. 2
      main/tracking/question_course_report.php
  30. 1
      main/tracking/userLog.php
  31. 1
      main/tracking/userlogCSV.php
  32. 1
      main/user/user.php
  33. 1
      main/wiki/index.php
  34. 2
      main/work/work.lib.php
  35. 3
      main/work/work.php
  36. 2
      user_portal.php

@ -24,8 +24,6 @@ $cidReset = true;
/** @todo Make all the library files consistent, use filename.lib.php and not filename.lib.inc.php. */
require_once 'main/inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'events.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'system_announcements.lib.php';
require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';

@ -24,7 +24,6 @@ $this_section = SECTION_COURSES;
$nameTools = get_lang('ModifInfo');
/* Libraries */
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(INCLUDE_PATH).'conf/course_info.conf.php';
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
require_once api_get_path(LIBRARY_PATH).'pdf.lib.php';

@ -37,7 +37,6 @@ $course_validation_feature = api_get_setting('course_validation') == 'true';
// Require additional libraries.
require_once api_get_path(LIBRARY_PATH).'add_course.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
require_once api_get_path(CONFIGURATION_PATH).'course_info.conf.php';

@ -934,7 +934,6 @@ function get_exam_results_data($from, $number_of_items, $column, $direction) {
ORDER BY exe_cours_id ASC, exe_date DESC";
}
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
$teacher_list = CourseManager::get_teacher_list_from_course_code(api_get_course_id());
$teacher_id_list = array();
foreach ($teacher_list as $teacher) {

@ -36,7 +36,6 @@ if ($_GET['origin']=='learnpath') {
}
require_once api_get_path(LIBRARY_PATH).'exercise_show_functions.lib.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
$this_section=SECTION_COURSES;

@ -24,7 +24,6 @@ require_once 'answer.class.php';
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';

@ -20,7 +20,6 @@ require_once 'exercise.lib.php';
require_once 'question.class.php';
require_once 'answer.class.php';
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'sessionmanager.lib.php';
$this_section=SECTION_COURSES;

@ -17,8 +17,6 @@ require_once '../inc/global.inc.php';
api_block_anonymous_users();
$this_section=SECTION_COURSES;
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
$course_code = api_get_course_id();
$course_info = Database::get_course_info($course_code);
$course_title = $course_info['title'];

@ -105,9 +105,7 @@ switch ($action) {
require_once '../global.inc.php';
$libpath = api_get_path(LIBRARY_PATH);
require_once $libpath.'course.lib.php';
require_once $libpath.'sessionmanager.lib.php';
require_once $libpath.'usermanager.lib.php';
require_once $libpath.'tracking.lib.php';
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpathList.class.php';
@ -226,8 +224,6 @@ switch ($action) {
require_once '../global.inc.php';
$libpath = api_get_path(LIBRARY_PATH);
require_once $libpath.'course.lib.php';
require_once $libpath.'usermanager.lib.php';
require_once $libpath.'tracking.lib.php';
require_once $libpath.'sessionmanager.lib.php';
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpathList.class.php';
@ -357,8 +353,6 @@ switch ($action) {
require_once '../global.inc.php';
$libpath = api_get_path(LIBRARY_PATH);
require_once $libpath.'course.lib.php';
require_once $libpath.'usermanager.lib.php';
require_once $libpath.'tracking.lib.php';
require_once $libpath.'sessionmanager.lib.php';
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpathList.class.php';

@ -146,7 +146,6 @@ switch ($action) {
}
require_once api_get_path(LIBRARY_PATH).'blog.lib.php';
require_once api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
$user_id = intval($_SESSION['social_user_id']);

@ -9,7 +9,6 @@
*/
// Display of tool_navigation_menu according to admin setting.
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
if (api_get_setting('show_navigation_menu') != 'false') {
$course_id = api_get_course_id();
if (!empty($course_id) && ($course_id != -1)) {

@ -108,7 +108,9 @@ require_once $lib_path.'usermanager.lib.php';
require_once $lib_path.'message.lib.php';
require_once $lib_path.'social.lib.php';
require_once $lib_path.'notification.lib.php';
require_once $lib_path.'course.lib.php';
require_once $lib_path.'online.inc.php';
/* DATABASE CONNECTION */
@ -286,7 +288,7 @@ require $includePath.'/local.inc.php';
// ===== "who is logged in?" module section =====
require_once $lib_path.'online.inc.php';
// check and modify the date of user in the track.e.online table
if (!$x = strpos($_SERVER['PHP_SELF'], 'whoisonline.php')) {
LoginCheck(isset($_user['user_id']) ? $_user['user_id'] : '');

@ -67,13 +67,8 @@
/**
* Configuration files
*/
require_once api_get_path(CONFIGURATION_PATH).'add_course.conf.php';
/**
* Libraries (we assume main_api is also included...)
*/
require_once api_get_path(LIBRARY_PATH).'database.lib.php';
require_once api_get_path(CONFIGURATION_PATH).'add_course.conf.php';
require_once api_get_path(LIBRARY_PATH).'add_course.lib.inc.php';
/**

@ -128,8 +128,6 @@ The course id is stored in $_cid session variable.
variables should be initialised here
*/
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
// verified if exists the username and password in session current
if (isset($_SESSION['info_current_user'][1]) && isset($_SESSION['info_current_user'][2])) {
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
@ -436,9 +434,7 @@ if (!empty($_SESSION['_user']['user_id']) && ! ($login || $logout)) {
}
if (isset($_SESSION['_user']['user_id'])) {
if ($logout) {
// Library needed by index.php
include_once api_get_path(LIBRARY_PATH) . 'online.inc.php';
include_once (api_get_path(LIBRARY_PATH).'course.lib.php');
// Prevent index.php to redirect
global $logout_no_redirect;
$logout_no_redirect = TRUE;
@ -556,7 +552,6 @@ if (isset($use_anonymous) && $use_anonymous) {
// if there is a cDir parameter in the URL (coming from courses/.htaccess redirection)
if (!empty($cDir)) {
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
$c = CourseManager::get_course_id_from_path($cDir);
if ($c) { $cidReq = $c; }
}

@ -13,7 +13,6 @@ require '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'tracking.lib.php';
require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'thematic.lib.php';
$this_section = SECTION_TRACKING;

@ -10,7 +10,6 @@ require_once '../inc/global.inc.php';
// including additional libraries
require_once api_get_path(LIBRARY_PATH).'tracking.lib.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
require_once 'myspace.lib.php';

@ -19,8 +19,6 @@ if (isset($_GET['from']) && $_GET['from'] == 'myspace') {
}
require_once api_get_path(LIBRARY_PATH).'tracking.lib.php';
require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpath.class.php';
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpathItem.class.php';
require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';

@ -12,7 +12,6 @@ $language_file = array('registration', 'index', 'tracking', 'exercice', 'admin',
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'tracking.lib.php';
require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpath.class.php';
require_once api_get_path(SYS_CODE_PATH).'mySpace/myspace.lib.php';
require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/be/gradebookitem.class.php';

@ -8,7 +8,6 @@ $cidReset = true;
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'tracking.lib.php';
require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
$export_csv = isset($_GET['export']) && $_GET['export'] == 'csv' ? true : false;
if ($export_csv) {

@ -14,7 +14,6 @@
require_once 'learnpath.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';
require_once '../exercice/exercise.lib.php';
$course_id = api_get_course_id();

@ -13,10 +13,8 @@ require_once '../inc/global.inc.php';
$this_section = SECTION_COURSES;
if (extension_loaded('xapian')) {
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'system_announcements.lib.php';
require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
//api_block_anonymous_users(); // only users who are logged in can proceed
require '../newscorm/lp_list_search.php';
} else {

@ -14,7 +14,6 @@ $cidReset = true;
require_once '../inc/global.inc.php';
$libpath = api_get_path(LIBRARY_PATH);
require_once $libpath.'course.lib.php';
require_once $libpath.'sessionmanager.lib.php';
require_once $libpath.'formvalidator/FormValidator.class.php';
require_once $libpath.'tracking.lib.php';

@ -65,7 +65,6 @@ $libpath = api_get_path(LIBRARY_PATH);
require_once api_get_path(SYS_CODE_PATH).'calendar/myagenda.inc.php';
require_once api_get_path(SYS_CODE_PATH).'announcements/announcements.inc.php';
require_once $libpath.'course.lib.php';
require_once $libpath.'formvalidator/FormValidator.class.php';
require_once $libpath.'magpierss/rss_fetch.inc';

@ -27,9 +27,7 @@ require_once 'survey.lib.php';
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(CONFIGURATION_PATH).'add_course.conf.php';
require_once api_get_path(LIBRARY_PATH).'add_course.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/gradebook_functions.inc.php';

@ -29,11 +29,10 @@ require '../inc/global.inc.php';
// Including additional libraries
//require_once api_get_path(LIBRARY_PATH).'survey.lib.php';
require_once 'survey.lib.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
// Breadcrumbs
if (!empty($_user)) {
$interbreadcrumb[] = array('url' => 'survey_list.php?cidReq='.$_GET['course'], 'name' => get_lang('SurveyList'));
$interbreadcrumb[] = array('url' => 'survey_list.php?cidReq='.Security::remove_XSS($_GET['course']), 'name' => get_lang('SurveyList'));
}
// Header

@ -46,7 +46,6 @@ require_once api_get_path(SYS_CODE_PATH).'newscorm/learnpathList.class.php';
require_once api_get_path(SYS_CODE_PATH).'newscorm/scorm.class.php';
require_once api_get_path(SYS_CODE_PATH).'newscorm/scormItem.class.php';
require_once api_get_path(LIBRARY_PATH).'tracking.lib.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
require_once api_get_path(LIBRARY_PATH).'statsUtils.lib.inc.php';

@ -11,7 +11,6 @@
$language_file = array ('registration', 'index', 'tracking', 'exercice','survey');
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
require_once api_get_path(LIBRARY_PATH).'pear/Spreadsheet_Excel_Writer/Writer.php';

@ -14,7 +14,6 @@
$language_file = array ('registration', 'index', 'tracking', 'exercice','survey');
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
require_once api_get_path(LIBRARY_PATH).'pear/Spreadsheet_Excel_Writer/Writer.php';

@ -9,8 +9,6 @@
$language_file = array ('registration', 'index', 'tracking', 'exercice','survey');
$cidReset = true;
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'events.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'tracking.lib.php';
require_once api_get_path(LIBRARY_PATH).'sessionmanager.lib.php';

@ -35,7 +35,6 @@ $is_allowed = true;
/* Libraries */
require_once api_get_path(LIBRARY_PATH).'statsUtils.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(SYS_CODE_PATH).'resourcelinker/resourcelinker.inc.php';
require_once api_get_path(SYS_CODE_PATH).'exercice/hotpotatoes.lib.php';

@ -38,7 +38,6 @@ $is_allowed = true;
/* Libraries */
require_once api_get_path(LIBRARY_PATH).'statsUtils.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(SYS_CODE_PATH).'resourcelinker/resourcelinker.inc.php';
require_once api_get_path(SYS_CODE_PATH).'exercice/hotpotatoes.lib.php';

@ -34,7 +34,6 @@ api_protect_course_script(true);
/* Libraries */
require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';

@ -20,7 +20,6 @@ $this_section = SECTION_COURSES;
// including additional library scripts
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';

@ -15,7 +15,6 @@
*/
require_once api_get_path(SYS_CODE_PATH).'document/document.inc.php';
require_once api_get_path(LIBRARY_PATH).'fileDisplay.lib.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/gradebook_functions.inc.php';
@ -1723,7 +1722,6 @@ function send_reminder_users_without_publication($task_data) {
* @author Julio Montoya <gugli100@gmail.com> Adding session support - 2011
*/
function send_email_on_homework_creation($course_id) {
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
// Get the students of the course
$session_id = api_get_session_id();
if (empty($session_id)) {

@ -71,12 +71,9 @@ isset($_SESSION['id_session']) ? $id_session = $_SESSION['id_session'] : $id_ses
// Including necessary files
require_once 'work.lib.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'security.lib.php';
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
require_once api_get_path(LIBRARY_PATH).'document.lib.php';
require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'fckeditor/fckeditor.php';

@ -45,10 +45,8 @@ if (isset($_SESSION['this_section']))
require_once './main/inc/global.inc.php';
$libpath = api_get_path(LIBRARY_PATH);
require_once $libpath.'course.lib.php';
require_once $libpath.'system_announcements.lib.php';
require_once $libpath.'groupmanager.lib.php';
require_once $libpath.'usermanager.lib.php';
require_once 'main/survey/survey.lib.php';
require_once $libpath.'sessionmanager.lib.php';

Loading…
Cancel
Save