files-shared-config-default-tce-config

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

tce_config.php

Tags
file

Shared configuration file.

brief

TCExam Main Configuration

author

Nicola Asuni

since
2002-02-24

Table of Contents

Constants

K_ANSWER_TEXTAREA_COLS  = 70
Number of columns for answer textarea.
K_ANSWER_TEXTAREA_ROWS  = 15
Number of rows for answer textarea.
K_AVAILABLE_LANGUAGES  = \serialize(array('ar' => 'Arabian', 'az' => 'Azerbaijani', 'bg' => 'Bulgarian', 'br' => 'Brazilian Portuguese', 'cn' => 'Chinese', 'de' => 'German', 'el' => 'Greek', 'en' => 'English', 'es' => 'Spanish', 'fa' => 'Farsi', 'fr' => 'French', 'he' => 'Hebrew', 'hi' => 'Hindi', 'hu' => 'Hungarian', 'id' => 'Indonesian', 'it' => 'Italian', 'jp' => 'Japanese', 'mr' => 'Marathi', 'ms' => 'Malay (Bahasa Melayu)', 'nl' => 'Dutch', 'pl' => 'Polish', 'ro' => 'Romanian', 'ru' => 'Russian', 'tr' => 'Turkish', 'ur' => 'Urdu', 'vn' => 'Vietnamese'))
Defines a serialized array of available languages.
K_BRUTE_FORCE_DELAY_RATIO  = 2
Ratio at which the delay will be increased after every failed login attempt.
K_CHECK_SESSION_FINGERPRINT  = \true
If true, check for possible session hijacking (set to false if you have login problems).
K_COOKIE_DOMAIN  = ''
Cookie domain.
K_COOKIE_EXPIRE  = \K_SECONDS_IN_DAY
Expiration time for cookies.
K_COOKIE_HTTPONLY  = \true
When true the cookie will be made accessible only through the HTTP protocol.
K_COOKIE_PATH  = '/'
Cookie path.
K_COOKIE_SAMESITE  = 'Strict'
The SameSite attribute lets servers specify whether/when cookies are sent with cross-site requests.
K_COOKIE_SECURE  = \true
If true use secure cookies.
K_CUSTOM_AUTH_METHODS  = \serialize(array())
Lisf of enabled custom authentication methods.
K_DISPLAY_TEST_DESCRIPTION  = \true
If true display test description before executing the test.
K_ENABLE_ANSWER_EXPLANATION  = \true
If true enable explanation field for answers.
K_ENABLE_JSERRORS  = \false
If true display messages and errors on Javascript popup window.
K_ENABLE_QUESTION_EXPLANATION  = \true
If true enable explanation field for questions.
K_ENABLE_VIRTUAL_KEYBOARD  = \true
If true enable virtual keyboard on some textarea fields.
K_ERROR_TYPES  = \E_ALL | \E_STRICT
Define error reporting types for debug.
K_EXTEND_TIME_MINUTES  = 5
Default minutes used to extend test duration.
K_LANGUAGE  = 'en'
2-letters code for default language.
K_LANGUAGE_SELECTOR  = \true
If true, display a language selector.
K_LOGOUT_URL  = ''
URL to be redirected at logout (leave empty for default).
K_OTP_LOGIN  = \false
If true enable One-Time-Password authentication on login.
K_PASSWORD_RESET  = \true
If true enable password reset feature.
K_QUESTION_DIFFICULTY_LEVELS  = 10
Number of difficulty levels for questions.
K_QUESTION_LINE_MAX_LENGTH  = 70
Define max line length in chars for question navigator on test execution interface.
K_REDIRECT_LOGIN_MODE  = 4
Various pages redirection modes after login (valid values are 1, 2, 3 and 4).
K_SESSION_LIFE  = \K_SECONDS_IN_HOUR
User's session life time in seconds.
K_SHORT_ANSWERS_BINARY  = \false
If true compare short answers in binary mode.
K_TCEXAM_VERSION  = \file_get_contents('../../VERSION')
TCExam version (do not change).
K_TEST_INFO_HEIGHT  = 400
Popup window height in pixels for test info.
K_TEST_INFO_WIDTH  = 700
Popup window width in pixels for test info.
K_TIMESTAMP_FORMAT  = 'Y-m-d H:i:s'
Define timestamp format using PHP notation (do not change).
K_TIMEZONE  = 'UTC'
Set your own timezone here.
K_USE_ERROR_LOG  = \false
Enable error logs (../log/tce_errors.log).
K_USER_GROUP_RSYNC  = \false
When an alternate authentication method is used, if this constant is true the default user groups for the selected authentication method are always added to the user.
PHP_VERSION_ID  = $version[0] * 10000 + $version[2] * 100 + $version[4]

