skala
Yannick Warnier 15 years ago
commit d6a93b110e
  1. 23
      main/inc/conf/add_course.conf.dist.php
  2. 89
      main/inc/conf/course_info.conf.dist.php
  3. 15
      main/inc/conf/mail.conf.dist.php
  4. 55
      main/inc/conf/profile.conf.dist.php
  5. 15
      main/work/work.lib.php

@ -1,14 +1,15 @@
<?php <?php
/** /**
============================================================================== * This file holds the configuration constants and variables
* This file holds the configuration constants and variables * for the add course tool.
* for the add course tool. *
* * @package chamilo.configuration
* @package dokeos.configuration */
==============================================================================
*/ $firstExpirationDelay = 31536000; // <- 86400*365 // 60*60*24 = 1 jour = 86400
$firstExpirationDelay = 31536000; // <- 86400*365 // 60*60*24 = 1 jour = 86400 $defaultVisibilityForANewCourse = 2;
$defaultVisibilityForANewCourse = 2; $prefixAntiNumber = 'z';
$prefixAntiNumber ="z"; $DEBUG = false;
$DEBUG=FALSE;
?> ?>

@ -1,66 +1,45 @@
<?php <?php
/*
==============================================================================
Dokeos - elearning and course management software
Copyright (c) 2008 Dokeos SPRL
For a full list of contributors, see "credits.txt".
The full license can be read in "license.txt".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See the GNU General Public License for more details.
Contact address: Dokeos, rue du Corbeau, 108, B-1030 Brussels, Belgium
Mail: info@dokeos.com
==============================================================================
*/
/** /**
============================================================================== * This file holds the configuration constants and variables
* This file holds the configuration constants and variables * for the course info tool.
* for the course info tool. *
* * @package chamilo.configuration
* @package dokeos.configuration */
==============================================================================
*/
$course_info_is_editable = true; $course_info_is_editable = true;
/* /*
//if (basename($_SERVER["SCRIPT_FILENAME"])==basename(__FILE__)) die("Va voir ailleurs"); //if (basename($_SERVER['SCRIPT_FILENAME']) == basename(__FILE__)) die('Va voir ailleurs');
$showLinkToExportThisCourse = TRUE; $showLinkToExportThisCourse = true;
$showLinkToBackupThisCourse = TRUE; $showLinkToBackupThisCourse = true;
$showLinkToRecycleThisCourse = TRUE; $showLinkToRecycleThisCourse = true;
$showLinkToRestoreCourse = TRUE; $showLinkToRestoreCourse = true;
$showLinkToCopyThisCourse = TRUE; $showLinkToCopyThisCourse = true;
*/ */
// If true, these fileds keep the previous content. // If true, these fileds keep the previous content.
/* /*
$canBeEmpty["screenCode"] = FALSE; $canBeEmpty['screenCode'] = false;
$canBeEmpty["course_title"] = FALSE; $canBeEmpty['course_title'] = false;
$canBeEmpty["course_category"] = TRUE; $canBeEmpty['course_category'] = true;
$canBeEmpty["description"] = TRUE; $canBeEmpty['description'] = true;
$canBeEmpty["visibility"] = FALSE; $canBeEmpty['visibility'] = false;
$canBeEmpty["titulary"] = FALSE; $canBeEmpty['titulary'] = false;
$canBeEmpty["course_language"]= FALSE; $canBeEmpty['course_language'] = false;
$canBeEmpty["department_name"] = TRUE; $canBeEmpty['department_name'] = true;
$canBeEmpty["department_url"] = TRUE; $canBeEmpty['department_url'] = true;
*/ */
$showDiskQuota = TRUE; $showDiskQuota = true;
//$showDiskUse = TRUE; //$showDiskUse = true;
//$showLinkToChangeDiskQuota = TRUE; //$showLinkToChangeDiskQuota = true;
$showExpirationDate = TRUE; $showExpirationDate = true;
$showCreationDate = TRUE; $showCreationDate = true;
$showLastEdit = TRUE; $showLastEdit = true;
$showLastVisit = TRUE; $showLastVisit = true;
$canReportExpirationDate = TRUE; // need to be true $canReportExpirationDate = true; // Needs to be true
// if ScriptToReportExpirationDate // if ScriptToReportExpirationDate
// is not automaticly called // is not automaticly called
//$linkToChangeDiskQuota = "changeQuota.php"; //$linkToChangeDiskQuota = 'changeQuota.php';
$urlScriptToReportExpirationDate = "postpone.php"; // external script to postpone the expiration of course. $urlScriptToReportExpirationDate = 'postpone.php'; // external script to postpone the expiration of course.
?>
?>

