[svn r10083] cleanup $_configuration

skala
Patrick Cool 19 years ago
parent 8221774681
commit 1c193d6f43
  1. 8
      main/admin/configure_homepage.php
  2. 2
      main/course_home/3column.php
  3. 14
      main/exercice/GC.php
  4. 6
      main/exercice/Hpdownload.php
  5. 2
      main/exercice/hotpotatoes.php
  6. 2
      main/exercice/testheaderpage.php
  7. 4
      main/inc/lib/add_course.lib.inc.php
  8. 2
      main/inc/lib/course.lib.php
  9. 367
      main/inc/lib/debug.lib.inc.php
  10. 2
      main/inc/lib/fckeditor/editor/plugins/ImageManager/config.inc.php
  11. 6
      main/inc/lib/fileManage.lib.php
  12. 8
      main/install/configuration.dist.php
  13. 9
      main/metadata/importmanifest.php
  14. 4
      main/newscorm/resourcelinker.inc.php
  15. 2
      main/newscorm/resourcelinker.php
  16. 4
      main/online/online_links.php
  17. 6
      main/resourcelinker/resourcelinker.inc.php
  18. 2
      main/resourcelinker/resourcelinker.php
  19. 10
      main/work/work.php

@ -1,4 +1,4 @@
<?php // $Id: configure_homepage.php 10082 2006-11-21 19:08:15Z pcool $
<?php // $Id: configure_homepage.php 10083 2006-11-21 19:43:29Z pcool $
/*
==============================================================================
Dokeos - elearning and course management software
@ -178,9 +178,9 @@ if(!empty($action))
{
$link_url=$_configuration['root_web'].'index.php?include='.urlencode($filename);
if(!file_exists($rootSys.'home/'.$filename))
if(!file_exists($_configuration['root_sys'].'home/'.$filename))
{
$fp=@fopen($rootSys.'home/'.$filename,'w');
$fp=@fopen($_configuration['root_sys'].'home/'.$filename,'w');
if($fp)
{
@ -193,7 +193,7 @@ if(!empty($action))
if($action == 'edit_link' && !empty($link_html))
{
$fp=@fopen($rootSys.'home/'.$filename,'w');
$fp=@fopen($_configuration['root_sys'].'home/'.$filename,'w');
if($fp)
{

@ -153,7 +153,7 @@ if (is_allowed_to_edit())
{
$result = api_sql_query("SELECT * FROM $TBL_ACCUEIL WHERE id=$id");
$toolsRow = mysql_fetch_array($result);
$racine = $rootSys."/".$currentCourseID."/images/";
$racine = $_configuration['root_sys']."/".$currentCourseID."/images/";
$chemin = $racine;
$name = $toolsRow[1];
$image = $toolsRow[3];

@ -1,4 +1,4 @@
<?php // $Id: GC.php 9246 2006-09-25 13:24:53Z bmol $
<?php // $Id: GC.php 10083 2006-11-21 19:43:29Z pcool $
/*
==============================================================================
Dokeos - elearning and course management software
@ -30,19 +30,19 @@
==============================================================================
*/
// usage: HotPotGC($rootSys,$flag);
// usage: HotPotGC($_configuration['root_sys'],$flag);
// working recursively, flag[0,1] print or delete the HotPotatoes temp files (.t.html)
$rootSys = "C:/Program Files/EasyPHP1-7/www/dokeos_new/";
echo "Garbage Collector<BR>";
HotPotGC($rootSys,1,1);
HotPotGC($_configuration['root_sys'],1,1);
// functions
function HotPotGC($rootSys,$flag,$userID)
{ // flag[0,1] - print or delete the HotPotatoes temp files (.t.html)
$documentPath = $rootSys."courses";
function HotPotGC($root_sys,$flag,$userID)
{
// flag[0,1] - print or delete the HotPotatoes temp files (.t.html)
$documentPath = $root_sys."courses";
require_once(api_get_path(LIBRARY_PATH)."fileManage.lib.php");
HotPotGCt($documentPath,$flag,$userID);
}

@ -48,12 +48,12 @@ $filename=basename($doc_url);
//event_download($doc_url);
if (isset($_course['path']))
{
// $full_file_name=$rootSys."courses/".$_course['path'].'/document'.$doc_url;
// $full_file_name=$_configuration['root_sys']."courses/".$_course['path'].'/document'.$doc_url;
$full_file_name = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'.$doc_url;
}
else
{
//$full_file_name=$rootSys."courses/".$cid.'/document'.$doc_url;
//$full_file_name=$_configuration['root_sys']."courses/".$cid.'/document'.$doc_url;
$full_file_name = api_get_path(SYS_COURSE_PATH).$cid.'/document'.$doc_url;
}
@ -103,7 +103,7 @@ if($content_type == 'text/html')
include (api_get_path(LIBRARY_PATH).'fileUpload.lib.php');
$directory_name = dirname($full_file_name);
$dir=str_replace(array('\\',$rootSys."courses/".$_course['path'].'/document'),array('/',''),$directory_name);
$dir=str_replace(array('\\',$_configuration['root_sys']."courses/".$_course['path'].'/document'),array('/',''),$directory_name);
if($dir[strlen($dir)-1] != '/')
{

@ -45,7 +45,7 @@ $is_allowedToEdit=(!empty($is_courseAdmin)?$is_courseAdmin:false);
//$dbTable = '`'.$_course['dbNameGlu']."document`";
$dbTable = Database::get_course_table(DOCUMENT_TABLE);
$baseServDir = $rootSys;
$baseServDir = $_configuration['root_sys'];
$baseServUrl = $urlAppend."/";
$document_sys_path = api_get_path(SYS_COURSE_PATH).$_course['path']."/document";
$uploadPath = "/HotPotatoes_files";

@ -32,7 +32,7 @@
$langFile='exercice';
include('../inc/global.inc.php');
require_once($rootSys.'main/exercice/hotpotatoes.lib.php');
require_once($_configuration['root_sys'].'main/exercice/hotpotatoes.lib.php');
$documentPath= api_get_path(SYS_COURSE_PATH).$_course['path']."/document";
$title = GetQuizName($_GET['file'],$documentPath);
if ($title =='')

@ -83,7 +83,7 @@ function create_course($wanted_code, $title, $tutor_name, $category_code, $cours
*/
function define_course_keys($wantedCode, $prefix4all = "", $prefix4baseName = "", $prefix4path = "", $addUniquePrefix = false, $useCodeInDepedentKeys = true)
{
global $rootSys, $coursesRepositoryAppend, $prefixAntiNumber, $_configuration;
global $coursesRepositoryAppend, $prefixAntiNumber, $_configuration;
$course_table = Database :: get_main_table(MAIN_COURSE_TABLE);
@ -174,7 +174,7 @@ function define_course_keys($wantedCode, $prefix4all = "", $prefix4baseName = ""
$finalSuffix['CourseDb'] = substr('_'.md5(uniqid(rand())), 0, 4);
}
if(file_exists($rootSys.$coursesRepositoryAppend.$keysCourseRepository))
if(file_exists($_configuration['root_sys'].$coursesRepositoryAppend.$keysCourseRepository))
{
$keysAreUnique = false;

@ -164,7 +164,7 @@ $TABLECOURSDOMAIN = Database :: get_main_table(MAIN_CATEGORY_TABLE);
$TABLEUSER = Database :: get_main_table(MAIN_USER_TABLE);
$TABLECOURSUSER = Database :: get_main_table(MAIN_COURSE_USER_TABLE);
$TABLEANNOUNCEMENTS = "announcement";
$coursesRepositories = $rootSys;
$coursesRepositories = $_configuration['root_sys'];
/*
==============================================================================

@ -27,263 +27,24 @@
*
* debug functions
*
* All these function only display output only when debugClaro is on
*
* function echoSessionValue()
function debugIO($file="")
*
* @package dokeos.library
==============================================================================
*/
/**
* function echoSessionValue()
*
* @desc print out content of session's variable
*
* @return
* @authot Christophe Gesché gesché@ipm.ucl.ac.be
* @deprecated Function not in use
* This function displays the contend of a variable, array or object in a nicely formatted way.
*
* @param $variable a variable, array or object
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
*/
function echoSessionValue()
function debug($variable)
{
$infoResult = "";
global $statuts, $statut, $status, $_configuration, $is_admin, $_GET, $_SESSION, $_POST;
if (!isset ($is_admin) || !$is_admin)
{
exit ("pwet");
}
$infoResult .= "
<HR>
<a href=\"../main/admin/phpInfo.php\">phpInfo Dokeos</a>
<PRE>";
$infoResult .= "<strong>PHP Version</strong> : ".phpversion()."
<strong>nivo d'err</strong> : ".error_reporting(2039);
if (isset ($statuts))
{
$infoResult .= "
<strong>statut</strong> : ";
print_r($statuts);
}
if (isset ($statut))
{
$infoResult .= "
<strong>statut</strong> : ";
print_r($statut);
}
if (isset ($status))
{
$infoResult .= "
<strong>status</strong> : ";
print_r($status);
}
if (isset ($_configuration['db_host']) || isset ($_configuration['db_user']))
{
$infoResult .= "
<strong>mysql param</strong> :
Serveur : ".$_configuration['db_host']."
User : ".$_configuration['db_user']."";
}
if (isset ($_SESSION))
{
$infoResult .= "
<strong>session</strong> : ";
print_r($_SESSION);
}
if (isset ($_POST))
{
$infoResult .= "
<strong>Post</strong> : ";
print_r($_POST);
}
if (isset ($_GET))
{
$infoResult .= "
<strong>GET</strong> : ";
print_r($_GET);
}
$infoResult .= "
<strong>Contantes</strong> : ";
print_r(get_defined_constants());
get_current_user();
$infoResult .= "
<strong>Fichiers inclus</strong> : ";
print_r(get_included_files());
$infoResult .= "
<strong>Magic quote gpc</strong> : ".get_magic_quotes_gpc()."
<strong>Magig quote runtime</strong> : ".get_magic_quotes_runtime()."
<strong>date de dernière modification de la page</strong> : ".date("j-m-Y", getlastmod());
/*
get_cfg_var -- Retourne la valeur d'une option de PHP
getenv -- Retourne la valeur de la variable d'environnement.
ini_alter -- Change la valeur d'une option de configuration
ini_get -- Lit la valeur d'une option de configuration.
ini_get_all -- Lit toutes les valeurs de configuration
ini_restore -- Restaure la valeur de l'option de configuration
ini_set -- Change la valeur d'une option de configuration
putenv -- Fixe la valeur d'une variable d'environnement.
set_magic_quotes_runtime -- Active/désactive l'option magic_quotes_runtime.
set_time_limit -- Fixe le temps maximum d'exécution d'un script.
*/
$infoResult .= "
<strong>Type d'interface utilisé entre le serveur web et PHP</strong> : ".php_sapi_name()."
<strong>informations OS</strong> : ".php_uname()."
<strong>Version courante du moteur Zend</strong> : ".zend_version()."
<strong>GID du propriétaire du script</strong> : ".getmygid()."
<strong>inode du script</strong> : ".getmyinode()."
<strong>numéro de processus courant</strong> : ".getmypid()."
<strong>UID du propriétaire du script actuel</strong> : ".getmyuid()."
<strong>niveau d'utilisation des ressources</strong> : ";
print_r(@ getrusage());
$infoResult .= "
</PRE>
<HR>
";
if (PRINT_DEBUG_INFO)
echo $infoResult;
return $infoResult;
echo '<pre>';
print_r($variable);
echo '</pre>';
}
/**
* function debugIO($file="")
*
* @desc io file
* @return
* @author Christophe Gesché gesché@ipm.ucl.ac.be
* @deprecated Function not in use
*/
function debugIO($file = "")
{
GLOBAL $SERVER_SOFTWARE;
$infoResult = "
[Script : ".$_SERVER['PHP_SELF']."]
[Server : ".$SERVER_SOFTWARE."]
[Php : ".phpversion()."]
[sys : ".php_uname()."]
[My uid : ".getmyuid()."]
[current_user : ".get_current_user()."]
[my gid : ".getmygid()."]
[my inode : ".getmyinode()."]
[my pid : ".getmypid()."]
[space : - free - : ".disk_free_space('..')."
- total - : ".disk_total_space('..')."
]";
if ($file != "")
{
$infoResult .= "<HR> <strong>".$file."</strong> -
[<strong>o</strong>:".fileowner($file)." <strong>g</strong>:".filegroup($file)." ".display_perms(fileperms($file))."]";
if (is_dir($file))
$infoResult .= "-Dir-";
if (is_file($file))
$infoResult .= "-File-";
if (is_link($file))
$infoResult .= "-Lnk-";
if (is_executable($file))
$infoResult .= "-X-";
if (is_readable($file))
$infoResult .= "-R-";
if (is_writeable($file))
$infoResult .= "-W-";
}
$file = ".";
$infoResult .= "<HR> <strong>".$file."</strong> -
[<strong>o</strong>:".fileowner($file)." <strong>g</strong>:".filegroup($file)." ".display_perms(fileperms($file))."]";
if (is_dir($file))
$infoResult .= "-Dir-";
if (is_file($file))
$infoResult .= "-File-";
if (is_link($file))
echo "-Lnk-";
if (is_executable($file))
echo "-X-";
if (is_readable($file))
echo "-R-";
if (is_writeable($file))
echo "-W-";
$file = "..";
echo "<HR> <strong>".$file."</strong> -
[<strong>o</strong>:".fileowner($file)." <strong>g</strong>:".filegroup($file)." ".display_perms(fileperms($file))."]";
if (is_dir($file))
$infoResult .= "-Dir-";
if (is_file($file))
$infoResult .= "-File-";
if (is_link($file))
$infoResult .= "-Lnk-";
if (is_executable($file))
$infoResult .= "-X-";
if (is_readable($file))
$infoResult .= "-R-";
if (is_writeable($file))
$infoResult .= "-W-";
if (PRINT_DEBUG_INFO)
echo $infoResult;
return $infoResult;
}
/**
* @deprecated Function only used in deprecated function debugIO
*/
function display_perms($mode)
{
/* Determine Type */
if ($mode & 0x1000)
$type = 'p'; /* FIFO pipe */
else
if ($mode & 0x2000)
$type = 'c'; /* Character special */
else
if ($mode & 0x4000)
$type = 'd'; /* Directory */
else
if ($mode & 0x6000)
$type = 'b'; /* Block special */
else
if ($mode & 0x8000)
$type = '-'; /* Regular */
else
if ($mode & 0xA000)
$type = 'l'; /* Symbolic Link */
else
if ($mode & 0xC000)
$type = 's'; /* Socket */
else
$type = 'u'; /* UNKNOWN */
/* Determine permissions */
$owner["read"] = ($mode & 00400) ? 'r' : '-';
$owner["write"] = ($mode & 00200) ? 'w' : '-';
$owner["execute"] = ($mode & 00100) ? 'x' : '-';
$group["read"] = ($mode & 00040) ? 'r' : '-';
$group["write"] = ($mode & 00020) ? 'w' : '-';
$group["execute"] = ($mode & 00010) ? 'x' : '-';
$world["read"] = ($mode & 00004) ? 'r' : '-';
$world["write"] = ($mode & 00002) ? 'w' : '-';
$world["execute"] = ($mode & 00001) ? 'x' : '-';
/* Adjust for SUID, SGID and sticky bit */
if ($mode & 0x800)
$owner["execute"] = ($owner[execute] == 'x') ? 's' : 'S';
if ($mode & 0x400)
$group["execute"] = ($group[execute] == 'x') ? 's' : 'S';
if ($mode & 0x200)
$world["execute"] = ($world[execute] == 'x') ? 't' : 'T';
$strPerms = "<strong>t</strong>:".$type."<strong>o</strong>:".$owner[read].$owner[write].$owner[execute]."<strong>g</strong>:".$group[read].$group[write].$group[execute]."<strong>w</strong>:".$world[read].$world[write].$world[execute];
return $strPerms;
}
function printVar($var, $varName = "@")
{
@ -305,116 +66,4 @@ function printVar($var, $varName = "@")
echo "DEBUG is OFF";
}
}
/**
* @deprecated Function not in use
*/
function printInit($selection = "*")
{
GLOBAL $uidReset, $cidReset, $gidReset, $uidReq, $cidReq, $gidReq, $_user, $_cid, $_gid, $_user, $_course, $is_platformAdmin, $is_allowedCreateCourse, $is_courseMember, $is_courseAdmin, $is_allowed_in_course, $is_courseTutor, $_SESSION, $_claro_local_run;
if ($_claro_local_run)
{
echo "local init ran";
}
else
{
echo "<font color=\"red\">local init never ran during this script</font>";
}
echo "
<table width=\"100%\" border=\"1\" cellspacing=\"4\" cellpadding=\"1\" bordercolor=\"#808080\" bgcolor=\"#C0C0C0\" lang=\"en\"><TR>";
if ($selection == "*" or strstr($selection, "u"))
{
echo "<TD valign=\"top\" >USER :
(uid): ".$uid." |
(_uid): ".$_user['user_id']." |
(session[_uid]): ".$_SESSION['_uid']."
<PRE>
reset = ".$uidReset." | req = ".$uidReq."<br>
_user : ";
var_dump($_user);
echo "is_platformAdmin:";
var_dump($is_platformAdmin);
echo "is_allowedCreateCourse:";
var_dump($is_allowedCreateCourse);
echo "</PRE></TD>";
}
if ($selection == "*" or strstr($selection, "c"))
{
echo "<TD valign=\"top\" >COURSE :(_cid)".$_cid."<PRE>
reset = ".$cidReset." | req = ".$cidReq."<br>
";
echo "_course : ";
var_dump($_course);
echo "</PRE></TD>";
}
if ($selection == "*" or strstr($selection, "g"))
{
echo "<TD valign=\"top\" >GROUP :".$_gid."<PRE>
reset = ".$gidReset." | req = ".$gidReq."<br>
";
echo "</PRE></TD>";
}
echo "</TR><TR>";
if ($selection == "*" or (strstr($selection, "u") && strstr($selection, "c")))
{
echo "<TD valign=\"top\" colspan=2>USER :".$_user['user_id']." in ".$_cid."<PRE>";
echo "_courseUser:";
var_dump($_courseUser);
echo "is_courseMember:";
var_dump($is_courseMember);
echo "is_courseAdmin:";
var_dump($is_courseAdmin);
echo "is_allowed_in_course:";
var_dump($is_allowed_in_course);
echo "is_courseTutor:";
var_dump($is_courseTutor);
echo "</PRE></TD><TD></TD>";
}
echo "</TR><TR>";
if ($selection == "*" or (strstr($selection, "u") && strstr($selection, "g")))
{
echo "<td></td><TD valign=\"top\" colspan=2>USER :".$_user['user_id']." in ".$_gid."<PRE>";
echo "</PRE></TD>";
}
echo "</TR></TABLE>";
}
/**
* @deprecated Function not in use
*/
function printConfig()
{
GLOBAL $_configuration, $dokeos_version, $urlAppend, $userPasswordCrypted, $userPasswordCrypted, $platformLanguage, $siteName, $clarolineRepositoryAppend, $coursesRepositoryAppend, $rootAdminAppend, $clarolineRepositoryWeb, $clarolineRepositorySys, $coursesRepositoryWeb, $coursesRepositorySys, $rootAdminSys, $rootAdminWeb;
echo "<table width=\"100%\" border=\"1\" cellspacing=\"1\" cellpadding=\"1\" bordercolor=\"#808080\" bgcolor=\"#C0C0C0\" lang=\"en\"><TR>";
echo "
<tr><td colspan=2><strong>Mysql</strong></td></tr>
<tr><td>dbHost</TD><TD>".$_configuration['db_host']."</td></tr>
<tr><td>dbLogin </TD><TD>".$_configuration['db_user']."</td></tr>
<tr><td>dbPass </TD><TD>".str_repeat("*", strlen($_configuration['db_password']))."</td></tr>
<tr><td>mainDbName </TD><TD>".$_configuration['main_database']." </td></tr>
<tr><td>clarolineVersion </TD><TD>$dokeos_version</td></tr>
<tr><td>rootWeb</TD><TD>".$_configuration['root_web']."</td></tr>
<tr><td>urlAppend </TD><TD>$urlAppend</td></tr>
<tr><td colspan=2><HR></td></tr>
<tr><td colspan=2><strong>param for new and future features</strong></td></tr>
<tr><td>userPasswordCrypted </TD><TD>$userPasswordCrypted </td></tr>
<tr><td colspan=2></td></tr>
<tr><td>platformLanguage </TD><TD>$platformLanguage </td></tr>
<tr><td>siteName </TD><TD>$siteName </td></tr>
<tr><td>rootWeb </TD><TD>".$_configuration['root_web']." </td></tr>
<tr><td>rootSys </TD><TD>$rootSys </td></tr>
<tr><td colspan=2></td></tr>
<tr><td>clarolineRepository<strong>Append</strong> </TD><TD>$clarolineRepositoryAppend </td></tr>
<tr><td>coursesRepository<strong>Append</strong> </TD><TD>$coursesRepositoryAppend </td></tr>
<tr><td>rootAdmin<strong>Append</strong> </TD><TD>$rootAdminAppend </td></tr>
<tr><td colspan=2></td></tr>
<tr><td>clarolineRepository<strong>Web</strong> </TD><TD>$clarolineRepositoryWeb </td></tr>
<tr><td>clarolineRepository<strong>Sys</strong> </TD><TD>$clarolineRepositorySys </td></tr>
<tr><td>coursesRepository<strong>Web</strong> </TD><TD>$coursesRepositoryWeb </td></tr>
<tr><td>coursesRepository<strong>Sys</strong> </TD><TD>$coursesRepositorySys </td></tr>
<tr><td>rootAdmin<strong>Sys</strong> </TD><TD>$rootAdminSys </td></tr>
<tr><td>rootAdmin<strong>Web</strong> </TD><TD>$rootAdminWeb </td></tr>
";
echo "</TABLE>";
}
?>

@ -30,7 +30,7 @@ require_once('../../../../../conf/configuration.php');
$IMConfig['base_url'] = $_configuration['root_web'].'main/img/gallery/';
//$IMConfig['base_dir'] = $_SERVER['DOCUMENT_ROOT'].$IMConfig['base_url'];
$IMConfig['base_dir'] = $rootSys.'main/img/gallery/';
$IMConfig['base_dir'] = $_configuration['root_sys'].'main/img/gallery/';
$IMConfig['server_name'] = $_SERVER['SERVER_NAME'];
/*

@ -1,4 +1,4 @@
<?php # $Id: fileManage.lib.php 9246 2006-09-25 13:24:53Z bmol $
<?php # $Id: fileManage.lib.php 10083 2006-11-21 19:43:29Z pcool $
/* vim: set expandtab tabstop=4 shiftwidth=4:
===============================================================================
@ -526,7 +526,7 @@ function form_dir_list($sourceType, $sourceComponent, $command, $baseWorkDir)
*/
function mkpath($path, $verbose = false, $mode = "herit")
{
global $langCreatedIn, $rootSys;
global $langCreatedIn, $_configuration;
$path=str_replace("/","\\",$path);
$dirs=explode("\\",$path);
@ -542,7 +542,7 @@ function mkpath($path, $verbose = false, $mode = "herit")
{
$path.='/'.$dirs[$i];
if(ereg('^'.$path,$rootSys) && strlen($path) < strlen($rootSys))
if(ereg('^'.$path,$_configuration['root_sys']) && strlen($path) < strlen($_configuration['root_sys']))
{
continue;
}

@ -86,9 +86,9 @@ $_configuration['user_personal_database'] ='{DATABASE_PERSONAL}';
// Directory settings
//============================================================================
// URL to the root of your Dokeos installation
$_configuration['root_web'] = '{ROOT_WEB}';
$_configuration['root_web'] = '{ROOT_WEB}';
// Path to the root of your Dokeos installation
$rootSys = '{ROOT_SYS}';
$_configuration['root_sys'] = '{ROOT_SYS}';
// Path from your WWW-root to the root of your Dokeos installation
$urlAppend = '{URL_APPEND_PATH}';
// Directory of the Dokeos code
@ -99,9 +99,9 @@ $coursesRepositoryAppend = "courses/";
$rootAdminAppend = "admin/";
// Do not change the following values
// @todo should be moved to api_get_path
$clarolineRepositorySys = $rootSys.$clarolineRepositoryAppend;
$clarolineRepositorySys = $_configuration['root_sys'].$clarolineRepositoryAppend;
$clarolineRepositoryWeb = $_configuration['root_web'].$clarolineRepositoryAppend;
$coursesRepositorySys = $rootSys.$coursesRepositoryAppend;
$coursesRepositorySys = $_configuration['root_sys'].$coursesRepositoryAppend;
$coursesRepositoryWeb = $_configuration['root_web'].$coursesRepositoryAppend;
$rootAdminSys = $clarolineRepositorySys.$rootAdminAppend;
$rootAdminWeb = $clarolineRepositoryWeb.$rootAdminAppend;

@ -12,7 +12,9 @@
* @package dokeos.metadata
==============================================================================
*/
/**
* @todo $rootSys is replaced with $_configuration['root_sys'] except here because I do not understand this code.
*/
// PRELIMS -------------------------------------------------------------------->
@ -334,12 +336,13 @@ elseif ($smo == get_lang('Import'))
$fp = fopen($thf, "rb"); fpassthru($fp); fclose($fp);
}
'
. str_replace('$rootSys', api_get_path(SYS_PATH),
. str_replace($_configuration['root_sys'], api_get_path(SYS_PATH),
str_replace('$scid', $scid,
'
else
{
$drs = "$rootSys"; $scormid = "$scid";
$drs = "$rootSys";
$scormid = "$scid";
require($drs. "main/metadata/playscormmdset.inc.php");
}
' )) . '?' . '>';

@ -366,7 +366,7 @@ function display_addedresource_link($type, $id, $style='')
function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_path, $builder, $icon, $level = 0)
{
global $_course, $learnpath_id, $tbl_learnpath_item, $items;
global $_course, $curDirPath, $_configuration, $enableDocumentParsing, $_course, $_user, $_cid, $rootSys;
global $curDirPath, $_configuration, $enableDocumentParsing, $_course, $_user, $_cid;
$tbl_lp_item = Database::get_course_table('lp_item');
$hyperlink_target_parameter = ''; //or e.g. 'target="_blank"'
@ -1164,7 +1164,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
function get_addedresource_link_in_learnpath($type, $id, $id_in_path)
{
global $_course, $learnpath_id, $tbl_learnpath_item, $items;
global $curDirPath, $_configuration, $enableDocumentParsing, $_user, $_cid, $rootSys;
global $curDirPath, $_configuration, $enableDocumentParsing, $_user, $_cid;
$tbl_lp_item = Database::get_course_table('lp_item');
$hyperlink_target_parameter = ""; //or e.g. target='_blank'

@ -777,7 +777,7 @@ if ($content == "chapter")
if ($content == "Document" OR (empty($content) AND (is_allowed_to_edit() OR in_array(TOOL_DOCUMENT,$active_modules))) AND !$_GET['showresources'])
{
// setting variables for file locations
$baseServDir = $rootSys;
$baseServDir = $_configuration['root_sys'];
$courseDir = $_course['path']."/document";
$baseWorkDir = $baseServDir.$courseDir;
// showing the link to move one folder up (when not in the root folder)

@ -1,4 +1,4 @@
<?php // $Id: online_links.php 10082 2006-11-21 19:08:15Z pcool $
<?php // $Id: online_links.php 10083 2006-11-21 19:43:29Z pcool $
/*
==============================================================================
Dokeos - elearning and course management software
@ -101,7 +101,7 @@ if($_POST['sent'])
move_uploaded_file($link_file['tmp_name'],$doc_path.$link_file['name']);
$link_url=str_replace($rootSys,$_configuration['root_web'],$doc_path).$link_file['name'];
$link_url=str_replace($_configuration['root_sys'],$_configuration['root_web'],$doc_path).$link_file['name'];
}
if(!empty($link_name) && !empty($link_url))

@ -1,4 +1,4 @@
<?php // $Id: resourcelinker.inc.php 10082 2006-11-21 19:08:15Z pcool $
<?php // $Id: resourcelinker.inc.php 10083 2006-11-21 19:43:29Z pcool $
/*
==============================================================================
Dokeos - elearning and course management software
@ -363,7 +363,7 @@ function display_addedresource_link($type, $id, $style='')
function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_path, $builder, $icon, $level = 0)
{
global $learnpath_id, $tbl_learnpath_item, $items;
global $_course, $curDirPath, $_configuration, $enableDocumentParsing, $_user, $_cid, $rootSys;
global $_course, $curDirPath, $_configuration, $enableDocumentParsing, $_user, $_cid;
$hyperlink_target_parameter = ''; //or e.g. 'target="_blank"'
@ -1135,7 +1135,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_
function get_addedresource_link_in_learnpath($type, $id, $id_in_path)
{
global $_course, $learnpath_id, $tbl_learnpath_item, $items;
global $curDirPath, $_configuration, $enableDocumentParsing, $_user , $_cid, $rootSys;
global $curDirPath, $_configuration, $enableDocumentParsing, $_user , $_cid;
$hyperlink_target_parameter = ""; //or e.g. target='_blank'
$builder = 'player';

@ -693,7 +693,7 @@ if ($content == "chapter")
if ($content == "Document" OR (empty($content) AND (is_allowed_to_edit() OR in_array(TOOL_DOCUMENT,$active_modules))) AND !$_GET['showresources'])
{
// setting variables for file locations
$baseServDir = $rootSys;
$baseServDir = $_configuration['root_sys'];
$courseDir = $_course['path']."/document";
$baseWorkDir = $baseServDir.$courseDir;
// showing the link to move one folder up (when not in the root folder)

@ -48,8 +48,8 @@
* establish a correspondence between RealServer Content Path and the user's
* documents path.
*
* All documents are sent to the address /$rootSys/$currentCourseID/document/
* where $currentCourseID is the web directory for the course and $rootSys
* All documents are sent to the address /$_configuration['root_sys']/$currentCourseID/document/
* where $currentCourseID is the web directory for the course and $_configuration['root_sys']
* usually /var/www/html
*
* Modified by Patrick Cool, february 2004:
@ -380,10 +380,6 @@ if($submitWork && $is_course_member)
{
if($_FILES['file']['size'])
{
// exemple :
// $urlAppend="/cvs130/Dokeos150";
// $rootSys="/var/www/html/cvs130/Dokeos150/";
$updir = $currentCourseRepositorySys.'work/'; //directory path to upload
// Try to add an extension to the file if it has'nt one
@ -599,7 +595,7 @@ if ($submitWork && $succeed &&!$id) //last value is to check this is not "just"
if ($submitGroupWorkUrl) // For user comming from group space to publish his work
{
$realUrl = str_replace ($rootSys, $_configuration['root_web'], str_replace("\\", "/", realpath($submitGroupWorkUrl) ) ) ;
$realUrl = str_replace ($_configuration['root_sys'], $_configuration['root_web'], str_replace("\\", "/", realpath($submitGroupWorkUrl) ) ) ;
echo "<tr>\n",

Loading…
Cancel
Save