Functions

addSlashesArray()  : array<string|int, mixed>|string
Escape strings with backslashes before characters that need to be escaped.

Constants

K_ANSWER_TEXTAREA_COLS

Number of columns for answer textarea.

public mixed K_ANSWER_TEXTAREA_COLS = 70

K_ANSWER_TEXTAREA_ROWS

Number of rows for answer textarea.

public mixed K_ANSWER_TEXTAREA_ROWS = 15

K_AVAILABLE_LANGUAGES

Defines a serialized array of available languages.

public mixed K_AVAILABLE_LANGUAGES = \serialize(array('ar' => 'Arabian', 'az' => 'Azerbaijani', 'bg' => 'Bulgarian', 'br' => 'Brazilian Portuguese', 'cn' => 'Chinese', 'de' => 'German', 'el' => 'Greek', 'en' => 'English', 'es' => 'Spanish', 'fa' => 'Farsi', 'fr' => 'French', 'he' => 'Hebrew', 'hi' => 'Hindi', 'hu' => 'Hungarian', 'id' => 'Indonesian', 'it' => 'Italian', 'jp' => 'Japanese', 'mr' => 'Marathi', 'ms' => 'Malay (Bahasa Melayu)', 'nl' => 'Dutch', 'pl' => 'Polish', 'ro' => 'Romanian', 'ru' => 'Russian', 'tr' => 'Turkish', 'ur' => 'Urdu', 'vn' => 'Vietnamese'))

Each language is indexed using a 2-letters code (ISO 639).

K_BRUTE_FORCE_DELAY_RATIO

Ratio at which the delay will be increased after every failed login attempt.

public mixed K_BRUTE_FORCE_DELAY_RATIO = 2

K_CHECK_SESSION_FINGERPRINT

If true, check for possible session hijacking (set to false if you have login problems).

public mixed K_CHECK_SESSION_FINGERPRINT = \true

Cookie domain.

public mixed K_COOKIE_DOMAIN = ''

Expiration time for cookies.

public mixed K_COOKIE_EXPIRE = \K_SECONDS_IN_DAY

When true the cookie will be made accessible only through the HTTP protocol.

public mixed K_COOKIE_HTTPONLY = \true

Cookie path.

public mixed K_COOKIE_PATH = '/'

The SameSite attribute lets servers specify whether/when cookies are sent with cross-site requests.

public mixed K_COOKIE_SAMESITE = 'Strict'

If true use secure cookies.

public mixed K_COOKIE_SECURE = \true

K_CUSTOM_AUTH_METHODS

Lisf of enabled custom authentication methods.

public mixed K_CUSTOM_AUTH_METHODS = \serialize(array())

Add your custom authentication methods here.

K_DISPLAY_TEST_DESCRIPTION

If true display test description before executing the test.

public mixed K_DISPLAY_TEST_DESCRIPTION = \true

K_ENABLE_ANSWER_EXPLANATION

If true enable explanation field for answers.

public mixed K_ENABLE_ANSWER_EXPLANATION = \true

