[svn r9997]

skala
Patrick Cool 18 years ago
parent 4214044b4c
commit 8c5b65be3f
  1. 9
      main/inc/banner.inc.php
  2. 6
      main/inc/course_document.inc.php
  3. 24
      main/inc/global.inc.php
  4. 20
      main/inc/local.inc.php

@ -54,7 +54,9 @@ elseif (isset ($nameTools) && $langFile != 'course_home')
{
//Put the name of the user-tools in the header
if (!isset ($_user['user_id']))
{
echo " ";
}
elseif(!$noPHP_SELF)
{
echo "<div id=\"my_courses\"><a href=\"".$_SERVER['PHP_SELF']."?".api_get_cidreq(), "\" target=\"_top\">", $nameTools, "</a></div>", "\n";
@ -350,9 +352,12 @@ if (isset ($dokeos_database_connection))
<?php
//to mask the main div, set $header_hide_main_div to true in any script just before calling Display::display_header();
global $header_hide_main_div;
if(!empty($header_hide_main_div) && $header_hide_main_div===true){
if(!empty($header_hide_main_div) && $header_hide_main_div===true)
{
//do nothing
}else{
}
else
{
?>
<div id="main"> <!-- start of #main wrapper for #content and #menu divs -->
<?php

@ -271,8 +271,6 @@ function getlist ($directory) {
if ($filename != '..')
if ($filename != '.')
{
$file = array(
"lastedit_date" =>date ("Y-m-d H:i:s", filemtime($path)),
"visibility" => 1,
@ -291,7 +289,9 @@ function getlist ($directory) {
return $files;
} else {
}
else
{
return false;
}

@ -93,15 +93,14 @@ if(empty($statsDbName) && $already_installed)
$dokeos_database_connection = @mysql_connect($dbHost, $dbLogin, $dbPass) or die ($error_message);
if (! $dbHost) die($error_message);
if (! $dbHost)
{
die($error_message);
}
unset($error_message);
$selectResult = mysql_select_db($mainDbName,$dokeos_database_connection)
or die ( "<center>"
."WARNING ! SYSTEM UNABLE TO SELECT THE MAIN DOKEOS DATABASE"
."</center>");
$selectResult = mysql_select_db($mainDbName,$dokeos_database_connection) or die ('<center>WARNING ! SYSTEM UNABLE TO SELECT THE MAIN DOKEOS DATABASE</center>');
/*
--------------------------------------------
@ -113,9 +112,13 @@ $result=mysql_query($sql) or die(mysql_error());
while ($row=mysql_fetch_array($result))
{
if ($row['subkey']==NULL)
{ $_setting[$row['variable']]=$row['selected_value']; }
{
$_setting[$row['variable']]=$row['selected_value'];
}
else
{ $_setting[$row['variable']][$row['subkey']]=$row['selected_value']; }
{
$_setting[$row['variable']][$row['subkey']]=$row['selected_value'];
}
}
// we have to store the settings for the plugins differently because it expects an array
$sql="SELECT * FROM settings_current WHERE category='plugins'";
@ -141,7 +144,10 @@ require($includePath."/local.inc.php");
include_once($includePath."/lib/online.inc.php");
// check and modify the date of user in the track.e.online table
if (!$x=strpos($_SERVER['PHP_SELF'],'whoisonline.php')) { LoginCheck(isset($_user['user_id']) ? $_user['user_id'] : '',$statsDbName); }
if (!$x=strpos($_SERVER['PHP_SELF'],'whoisonline.php'))
{
LoginCheck(isset($_user['user_id']) ? $_user['user_id'] : '',$statsDbName);
}
// ===== end "who is logged in?" module section =====

@ -496,10 +496,13 @@ if (isset($cidReset) && $cidReset) // course session data refresh requested or e
}
else // continue with the previous values
{
if(empty($_SESSION['_course']) OR empty($_SESSION['_cid'])){ //no previous values...
if(empty($_SESSION['_course']) OR empty($_SESSION['_cid']))
{ //no previous values...
$_cid = -1; //set default values that will be caracteristic of being unset
$_course = -1;
}else{
}
else
{
$_cid = $_SESSION['_cid' ];
$_course = $_SESSION['_course'];
}
@ -565,7 +568,8 @@ if ((isset($uidReset) && $uidReset) || (isset($cidReset) && $cidReset)) // sessi
api_session_register('_courseUser');
}
else {
else
{
// vérifier que c pas le coach du cours
$sql = "SELECT 1
FROM `".$mainDbName."`.`session_rel_course`
@ -573,7 +577,8 @@ if ((isset($uidReset) && $uidReset) || (isset($cidReset) && $cidReset)) // sessi
AND session_rel_course.id_coach = '".$_user['user_id']."'";
$result = api_sql_query($sql,__FILE__,__LINE__);
if($row = mysql_fetch_array($result)){
if($row = mysql_fetch_array($result))
{
$_courseUser['role'] = 'Professor';
$is_courseMember = true;
$is_courseTutor = true;
@ -581,7 +586,8 @@ if ((isset($uidReset) && $uidReset) || (isset($cidReset) && $cidReset)) // sessi
api_session_register('_courseUser');
}
else {
else
{
// vérifier que c pas un élève de la session
$sql = "SELECT * FROM `".$mainDbName."`.`session_rel_course_rel_user`
WHERE `id_user` = '".$_user['user_id']."'
@ -708,7 +714,9 @@ if ((isset($gidReset) && $gidReset) || (isset($cidReset) && $cidReset)) // sessi
elseif(isset($_SESSION['_gid'])) // continue with the previous values
{
$_gid = $_SESSION ['_gid' ];
}else{ //if no previous value, assign caracteristic undefined value
}
else
{ //if no previous value, assign caracteristic undefined value
$_gid = -1;
}

Loading…
Cancel
Save