@ -1,17 +1,20 @@
<?php <?php
// ============================== mail ================================= /**
* This file holds the configuration settings
* for phpmailer Class.
*
* @package chamilo.configuration
*/
// smtp values for phpmailer Class $platform_email['SMTP_FROM_EMAIL'] = $administrator['email'];
$platform_email['SMTP_FROM_EMAIL'] = $administrator["email"]; $platform_email['SMTP_FROM_NAME'] = $administrator['name'];
$platform_email['SMTP_FROM_NAME'] = $administrator["name"];
$platform_email['SMTP_HOST'] = 'localhost'; $platform_email['SMTP_HOST'] = 'localhost';
$platform_email['SMTP_PORT'] = 25; $platform_email['SMTP_PORT'] = 25;
$platform_email['SMTP_MAILER'] = IS_WINDOWS_OS ? 'smtp' : 'mail'; //mail, sendmail or smtp $platform_email['SMTP_MAILER'] = IS_WINDOWS_OS ? 'smtp' : 'mail'; // mail, sendmail or smtp
$platform_email['SMTP_AUTH'] = 0; $platform_email['SMTP_AUTH'] = 0;
$platform_email['SMTP_USER'] = ''; $platform_email['SMTP_USER'] = '';
$platform_email['SMTP_PASS'] = ''; $platform_email['SMTP_PASS'] = '';
$platform_email['SMTP_CHARSET'] = api_get_system_encoding(); $platform_email['SMTP_CHARSET'] = api_get_system_encoding();
// ====================================================================
?> ?>

@ -1,47 +1,42 @@
<?php <?php
/**
==============================================================================
* This file holds the configuration constants and variables
* for the user profile tool.
*
* @package dokeos.configuration
==============================================================================
*/
// AUTHENTICATION // /**
//// PASSWORD ////// * This file holds the configuration constants and variables
* for the user profile tool.
*
* @package chamilo.configuration
*/
define ('CHECK_PASS_EASY_TO_FIND', false); // Autentication, password
define('CHECK_PASS_EASY_TO_FIND', false);
$profileIsEditable = true; $profileIsEditable = true;
///// PICTURE OF USERS ///// // User photos
define ('PREFIX_IMAGE_FILENAME_WITH_UID', true); // if true, filename of images on server begin with uid of the user. define('PREFIX_IMAGE_FILENAME_WITH_UID', true); // If true, filename of images on server begin with uid of the user.
define ('RESIZE_IMAGE_TO_THIS_HEIGTH',180); define('RESIZE_IMAGE_TO_THIS_HEIGTH', 180);
define('IMAGE_THUMBNAIL_WIDTH', 100); define('IMAGE_THUMBNAIL_WIDTH', 100);
// ABOUT IMAGE REPLACE // Replacing user photos
define ('KEEP_THE_NAME_WHEN_CHANGE_IMAGE',TRUE); define('KEEP_THE_NAME_WHEN_CHANGE_IMAGE', true);
// true -> the new image have the name of previous. // true -> the new image have the name of previous.
// false -> a new name is build for each upladed image. // false -> a new name is build for each upladed image.
define ('KEEP_THE_OLD_IMAGE_AFTER_CHANGE',TRUE); define('KEEP_THE_OLD_IMAGE_AFTER_CHANGE', true);
// true -> if KEEP_THE_NAME_WHEN_CHANGE_IMAGE is true, the previous image is rename before. // true -> if KEEP_THE_NAME_WHEN_CHANGE_IMAGE is true, the previous image is rename before.
// false -> only the last image still on server. // false -> only the last image still on server.
// Official code
///// OFFICIAL CODE // BEGIN // Don't forget to change name of offical code in your organization
// don't forget to change name of offical code in your institute // See $langOfficialCode within the language file 'registration'
// $langOfficialCode in lang File 'registration' define('CONFVAL_ASK_FOR_OFFICIAL_CODE', true); // not used but name fixed
define ('CONFVAL_ASK_FOR_OFFICIAL_CODE', true); // not used but name fixed define('CONFVAL_CHECK_OFFICIAL_CODE', false);
define ('CONFVAL_CHECK_OFFICIAL_CODE', false); /* if CONFVAL_CHECK_OFFICIAL_CODE is true, build here the
/* if true, build here the function personal_check_official_code($code,$valueToReturnIfOk,$valueToReturnIfBad) function personal_check_official_code($code, $valueToReturnIfOk, $valueToReturnIfBad) {
{ return $stateOfficialCode = true;
return $stateOfficialCode
} }
*/ */
///// OFFICIAL CODE // END
// for stats // // For stats
define ('NB_LINE_OF_EVENTS', 15); define('NB_LINE_OF_EVENTS', 15);
?> ?>