K_ENABLE_JSERRORS

If true display messages and errors on Javascript popup window.

public mixed K_ENABLE_JSERRORS = \false

K_ENABLE_QUESTION_EXPLANATION

If true enable explanation field for questions.

public mixed K_ENABLE_QUESTION_EXPLANATION = \true

K_ENABLE_VIRTUAL_KEYBOARD

If true enable virtual keyboard on some textarea fields.

public mixed K_ENABLE_VIRTUAL_KEYBOARD = \true

K_ERROR_TYPES

Define error reporting types for debug.

public mixed K_ERROR_TYPES = \E_ALL | \E_STRICT

K_EXTEND_TIME_MINUTES

Default minutes used to extend test duration.

public mixed K_EXTEND_TIME_MINUTES = 5

K_LANGUAGE

2-letters code for default language.

public mixed K_LANGUAGE = 'en'

K_LANGUAGE_SELECTOR

If true, display a language selector.

public mixed K_LANGUAGE_SELECTOR = \true

K_LOGOUT_URL

URL to be redirected at logout (leave empty for default).

public mixed K_LOGOUT_URL = ''

K_OTP_LOGIN

If true enable One-Time-Password authentication on login.

public mixed K_OTP_LOGIN = \false

K_PASSWORD_RESET

If true enable password reset feature.

public mixed K_PASSWORD_RESET = \true

K_QUESTION_DIFFICULTY_LEVELS

Number of difficulty levels for questions.

public mixed K_QUESTION_DIFFICULTY_LEVELS = 10

K_QUESTION_LINE_MAX_LENGTH

Define max line length in chars for question navigator on test execution interface.

public mixed K_QUESTION_LINE_MAX_LENGTH = 70

K_REDIRECT_LOGIN_MODE

Various pages redirection modes after login (valid values are 1, 2, 3 and 4).

public mixed K_REDIRECT_LOGIN_MODE = 4

1 = relative redirect. 2 = absolute redirect. 3 = html redirect. 4 = full redirect.

K_SESSION_LIFE

User's session life time in seconds.

public mixed K_SESSION_LIFE = \K_SECONDS_IN_HOUR

K_SHORT_ANSWERS_BINARY

If true compare short answers in binary mode.

public mixed K_SHORT_ANSWERS_BINARY = \false

K_TCEXAM_VERSION

TCExam version (do not change).

public mixed K_TCEXAM_VERSION = \file_get_contents('../../VERSION')

K_TEST_INFO_HEIGHT

Popup window height in pixels for test info.

public mixed K_TEST_INFO_HEIGHT = 400

K_TEST_INFO_WIDTH

Popup window width in pixels for test info.

public mixed K_TEST_INFO_WIDTH = 700

K_TIMESTAMP_FORMAT

Define timestamp format using PHP notation (do not change).

public mixed K_TIMESTAMP_FORMAT = 'Y-m-d H:i:s'

K_TIMEZONE

Set your own timezone here.

public mixed K_TIMEZONE = 'UTC'

Possible values are listed on: http://php.net/manual/en/timezones.php

K_USE_ERROR_LOG

Enable error logs (../log/tce_errors.log).

public mixed K_USE_ERROR_LOG = \false

K_USER_GROUP_RSYNC

When an alternate authentication method is used, if this constant is true the default user groups for the selected authentication method are always added to the user.

public mixed K_USER_GROUP_RSYNC = \false

PHP_VERSION_ID

public mixed PHP_VERSION_ID = $version[0] * 10000 + $version[2] * 100 + $version[4]

Functions

addSlashesArray()

Escape strings with backslashes before characters that need to be escaped.

addSlashesArray( $data) : array<string|int, mixed>|string

These characters are single quote ('), double quote ("), backslash () and NUL (the NULL byte).

Parameters
$data :

(array|string) String or array to escape

Return values
array<string|int, mixed>|string
On this page
 

© 2004-2024 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy