Minor - Removing libs already included in global.inc + removing Display::header when using api_not_allowed()

skala
Julio Montoya 13 years ago
parent a7a7c25b92
commit 500d4b7efd
  1. 6
      main/tracking/courseLog.php
  2. 1
      main/tracking/course_session_report.php
  3. 4
      main/tracking/exams.php
  4. 2
      main/tracking/userLog.php

@ -28,10 +28,8 @@ if ($from == 'myspace') {
// Access restrictions.
$is_allowedToTrack = api_is_platform_admin() || api_is_allowed_to_create_course() || api_is_session_admin() || api_is_drh() || api_is_course_tutor();
if (!$is_allowedToTrack) {
Display :: display_header(null);
api_not_allowed();
Display :: display_footer();
if (!$is_allowedToTrack) {
api_not_allowed();
exit;
}

@ -9,7 +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).'formvalidator/FormValidator.class.php';
require_once api_get_path(LIBRARY_PATH).'pear/Spreadsheet_Excel_Writer/Writer.php';
require_once api_get_path(SYS_CODE_PATH).'exercice/exercise.class.php';

@ -16,10 +16,8 @@ $this_section = SECTION_TRACKING;
$is_allowedToTrack = $is_courseAdmin || $is_platformAdmin || $is_courseCoach || $is_sessionAdmin;
if(!$is_allowedToTrack) {
Display :: display_header(null);
if(!$is_allowedToTrack) {
api_not_allowed();
Display :: display_footer();
}
$export_to_xls = false;

@ -78,7 +78,7 @@ $tbl_session_course_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_U
$tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
$TABLECOURSE_GROUPSUSER = Database::get_course_table(TABLE_GROUP_USER);
if(api_get_setting('use_session_mode') == "true") {
if (api_get_setting('use_session_mode') == "true") {
$sql = "SELECT 1
FROM $tbl_session_course_user AS session_course_user
INNER JOIN $tbl_session AS session

Loading…
Cancel
Save