@ -1422,11 +1422,10 @@ function get_list_users_without_publication($task_id) {
//condition for the session //condition for the session
$session_id = api_get_session_id(); $session_id = api_get_session_id();
if (!empty($session_id)){ if ($session_id == 0){
$sql = "SELECT user_id as id FROM $work_table WHERE parent_id='$task_id' and session_id='".$session_id."'";
} else {
$sql = "SELECT user_id as id FROM $work_table WHERE parent_id='$task_id'"; $sql = "SELECT user_id as id FROM $work_table WHERE parent_id='$task_id'";
} else {
$sql = "SELECT user_id as id FROM $work_table WHERE parent_id='$task_id' and session_id='".$session_id."'";
} }
$result = Database::query($sql); $result = Database::query($sql);
$users_with_tasks = array(); $users_with_tasks = array();
@ -1434,12 +1433,11 @@ function get_list_users_without_publication($task_id) {
$users_with_tasks[] = $row['id']; $users_with_tasks[] = $row['id'];
} }
if (!empty($session_id)){ if ($session_id == 0){
$sql_users = "SELECT cu.id_user, u.lastname, u.firstname, u.email FROM $session_course_rel_user AS cu, $table_user AS u WHERE u.status!=1 and cu.course_code='".api_get_course_id()."' AND u.user_id=cu.id_user and cu.id_session='".$session_id."'";
} else {
$sql_users = "SELECT cu.user_id, u.lastname, u.firstname, u.email FROM $table_course_user AS cu, $table_user AS u WHERE u.status!=1 and cu.course_code='".api_get_course_id()."' AND u.user_id=cu.user_id"; $sql_users = "SELECT cu.user_id, u.lastname, u.firstname, u.email FROM $table_course_user AS cu, $table_user AS u WHERE u.status!=1 and cu.course_code='".api_get_course_id()."' AND u.user_id=cu.user_id";
} else {
$sql_users = "SELECT cu.id_user, u.lastname, u.firstname, u.email FROM $session_course_rel_user AS cu, $table_user AS u WHERE u.status!=1 and cu.course_code='".api_get_course_id()."' AND u.user_id=cu.id_user and cu.id_session='".$session_id."'";
} }
$result_users = Database::query($sql_users); $result_users = Database::query($sql_users);
$users_without_tasks = array(); $users_without_tasks = array();
while ($row_users = Database::fetch_row($result_users)) { while ($row_users = Database::fetch_row($result_users)) {
@ -1450,7 +1448,6 @@ function get_list_users_without_publication($task_id) {
$users_without_tasks[] = $row_users; $users_without_tasks[] = $row_users;
} }
return $users_without_tasks; return $users_without_tasks;
} }

Loading…
Cancel
Save