Removing libraries from some scripts because they're already added in global.inc

skala
Julio Montoya 13 years ago
parent 2da6c2c447
commit e8dd8d12dd
  1. 6
      main/exercice/exercise.lib.php
  2. 2
      main/exercice/exercise_show.php
  3. 3
      main/exercice/question_pool.php
  4. 2
      main/session/index.php
  5. 2
      main/social/group_waiting_list.php
  6. 2
      main/user/subscribe_user.php

@ -1248,11 +1248,9 @@ function get_all_exercises($course_info = null, $session_id = 0, $check_dates =
*/
function get_exercise_result_ranking($my_score, $my_exe_id, $exercise_id, $course_code, $session_id = 0, $return_string = true) {
if (empty($session_id)) {
$session_id = 0;
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
$session_id = 0;
$user_list = UserManager::get_user_list();
} else {
require_once api_get_path(LIBRARY_PATH).'sessionmanager.lib.php';
} else {
$user_list = SessionManager::get_users_by_session($session_id);
}
//No score given we return

@ -68,7 +68,7 @@ if (empty($id)) {
api_not_allowed();
}
$is_allowedToEdit = api_is_allowed_to_edit(null,true) || $is_courseTutor;
$is_allowedToEdit = api_is_allowed_to_edit(null,true) || $is_courseTutor || api_is_session_admin();
//Getting results from the exe_id. This variable also contain all the information about the exercise
$track_exercise_info = get_exercise_track_exercise_info($id);

@ -20,9 +20,8 @@ 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).'sessionmanager.lib.php';
$this_section=SECTION_COURSES;
$this_section = SECTION_COURSES;
$is_allowedToEdit=api_is_allowed_to_edit(null,true);

@ -14,9 +14,7 @@ $cidReset = true;
require_once '../inc/global.inc.php';
$libpath = api_get_path(LIBRARY_PATH);
require_once $libpath.'sessionmanager.lib.php';
require_once $libpath.'formvalidator/FormValidator.class.php';
require_once $libpath.'tracking.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';

@ -9,7 +9,7 @@
*/
$cidReset = true;
$language_file = array('userInfo');
require '../inc/global.inc.php';
require_once '../inc/global.inc.php';
api_block_anonymous_users();
if (api_get_setting('allow_social_tool') !='true') {

@ -22,8 +22,6 @@ if (!api_is_allowed_to_edit()) {
}
// including additional libraries
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
require_once api_get_path(LIBRARY_PATH).'sessionmanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
$tool_name = get_lang("SubscribeUserToCourse");

Loading…
Cancel
Save