swad-core/swad_config.h

552 lines
34 KiB
C
Raw Normal View History

2014-12-01 23:55:08 +01:00
// swad_config.h: configuration
#ifndef _SWAD_CFG
#define _SWAD_CFG
/*
SWAD (Shared Workspace At a Distance),
is a web platform developed at the University of Granada (Spain),
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2023 Antonio Ca<EFBFBD>as Vargas
2014-12-01 23:55:08 +01:00
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*****************************************************************************/
/** Uncomment one of the following installations of SWAD or create your own **/
/*****************************************************************************/
2021-02-07 20:07:00 +01:00
#define LOCALHOST_UBUNTU // Comment this line if not applicable
2020-09-27 10:50:18 +02:00
//#define OPENSWAD_ORG // Comment this line if not applicable
2020-09-30 20:23:52 +02:00
//#define SWAD_UGR_ES // Comment this line if not applicable
2016-07-20 20:24:16 +02:00
//#define SWADBERRY_UGR_ES // Comment this line if not applicable
2014-12-01 23:55:08 +01:00
2014-12-27 13:49:17 +01:00
/*****************************************************************************/
/********************************* Headers ***********************************/
/*****************************************************************************/
#include "swad_layout.h"
2014-12-01 23:55:08 +01:00
/*****************************************************************************/
/***************************** Public constants ******************************/
/*****************************************************************************/
/* IMPORTANT:
- If one of the following paths does not exist, it should be created during installation!
*/
#if defined LOCALHOST_UBUNTU // localhost (Ubuntu) ******************
2016-03-20 22:31:57 +01:00
#define Cfg_PLATFORM_SHORT_NAME "SWAD local"
2014-12-03 20:06:16 +01:00
#define Cfg_PLATFORM_FULL_NAME "SWAD (Shared Workspace At a Distance)"
2014-12-01 23:55:08 +01:00
#define Cfg_PLATFORM_SERVER "localhost" // Server name (main part of the URL)
2017-04-24 01:56:57 +02:00
#define Cfg_URL_SWAD_SERVER "https://localhost/" // With ending slash
#define Cfg_URL_SWAD_CGI "https://localhost" // Without ending slash
2016-07-08 12:43:48 +02:00
#define Cfg_URL_SWAD_PUBLIC "https://localhost/swad" // Without ending slash
2014-12-01 23:55:08 +01:00
#define Cfg_PATH_CGI_BIN "/usr/lib/cgi-bin/swad" // Directory for this CGI and other commands called by it
#define Cfg_PATH_SWAD_PUBLIC "/var/www/html/swad" // Main public directory for public SWAD pages, icons, etc.
#define Cfg_PATH_SWAD_PRIVATE "/var/www/swad" // Main private directory for SWAD private data
2016-03-19 02:21:09 +01:00
#define Cfg_PLATFORM_LOGO_SMALL_FILENAME "swad64x64.png" // Logo displayed in the top of the page
2019-11-18 14:21:01 +01:00
#define Cfg_PLATFORM_LOGO_SMALL_CLASS "ICO40x40"
2015-11-30 19:50:06 +01:00
#define Cfg_PLATFORM_LOGO_BIG_FILENAME "swad140x40.png"
2019-11-18 14:21:01 +01:00
#define Cfg_PLATFORM_LOGO_BIG_CLASS "ICO140x40"
2015-11-24 13:27:46 +01:00
2019-12-18 22:28:31 +01:00
#define Cfg_PLATFORM_RESPONSIBLE_NAME "Responsible name" // Main responsible for the platform
#define Cfg_PLATFORM_RESPONSIBLE_EMAIL "Responsible email address" // Main responsible for the platform
#define Cfg_AUTOMATIC_EMAIL_SMTP_SERVER "Your SMTP server" // SMTP server for sending automatic emails
2016-11-16 23:19:52 +01:00
#define Cfg_AUTOMATIC_EMAIL_SMTP_PORT "465" // SMTP port for sending automatic emails
2019-12-18 22:28:31 +01:00
#define Cfg_AUTOMATIC_EMAIL_FROM "Sender email address" // Email address from where automatic emails will be sent
2014-12-01 23:55:08 +01:00
#define Cfg_DATABASE_HOST "localhost" // Database host
2018-12-08 16:43:13 +01:00
#define Cfg_DEFAULT_LANGUAGE Lan_LANGUAGE_ES // Default language
2014-12-01 23:55:08 +01:00
#define Cfg_LOG_START_YEAR 2012 // Year when the log started in the database
// Footer of page with info about the institution where this platform is installed
#define Cfg_ABOUT_NAME "Centro de Educaci&oacute;n Virtual de la Universidad Nacional de Asunci&oacute;n"
#define Cfg_ABOUT_URL "http://www.cevuna.una.py/"
#define Cfg_ABOUT_LOGO "cevuna.una.py100x32.gif"
2015-09-28 18:28:29 +02:00
#define Cfg_ABOUT_LOGO_WIDTH 125
#define Cfg_ABOUT_LOGO_HEIGHT 40
2014-12-01 23:55:08 +01:00
#define Cfg_TIME_TO_SEND_PENDING_NOTIF ((time_t) (30UL * 60UL)) // After these seconds after first pending notification, all pending notifications are sent by email
2014-12-01 23:55:08 +01:00
#define Cfg_GOOGLE_ANALYTICS ""
#elif defined OPENSWAD_ORG // openswad.org ************************
2014-12-03 20:06:16 +01:00
#define Cfg_PLATFORM_SHORT_NAME "OpenSWAD"
2015-07-24 11:34:39 +02:00
#define Cfg_PLATFORM_FULL_NAME "OpenSWAD (Open Shared Workspace At a Distance)"
2014-12-01 23:55:08 +01:00
#define Cfg_PLATFORM_SERVER "openswad.org" // Server name (main part of the URL)
2016-10-02 22:54:30 +02:00
#define Cfg_URL_SWAD_SERVER "https://openswad.org/" // With ending slash
2016-07-08 12:43:48 +02:00
#define Cfg_URL_SWAD_CGI "https://openswad.org" // Without ending slash
#define Cfg_URL_SWAD_PUBLIC "https://openswad.org/swad" // Without ending slash
2014-12-01 23:55:08 +01:00
#define Cfg_PATH_CGI_BIN "/var/www/cgi-bin/swad" // Directory for this CGI and other commands called by it
#define Cfg_PATH_SWAD_PUBLIC "/var/www/html/swad" // Main public directory for public SWAD pages, icons, etc.
#define Cfg_PATH_SWAD_PRIVATE "/var/www/swad" // Main private directory for SWAD private data
2016-03-19 02:21:09 +01:00
#define Cfg_PLATFORM_LOGO_SMALL_FILENAME "swad64x64.png" // Logo displayed in the top of the page
2019-11-18 14:21:01 +01:00
#define Cfg_PLATFORM_LOGO_SMALL_CLASS "ICO40x40"
2015-11-30 19:50:06 +01:00
#define Cfg_PLATFORM_LOGO_BIG_FILENAME "openswad220x40.png"
2019-11-18 14:21:01 +01:00
#define Cfg_PLATFORM_LOGO_BIG_CLASS "ICO220x40"
2015-11-24 13:27:46 +01:00
2014-12-01 23:55:08 +01:00
#define Cfg_PLATFORM_RESPONSIBLE_NAME "Antonio Ca<43>as Vargas" // Main responsible for the platform
2016-11-16 23:19:52 +01:00
#define Cfg_PLATFORM_RESPONSIBLE_EMAIL "webmaster@openswad.org" // Main responsible for the platform
#define Cfg_AUTOMATIC_EMAIL_SMTP_SERVER "mail.openswad.org" // SMTP server for sending automatic emails
#define Cfg_AUTOMATIC_EMAIL_SMTP_PORT "465" // SMTP port for sending automatic emails
#define Cfg_AUTOMATIC_EMAIL_FROM "acanas@openswad.org" // Email address from where automatic emails will be sent
2014-12-01 23:55:08 +01:00
#define Cfg_DATABASE_HOST "localhost" // Database host
2018-12-08 16:43:13 +01:00
#define Cfg_DEFAULT_LANGUAGE Lan_LANGUAGE_EN // Default language
2014-12-01 23:55:08 +01:00
#define Cfg_LOG_START_YEAR 2012 // Year when the log started in the database
// Footer of page with info about the institution where this platform is installed
#define Cfg_ABOUT_NAME "OpenSWAD"
#define Cfg_ABOUT_URL "http://openswad.org/"
#define Cfg_ABOUT_LOGO "swad32x32.gif"
#define Cfg_ABOUT_LOGO_WIDTH 32
#define Cfg_ABOUT_LOGO_HEIGHT 32
#define Cfg_TIME_TO_SEND_PENDING_NOTIF ((time_t) (30UL * 60UL)) // After these seconds after first pending notification, all pending notifications are sent by email
2014-12-01 23:55:08 +01:00
/* Google Analytics without cookies.
* This code comes from http://stackoverflow.com/a/19995629
*/
2019-06-13 10:14:05 +02:00
#define Cfg_GOOGLE_ANALYTICS ""
/*
"<script type=\"text/javascript\">" \
2014-12-01 23:55:08 +01:00
" (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){" \
" (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o)," \
" m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)" \
" })(window,document,'script','//www.google-analytics.com/analytics.js','ga');" \
" ga('create', 'UA-40768375-1', 'openswad.org', {" \
" 'anonymizeIp': true," \
" 'storage': 'none'," \
" 'clientId': window.localStorage.getItem('ga_clientId')" \
" });" \
" ga(function(tracker) {" \
" window.localStorage.setItem('ga_clientID', tracker.get('clientId'));" \
" });" \
" ga('send', 'pageview');" \
"</script>"
2019-06-13 10:14:05 +02:00
*/
2014-12-01 23:55:08 +01:00
#elif defined SWAD_UGR_ES // swad.ugr.es *************************
2014-12-03 20:06:16 +01:00
#define Cfg_PLATFORM_SHORT_NAME "SWAD"
#define Cfg_PLATFORM_FULL_NAME "SWAD (Shared Workspace At a Distance)"
2014-12-01 23:55:08 +01:00
#define Cfg_PLATFORM_SERVER "swad.ugr.es" // Server name (main part of the URL)
2016-10-02 22:54:30 +02:00
#define Cfg_URL_SWAD_SERVER "https://swad.ugr.es/" // With ending slash
2016-07-08 12:43:48 +02:00
#define Cfg_URL_SWAD_CGI "https://swad.ugr.es" // Without ending slash
#define Cfg_URL_SWAD_PUBLIC "https://swad.ugr.es/swad" // Without ending slash
2014-12-01 23:55:08 +01:00
#define Cfg_PATH_CGI_BIN "/var/www/cgi-bin" // Directory for this CGI and other commands called by it
#define Cfg_PATH_SWAD_PUBLIC "/var/www/html/swad" // Main public directory for public SWAD pages, icons, etc.
2016-09-18 22:53:05 +02:00
#define Cfg_PATH_SWAD_PRIVATE "/var/www/swad" // Main private directory for SWAD private data
2017-03-01 12:59:49 +01:00
#define Cfg_PLATFORM_LOGO_SMALL_FILENAME "swad-ugr160x80.png" // Logo displayed in the top of the page
2019-11-18 14:21:01 +01:00
#define Cfg_PLATFORM_LOGO_SMALL_CLASS "ICO80x40"
2017-03-01 12:59:49 +01:00
#define Cfg_PLATFORM_LOGO_BIG_FILENAME "swad-ugr530x80.png"
2019-11-18 14:21:01 +01:00
#define Cfg_PLATFORM_LOGO_BIG_CLASS "ICO265x40"
2016-09-18 22:53:05 +02:00
#define Cfg_PLATFORM_RESPONSIBLE_NAME "UGR" // Main responsible for the platform
2016-11-16 23:19:52 +01:00
#define Cfg_PLATFORM_RESPONSIBLE_EMAIL "swad@ugr.es" // Main responsible for the platform
#define Cfg_AUTOMATIC_EMAIL_SMTP_SERVER "smtp.ugr.es" // SMTP server for sending automatic emails
#define Cfg_AUTOMATIC_EMAIL_SMTP_PORT "587" // SMTP port for sending automatic emails
#define Cfg_AUTOMATIC_EMAIL_FROM "swad@ugr.es" // Email address from where automatic emails will be sent
2016-09-18 22:53:05 +02:00
#define Cfg_DATABASE_HOST "localhost" // Database host
2018-12-08 16:43:13 +01:00
#define Cfg_DEFAULT_LANGUAGE Lan_LANGUAGE_ES // Default language
2016-09-18 22:53:05 +02:00
#define Cfg_LOG_START_YEAR 2005 // Year when the log started in the database
// Footer of page with info about the institution where this platform is installed
#define Cfg_ABOUT_NAME "Universidad de Granada"
#define Cfg_ABOUT_URL "http://www.ugr.es/"
2017-02-28 20:22:02 +01:00
#define Cfg_ABOUT_LOGO "ugr200x64.png"
2016-09-18 22:53:05 +02:00
#define Cfg_ABOUT_LOGO_WIDTH 100
#define Cfg_ABOUT_LOGO_HEIGHT 32
#define Cfg_TIME_TO_SEND_PENDING_NOTIF ((time_t) (30UL * 60UL)) // After these seconds after first pending notification, all pending notifications are sent by email
2014-12-01 23:55:08 +01:00
2019-06-13 10:14:05 +02:00
#define Cfg_GOOGLE_ANALYTICS ""
/*
"<script type=\"text/javascript\">" \
2014-12-01 23:55:08 +01:00
" (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){" \
" (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o)," \
" m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)" \
" })(window,document,'script','//www.google-analytics.com/analytics.js','ga');" \
2016-07-06 19:31:33 +02:00
" ga('create', 'UA-42150741-1', 'ugr.es', {" \
" 'anonymizeIp': true," \
" 'storage': 'none'," \
" 'clientId': window.localStorage.getItem('ga_clientId')" \
" });" \
" ga(function(tracker) {" \
" window.localStorage.setItem('ga_clientID', tracker.get('clientId'));" \
" });" \
2014-12-01 23:55:08 +01:00
" ga('send', 'pageview');" \
"</script>"
2019-06-13 10:14:05 +02:00
*/
2014-12-01 23:55:08 +01:00
2016-04-30 13:47:18 +02:00
#elif defined SWADBERRY_UGR_ES // swadberry.ugr.es ******************
2016-05-01 16:26:20 +02:00
#define Cfg_PLATFORM_SHORT_NAME "SWADberry"
#define Cfg_PLATFORM_FULL_NAME "SWADberry (Shared Workspace At a Distance on a Raspberry Pi)"
2016-07-08 12:43:48 +02:00
#define Cfg_PLATFORM_SERVER "swadberry.ugr.es" // Server name (main part of the URL)
2016-10-02 22:54:30 +02:00
#define Cfg_URL_SWAD_SERVER "https://swadberry.ugr.es/" // With ending slash
2016-07-15 18:39:19 +02:00
#define Cfg_URL_SWAD_CGI "https://swadberry.ugr.es" // Without ending slash
2016-07-08 12:43:48 +02:00
#define Cfg_URL_SWAD_PUBLIC "https://swadberry.ugr.es/swad" // Without ending slash
2016-04-30 13:47:18 +02:00
#define Cfg_PATH_CGI_BIN "/usr/lib/cgi-bin/swad" // Directory for this CGI and other commands called by it
#define Cfg_PATH_SWAD_PUBLIC "/var/www/html/swad" // Main public directory for public SWAD pages, icons, etc.
#define Cfg_PATH_SWAD_PRIVATE "/var/www/swad" // Main private directory for SWAD private data
#define Cfg_PLATFORM_LOGO_SMALL_FILENAME "swad64x64.png" // Logo displayed in the top of the page
2019-11-18 14:21:01 +01:00
#define Cfg_PLATFORM_LOGO_SMALL_CLASS "ICO40x40"
2016-05-05 10:01:35 +02:00
#define Cfg_PLATFORM_LOGO_BIG_FILENAME "SWADberry212x40.png"
2019-11-18 14:21:01 +01:00
#define Cfg_PLATFORM_LOGO_BIG_CLASS "ICO212x40"
2016-04-30 13:47:18 +02:00
#define Cfg_PLATFORM_RESPONSIBLE_NAME "ATC - UGR" // Main responsible for the platform
2016-11-16 23:19:52 +01:00
#define Cfg_PLATFORM_RESPONSIBLE_EMAIL "swad@ugr.es" // Main responsible for the platform
#define Cfg_AUTOMATIC_EMAIL_SMTP_SERVER "smtp.ugr.es" // SMTP server for sending automatic emails
#define Cfg_AUTOMATIC_EMAIL_SMTP_PORT "587" // SMTP port for sending automatic emails
#define Cfg_AUTOMATIC_EMAIL_FROM "swad@ugr.es" // Email address from where automatic emails will be sent
2016-04-30 13:47:18 +02:00
#define Cfg_DATABASE_HOST "localhost" // Database host
2018-12-08 16:43:13 +01:00
#define Cfg_DEFAULT_LANGUAGE Lan_LANGUAGE_ES // Default language
2016-04-30 13:47:18 +02:00
#define Cfg_LOG_START_YEAR 2016 // Year when the log started in the database
// Footer of page with info about the institution where this platform is installed
#define Cfg_ABOUT_NAME "Dpt. Arquitectura y Tecnolog&iacute;a de Computadores"
#define Cfg_ABOUT_URL "http://atc.ugr.es/"
#define Cfg_ABOUT_LOGO "atc64x64.png"
#define Cfg_ABOUT_LOGO_WIDTH 32
#define Cfg_ABOUT_LOGO_HEIGHT 32
#define Cfg_TIME_TO_SEND_PENDING_NOTIF ((time_t) (30UL * 60UL)) // After these seconds after first pending notification, all pending notifications are sent by email
2016-04-30 13:47:18 +02:00
#define Cfg_GOOGLE_ANALYTICS ""
2014-12-01 23:55:08 +01:00
#endif
/* Database */
#define Cfg_DATABASE_DBNAME "swad" // Database name
#define Cfg_DATABASE_USER "swad" // Database user
/* Email */
2016-11-16 23:19:52 +01:00
#define Cfg_AUTOMATIC_EMAIL_PASSWORD DONT_PUBLISH_SMTP_PASSWORD // Email user's password for automatic emails
2014-12-01 23:55:08 +01:00
/* SWADroid */
#define Cfg_SWADROID_URL "https://play.google.com/store/apps/details?id=es.ugr.swad.swadroid"
#define Cfg_SWADROID_ICO "SWADroid300x650.png"
2014-12-01 23:55:08 +01:00
/* About SWAD */
2019-04-03 20:57:04 +02:00
#define Cfg_ABOUT_SWAD_URL "https://github.com/acanas/swad-core/wiki/UserGuide.en"
2014-12-01 23:55:08 +01:00
/* Link to download Java: keep updated! */
#define Cfg_JAVA_URL "http://www.java.com/es/download/"
#define Cfg_JAVA_NAME "Java Runtime Environment"
/* Users */
#define Cfg_MAX_USRS_IN_LIST 20000 // If the number of users in a list is greater than this, don't show the list
#define Cfg_MIN_NUM_USERS_TO_CONFIRM_SHOW_BIG_LIST 1000 // If the number of users in a list is greater than this, ask me for confirmation before showing the list
2016-05-05 10:01:35 +02:00
#define Cfg_MIN_PHOTOS_TO_SHOW_AVERAGE 10 // If the number of students with photo in a degree is less than this, don't show average photo of the degree
2014-12-01 23:55:08 +01:00
#define Cfg_MAX_RECIPIENTS 250 // A student can not send a message to more than this number of recipients
2020-05-09 01:37:00 +02:00
#define Cfg_MAX_CONNECTED_SHOWN 10 // Show (in right column) only these connected users with more recent activity
2014-12-01 23:55:08 +01:00
/* Courses */
#define Cfg_MIN_NUM_COURSES_TO_CONFIRM_SHOW_BIG_LIST 1000 // If the number of courses in a list is greater than this, ask me for confirmation before showing the list
2014-12-01 23:55:08 +01:00
2020-05-09 18:18:04 +02:00
/* Layout */
#define Cfg_DEFAULT_COLUMNS Lay_HIDE_BOTH_COLUMNS
2014-12-01 23:55:08 +01:00
/*****************************************************************************/
/*********************** Directories, folder and files ***********************/
/*****************************************************************************/
/* /
|
|
|
var
|
+---------------------------------------------+---------------------------------------------------+
| |
www lib
| |
+----------------------+--------------------------------------------------+ |
| | | |
cgi-bin html (public) swad (private) mysql (HD 15000 rpm)
| | | |
| +---+----+---+-------------+------------------+---+ +----+-+----+-----+----+----+---------+----+ +
| | | | | | | | | | | | | | | |
swad (CGI) crs chat photo icon tmp logo crs out param photo test tmp usr zip swad (database)
| | | | | | | |
| +-----+---+ +-----+---+--+------+ + | tmp +-+-+ +-+-+---+
| | | | | | | | | | | | | | | |...|
| links tmp | filext | plugin | tmp.dirs. | tmp.dirs. 0 1 2 9
| | degree institution theme | | | | | |...|
| + + | +-+-+ +-+-+
| processing links | | | | | | |
| of to | tmp. links xxxxxxx9
| received download | to |
| photos files | assignments +
| | and |
| | works maletin
+-+-+ +-+-+ for
| | |... | | | compression
course code course code
| |
+----+----+ +----------+------+-------------+------+---+-----------+------------+
|... | | | | | | | |
bibliografia rss calificaciones comun descarga grp pra lec usr
+ +-+-+ +-+-+ +-+-+ +---+---+ + + +-+--------+
| | | | | | | | | | | | | | | |
index.rss ... ... ... c<EFBFBD>d. c<EFBFBD>d. syllabus.xml syllabus.xml ID ID
+ + +----+---+
| | | |
comun comun actividades trabajos
+-+-+ +-+-+ +-+-+ +-+-+
| | | | | | | | | | | |
... ... ... ...
*/
/* Config file */
#define Cfg_FILE_CONFIG "swad.cfg"
#define Cfg_MAX_BYTES_DATABASE_PASSWORD 256
#define Cfg_MAX_BYTES_SMTP_PASSWORD 256
2015-01-17 13:31:25 +01:00
/* Folders for institutions, inside public and private swad directories */
#define Cfg_FOLDER_INS "ins" // If not exists, it should be created during installation inside swad private and public directory!
2019-03-20 01:36:36 +01:00
#define Cfg_PATH_INS_PRIVATE Cfg_PATH_SWAD_PRIVATE "/" Cfg_FOLDER_INS
#define Cfg_PATH_INS_PUBLIC Cfg_PATH_SWAD_PUBLIC "/" Cfg_FOLDER_INS
2015-01-17 13:31:25 +01:00
/* Folders for centers, inside public and private swad directories */
2014-12-01 23:55:08 +01:00
#define Cfg_FOLDER_CTR "ctr" // If not exists, it should be created during installation inside swad private and public directory!
2019-03-20 01:36:36 +01:00
#define Cfg_PATH_CTR_PRIVATE Cfg_PATH_SWAD_PRIVATE "/" Cfg_FOLDER_CTR
#define Cfg_PATH_CTR_PUBLIC Cfg_PATH_SWAD_PUBLIC "/" Cfg_FOLDER_CTR
#define Cfg_URL_CTR_PUBLIC Cfg_URL_SWAD_PUBLIC "/" Cfg_FOLDER_CTR
2014-12-01 23:55:08 +01:00
/* Folders for centers, inside public and private swad directories */
2015-01-17 13:31:25 +01:00
#define Cfg_FOLDER_DEG "deg" // If not exists, it should be created during installation inside swad private and public directory!
2019-03-20 01:36:36 +01:00
#define Cfg_PATH_DEG_PRIVATE Cfg_PATH_SWAD_PRIVATE "/" Cfg_FOLDER_DEG
#define Cfg_PATH_DEG_PUBLIC Cfg_PATH_SWAD_PUBLIC "/" Cfg_FOLDER_DEG
2015-01-17 13:31:25 +01:00
2014-12-01 23:55:08 +01:00
/* Folders for courses, inside public and private swad directories */
#define Cfg_FOLDER_CRS "crs" // If not exists, it should be created during installation inside swad private and public directory!
2019-03-20 01:36:36 +01:00
#define Cfg_PATH_CRS_PRIVATE Cfg_PATH_SWAD_PRIVATE "/" Cfg_FOLDER_CRS
#define Cfg_PATH_CRS_PUBLIC Cfg_PATH_SWAD_PUBLIC "/" Cfg_FOLDER_CRS
#define Cfg_URL_CRS_PUBLIC Cfg_URL_SWAD_PUBLIC "/" Cfg_FOLDER_CRS
2014-12-01 23:55:08 +01:00
2017-10-06 15:13:19 +02:00
/* Folders for groups, inside public and private swad directories */
#define Cfg_FOLDER_GRP "grp" // Created automatically the first time it is accessed
2014-12-01 23:55:08 +01:00
/* Folder for users, inside private swad directory */
#define Cfg_FOLDER_USR "usr" // Created automatically the first time it is accessed
2019-03-20 01:36:36 +01:00
#define Cfg_PATH_USR_PRIVATE Cfg_PATH_SWAD_PRIVATE "/" Cfg_FOLDER_USR
2014-12-01 23:55:08 +01:00
2017-10-06 15:13:19 +02:00
/* Folders for projects, inside public and private swad directories */
#define Cfg_FOLDER_PRJ "prj" // Created automatically the first time it is accessed
2014-12-21 14:47:04 +01:00
/* Folder for temporary HTML output of this CGI, inside private swad directory */
2014-12-01 23:55:08 +01:00
#define Cfg_FOLDER_OUT "out" // Created automatically the first time it is accessed
2019-03-20 01:36:36 +01:00
#define Cfg_PATH_OUT_PRIVATE Cfg_PATH_SWAD_PRIVATE "/" Cfg_FOLDER_OUT
2014-12-01 23:55:08 +01:00
/* Folder for temporary public links to file zones, used when displaying file browsers, inside public swad directory */
#define Cfg_FOLDER_FILE_BROWSER_TMP "tmp" // Created automatically the first time it is accessed
2019-03-20 01:36:36 +01:00
#define Cfg_PATH_FILE_BROWSER_TMP_PUBLIC Cfg_PATH_SWAD_PUBLIC "/" Cfg_FOLDER_FILE_BROWSER_TMP
#define Cfg_URL_FILE_BROWSER_TMP_PUBLIC Cfg_URL_SWAD_PUBLIC "/" Cfg_FOLDER_FILE_BROWSER_TMP
2014-12-01 23:55:08 +01:00
/* Folder where temporary files are created for students' marks, inside private swad directory */
#define Cfg_FOLDER_MARK "mark" // Created automatically the first time it is accessed
2019-03-20 01:36:36 +01:00
#define Cfg_PATH_MARK_PRIVATE Cfg_PATH_SWAD_PRIVATE "/" Cfg_FOLDER_MARK
2014-12-01 23:55:08 +01:00
/* Folder for temporary XML files received to import test questions, inside private swad directory */
#define Cfg_FOLDER_TEST "test" // Created automatically the first time it is accessed
2019-03-20 01:36:36 +01:00
#define Cfg_PATH_TEST_PRIVATE Cfg_PATH_SWAD_PRIVATE "/" Cfg_FOLDER_TEST
2014-12-01 23:55:08 +01:00
/* Folder for compression of assignments and works into a zip files, inside private swad directory */
#define Cfg_FOLDER_ZIP "zip" // Created automatically the first time it is accessed
2019-03-20 01:36:36 +01:00
#define Cfg_PATH_ZIP_PRIVATE Cfg_PATH_SWAD_PRIVATE "/" Cfg_FOLDER_ZIP
2014-12-01 23:55:08 +01:00
2019-03-02 21:49:11 +01:00
/* Folders for images/videos inside public and private swad directories */
#define Cfg_FOLDER_MEDIA "med" // Created automatically the first time it is accessed
2019-03-20 01:36:36 +01:00
#define Cfg_PATH_MEDIA_PRIVATE Cfg_PATH_SWAD_PRIVATE "/" Cfg_FOLDER_MEDIA
/* Folders for temporary images/videos inside media directories */
#define Cfg_FOLDER_MEDIA_TMP "tmp" // Created automatically the first time it is accessed
#define Cfg_PATH_MEDIA_TMP_PRIVATE Cfg_PATH_MEDIA_PRIVATE "/" Cfg_FOLDER_MEDIA_TMP
2016-03-29 13:25:33 +02:00
2014-12-01 23:55:08 +01:00
/* Folders for users' photos inside public and private swad directories */
#define Cfg_FOLDER_PHOTO "photo" // Created automatically the first time it is accessed
2019-03-20 01:36:36 +01:00
#define Cfg_PATH_PHOTO_PRIVATE Cfg_PATH_SWAD_PRIVATE "/" Cfg_FOLDER_PHOTO
#define Cfg_PATH_PHOTO_PUBLIC Cfg_PATH_SWAD_PUBLIC "/" Cfg_FOLDER_PHOTO
#define Cfg_URL_PHOTO_PUBLIC Cfg_URL_SWAD_PUBLIC "/" Cfg_FOLDER_PHOTO
2014-12-01 23:55:08 +01:00
/* Folders for temporary users' photos inside photos directories */
#define Cfg_FOLDER_PHOTO_TMP "tmp" // Created automatically the first time it is accessed
2019-03-20 01:36:36 +01:00
#define Cfg_PATH_PHOTO_TMP_PRIVATE Cfg_PATH_PHOTO_PRIVATE "/" Cfg_FOLDER_PHOTO_TMP
#define Cfg_PATH_PHOTO_TMP_PUBLIC Cfg_PATH_PHOTO_PUBLIC "/" Cfg_FOLDER_PHOTO_TMP
#define Cfg_URL_PHOTO_TMP_PUBLIC Cfg_URL_PHOTO_PUBLIC "/" Cfg_FOLDER_PHOTO_TMP
2014-12-01 23:55:08 +01:00
2016-10-04 02:32:25 +02:00
/* Folder for reports, inside public swad directory */
#define Cfg_FOLDER_REP "rep" // Created automatically the first time it is accessed
2019-03-20 01:36:36 +01:00
#define Cfg_PATH_REP_PUBLIC Cfg_PATH_SWAD_PUBLIC "/" Cfg_FOLDER_REP
#define Cfg_URL_REP_PUBLIC Cfg_URL_SWAD_PUBLIC "/" Cfg_FOLDER_REP
2016-10-04 02:32:25 +02:00
2014-12-01 23:55:08 +01:00
/* Folder for banners, inside public swad directory */
#define Cfg_FOLDER_BANNER "banner" // If not exists, it should be created during installation inside swad public directory!
2019-03-20 01:36:36 +01:00
#define Cfg_URL_BANNER_PUBLIC Cfg_URL_SWAD_PUBLIC "/" Cfg_FOLDER_BANNER
2014-12-01 23:55:08 +01:00
#define Cfg_FOLDER_DEGREE_PHOTO_MEDIAN "mdn_all"
#define Cfg_FOLDER_DEGREE_PHOTO_AVERAGE "avg_all"
/* Folders with icons. They should be created with icons during installation */
#define Cfg_FOLDER_PUBLIC_ICON "icon"
2019-03-20 01:36:36 +01:00
#define Cfg_PATH_ICON_PUBLIC Cfg_PATH_SWAD_PUBLIC "/" Cfg_FOLDER_PUBLIC_ICON
#define Cfg_URL_ICON_PUBLIC Cfg_URL_SWAD_PUBLIC "/" Cfg_FOLDER_PUBLIC_ICON
#define Cfg_ICON_FOLDER_THEMES "theme" // Directory with all images for each theme
2019-03-20 01:36:36 +01:00
#define Cfg_URL_ICON_THEMES_PUBLIC Cfg_URL_ICON_PUBLIC "/" Cfg_ICON_FOLDER_THEMES
#define Cfg_ICON_FOLDER_SETS "iconset" // Directory with all icons for each icon set
2019-03-20 01:36:36 +01:00
#define Cfg_PATH_ICON_SETS_PUBLIC Cfg_PATH_ICON_PUBLIC "/" Cfg_ICON_FOLDER_SETS
#define Cfg_URL_ICON_SETS_PUBLIC Cfg_URL_ICON_PUBLIC "/" Cfg_ICON_FOLDER_SETS
2014-12-01 23:55:08 +01:00
#define Cfg_ICON_FOLDER_COUNTRIES "country" // Directory with icons for countries
2019-03-20 01:36:36 +01:00
#define Cfg_PATH_ICON_COUNTRIES_PUBLIC Cfg_PATH_ICON_PUBLIC "/" Cfg_ICON_FOLDER_COUNTRIES
#define Cfg_URL_ICON_COUNTRIES_PUBLIC Cfg_URL_ICON_PUBLIC "/" Cfg_ICON_FOLDER_COUNTRIES
2014-12-01 23:55:08 +01:00
#define Cfg_ICON_FOLDER_FILEXT "filext" // Directory with icons for file extensions
2019-03-20 01:36:36 +01:00
#define CfG_URL_ICON_FILEXT_PUBLIC Cfg_URL_ICON_PUBLIC "/" Cfg_ICON_FOLDER_FILEXT
2014-12-01 23:55:08 +01:00
#define Cfg_ICON_FOLDER_PLUGINS "plugin" // Directory with icons for plugins
2019-03-20 01:36:36 +01:00
#define Cfg_URL_ICON_PLUGINS_PUBLIC Cfg_URL_ICON_PUBLIC "/" Cfg_ICON_FOLDER_PLUGINS
2014-12-01 23:55:08 +01:00
/* Folders and file used to store syllabus */
#define Cfg_SYLLABUS_FOLDER_LECTURES "lec"
#define Cfg_SYLLABUS_FOLDER_PRACTICALS "pra"
#define Cfg_SYLLABUS_FILENAME "syllabus.xml"
/* Main folders in file browsers */
#define Cfg_CRS_INFO_INTRODUCTION "intro"
#define Cfg_CRS_INFO_TEACHING_GUIDE "description"
#define Cfg_CRS_INFO_LECTURES "teoria"
#define Cfg_CRS_INFO_PRACTICALS "practicas"
#define Cfg_CRS_INFO_BIBLIOGRAPHY "bibliografia"
#define Cfg_CRS_INFO_FAQ "FAQ"
#define Cfg_CRS_INFO_LINKS "enlaces"
#define Cfg_CRS_INFO_ASSESSMENT "evaluacion"
/* RSS folders and files */
#define Cfg_RSS_FOLDER "rss"
#define Cfg_RSS_FILE "rss.xml"
#define Cfg_RSS_LANGUAGE "es-es"
/* Data protection policy folder
This folder, and an index.html file inside it, must be created during installation */
#define Cfg_DATA_PROTECTION_FOLDER "data_protection"
2019-03-20 01:36:36 +01:00
#define Cfg_URL_DATA_PROTECTION_PUBLIC Cfg_URL_SWAD_PUBLIC "/" Cfg_DATA_PROTECTION_FOLDER
2014-12-01 23:55:08 +01:00
/* HTML file weitten at foot of page */
#define Cfg_PATH_AND_FILE_REL_HTML_PRIVATE "./foot.html"
2015-04-09 12:09:44 +02:00
/* Comment the following line if you do not want a local copy of MathJax */
#define Cfg_MATHJAX_LOCAL
2014-12-01 23:55:08 +01:00
/*****************************************************************************/
/************************ Commands called by this CGI ************************/
/*****************************************************************************/
/* Template for chat window. It should be copied during installation */
#define Cfg_PATH_AND_FILE_REL_CHAT_PRIVATE "./chat.html"
/* Command to make image processing / face detection, programmed by Daniel J. Calandria-Hern<72>ndez */
// %s must be substituted by temporary file with the image received:
2018-10-04 21:57:25 +02:00
#define Cfg_COMMAND_FACE_DETECTION "./fotomaton cascade.xml %s 540"
2014-12-01 23:55:08 +01:00
/* Commands to compute the average photo of a degree */
#define Cfg_COMMAND_DEGREE_PHOTO_MEDIAN "./foto_mediana"
#define Cfg_COMMAND_DEGREE_PHOTO_AVERAGE "./foto_promedio"
2016-11-16 23:19:52 +01:00
/* Command to send automatic emails, programmed by Antonio F. D<>az-Garc<72>a and Antonio Ca<43>as-Vargas */
#define Cfg_COMMAND_SEND_AUTOMATIC_EMAIL "./swad_smtp.py"
2014-12-01 23:55:08 +01:00
/*****************************************************************************/
/******************************** Time periods *******************************/
/*****************************************************************************/
#define Cfg_LOG_START_MONTH 01 // Month where the log started in the database
#define Cfg_LOG_START_DAY 01 // Day where the log started in the database
2017-02-25 13:49:03 +01:00
#define Cfg_DAYS_IN_RECENT_LOG 15 // Only accesses in these last days + 1 are stored in recent log.
2014-12-01 23:55:08 +01:00
// Important!!! Must be 1 <= Cfg_DAYS_IN_RECENT_LOG <= 29
2015-10-31 14:27:15 +01:00
#define Cfg_TIMES_PER_SECOND_REFRESH_CONNECTED 2 // Execute this CGI to refresh connected users about these times per second
2017-01-28 15:58:46 +01:00
#define Cfg_MIN_TIME_TO_REFRESH_CONNECTED ((time_t)( 60UL)) // Refresh period of connected users in seconds
#define Cfg_MAX_TIME_TO_REFRESH_CONNECTED ((time_t)( 15UL * 60UL)) // Refresh period of connected users in seconds
2017-11-30 10:08:37 +01:00
#define Cfg_TIME_TO_CLOSE_SESSION_FROM_LAST_REFRESH ((time_t)(Cfg_MAX_TIME_TO_REFRESH_CONNECTED * 4)) // After these seconds without refresh of connected users, session is closed
#define Cfg_TIME_TO_CLOSE_SESSION_FROM_LAST_CLICK ((time_t)( 8 * 60UL * 60UL)) // After these seconds without user's clicks, session is closed
2014-12-01 23:55:08 +01:00
2019-03-13 10:23:41 +01:00
#define Cfg_TIME_TO_REFRESH_TIMELINE ((time_t)( 2UL * 1000UL)) // Initial refresh period of social timeline in miliseconds
2019-03-13 09:55:23 +01:00
// This delay is increased 1 second on each refresh
2019-07-16 22:33:28 +02:00
2019-12-13 00:36:01 +01:00
#define Cfg_SECONDS_TO_REFRESH_MATCH_TCH 1 // Refresh period of match being played in seconds (for teachers)
#define Cfg_SECONDS_TO_REFRESH_MATCH_STD 3 // Refresh period of match being played in seconds (for students)
2019-10-01 21:18:53 +02:00
#define Cfg_TIME_TO_REFRESH_MATCH_TCH ((time_t)(Cfg_SECONDS_TO_REFRESH_MATCH_TCH * 1000UL)) // Refresh period of match being played in miliseconds (for teachers)
#define Cfg_TIME_TO_REFRESH_MATCH_STD ((time_t)(Cfg_SECONDS_TO_REFRESH_MATCH_STD * 1000UL)) // Refresh period of match being played in miliseconds (for students)
2019-05-22 09:36:18 +02:00
#define Cfg_TIME_TO_REFRESH_LAST_CLICKS ((time_t)( 1UL * 1000UL)) // Refresh period of last clicks in miliseconds
2016-01-09 15:00:14 +01:00
2017-02-05 22:23:41 +01:00
#define Cfg_TIME_TO_CHANGE_BANNER ((time_t)( 2UL * 60UL)) // After these seconds, change banner
2014-12-01 23:55:08 +01:00
#define Cfg_NUMBER_OF_BANNERS 1 // Number of banners to show simultaneously
#define Cfg_TIME_TO_DELETE_API_KEY ((time_t)( 7UL * 24UL * 60UL * 60UL)) // After these seconds, a web service key is removed
2014-12-01 23:55:08 +01:00
2017-01-28 15:58:46 +01:00
#define Cfg_TIME_TO_DELETE_HTML_OUTPUT ((time_t)( 30UL * 60UL)) // Remove the HTML output files older than these seconds
2014-12-01 23:55:08 +01:00
2017-01-28 15:58:46 +01:00
#define Cfg_TIME_TO_ABORT_FILE_UPLOAD ((time_t)( 55UL * 60UL)) // After these seconds uploading data, abort upload.
2014-12-01 23:55:08 +01:00
2017-01-28 15:58:46 +01:00
#define Cfg_TIME_TO_DELETE_BROWSER_TMP_FILES ((time_t)( 2UL * 60UL * 60UL)) // Temporary files are deleted after these seconds
#define Cfg_TIME_TO_DELETE_BROWSER_EXPANDED_FOLDERS ((time_t)( 7UL * 24UL * 60UL * 60UL)) // Past these seconds, remove expired expanded folders
#define Cfg_TIME_TO_DELETE_BROWSER_CLIPBOARD ((time_t)( 15UL * 60UL)) // Paths older than these seconds are removed from clipboard
#define Cfg_TIME_TO_DELETE_BROWSER_ZIP_FILES ((time_t)( 2UL * 60UL * 60UL)) // Temporary zip files are deleted after these seconds
2014-12-01 23:55:08 +01:00
2017-01-28 15:58:46 +01:00
#define Cfg_TIME_TO_DELETE_MARKS_TMP_FILES ((time_t)( 2UL * 60UL * 60UL)) // Temporary files with students' marks are deleted after these seconds
2014-12-01 23:55:08 +01:00
2017-01-28 15:58:46 +01:00
#define Cfg_TIME_TO_DELETE_PARAMS_TO_COMMANDS ((time_t)( 15UL * 60UL)) // Temporary files with params to commands are deleted after these seconds
2014-12-01 23:55:08 +01:00
2019-03-20 01:36:36 +01:00
#define Cfg_TIME_TO_DELETE_MEDIA_TMP_FILES ((time_t)( 2UL * 60UL * 60UL)) // Temporary files related to images after these seconds
2017-01-28 15:58:46 +01:00
#define Cfg_TIME_TO_DELETE_PHOTOS_TMP_FILES ((time_t)( 2UL * 60UL * 60UL)) // Temporary files related to photos after these seconds
2014-12-01 23:55:08 +01:00
2017-01-28 15:58:46 +01:00
#define Cfg_TIME_TO_DELETE_TEST_TMP_FILES ((time_t)( 2UL * 60UL * 60UL)) // Temporary files related to imported test questions after these seconds
2014-12-01 23:55:08 +01:00
2017-03-30 11:20:06 +02:00
#define Cfg_TIME_TO_DELETE_ENROLMENT_REQUESTS ((time_t)(30UL * 24UL * 60UL * 60UL)) // Past these seconds, remove expired enrolment requests
2016-03-27 20:33:39 +02:00
2017-01-28 15:58:46 +01:00
#define Cfg_TIME_TO_DELETE_THREAD_CLIPBOARD ((time_t)( 15UL * 60UL)) // Threads older than these seconds are removed from clipboard
2014-12-01 23:55:08 +01:00
2017-01-28 15:58:46 +01:00
#define Cfg_TIME_TO_DELETE_OLD_PENDING_PASSWORDS ((time_t)( 24UL * 60UL * 60UL)) // Past these seconds, remove expired pending passwords
#define Cfg_TIME_TO_DELETE_OLD_PENDING_EMAILS ((time_t)( 24UL * 60UL * 60UL)) // Past these seconds, remove expired pending emails
2014-12-01 23:55:08 +01:00
2019-03-26 11:53:21 +01:00
#define Cfg_TIME_TO_DELETE_IP_PREFS ((time_t)( 7UL * 24UL * 60UL * 60UL)) // Past these seconds, remove expired IP settings
2014-12-01 23:55:08 +01:00
2017-01-28 15:58:46 +01:00
#define Cfg_TIME_TO_DELETE_OLD_NOTIF ((time_t)(30UL * 24UL * 60UL * 60UL)) // Past these seconds, remove expired notifications
2014-12-01 23:55:08 +01:00
#define Cfg_MIN_TIME_TO_RECOMPUTE_AVG_PHOTO ((time_t)( 0 * 60UL * 60UL)) // After these seconds, users can recompute the average photos of a degree
2014-12-01 23:55:08 +01:00
2019-04-03 22:08:44 +02:00
#define Cfg_MAX_TIME_TO_REMEMBER_LAST_ACTION_ON_LOGIN ((time_t)( 2UL * 60UL * 60UL)) // On login, if interval since last action is less than this time, remember last action
2019-04-03 21:49:10 +02:00
2014-12-01 23:55:08 +01:00
/*****************************************************************************/
/***************************** Public prototypes *****************************/
/*****************************************************************************/
void Cfg_GetConfigFromFile (void);
const char *Cfg_GetDatabasePassword (void);
const char *Cfg_GetSMTPPassword (void);
2014-12-01 23:55:08 +01:00
#endif