Using absolute URLs

skala
Julio Montoya 12 years ago
parent 4f2721953d
commit 6d5155bc9d
  1. 3
      main/admin/course_create_content.php
  2. 8
      main/admin/course_list.php
  3. 9
      main/admin/ldap_synchro.php
  4. 9
      main/admin/user_list.php
  5. 2
      main/exercice/adminhp.php
  6. 2
      main/newscorm/resourcelinker.inc.php

@ -23,7 +23,8 @@ Display::display_header($tool_name);
if (api_get_setting('server_type') != 'test') { if (api_get_setting('server_type') != 'test') {
echo get_lang('DummyCourseOnlyOnTestServer'); echo get_lang('DummyCourseOnlyOnTestServer');
} elseif (isset($_POST['action'])) { } elseif (isset($_POST['action'])) {
require_once('../coursecopy/classes/DummyCourseCreator.class.php'); require_once api_get_path(SYS_CODE_PATH).'coursecopy/classes/DummyCourseCreator.class.php';
$dcc = new DummyCourseCreator(); $dcc = new DummyCourseCreator();
$dcc->create_dummy_course($_POST['course_code']); $dcc->create_dummy_course($_POST['course_code']);
echo get_lang('Done'); echo get_lang('Done');

@ -16,13 +16,15 @@ require_once '../inc/global.inc.php';
$this_section = SECTION_PLATFORM_ADMIN; $this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script(); 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(SYS_CODE_PATH).'gradebook/lib/be/gradebookitem.class.php';
require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/be/category.class.php';
/** /**
* Get the number of courses which will be displayed * Get the number of courses which will be displayed
*/ */
function get_number_of_courses() { function get_number_of_courses()
{
$course_table = Database :: get_main_table(TABLE_MAIN_COURSE); $course_table = Database :: get_main_table(TABLE_MAIN_COURSE);
$sql = "SELECT COUNT(code) AS total_number_of_items FROM $course_table course"; $sql = "SELECT COUNT(code) AS total_number_of_items FROM $course_table course";

@ -13,11 +13,10 @@ $language_file = 'admin';
$cidReset = true; $cidReset = true;
require('../inc/global.inc.php'); require '../inc/global.inc.php';
$libpath = api_get_path(LIBRARY_PATH); $libpath = api_get_path(LIBRARY_PATH);
require_once($libpath.'formvalidator/FormValidator.class.php'); require_once api_get_path(SYS_CODE_PATH).'auth/ldap/authldap.php';
require_once($libpath.'usermanager.lib.php');
require_once('../auth/ldap/authldap.php');
$annee_base = date('Y'); $annee_base = date('Y');
// setting the section (for the tabs) // setting the section (for the tabs)
$this_section = SECTION_PLATFORM_ADMIN; $this_section = SECTION_PLATFORM_ADMIN;
@ -190,4 +189,4 @@ foreach ($Sessions as $session) {
$sql = "UPDATE $tbl_session SET nbr_users=$nbr_users WHERE id='$id_session'"; $sql = "UPDATE $tbl_session SET nbr_users=$nbr_users WHERE id='$id_session'";
Database::query($sql); Database::query($sql);
} }
} }

@ -449,7 +449,10 @@ function user_filter($name, $params, $row) {
*/ */
function modify_filter($user_id, $url_params, $row) { function modify_filter($user_id, $url_params, $row) {
global $charset, $_admins_list, $delete_user_available; global $charset, $_admins_list, $delete_user_available;
$is_admin = in_array($user_id,$_admins_list); $is_admin = false;
if (is_array($_admins_list)) {
$is_admin = in_array($user_id,$_admins_list);
}
$statusname = api_get_status_langvars(); $statusname = api_get_status_langvars();
$user_is_anonymous = false; $user_is_anonymous = false;
$current_user_status_label = $row['7']; $current_user_status_label = $row['7'];
@ -732,7 +735,7 @@ while ($row_admin = Database::fetch_row($res_admin)) {
$_admins_list[] = $row_admin[0]; $_admins_list[] = $row_admin[0];
} }
// display advaced search form // display advanced search form
$form = new FormValidator('advanced_search','get'); $form = new FormValidator('advanced_search','get');
$form->addElement('html','<div id="advanced_search_form" style="display:none;">'); $form->addElement('html','<div id="advanced_search_form" style="display:none;">');
@ -906,4 +909,4 @@ $tpl = $app['template'];
$tpl->assign('actions', $actions); $tpl->assign('actions', $actions);
$tpl->assign('message', $message); $tpl->assign('message', $message);
$tpl->assign('content', $form.$table_result.$extra_search_options); $tpl->assign('content', $form.$table_result.$extra_search_options);
$tpl->display_one_col_template(); //$tpl->display_one_col_template();

@ -62,7 +62,7 @@ $nameTools = get_lang('adminHP');
Display::display_header($nameTools,"Exercise"); Display::display_header($nameTools,"Exercise");
/** @todo probably wrong !!!! */ /** @todo probably wrong !!!! */
require_once api_get_path(SYS_CODE_PATH).'/exercice/hotpotatoes.lib.php'; require_once api_get_path(SYS_CODE_PATH).'exercice/hotpotatoes.lib.php';
$urlMainExercise = api_get_path(WEB_CODE_PATH).'exercice/'; $urlMainExercise = api_get_path(WEB_CODE_PATH).'exercice/';
?> ?>

@ -30,7 +30,7 @@ if (!empty($_course['language'])) {
require_once $resource_linker_file; require_once $resource_linker_file;
} }
} }
require_once '../exercice/hotpotatoes.lib.php'; require_once api_get_path(SYS_CODE_PATH).'exercice/hotpotatoes.lib.php';
/* FUNCTIONS */ /* FUNCTIONS */

Loading…
Cancel
Save