Don't require plugin class - refs BT#9049

1.10.x
Angel Fernando Quiroz Campos 10 years ago
parent c637b0c7fb
commit 8a10618431
  1. 6
      main/admin/resume_session.php
  2. 6
      main/admin/session_add.php
  3. 6
      main/admin/session_edit.php
  4. 6
      main/auth/courses.php
  5. 8
      main/inc/ajax/session.ajax.php
  6. 6
      main/session/index.php

@ -10,12 +10,6 @@ $language_file = 'admin';
$cidReset = true;
require_once '../inc/global.inc.php';
$advancedSessionsPluginFilePath = api_get_path(PLUGIN_PATH) . 'advancedsessions/src/AdvancedSessionsPlugin.class.php';
if (file_exists($advancedSessionsPluginFilePath)) {
require_once api_get_path(PLUGIN_PATH) . 'advancedsessions/src/AdvancedSessionsPlugin.class.php';
}
// setting the section (for the tabs)
$this_section = SECTION_PLATFORM_ADMIN;

@ -17,12 +17,6 @@ require_once '../inc/global.inc.php';
// including additional libraries
require_once '../inc/lib/xajax/xajax.inc.php';
$advancedSessionsPluginFilePath = api_get_path(PLUGIN_PATH) . 'advancedsessions/src/AdvancedSessionsPlugin.class.php';
if (file_exists($advancedSessionsPluginFilePath)) {
require_once api_get_path(PLUGIN_PATH) . 'advancedsessions/src/AdvancedSessionsPlugin.class.php';
}
$xajax = new xajax();
//$xajax->debugOn();
$xajax -> registerFunction ('search_coachs');

@ -13,12 +13,6 @@ $language_file ='admin';
$cidReset = true;
require_once '../inc/global.inc.php';
$advancedSessionsPluginFilePath = api_get_path(PLUGIN_PATH) . 'advancedsessions/src/AdvancedSessionsPlugin.class.php';
if (file_exists($advancedSessionsPluginFilePath)) {
require_once api_get_path(PLUGIN_PATH) . 'advancedsessions/src/AdvancedSessionsPlugin.class.php';
}
// setting the section (for the tabs)
$this_section = SECTION_PLATFORM_ADMIN;

@ -24,12 +24,6 @@ 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';
$advancedSessionsPluginFilePath = api_get_path(PLUGIN_PATH) . 'advancedsessions/src/AdvancedSessionsPlugin.class.php';
if (file_exists($advancedSessionsPluginFilePath)) {
require_once api_get_path(PLUGIN_PATH) . 'advancedsessions/src/AdvancedSessionsPlugin.class.php';
}
if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') {
$htmlHeadXtra[] = '
<script>

@ -107,15 +107,9 @@ switch ($action) {
}
break;
case 'get_description':
$advancedSessionsPluginFilePath = api_get_path(PLUGIN_PATH) . 'advancedsessions/src/AdvancedSessionsPlugin.class.php';
if (file_exists($advancedSessionsPluginFilePath)) {
require_once api_get_path(PLUGIN_PATH) . 'advancedsessions/src/AdvancedSessionsPlugin.class.php';
}
$sessionId = intval($_GET['session']);
if (class_exists('AdvancedSessionsPlugin') && AdvancedSessionsPlugin::hasDescriptionField()) {
if (AdvancedSessionsPlugin::hasDescriptionField()) {
$sessionInfo = api_get_session_info($sessionId);
?>
<h2><?php echo $sessionInfo['name'] ?></h2><br>

@ -20,12 +20,6 @@ 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';
$advancedSessionsPluginFilePath = api_get_path(PLUGIN_PATH) . 'advancedsessions/src/AdvancedSessionsPlugin.class.php';
if (file_exists($advancedSessionsPluginFilePath)) {
require_once api_get_path(PLUGIN_PATH) . 'advancedsessions/src/AdvancedSessionsPlugin.class.php';
}
// Only users who are logged in can proceed.
api_block_anonymous_users();

Loading…
Cancel
Save