API Documentation

API Documentation namespace reference

Table of contents

Constants

FORCE_CURL

File: tce_functions_email_reports.php line 119

public mixed FORCE_CURL = true

File: tce_auth.php line 70

public mixed K_ADMIN_LINK = 5

K_ADMIN_THEME

File: tce_config.php line 117

public mixed K_ADMIN_THEME = 'default'

K_ALLOWED_ERROR_TAGS

File: tce_functions_errmsg.php line 32

public mixed K_ALLOWED_ERROR_TAGS = '<a><b><br><em><p><ol><ul><li><small><table><tr><th><td>'

K_ALLOWED_UPLOAD_EXTENSIONS

File: tce_config.php line 50

public mixed K_ALLOWED_UPLOAD_EXTENSIONS = \serialize(['csv', 'tsv', 'xml', 'txt', 'png', 'gif', 'jpg', 'jpeg', 'svg', 'mp3', 'mid', 'oga', 'ogg', 'wav', 'wma', 'avi', 'flv', 'm2v', 'mpeg', 'mpeg4', 'mpg', 'mpg2', 'mpv', 'ogm', 'ogv', 'vid', 'pfx', 'pem', 'crt'])

FOR SERVER SECURITY DO NOT ADD EXECUTABLE FILE TYPES HERE

K_ANSWER_TEXTAREA_COLS

File: tce_config.php line 104

public mixed K_ANSWER_TEXTAREA_COLS = 70

K_ANSWER_TEXTAREA_ROWS

File: tce_config.php line 109

public mixed K_ANSWER_TEXTAREA_ROWS = 15

K_AUTH_ADMIN_ANSWERS

File: tce_auth.php line 105

public mixed K_AUTH_ADMIN_ANSWERS = \K_AUTH_OPERATOR

K_AUTH_ADMIN_DIRS

File: tce_auth.php line 160

public mixed K_AUTH_ADMIN_DIRS = \K_AUTH_OPERATOR

K_AUTH_ADMIN_FILEMANAGER

File: tce_auth.php line 155

public mixed K_AUTH_ADMIN_FILEMANAGER = \K_AUTH_OPERATOR

K_AUTH_ADMIN_GROUPS

File: tce_auth.php line 70

public mixed K_AUTH_ADMIN_GROUPS = \K_AUTH_ADMINISTRATOR

K_AUTH_ADMIN_IMPORT

File: tce_auth.php line 140

public mixed K_AUTH_ADMIN_IMPORT = \K_AUTH_ADMINISTRATOR

K_AUTH_ADMIN_INFO

File: tce_auth.php line 115

public mixed K_AUTH_ADMIN_INFO = 0

K_AUTH_ADMIN_MODULES

File: tce_auth.php line 90

public mixed K_AUTH_ADMIN_MODULES = \K_AUTH_OPERATOR

K_AUTH_ADMIN_OMR_IMPORT

File: tce_auth.php line 145

public mixed K_AUTH_ADMIN_OMR_IMPORT = \K_AUTH_OPERATOR

K_AUTH_ADMIN_ONLINE_USERS

File: tce_auth.php line 120

public mixed K_AUTH_ADMIN_ONLINE_USERS = \K_AUTH_OPERATOR

K_AUTH_ADMIN_QUESTIONS

File: tce_auth.php line 100

public mixed K_AUTH_ADMIN_QUESTIONS = \K_AUTH_OPERATOR

K_AUTH_ADMIN_RATING

File: tce_auth.php line 130

public mixed K_AUTH_ADMIN_RATING = \K_AUTH_OPERATOR

K_AUTH_ADMIN_RESULTS

File: tce_auth.php line 135

public mixed K_AUTH_ADMIN_RESULTS = \K_AUTH_OPERATOR

K_AUTH_ADMIN_SSLCERT

File: tce_auth.php line 175

public mixed K_AUTH_ADMIN_SSLCERT = \K_AUTH_OPERATOR

K_AUTH_ADMIN_SUBJECTS

File: tce_auth.php line 95

public mixed K_AUTH_ADMIN_SUBJECTS = \K_AUTH_OPERATOR

K_AUTH_ADMIN_TCECODE

File: tce_auth.php line 85

public mixed K_AUTH_ADMIN_TCECODE = \K_AUTH_OPERATOR

K_AUTH_ADMIN_TESTS

File: tce_auth.php line 110

public mixed K_AUTH_ADMIN_TESTS = \K_AUTH_OPERATOR

K_AUTH_ADMIN_UPLOAD_IMAGES

File: tce_auth.php line 125

public mixed K_AUTH_ADMIN_UPLOAD_IMAGES = \K_AUTH_OPERATOR

K_AUTH_ADMIN_USERS

File: tce_auth.php line 50

public mixed K_AUTH_ADMIN_USERS = \K_AUTH_ADMINISTRATOR

K_AUTH_ADMINISTRATOR

File: tce_auth.php line 35

public mixed K_AUTH_ADMINISTRATOR = 10

K_AUTH_BACKUP

File: tce_auth.php line 150

public mixed K_AUTH_BACKUP = \K_AUTH_ADMINISTRATOR

K_AUTH_DELETE_GROUPS

File: tce_auth.php line 75

public mixed K_AUTH_DELETE_GROUPS = \K_AUTH_ADMINISTRATOR

K_AUTH_DELETE_MEDIAFILE

File: tce_auth.php line 165

public mixed K_AUTH_DELETE_MEDIAFILE = \K_AUTH_OPERATOR

K_AUTH_DELETE_USERS

File: tce_auth.php line 55

public mixed K_AUTH_DELETE_USERS = \K_AUTH_ADMINISTRATOR

K_AUTH_EXPORT_USERS

File: tce_auth.php line 60

public mixed K_AUTH_EXPORT_USERS = \K_AUTH_ADMINISTRATOR

K_AUTH_IMPORT_USERS

File: tce_auth.php line 65

public mixed K_AUTH_IMPORT_USERS = \K_AUTH_ADMINISTRATOR

K_AUTH_INDEX

File: tce_auth.php line 45

public mixed K_AUTH_INDEX = \K_AUTH_OPERATOR

K_AUTH_MOVE_GROUPS

File: tce_auth.php line 80

public mixed K_AUTH_MOVE_GROUPS = \K_AUTH_ADMINISTRATOR

K_AUTH_OPERATOR

File: tce_auth.php line 40

public mixed K_AUTH_OPERATOR = 5

K_AUTH_PAGE_USER

File: tce_auth.php line 55

public mixed K_AUTH_PAGE_USER = 1

K_AUTH_PUBLIC_INDEX

File: tce_auth.php line 35

public mixed K_AUTH_PUBLIC_INDEX = 1

K_AUTH_PUBLIC_TEST_EXECUTE

File: tce_auth.php line 40

public mixed K_AUTH_PUBLIC_TEST_EXECUTE = 1

K_AUTH_PUBLIC_TEST_INFO

File: tce_auth.php line 45

public mixed K_AUTH_PUBLIC_TEST_INFO = 1

K_AUTH_PUBLIC_TEST_RESULTS

File: tce_auth.php line 50

public mixed K_AUTH_PUBLIC_TEST_RESULTS = 1

K_AUTH_RENAME_MEDIAFILE

File: tce_auth.php line 170

public mixed K_AUTH_RENAME_MEDIAFILE = \K_AUTH_OPERATOR

K_AUTH_SSL_LEVEL

File: tce_auth.php line 183

public mixed K_AUTH_SSL_LEVEL = \false

Use false or a level above 10 to disable the control. Use 0 to enable for all area. Use 10 to enable just for the ADMIN pages.

K_AUTH_SSL_LEVEL

File: tce_auth.php line 78

public mixed K_AUTH_SSL_LEVEL = \false

Use false or a level above 10 to disable the control. Use 0 to enable for all area. Use 10 to enable just for the ADMIN pages.

K_AUTH_SSLIDS

File: tce_auth.php line 189

public mixed K_AUTH_SSLIDS = ''

K_AUTH_SSLIDS

File: tce_auth.php line 84

public mixed K_AUTH_SSLIDS = ''

K_AUTH_USER_CHANGE_EMAIL

File: tce_auth.php line 60

public mixed K_AUTH_USER_CHANGE_EMAIL = 1

K_AUTH_USER_CHANGE_PASSWORD

File: tce_auth.php line 65

public mixed K_AUTH_USER_CHANGE_PASSWORD = 1

K_AVAILABLE_FONTS

File: tce_config.php line 196

public mixed K_AVAILABLE_FONTS = \serialize(['courier' => 'courier', 'helvetica' => 'helvetica', 'times' => 'times', 'symbol' => 'symbol', 'zapfdingbats' => 'zapfdingbats', 'DejaVuSans' => 'dejavusans,sans', 'DejaVuSansCondensed' => 'dejavusanscondensed,sans', 'DejaVuSansMono' => 'dejavusansmono,monospace', 'DejaVuSerif' => 'dejavuserif,serif', 'DejaVuSerifCondensed' => 'dejavuserifcondensed,serif', 'FreeMono' => 'freemono,monospace', 'FreeSans' => 'freesans,sans', 'FreeSerif' => 'freeserif,serif'])

K_AVAILABLE_LANGUAGES

File: tce_config.php line 43

public mixed K_AVAILABLE_LANGUAGES = \serialize(['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_BLANK_IMAGE

File: tce_paths.php line 140

public mixed K_BLANK_IMAGE = \K_PATH_IMAGES . '_blank.png'

K_BRUTE_FORCE_DELAY_RATIO

File: tce_config.php line 84

public mixed K_BRUTE_FORCE_DELAY_RATIO = 2

K_CAS_ENABLED

File: tce_cas.php line 32

public mixed K_CAS_ENABLED = \false

K_CAS_HOST

File: tce_cas.php line 43

public mixed K_CAS_HOST = ''

K_CAS_PATH

File: tce_cas.php line 57

public mixed K_CAS_PATH = '/cas'

Some setups don’t place the CAS application in the webserver’s root directory and we can specify where to find the CAS application. Default is ‘’.

K_CAS_PORT

File: tce_cas.php line 49

public mixed K_CAS_PORT = 443

Defaults to 443

K_CAS_SERVICE_BASE_URL

File: tce_cas.php line 65

public mixed K_CAS_SERVICE_BASE_URL = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || ($_SERVER['SERVER_PORT'] ?? \null) == 443 ? 'https://' : 'http://') . ($_SERVER['HTTP_HOST'] ?? 'localhost')

Required since phpCAS 1.6. Defaults to the current request scheme + host; override with an explicit value if TCExam runs behind a proxy or on a custom URL (e.g. ‘https://www.example.com ’).

K_CAS_USER_GROUP_ID

File: tce_cas.php line 85

public mixed K_CAS_USER_GROUP_ID = 1

You can also set 0 for all available groups or a string containing a comma-separated list of group IDs.

K_CAS_USER_LEVEL

File: tce_cas.php line 78

public mixed K_CAS_USER_LEVEL = 1

K_CAS_VERSION

File: tce_cas.php line 38

public mixed K_CAS_VERSION = '2.0'

Defaults to CAS_VERSION_2_0

K_CHECK_SESSION_FINGERPRINT

File: tce_config.php line 156

public mixed K_CHECK_SESSION_FINGERPRINT = \true

K_CLOCK_IN_UTC

File: tce_config.php line 132

public mixed K_CLOCK_IN_UTC = \false

File: tce_config.php line 163

public mixed K_COOKIE_DOMAIN = ''

File: tce_config.php line 188

public mixed K_COOKIE_EXPIRE = \K_SECONDS_IN_DAY

File: tce_config.php line 178

public mixed K_COOKIE_HTTPONLY = \true

File: tce_config.php line 168

public mixed K_COOKIE_PATH = '/'

File: tce_config.php line 183

public mixed K_COOKIE_SAMESITE = 'Strict'

File: tce_config.php line 173

public mixed K_COOKIE_SECURE = \true

K_CUSTOM_AUTH_BASIC_PASSWORD_HASH

File: basic.php line 15

public mixed K_CUSTOM_AUTH_BASIC_PASSWORD_HASH = ''

K_CUSTOM_AUTH_BASIC_USER_GROUP_ID

File: basic.php line 25

public mixed K_CUSTOM_AUTH_BASIC_USER_GROUP_ID = 1

K_CUSTOM_AUTH_BASIC_USER_LEVEL

File: basic.php line 20

public mixed K_CUSTOM_AUTH_BASIC_USER_LEVEL = 1

K_CUSTOM_AUTH_BASIC_USERNAME

File: basic.php line 10

public mixed K_CUSTOM_AUTH_BASIC_USERNAME = ''

K_CUSTOM_AUTH_METHODS

File: tce_config.php line 306

public mixed K_CUSTOM_AUTH_METHODS = \serialize([])

Add your custom authentication methods here.

K_DATABASE_HOST

File: tce_db_config.php line 31

public mixed K_DATABASE_HOST = ''

K_DATABASE_NAME

File: tce_db_config.php line 45

public mixed K_DATABASE_NAME = ''

K_DATABASE_PORT

File: tce_db_config.php line 40

public mixed K_DATABASE_PORT = ''

NOTE: For MYSQL database type, set this constant to NULL to be able to use the MySQL socket path defined by the mysqli.default_socket PHP value. For example, in Apache: php_value mysqli.default_socket “/path/to/mysql.sock”

K_DATABASE_TYPE

File: tce_db_config.php line 26

public mixed K_DATABASE_TYPE = ''

K_DATABASE_USER_NAME

File: tce_db_config.php line 50

public mixed K_DATABASE_USER_NAME = ''

K_DATABASE_USER_PASSWORD

File: tce_db_config.php line 55

public mixed K_DATABASE_USER_PASSWORD = ''

K_DIGSIG_CERT_TYPE

File: tce_pdf.php line 160

public mixed K_DIGSIG_CERT_TYPE = '1'

Valid values shall be: 1 = No changes to the document shall be permitted; any change to the document shall invalidate the signature; 2 = Permitted changes shall be filling in forms, instantiating page templates, and signing; other changes shall invalidate the signature; 3 = Permitted changes shall be the same as for 2, as well as annotation creation, deletion, and modification; other changes shall invalidate the signature.

K_DIGSIG_CERTIFICATE

File: tce_pdf.php line 136

public mixed K_DIGSIG_CERTIFICATE = 'file://../../shared/config/tcpdf.crt'

K_DIGSIG_CONTACT

File: tce_pdf.php line 180

public mixed K_DIGSIG_CONTACT = 'you@example.com'

K_DIGSIG_ENABLE

File: tce_pdf.php line 131

public mixed K_DIGSIG_ENABLE = \false

K_DIGSIG_EXTRA_CERTS

File: tce_pdf.php line 151

public mixed K_DIGSIG_EXTRA_CERTS = ''

K_DIGSIG_LOCATION

File: tce_pdf.php line 170

public mixed K_DIGSIG_LOCATION = 'Office'

K_DIGSIG_NAME

File: tce_pdf.php line 165

public mixed K_DIGSIG_NAME = 'TCEXAM'

K_DIGSIG_PASSWORD

File: tce_pdf.php line 146

public mixed K_DIGSIG_PASSWORD = 'tcpdfdemo'

K_DIGSIG_PRIVATE_KEY

File: tce_pdf.php line 141

public mixed K_DIGSIG_PRIVATE_KEY = 'file://../../shared/config/tcpdf.crt'

K_DIGSIG_REASON

File: tce_pdf.php line 175

public mixed K_DIGSIG_REASON = 'Certification'

K_DISPLAY_PDFTEXT_BUTTON

File: tce_config.php line 142

public mixed K_DISPLAY_PDFTEXT_BUTTON = \false

K_DISPLAY_TEST_DESCRIPTION

File: tce_config.php line 124

public mixed K_DISPLAY_TEST_DESCRIPTION = \true

K_DOWNLOAD_BACKUPS

File: tce_config.php line 159

public mixed K_DOWNLOAD_BACKUPS = \true

K_EMAIL_RE_PATTERN

File: tce_functions_form.php line 53

public mixed K_EMAIL_RE_PATTERN = '^([a-zA-Z0-9_\.\-\+\%]+)@([a-zA-Z0-9\.\-]+)$'

K_ENABLE_ANSWER_EXPLANATION

File: tce_config.php line 119

public mixed K_ENABLE_ANSWER_EXPLANATION = \true

K_ENABLE_CUSTOM_EXPORT

File: tce_config.php line 154

public mixed K_ENABLE_CUSTOM_EXPORT = ''

Set this constant to empty to disable this feature (or if you haven’t set tce_import_custom.php)

K_ENABLE_CUSTOM_IMPORT

File: tce_config.php line 148

public mixed K_ENABLE_CUSTOM_IMPORT = ''

Set this constant to empty to disable this feature (or if you haven’t set tce_import_custom.php)

K_ENABLE_JSERRORS

File: tce_config.php line 225

public mixed K_ENABLE_JSERRORS = \false

K_ENABLE_PUBLIC_PDF

File: tce_config.php line 102

public mixed K_ENABLE_PUBLIC_PDF = \true

K_ENABLE_QUESTION_EXPLANATION

File: tce_config.php line 114

public mixed K_ENABLE_QUESTION_EXPLANATION = \true

K_ERROR_TYPES

File: tce_config.php line 214

public mixed K_ERROR_TYPES = \E_ALL | \E_STRICT

K_EXTEND_TIME_MINUTES

File: tce_config.php line 237

public mixed K_EXTEND_TIME_MINUTES = 5

K_FILE_ALLOWED_HOSTS

File: tce_paths.php line 66

public mixed K_FILE_ALLOWED_HOSTS = \serialize([])

Example: define(‘K_FILE_ALLOWED_HOSTS’, serialize(array(‘reports.example.com’)));

K_FILE_ALLOWED_PATHS

File: tce_paths.php line 57

public mixed K_FILE_ALLOWED_PATHS = \serialize([])

Provide a serialized array of absolute path prefixes. The cache directory (K_PATH_CACHE) is always trusted in addition to the entries listed here. Example: define(‘K_FILE_ALLOWED_PATHS’, serialize(array(’/srv/tcexam-imports/’)));

K_HIDE_EXPIRED_TESTS

File: tce_config.php line 107

public mixed K_HIDE_EXPIRED_TESTS = \false

K_HTTPBASIC_ENABLED

File: tce_httpbasic.php line 42

public mixed K_HTTPBASIC_ENABLED = \false

K_HTTPBASIC_USER_GROUP_ID

File: tce_httpbasic.php line 54

public mixed K_HTTPBASIC_USER_GROUP_ID = 1

You can also set 0 for all available groups or a string containing a comma-separated list of group IDs.

K_HTTPBASIC_USER_LEVEL

File: tce_httpbasic.php line 47

public mixed K_HTTPBASIC_USER_LEVEL = 1

K_KEY_SECURITY

File: tce_general_constants.php line 102

public mixed K_KEY_SECURITY = 'VENFeGFtIChjKSAyMDA0LTIwMjAgTmljb2xhIEFzdW5pIC0gVGVjbmljay5jb20gLSB0Y2V4YW0uY29t'

K_LANGUAGE

File: tce_config.php line 32

public mixed K_LANGUAGE = 'en'

K_LANGUAGE_SELECTOR

File: tce_config.php line 37

public mixed K_LANGUAGE_SELECTOR = \true

K_LATEX_CLASS

File: tce_latex.php line 101

public mixed K_LATEX_CLASS = 'article'

K_LATEX_FONT_SIZE

File: tce_latex.php line 96

public mixed K_LATEX_FONT_SIZE = 10

K_LATEX_FORMULA_DENSITY

File: tce_latex.php line 76

public mixed K_LATEX_FORMULA_DENSITY = 120

K_LATEX_IMG_FORMAT

File: tce_latex.php line 111

public mixed K_LATEX_IMG_FORMAT = 'png'

K_LATEX_IMG_PREFIX

File: tce_latex.php line 106

public mixed K_LATEX_IMG_PREFIX = 'latex_'

K_LATEX_MAX_HEIGHT

File: tce_latex.php line 86

public mixed K_LATEX_MAX_HEIGHT = 800

K_LATEX_MAX_LENGHT

File: tce_latex.php line 91

public mixed K_LATEX_MAX_LENGHT = 500

K_LATEX_MAX_WIDTH

File: tce_latex.php line 81

public mixed K_LATEX_MAX_WIDTH = 800

K_LATEX_PATH_CONVERT

File: tce_latex.php line 71

public mixed K_LATEX_PATH_CONVERT = '/usr/bin/convert'

K_LATEX_PATH_PICTURE

File: tce_latex.php line 56

public mixed K_LATEX_PATH_PICTURE = \K_PATH_CACHE

K_LATEX_PATH_PICTURE_HTTPD

File: tce_latex.php line 61

public mixed K_LATEX_PATH_PICTURE_HTTPD = \K_PATH_URL_CACHE

K_LATEX_PDFLATEX

File: tce_latex.php line 66

public mixed K_LATEX_PDFLATEX = '/usr/bin/pdflatex'

K_LDAP_BASE_DN

File: tce_ldap.php line 61

public mixed K_LDAP_BASE_DN = 'ou=users,dc=mydom,dc=example,dc=org'

K_LDAP_ENABLED

File: tce_ldap.php line 29

public mixed K_LDAP_ENABLED = \false

K_LDAP_FILTER

File: tce_ldap.php line 66

public mixed K_LDAP_FILTER = 'uid=#USERNAME#'

K_LDAP_HOST

File: tce_ldap.php line 34

public mixed K_LDAP_HOST = 'localhost'

K_LDAP_PORT

File: tce_ldap.php line 39

public mixed K_LDAP_PORT = 389

K_LDAP_PROTOCOL_VERSION

File: tce_ldap.php line 44

public mixed K_LDAP_PROTOCOL_VERSION = 3

K_LDAP_ROOT_DN

File: tce_ldap.php line 50

public mixed K_LDAP_ROOT_DN = \null

K_LDAP_ROOT_PASS

File: tce_ldap.php line 56

public mixed K_LDAP_ROOT_PASS = \null

K_LDAP_USER_GROUP_ID

File: tce_ldap.php line 96

public mixed K_LDAP_USER_GROUP_ID = 1

This is the TCExam group id to which the LDAP accounts belongs. You can also set 0 for all available groups or a string containing a comma-separated list of group IDs.

K_LDAP_USER_LEVEL

File: tce_ldap.php line 89

public mixed K_LDAP_USER_LEVEL = 1

K_LDAP_UTF8

File: tce_ldap.php line 84

public mixed K_LDAP_UTF8 = \true

K_LOGOUT_URL

File: tce_config.php line 207

public mixed K_LOGOUT_URL = ''

K_MAIN_PAGE

File: tce_config.php line 97

public mixed K_MAIN_PAGE = 'index.php'

K_MAX_MEMORY_LIMIT

File: tce_config.php line 34

public mixed K_MAX_MEMORY_LIMIT = '512M'

K_MAX_MEMORY_LIMIT

File: tce_config.php line 92

public mixed K_MAX_MEMORY_LIMIT = '32M'

K_MAX_ROWS_PER_PAGE

File: tce_config.php line 39

public mixed K_MAX_ROWS_PER_PAGE = 50

K_MAX_ROWS_PER_PAGE

File: tce_config.php line 82

public mixed K_MAX_ROWS_PER_PAGE = 50

K_MAX_TESTS_DAY

File: tce_general_constants.php line 48

public mixed K_MAX_TESTS_DAY = \false

false = unlimited

K_MAX_TESTS_MONTH

File: tce_general_constants.php line 42

public mixed K_MAX_TESTS_MONTH = \false

false = unlimited

K_MAX_TESTS_YEAR

File: tce_general_constants.php line 36

public mixed K_MAX_TESTS_YEAR = \false

false = unlimited

K_MAX_UPLOAD_SIZE

File: tce_config.php line 44

public mixed K_MAX_UPLOAD_SIZE = 25000000

K_MAX_UPLOAD_SIZE

File: tce_config.php line 87

public mixed K_MAX_UPLOAD_SIZE = 1000000

K_MYSQL_QA_BIN_COLLATION

File: tce_config.php line 171

public mixed K_MYSQL_QA_BIN_COLLATION = 'utf8_bin'

The collation must be compatible with the character set of your database columns: use ‘utf8_bin’ for utf8 (utf8mb3) columns, or ‘utf8mb4_bin’ for utf8mb4 columns.

K_MYSQL_QA_BIN_UNIQUITY

File: tce_config.php line 164

public mixed K_MYSQL_QA_BIN_UNIQUITY = \true

K_NEWLINE

File: tce_general_constants.php line 62

public mixed K_NEWLINE = "\n"

K_OMR_PATH_ZBARIMG

File: tce_config.php line 191

public mixed K_OMR_PATH_ZBARIMG = '/usr/bin/zbarimg'

This application is required to decode barcodes on scanned offline test pages. For installation instructions: http://zbar.sourceforge.net/ On Debian/Ubuntu you can easily install zbarimg using the following command: “sudo apt-get install zbar-tools”

K_OTP_LOGIN

File: tce_config.php line 79

public mixed K_OTP_LOGIN = \false

K_PASSWORD_RESET

File: tce_config.php line 202

public mixed K_PASSWORD_RESET = \true

K_PATH_BACKUP

File: tce_paths.php line 101

public mixed K_PATH_BACKUP = \K_PATH_MAIN . 'admin/backup/'

Please protect this directory with extra authentication to restrict access.

K_PATH_CACHE

File: tce_paths.php line 85

public mixed K_PATH_CACHE = \K_PATH_MAIN . 'cache/'

K_PATH_FONTS

File: tce_pdf_all_questions.php line 26

public mixed K_PATH_FONTS = \realpath(__DIR__ . '/../../vendor/tecnickcom/tc-lib-pdf-font/target/fonts')

K_PATH_FONTS

File: tce_pdf_results.php line 33

public mixed K_PATH_FONTS = \realpath(__DIR__ . '/../../vendor/tecnickcom/tc-lib-pdf-font/target/fonts')

K_PATH_FONTS

File: tce_pdf_testgen.php line 34

public mixed K_PATH_FONTS = \realpath(__DIR__ . '/../../vendor/tecnickcom/tc-lib-pdf-font/target/fonts')

K_PATH_FONTS

File: tce_pdf_results.php line 33

public mixed K_PATH_FONTS = \realpath(__DIR__ . '/../../vendor/tecnickcom/tc-lib-pdf-font/target/fonts')

K_PATH_FONTS

File: tce_paths.php line 109

public mixed K_PATH_FONTS = \K_PATH_MAIN . 'vendor/tecnickcom/tc-lib-pdf-font/target/fonts/'

K_PATH_HOST

File: tce_paths.php line 27

public mixed K_PATH_HOST = ''

K_PATH_IMAGES

File: tce_paths.php line 130

public mixed K_PATH_IMAGES = '../../images/'

K_PATH_JSCRIPTS

File: tce_paths.php line 120

public mixed K_PATH_JSCRIPTS = '../jscripts/'

K_PATH_LANG_CACHE

File: tce_paths.php line 95

public mixed K_PATH_LANG_CACHE = \K_PATH_CACHE . 'lang/'

K_PATH_MAIN

File: tce_paths.php line 37

public mixed K_PATH_MAIN = ''

K_PATH_PUBLIC_CODE

File: tce_paths.php line 75

public mixed K_PATH_PUBLIC_CODE = \K_PATH_HOST . \K_PATH_TCEXAM . 'public/code/'

K_PATH_PUBLIC_CODE_REAL

File: tce_paths.php line 80

public mixed K_PATH_PUBLIC_CODE_REAL = \K_PATH_MAIN . 'public/code/'

K_PATH_SHARED_JSCRIPTS

File: tce_paths.php line 125

public mixed K_PATH_SHARED_JSCRIPTS = '../../shared/jscripts/'

K_PATH_STYLE_SHEETS

File: tce_paths.php line 115

public mixed K_PATH_STYLE_SHEETS = '../styles/'

K_PATH_TCEXAM

File: tce_paths.php line 32

public mixed K_PATH_TCEXAM = ''

K_PATH_TMX_FILE

File: tce_paths.php line 135

public mixed K_PATH_TMX_FILE = \K_PATH_MAIN . 'shared/config/lang/language_tmx.xml'

K_PATH_URL

File: tce_paths.php line 42

public mixed K_PATH_URL = \K_PATH_HOST . \K_PATH_TCEXAM

K_PATH_URL_CACHE

File: tce_paths.php line 90

public mixed K_PATH_URL_CACHE = \K_PATH_TCEXAM . 'cache/'

K_PDF_ALLOWED_HOSTS

File: tce_pdf.php line 231

public mixed K_PDF_ALLOWED_HOSTS = \serialize([])

Remote URL loading is DISABLED by default (empty list) to prevent SSRF; add hosts (e.g. [‘cdn.example.com’]) only if your templates must load remote resources.

K_PDF_ALLOWED_PATHS

File: tce_pdf.php line 215

public mixed K_PDF_ALLOWED_PATHS = \serialize(\array_values(\array_filter([\realpath(\K_PATH_MAIN . 'images'), \realpath(\K_PATH_MAIN . 'cache'), \realpath(\K_PATH_MAIN . 'vendor/tecnickcom/tc-lib-pdf-font/target/fonts'), \defined('K_PATH_FONTS') ? \realpath(\K_PATH_FONTS) : \false, \realpath(\sys_get_temp_dir())])))

K_PDF_COMPRESS

File: tce_pdf.php line 199

public mixed K_PDF_COMPRESS = \true

K_PDF_MAX_REMOTE_SIZE

File: tce_pdf.php line 236

public mixed K_PDF_MAX_REMOTE_SIZE = 52428800

K_PDF_MODE

File: tce_pdf.php line 204

public mixed K_PDF_MODE = ''

K_PDF_SUBSET_FONT

File: tce_pdf.php line 194

public mixed K_PDF_SUBSET_FONT = \false

K_PDF_UNICODE

File: tce_pdf.php line 189

public mixed K_PDF_UNICODE = \true

K_PUBLIC_THEME

File: tce_config.php line 65

public mixed K_PUBLIC_THEME = 'default'

K_QUESTION_DIFFICULTY_LEVELS

File: tce_config.php line 89

public mixed K_QUESTION_DIFFICULTY_LEVELS = 10

K_QUESTION_LINE_MAX_LENGTH

File: tce_config.php line 151

public mixed K_QUESTION_LINE_MAX_LENGTH = 70

K_RADIUS_ACCOUNTING_PORT

File: tce_radius.php line 56

public mixed K_RADIUS_ACCOUNTING_PORT = 1813

K_RADIUS_AUTHENTICATION_PORT

File: tce_radius.php line 51

public mixed K_RADIUS_AUTHENTICATION_PORT = 1812

K_RADIUS_ENABLED

File: tce_radius.php line 26

public mixed K_RADIUS_ENABLED = \false

K_RADIUS_SERVER_IP

File: tce_radius.php line 31

public mixed K_RADIUS_SERVER_IP = 'localhost'

K_RADIUS_SHARED_SECRET

File: tce_radius.php line 36

public mixed K_RADIUS_SHARED_SECRET = 'WinRadius'

K_RADIUS_SUFFIX

File: tce_radius.php line 41

public mixed K_RADIUS_SUFFIX = ''

K_RADIUS_UDP_TIMEOUT

File: tce_radius.php line 46

public mixed K_RADIUS_UDP_TIMEOUT = 5

K_RADIUS_USER_GROUP_ID

File: tce_radius.php line 73

public mixed K_RADIUS_USER_GROUP_ID = 1

This is the TCExam group id to which the radius accounts belongs. You can also set 0 for all available groups or a string containing a comma-separated list of group IDs.

K_RADIUS_USER_LEVEL

File: tce_radius.php line 66

public mixed K_RADIUS_USER_LEVEL = 1

K_RADIUS_UTF8

File: tce_radius.php line 61

public mixed K_RADIUS_UTF8 = \true

K_RANDOM_SECURITY

File: tce_general_constants.php line 30

public mixed K_RANDOM_SECURITY = 'CHANGE_THIS_K_RANDOM_SECURITY'

SECURITY: this value MUST be unique and secret for every installation. The installer (install/tce_functions_install.php) replaces the placeholder below with a random value. If it is left at the shipped placeholder (or the historical default), the security sensitive result-access token check fails closed - see F_isRandomSecurityConfigured().

K_REDIRECT_LOGIN_MODE

File: tce_config.php line 197

public mixed K_REDIRECT_LOGIN_MODE = 4

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

K_REMAINING_TESTS

File: tce_general_constants.php line 53

public mixed K_REMAINING_TESTS = \false

K_SECONDS_IN_DAY

File: tce_general_constants.php line 82

public mixed K_SECONDS_IN_DAY = 24 * \K_SECONDS_IN_HOUR

K_SECONDS_IN_HOUR

File: tce_general_constants.php line 77

public mixed K_SECONDS_IN_HOUR = 60 * \K_SECONDS_IN_MINUTE

K_SECONDS_IN_MINUTE

File: tce_general_constants.php line 72

public mixed K_SECONDS_IN_MINUTE = 60

K_SECONDS_IN_MONTH

File: tce_general_constants.php line 92

public mixed K_SECONDS_IN_MONTH = 30 * \K_SECONDS_IN_DAY

K_SECONDS_IN_WEEK

File: tce_general_constants.php line 87

public mixed K_SECONDS_IN_WEEK = 7 * \K_SECONDS_IN_DAY

K_SECONDS_IN_YEAR

File: tce_general_constants.php line 97

public mixed K_SECONDS_IN_YEAR = 365 * \K_SECONDS_IN_DAY

K_SELECT_SUBSTRING

File: tce_config.php line 137

public mixed K_SELECT_SUBSTRING = 40

K_SESSION_LIFE

File: tce_config.php line 134

public mixed K_SESSION_LIFE = \K_SECONDS_IN_HOUR

K_SHIBBOLETH_ENABLED

File: tce_shibboleth.php line 27

public mixed K_SHIBBOLETH_ENABLED = \false

K_SHIBBOLETH_LOGIN

File: tce_shibboleth.php line 44

public mixed K_SHIBBOLETH_LOGIN = ''

K_SHIBBOLETH_USER_GROUP_ID

File: tce_shibboleth.php line 39

public mixed K_SHIBBOLETH_USER_GROUP_ID = 1

You can also set 0 for all available groups or a string containing a comma-separated list of group IDs.

K_SHIBBOLETH_USER_LEVEL

File: tce_shibboleth.php line 32

public mixed K_SHIBBOLETH_USER_LEVEL = 1

K_SHORT_ANSWERS_BINARY

File: tce_config.php line 129

public mixed K_SHORT_ANSWERS_BINARY = \false

K_SITE_AUTHOR

File: tce_config.php line 45

public mixed K_SITE_AUTHOR = 'Nicola Asuni - Tecnick.com LTD'

K_SITE_DESCRIPTION

File: tce_config.php line 40

public mixed K_SITE_DESCRIPTION = 'TCExam by Tecnick.com'

K_SITE_ICON

File: tce_config.php line 60

public mixed K_SITE_ICON = '../../favicon.ico'

K_SITE_KEYWORDS

File: tce_config.php line 55

public mixed K_SITE_KEYWORDS = 'TCExam, eExam, e-exam, web, exam'

K_SITE_REPLY

File: tce_config.php line 50

public mixed K_SITE_REPLY = ''

K_SITE_STYLE

File: tce_config.php line 70

public mixed K_SITE_STYLE = \K_PATH_STYLE_SHEETS . \K_PUBLIC_THEME . '.css'

K_SITE_STYLE_RTL

File: tce_config.php line 75

public mixed K_SITE_STYLE_RTL = \K_PATH_STYLE_SHEETS . \K_PUBLIC_THEME . '_rtl.css'

K_SITE_TITLE

File: tce_config.php line 35

public mixed K_SITE_TITLE = 'TCExam'

K_SSL_ENABLED

File: tce_ssl.php line 27

public mixed K_SSL_ENABLED = \false

K_SSL_USER_GROUP_ID

File: tce_ssl.php line 39

public mixed K_SSL_USER_GROUP_ID = 1

You can also set 0 for all available groups or a string containing a comma-separated list of group IDs.

K_SSL_USER_LEVEL

File: tce_ssl.php line 32

public mixed K_SSL_USER_LEVEL = 1

K_STANDARD_PORT

File: tce_paths.php line 47

public mixed K_STANDARD_PORT = 80

K_TAB

File: tce_general_constants.php line 67

public mixed K_TAB = "\t"

K_TABLE_ANSWERS

File: tce_db_config.php line 94

public mixed K_TABLE_ANSWERS = \K_TABLE_PREFIX . 'answers'

K_TABLE_GROUPS

File: tce_db_config.php line 134

public mixed K_TABLE_GROUPS = \K_TABLE_PREFIX . 'user_groups'

K_TABLE_LOG_ANSWER

File: tce_db_config.php line 129

public mixed K_TABLE_LOG_ANSWER = \K_TABLE_PREFIX . 'tests_logs_answers'

K_TABLE_MODULES

File: tce_db_config.php line 79

public mixed K_TABLE_MODULES = \K_TABLE_PREFIX . 'modules'

K_TABLE_PREFIX

File: tce_db_config.php line 60

public mixed K_TABLE_PREFIX = 'tce_'

K_TABLE_QUESTIONS

File: tce_db_config.php line 89

public mixed K_TABLE_QUESTIONS = \K_TABLE_PREFIX . 'questions'

K_TABLE_SESSIONS

File: tce_db_config.php line 69

public mixed K_TABLE_SESSIONS = \K_TABLE_PREFIX . 'sessions'

K_TABLE_SSLCERTS

File: tce_db_config.php line 149

public mixed K_TABLE_SSLCERTS = \K_TABLE_PREFIX . 'sslcerts'

K_TABLE_SUBJECT_SET

File: tce_db_config.php line 119

public mixed K_TABLE_SUBJECT_SET = \K_TABLE_PREFIX . 'test_subjects'

K_TABLE_SUBJECTS

File: tce_db_config.php line 84

public mixed K_TABLE_SUBJECTS = \K_TABLE_PREFIX . 'subjects'

K_TABLE_TEST_GROUPS

File: tce_db_config.php line 144

public mixed K_TABLE_TEST_GROUPS = \K_TABLE_PREFIX . 'testgroups'

K_TABLE_TEST_SSLCERTS

File: tce_db_config.php line 154

public mixed K_TABLE_TEST_SSLCERTS = \K_TABLE_PREFIX . 'testsslcerts'

K_TABLE_TEST_SUBJSET

File: tce_db_config.php line 114

public mixed K_TABLE_TEST_SUBJSET = \K_TABLE_PREFIX . 'test_subject_set'

K_TABLE_TEST_USER

File: tce_db_config.php line 104

public mixed K_TABLE_TEST_USER = \K_TABLE_PREFIX . 'tests_users'

K_TABLE_TESTS

File: tce_db_config.php line 99

public mixed K_TABLE_TESTS = \K_TABLE_PREFIX . 'tests'

K_TABLE_TESTS_LOGS

File: tce_db_config.php line 124

public mixed K_TABLE_TESTS_LOGS = \K_TABLE_PREFIX . 'tests_logs'

K_TABLE_TESTUSER_STAT

File: tce_db_config.php line 109

public mixed K_TABLE_TESTUSER_STAT = \K_TABLE_PREFIX . 'testuser_stat'

K_TABLE_USERGROUP

File: tce_db_config.php line 139

public mixed K_TABLE_USERGROUP = \K_TABLE_PREFIX . 'usrgroups'

K_TABLE_USERS

File: tce_db_config.php line 74

public mixed K_TABLE_USERS = \K_TABLE_PREFIX . 'users'

K_TCEXAM_AUTHOR

File: tce_config.php line 97

public mixed K_TCEXAM_AUTHOR = 'Nicola Asuni - Tecnick.com LTD'

K_TCEXAM_DESCRIPTION

File: tce_config.php line 92

public mixed K_TCEXAM_DESCRIPTION = 'TCExam by Tecnick.com'

K_TCEXAM_ICON

File: tce_config.php line 112

public mixed K_TCEXAM_ICON = '../../favicon.ico'

K_TCEXAM_KEYWORDS

File: tce_config.php line 107

public mixed K_TCEXAM_KEYWORDS = 'TCExam, eExam, e-exam, web, exam'

K_TCEXAM_REPLY_TO

File: tce_config.php line 102

public mixed K_TCEXAM_REPLY_TO = ''

K_TCEXAM_STYLE

File: tce_config.php line 122

public mixed K_TCEXAM_STYLE = \K_PATH_STYLE_SHEETS . \K_ADMIN_THEME . '.css'

K_TCEXAM_STYLE_RTL

File: tce_config.php line 127

public mixed K_TCEXAM_STYLE_RTL = \K_PATH_STYLE_SHEETS . \K_ADMIN_THEME . '_rtl.css'

K_TCEXAM_TITLE

File: tce_config.php line 87

public mixed K_TCEXAM_TITLE = 'TCExam'

K_TCEXAM_VERSION

File: tce_config.php line 27

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

K_TEST_INFO_HEIGHT

File: tce_config.php line 94

public mixed K_TEST_INFO_HEIGHT = 400

K_TEST_INFO_WIDTH

File: tce_config.php line 99

public mixed K_TEST_INFO_WIDTH = 700

K_TIMESTAMP_FORMAT

File: tce_config.php line 146

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

K_TIMEZONE

File: tce_config.php line 232

public mixed K_TIMEZONE = 'UTC'

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

K_UPDATE_PASSKEY

File: tce_update.php line 37

public mixed K_UPDATE_PASSKEY = '0'

K_UPDATE_SERVER

File: tce_update.php line 32

public mixed K_UPDATE_SERVER = 'http://updates.tcexam.com'

K_USE_ERROR_LOG

File: tce_config.php line 220

public mixed K_USE_ERROR_LOG = \false

K_USER_GROUP_RSYNC

File: tce_config.php line 141

public mixed K_USER_GROUP_RSYNC = \false

K_USRREG_ADMIN_EMAIL

File: tce_user_registration.php line 53

public mixed K_USRREG_ADMIN_EMAIL = ''

K_USRREG_AGREEMENT

File: tce_user_registration.php line 48

public mixed K_USRREG_AGREEMENT = ''

K_USRREG_ALLOWED_GROUPS

File: tce_user_registration.php line 43

public mixed K_USRREG_ALLOWED_GROUPS = [1]

K_USRREG_EMAIL_CONFIRM

File: tce_user_registration.php line 33

public mixed K_USRREG_EMAIL_CONFIRM = \true

K_USRREG_ENABLED

File: tce_user_registration.php line 28

public mixed K_USRREG_ENABLED = \true

K_USRREG_GROUP

File: tce_user_registration.php line 38

public mixed K_USRREG_GROUP = 1

K_USRREG_PASSWORD_RE

File: tce_user_registration.php line 58

public mixed K_USRREG_PASSWORD_RE = '^(.{8,})$'

K_UTF8_NORMALIZATION_MODE

File: tce_config.php line 182

public mixed K_UTF8_NORMALIZATION_MODE = 'NONE'

PDF_AUTHOR

File: tce_pdf.php line 63

public mixed PDF_AUTHOR = 'TCExam 12'

PDF_FONT_NAME_DATA

File: tce_pdf.php line 119

public mixed PDF_FONT_NAME_DATA = 'dejavusans'

See PDF_FONT_NAME_MAIN: DejaVu Sans is used so the test/answer content (which may be in any of the supported languages) renders with the correct glyphs.

PDF_FONT_NAME_MAIN

File: tce_pdf.php line 107

public mixed PDF_FONT_NAME_MAIN = 'dejavusans'

DejaVu Sans is used by default because it carries a broad Unicode glyph set (Latin with diacritics, Cyrillic, Greek, …) so exported PDFs render the non-Latin languages TCExam supports. The 14 standard PDF fonts (e.g. helvetica) only cover Latin-1. For CJK content set a cid0* font here.

PDF_FONT_SIZE_DATA

File: tce_pdf.php line 124

public mixed PDF_FONT_SIZE_DATA = 7

PDF_FONT_SIZE_MAIN

File: tce_pdf.php line 112

public mixed PDF_FONT_SIZE_MAIN = 9

File: tce_pdf.php line 38

public mixed PDF_HEADER_LOGO = 'logo_example.png'

PDF_HEADER_LOGO_WIDTH

File: tce_pdf.php line 43

public mixed PDF_HEADER_LOGO_WIDTH = 20

PDF_HEADER_STRING

File: tce_pdf.php line 33

public mixed PDF_HEADER_STRING = "first row\nsecond row\nthird row"

PDF_HEADER_TITLE

File: tce_pdf.php line 28

public mixed PDF_HEADER_TITLE = 'School name'

PDF_MARGIN_BOTTOM

File: tce_pdf.php line 88

public mixed PDF_MARGIN_BOTTOM = 30

File: tce_pdf.php line 78

public mixed PDF_MARGIN_FOOTER = 10

PDF_MARGIN_HEADER

File: tce_pdf.php line 73

public mixed PDF_MARGIN_HEADER = 5

PDF_MARGIN_LEFT

File: tce_pdf.php line 93

public mixed PDF_MARGIN_LEFT = 15

PDF_MARGIN_RIGHT

File: tce_pdf.php line 98

public mixed PDF_MARGIN_RIGHT = 15

PDF_MARGIN_TOP

File: tce_pdf.php line 83

public mixed PDF_MARGIN_TOP = 27

PDF_PAGE_FORMAT

File: tce_pdf.php line 53

public mixed PDF_PAGE_FORMAT = 'A4'

PDF_PAGE_ORIENTATION

File: tce_pdf.php line 58

public mixed PDF_PAGE_ORIENTATION = 'P'

PDF_TEXTANSWER_HEIGHT

File: tce_pdf.php line 48

public mixed PDF_TEXTANSWER_HEIGHT = 40

PDF_UNIT

File: tce_pdf.php line 68

public mixed PDF_UNIT = 'mm'

Functions

F_isValidbackupFile()

File: tce_edit_backup.php line 45

F_isValidbackupFile(mixed $file) : mixed

Parameters

  • $file : mixed

F_send_report_emails()

File: tce_functions_email_reports.php line 37

F_send_report_emails(mixed $test_id[, mixed $user_id = 0 ][, mixed $testuser_id = 0 ][, mixed $group_id = 0 ][, mixed $startdate = 0 ][, mixed $enddate = 0 ][, mixed $mode = 0 ][, mixed $display_mode = 1 ][, mixed $show_graph = false ]) : mixed

Parameters

  • $test_id : mixed: (int) TEST ID
  • $user_id : mixed = 0: (int) USER ID (0 means all users)
  • $testuser_id : mixed = 0: (int) test-user ID - if greater than zero, filter stats for the specified test-user.
  • $group_id : mixed = 0: (int) GROUP ID (0 means all groups)
  • $startdate : mixed = 0: (int) start date ID - if greater than zero, filter stats for the specified starting date
  • $enddate : mixed = 0: (int) end date ID - if greater than zero, filter stats for the specified ending date
  • $mode : mixed = 0: (int) type of report to send: 0=detailed report; 1=summary report (without questions)
  • $display_mode : mixed = 1: display (int) mode: 0 = disabled; 1 = minimum; 2 = module; 3 = subject; 4 = question; 5 = answer.
  • $show_graph : mixed = false: (boolean) If true display the score graph.

Tags

  • author: Nicola Asuni
  • since: 2005-02-24

F_deleteMediaFile()

File: tce_functions_filemanager.php line 29

F_deleteMediaFile(mixed $filename) : true

Parameters

  • $filename : mixed: (string) the file name

Tags

  • author: Nicola Asuni

Return values

true —

in case of success, false otherwise

F_renameMediaFile()

File: tce_functions_filemanager.php line 70

F_renameMediaFile(mixed $filename, mixed $newname) : true

Parameters

  • $filename : mixed: (string) old file name
  • $newname : mixed: (string) new file name

Tags

  • author: Nicola Asuni

Return values

true —

in case of success, false otherwise

F_createMediaDir()

File: tce_functions_filemanager.php line 131

F_createMediaDir(mixed $dirname) : true

Parameters

  • $dirname : mixed: (string) the directory name

Tags

  • author: Nicola Asuni

Return values

true —

in case of success, false otherwise

F_deleteMediaDir()

File: tce_functions_filemanager.php line 160

F_deleteMediaDir(mixed $dirname) : true

Parameters

  • $dirname : mixed: (string) the directory name

Tags

  • author: Nicola Asuni

Return values

true —

in case of success, false otherwise

F_getFileInfo()

File: tce_functions_filemanager.php line 185

F_getFileInfo(mixed $file) : associative

Parameters

  • $file : mixed: (string) the file name

Tags

  • author: Nicola Asuni

Return values

associative —

array containing file info or false in case of error

F_formatFileSize()

File: tce_functions_filemanager.php line 225

F_formatFileSize(mixed $size) : string

Parameters

  • $size : mixed: (int) size in bytes

Tags

  • author: Nicola Asuni

Return values

string —

formatted size

File: tce_functions_filemanager.php line 247

F_getMediaDirPathLink(mixed $dirpath[, mixed $viewmode = true ]) : an

Parameters

  • $dirpath : mixed: (string) the directory path
  • $viewmode : mixed = true: (boolean) true=table, false=visual

Tags

  • author: Nicola Asuni

Return values

an —

html string

F_getDirFiles()

File: tce_functions_filemanager.php line 297

F_getDirFiles(mixed $dir[, mixed $rootdir = K_PATH_CACHE ][, mixed $authdirs = '' ]) : an

Parameters

  • $dir : mixed: (string) the starting directory path
  • $rootdir : mixed = K_PATH_CACHE : (string) the user root dir.
  • $authdirs : mixed = ‘’: (string) regular expression containing the authorized dirs.

Tags

  • author: Nicola Asuni

Return values

an —

associative array containing sorted ‘dirs’ and ‘files’

F_isUsedMediaFile()

File: tce_functions_filemanager.php line 337

F_isUsedMediaFile(mixed $file) : true

Parameters

  • $file : mixed: (string) the file to search

Tags

  • author: Nicola Asuni

Return values

true —

if the file is used, false otherwise

F_getDirTable()

File: tce_functions_filemanager.php line 390

F_getDirTable(mixed $dir[, mixed $selected = '' ][, mixed $params = '' ][, mixed $rootdir = K_PATH_CACHE ][, mixed $authdirs = '' ]) : html

Parameters

  • $dir : mixed: (string) the starting directory path
  • $selected : mixed = ‘’: (string) the selected file
  • $params : mixed = ‘’: (string) additional parameters to add on links
  • $rootdir : mixed = K_PATH_CACHE : (string) the user root dir.
  • $authdirs : mixed = ‘’: (string) regular expression containing the authorized dirs.

Tags

  • author: Nicola Asuni

Return values

html —

table

F_getDirVisualTable()

File: tce_functions_filemanager.php line 496

F_getDirVisualTable(mixed $dir[, mixed $selected = '' ][, mixed $params = '' ][, mixed $rootdir = K_PATH_CACHE ][, mixed $authdirs = '' ]) : html

Parameters

  • $dir : mixed: (string) the starting directory path
  • $selected : mixed = ‘’: (string) the selected file
  • $params : mixed = ‘’: (string) additional parameters to add on links
  • $rootdir : mixed = K_PATH_CACHE : (string) the user root dir.
  • $authdirs : mixed = ‘’: (string) regular expression containing the authorized dirs.

Tags

  • author: Nicola Asuni

Return values

html —

table

F_getAuthorizedDirs()

File: tce_functions_filemanager.php line 620

F_getAuthorizedDirs() : a

Return values

a —

regular expression to match authorised directories.

F_isAuthorizedDir()

File: tce_functions_filemanager.php line 639

F_isAuthorizedDir(mixed $dir, mixed $rootdir[, mixed $authdirs = '' ]) : true

Parameters

  • $dir : mixed: (string) the directory to check.
  • $rootdir : mixed: (string) the user root dir.
  • $authdirs : mixed = ‘’: (string) regular expression containing the authorized dirs.

Return values

true —

if the user is authorized to use the specified directory, false otherwise.

F_encodeOMRTestData()

File: tce_functions_omr.php line 29

F_encodeOMRTestData(mixed $data) : encoded

Parameters

  • $data : mixed: (array) array to be encoded

Return values

encoded —

string.

F_decodeOMRTestData()

File: tce_functions_omr.php line 42

F_decodeOMRTestData(mixed $str) : array<string|int, mixed>

Parameters

  • $str : mixed: (string) string to be decoded.

Return values

array<string|int, mixed> —

with test data (0 => test_id, n => array(0 => question_n_ID, 1 => array(answers_IDs)), or false in case of error.

F_decodeOMRTestDataQRCode()

File: tce_functions_omr.php line 61

F_decodeOMRTestDataQRCode(mixed $image) : array<string|int, mixed>

This function uses the external application zbarimg (http://zbar.sourceforge.net/) .

Parameters

  • $image : mixed: (string) image file to be decoded (scanned OMR page).

Return values

array<string|int, mixed> —

with test data or false in case o error

F_decodeOMRPage()

File: tce_functions_omr.php line 79

F_decodeOMRPage(mixed $image) : array<string|int, mixed>

This function requires ImageMagick library and zbarimg (http://zbar.sourceforge.net/) .

Parameters

  • $image : mixed: (string) image file to be decoded (scanned OMR page at 200 DPI with full color range).

Return values

array<string|int, mixed> —

of answers data or false in case of error.

F_importOMRTestData()

File: tce_functions_omr.php line 214

F_importOMRTestData(mixed $user_id, mixed $date, mixed $omr_testdata, mixed $omr_answers[, mixed $overwrite = false ]) : bool

Parameters

  • $user_id : mixed: (int) user ID.
  • $date : mixed: (string) date-time field.
  • $omr_testdata : mixed: (array) Array containing test data.
  • $omr_answers : mixed: (array) Array containing test answers (from OMR).
  • $overwrite : mixed = false: (boolean) If true overwrites the previous answers on non-repeatable tests.

Return values

bool —

TRUE in case of success, FALSE otherwise.

F_question_set_enabled()

File: tce_functions_questions.php line 30

F_question_set_enabled(mixed $question_id[, mixed $enabled = true ]) : mixed

Parameters

  • $question_id : mixed: (int) question ID
  • $enabled : mixed = true: (boolean) if true enables question, false otherwise

Tags

  • author: Nicola Asuni
  • since: 2008-11-26

F_question_get_position()

File: tce_functions_questions.php line 57

F_question_get_position(mixed $question_id) : int

Parameters

  • $question_id : mixed: (int) question ID

Tags

  • author: Nicola Asuni
  • since: 2008-11-26

Return values

int —

question position

F_question_get_data()

File: tce_functions_questions.php line 85

F_question_get_data(mixed $question_id) : array<string|int, mixed>

Parameters

  • $question_id : mixed: (int) question ID

Tags

  • author: Nicola Asuni
  • since: 2008-11-26

Return values

array<string|int, mixed> —

containing selected question data, false in case of error

F_question_delete()

File: tce_functions_questions.php line 113

F_question_delete(mixed $question_id, mixed $subject_id) : mixed

Parameters

  • $question_id : mixed: (int) question ID
  • $subject_id : mixed: (int) subject ID

Tags

  • author: Nicola Asuni
  • since: 2008-11-26

F_question_copy()

File: tce_functions_questions.php line 170

F_question_copy(mixed $question_id, mixed $new_subject_id) : mixed

Parameters

  • $question_id : mixed: (int) question ID
  • $new_subject_id : mixed: (int) new subject ID

Tags

  • author: Nicola Asuni
  • since: 2008-11-26

tcecodeEditorTagButtons()

File: tce_functions_tcecode_editor.php line 32

tcecodeEditorTagButtons(mixed $callingform, mixed $callingfield) : XHTML

Parameters

  • $callingform : mixed: (string) name of calling xhtml form
  • $callingfield : mixed: (string) name of calling form field (textarea where output code will be sent)

Tags

  • author: Nicola Asuni
  • since: 2006-03-07

Return values

XHTML —

string

getImageButton()

File: tce_functions_tcecode_editor.php line 196

getImageButton(mixed $name, mixed $tag, mixed $image[, mixed $onclick = '' ][, mixed $accesskey = '' ]) : XHTML

Parameters

  • $name : mixed: (string) name of the button
  • $tag : mixed: (string) tag value
  • $image : mixed: (string) image file of button
  • $onclick : mixed = ‘’: (string) default onclick action
  • $accesskey : mixed = ‘’: (string) accesskey: character for keyboard shortcut

Tags

  • author: Nicola Asuni
  • since: 2006-03-07

Return values

XHTML —

string

F_select_test()

File: tce_functions_test_select.php line 34

F_select_test(mixed $order_field, mixed $orderdir, mixed $firstrow, mixed $rowsperpage[, mixed $andwhere = '' ][, mixed $searchterms = '' ]) : true

Parameters

  • $order_field : mixed: (string) order by column name
  • $orderdir : mixed: (string) oreder direction
  • $firstrow : mixed: (string) number of first row to display
  • $rowsperpage : mixed: (string) number of rows per page
  • $andwhere : mixed = ‘’: (string) additional SQL WHERE query conditions
  • $searchterms : mixed = ‘’: (string) search terms

Tags

  • author: Nicola Asuni

Return values

true

F_show_select_test()

File: tce_functions_test_select.php line 53

F_show_select_test(mixed $order_field, mixed $orderdir, mixed $firstrow, mixed $rowsperpage[, mixed $andwhere = '' ][, mixed $searchterms = '' ]) : false

Parameters

  • $order_field : mixed: (string) Order by column name.
  • $orderdir : mixed: (int) Order direction.
  • $firstrow : mixed: (int) Number of first row to display.
  • $rowsperpage : mixed: (int) Number of rows per page.
  • $andwhere : mixed = ‘’: (string) Additional SQL WHERE query conditions.
  • $searchterms : mixed = ‘’: (string) Search terms.

Tags

  • author: Nicola Asuni

Return values

false —

in case of empty database, true otherwise

F_show_select_test_popup()

File: tce_functions_test_select.php line 350

F_show_select_test_popup(mixed $order_field, mixed $orderdir, mixed $firstrow, mixed $rowsperpage[, mixed $andwhere = '' ][, mixed $searchterms = '' ][, string $cid = 0 ]) : false

Parameters

  • $order_field : mixed: (string) Order by column name.
  • $orderdir : mixed: (int) Order direction.
  • $firstrow : mixed: (int) Number of first row to display.
  • $rowsperpage : mixed: (int) Number of rows per page.
  • $andwhere : mixed = ‘’: (string) Additional SQL WHERE query conditions.
  • $searchterms : mixed = ‘’: (string) Search terms.
  • $cid : string = 0: ID of the calling form field.

Tags

  • author: Nicola Asuni
  • since: 2012-04-14

Return values

false —

in case of empty database, true otherwise

F_isTestOnSSLCerts()

File: tce_functions_test_select.php line 603

F_isTestOnSSLCerts(mixed $test_id, mixed $ssl_id) : bool

Parameters

  • $test_id : mixed: (int) test ID
  • $ssl_id : mixed: (int) SSL Certificate ID

Tags

  • since: 12.1.000 (2013-07-09)

Return values

bool —

true/false

F_is_allowed_upload()

File: tce_functions_upload.php line 30

F_is_allowed_upload(mixed $filename) : true

Parameters

  • $filename : mixed: (string) the filename

Tags

  • author: Nicola Asuni
  • since: 2001-11-19

Return values

true —

in case of allowed file type, false otherwise

F_upload_file()

File: tce_functions_upload.php line 49

F_upload_file(mixed $fieldname, mixed $uploaddir) : mixed

Parameters

  • $fieldname : mixed: (string) form field name containing the source file path
  • $uploaddir : mixed: (string) upload directory

Tags

  • author: Nicola Asuni
  • since: 2010-06-12

Return values

mixed —

file name or false in case of error

F_read_file_size()

File: tce_functions_upload.php line 78

F_read_file_size(mixed $filetocheck) : mixed

Parameters

  • $filetocheck : mixed: (string) file to check (local path or URL)

Tags

  • author: Nicola Asuni
  • since: 2001-11-19

Return values

mixed —

file size in bytes or false in case of error

F_select_user()

File: tce_functions_user_select.php line 36

F_select_user(mixed $order_field, mixed $orderdir, mixed $firstrow, mixed $rowsperpage[, mixed $group_id = 0 ][, mixed $andwhere = '' ][, mixed $searchterms = '' ]) : true

Parameters

  • $order_field : mixed: (string) order by column name
  • $orderdir : mixed: (string) oreder direction
  • $firstrow : mixed: (string) number of first row to display
  • $rowsperpage : mixed: (string) number of rows per page
  • $group_id : mixed = 0: (int) id of the group (default = 0 = no specific group selected)
  • $andwhere : mixed = ‘’: (string) additional SQL WHERE query conditions
  • $searchterms : mixed = ‘’: (string) search terms

Tags

  • author: Nicola Asuni
  • since: 2001-09-13

Return values

true

F_show_select_user()

File: tce_functions_user_select.php line 64

F_show_select_user(mixed $order_field, mixed $orderdir, mixed $firstrow, mixed $rowsperpage[, mixed $group_id = 0 ][, mixed $andwhere = '' ][, mixed $searchterms = '' ]) : false

Parameters

  • $order_field : mixed: (string) Order by column name.
  • $orderdir : mixed: (int) Order direction.
  • $firstrow : mixed: (int) Number of first row to display.
  • $rowsperpage : mixed: (int) Number of rows per page.
  • $group_id : mixed = 0: (int) ID of the group (default = 0 = no specific group selected).
  • $andwhere : mixed = ‘’: (string) Additional SQL WHERE query conditions.
  • $searchterms : mixed = ‘’: (string) Search terms.

Tags

  • author: Nicola Asuni
  • since: 2001-09-13

Return values

false —

in case of empty database, true otherwise

F_show_select_user_popup()

File: tce_functions_user_select.php line 489

F_show_select_user_popup(mixed $order_field, mixed $orderdir, mixed $firstrow, mixed $rowsperpage[, mixed $group_id = 0 ][, mixed $andwhere = '' ][, mixed $searchterms = '' ][, string $cid = 0 ]) : false

Parameters

  • $order_field : mixed: (string) Order by column name.
  • $orderdir : mixed: (int) Order direction.
  • $firstrow : mixed: (int) Number of first row to display.
  • $rowsperpage : mixed: (int) Number of rows per page.
  • $group_id : mixed = 0: (int) ID of the group (default = 0 = no specific group selected).
  • $andwhere : mixed = ‘’: (string) Additional SQL WHERE query conditions.
  • $searchterms : mixed = ‘’: (string) Search terms.
  • $cid : string = 0: ID of the calling form field.

Tags

  • author: Nicola Asuni
  • since: 2012-04-14

Return values

false —

in case of empty database, true otherwise

F_isTestOnGroup()

File: tce_functions_user_select.php line 824

F_isTestOnGroup(mixed $test_id, mixed $group_id) : bool

Parameters

  • $test_id : mixed: (int) test ID
  • $group_id : mixed: (int) group ID

Tags

  • since: 11.1.003 (2010-10-05)

Return values

bool —

true/false

F_isUserOnGroup()

File: tce_functions_user_select.php line 846

F_isUserOnGroup(mixed $user_id, mixed $group_id) : bool

Parameters

  • $user_id : mixed: (int) user ID
  • $group_id : mixed: (int) group ID

Tags

  • since: 11.1.003 (2010-10-05)

Return values

bool —

true/false

F_isAuthorizedEditorForGroup()

File: tce_functions_user_select.php line 867

F_isAuthorizedEditorForGroup(mixed $group_id) : bool

Parameters

  • $group_id : mixed: (int) group ID

Tags

  • since: 11.1.003 (2010-10-05)

Return values

bool —

true/false

F_isAuthorizedEditorForUser()

File: tce_functions_user_select.php line 885

F_isAuthorizedEditorForUser(mixed $user_id) : bool

Parameters

  • $user_id : mixed: (int) user ID

Tags

  • since: 11.1.003 (2010-10-05)

Return values

bool —

true/false

F_user_group_select_sql()

File: tce_functions_user_select.php line 923

F_user_group_select_sql([mixed $where = '' ]) : sql

Parameters

  • $where : mixed = ‘’: (string) filters to add on WHERE clause

Tags

  • since: 11.1.003 (2010-10-05)

Return values

sql —

selection string

F_user_group_select()

File: tce_functions_user_select.php line 950

F_user_group_select([mixed $name = 'group_id' ]) : table

Parameters

  • $name : mixed = ‘group_id’: (string) name of the select field

Return values

table —

header element string

F_get_user_groups()

File: tce_functions_user_select.php line 990

F_get_user_groups(mixed $user_id) : array<string|int, mixed>

Parameters

  • $user_id : mixed: (int) user ID

Return values

array<string|int, mixed> —

containing user’s groups IDs

F_getUIDfromRegnum()

File: tce_functions_user_select.php line 1015

F_getUIDfromRegnum(mixed $regnum) : int

Parameters

  • $regnum : mixed

Tags

  • since: 11.3.005 (2012-07-31)

Return values

int —

User ID or 0 in case of error.

F_show_online_users()

File: tce_functions_users_online.php line 34

F_show_online_users(mixed $wherequery, mixed $order_field, mixed $orderdir, mixed $firstrow, mixed $rowsperpage) : false

Parameters

  • $wherequery : mixed: (string) users selection query
  • $order_field : mixed: (string) order by column name
  • $orderdir : mixed: (string) oreder direction
  • $firstrow : mixed: (string) number of first row to display
  • $rowsperpage : mixed: (string) number of rows per page

Tags

  • author: Nicola Asuni
  • since: 2001-10-18

Return values

false —

in case of empty database, true otherwise

F_list_online_users()

File: tce_functions_users_online.php line 53

F_list_online_users(mixed $wherequery, mixed $order_field, mixed $orderdir, mixed $firstrow, mixed $rowsperpage) : false

Parameters

  • $wherequery : mixed: (string) users selection query
  • $order_field : mixed: (string) order by column name
  • $orderdir : mixed: (int) oreder direction
  • $firstrow : mixed: (int) number of first row to display
  • $rowsperpage : mixed: (int) number of rows per page

Tags

  • author: Nicola Asuni
  • since: 2001-10-18

Return values

false —

in case of empty database, true otherwise

F_TSVQuestionImporter()

File: tce_import_questions.php line 153

F_TSVQuestionImporter(mixed $tsvfile) : bool

The format of TSV is the same obtained by exporting data from TCExam interface.

Parameters

  • $tsvfile : mixed: (string) TSV (tab delimited text) file name

Return values

bool —

TRUE in case of success, FALSE otherwise

F_import_tsv_users()

File: tce_import_users.php line 602

F_import_tsv_users(mixed $tsvfile) : bool

The format of TSV is the same obtained by exporting data from Users Selection Form.

Parameters

  • $tsvfile : mixed: (string) TSV (tab delimited text) file name

Return values

bool —

TRUE in case of success, FALSE otherwise

F_show_select_questions()

File: tce_show_all_questions.php line 480

F_show_select_questions(mixed $wherequery, mixed $subject_module_id, mixed $subject_id, mixed $order_field, mixed $orderdir, mixed $firstrow, mixed $rowsperpage[, mixed $hide_answers = false ]) : false

Parameters

  • $wherequery : mixed: (string) question selection query
  • $subject_module_id : mixed: (string) module ID
  • $subject_id : mixed: (string) topic ID
  • $order_field : mixed: (string) order by column name
  • $orderdir : mixed: (int) oreder direction
  • $firstrow : mixed: (int) number of first row to display
  • $rowsperpage : mixed: (int) number of rows per page
  • $hide_answers : mixed = false: (boolean) if true hide answers

Tags

  • author: Nicola Asuni
  • since: 2005-07-06

Return values

false —

in case of empty database, true otherwise

F_tsv_export_questions()

File: tce_tsv_questions.php line 79

F_tsv_export_questions(mixed $module_id, mixed $subject_id, mixed $expmode) : TSV

Parameters

  • $module_id : mixed: (int) module ID
  • $subject_id : mixed: (int) topic ID
  • $expmode : mixed: (int) export mode: 1 = selected topic; 2 = selected module; 3 = all modules.

Return values

TSV —

data

F_tsv_export_users()

File: tce_tsv_users.php line 52

F_tsv_export_users() : TSV

Tags

  • author: Nicola Asuni
  • since: 2006-03-30

Return values

TSV —

data

F_xml_export_question_stats()

File: tce_xml_question_stats.php line 95

F_xml_export_question_stats(mixed $test_id) : XML

Parameters

  • $test_id : mixed: (int) test ID

Tags

  • author: Nicola Asuni
  • since: 2010-05-10

Return values

XML —

data

F_xml_export_questions()

File: tce_xml_questions.php line 110

F_xml_export_questions(mixed $module_id, mixed $subject_id, mixed $expmode) : XML

Parameters

  • $module_id : mixed: (int) module ID
  • $subject_id : mixed: (int) topic ID
  • $expmode : mixed: (int) export mode: 1 = selected topic; 2 = selected module; 3 = all modules.

Tags

  • author: Nicola Asuni
  • since: 2006-03-06

Return values

XML —

data

F_xml_export_results()

File: tce_xml_results.php line 115

F_xml_export_results(mixed $test_id[, mixed $group_id = 0 ][, mixed $user_id = 0 ][, mixed $startdate = 0 ][, mixed $enddate = 0 ][, mixed $display_mode = 1 ]) : XML

Parameters

  • $test_id : mixed: (int) test ID.
  • $group_id : mixed = 0: (int) group ID - if greater than zero, filter stats for the specified user group.
  • $user_id : mixed = 0: (int) user ID - if greater than zero, filter stats for the specified user.
  • $startdate : mixed = 0: (int) start date ID - if greater than zero, filter stats for the specified starting date
  • $enddate : mixed = 0: (int) end date ID - if greater than zero, filter stats for the specified ending date
  • $display_mode : mixed = 1: (int) display mode: 0 = disabled; 1 = minimum; 2 = module; 3 = subject; 4 = question; 5 = answer.

Tags

  • author: Nicola Asuni

Return values

XML —

data

F_xml_export_user_results()

File: tce_xml_user_results.php line 124

F_xml_export_user_results(mixed $user_id, mixed $startdate, mixed $enddate, mixed $order_field) : XML

Parameters

  • $user_id : mixed: (int) user ID - if greater than zero, filter stats for the specified user.
  • $startdate : mixed: (string) start date ID - if greater than zero, filter stats for the specified starting date
  • $enddate : mixed: (string) end date ID - if greater than zero, filter stats for the specified ending date
  • $order_field : mixed: (string) Ordering fields for SQL query.

Tags

  • author: Nicola Asuni

Return values

XML —

data

F_xml_export_users()

File: tce_xml_users.php line 80

F_xml_export_users() : XML

Tags

  • author: Nicola Asuni
  • since: 2006-03-17

Return values

XML —

data

F_altLogin()

File: tce_altauth.php line 30

F_altLogin() : array<string|int, mixed>

(SSL, HTTP-BASIC, CAS, SHIBBOLETH, RADIUS, LDAP, CUSTOM)

Tags

  • since: 2012-06-05

Return values

array<string|int, mixed> —

of user’s data for successful login, false otherwise

F_db_connect()

File: tce_db_dal_mysql.php line 36

F_db_connect([mixed $host = 'localhost' ][, mixed $port = '3306' ][, mixed $username = 'root' ][, mixed $password = '' ][, mixed $database = '' ]) : MySQL

Parameters

  • $host : mixed = ’localhost’: (string) database server host name.
  • $port : mixed = ‘3306’: (string) database connection port
  • $username : mixed = ‘root’: (string) Name of the user that owns the server process.
  • $password : mixed = ‘’: (string) Password of the user that owns the server process.
  • $database : mixed = ‘’: (string) Database name.

Return values

MySQL —

link identifier on success, or FALSE on failure.

F_db_close()

File: tce_db_dal_mysql.php line 63

F_db_close(mixed $link_identifier) : bool

Parameters

  • $link_identifier : mixed: (resource) database link identifier.

Return values

bool —

TRUE on success or FALSE on failure

F_db_error()

File: tce_db_dal_mysql.php line 72

F_db_error([mixed $link_identifier = null ]) : string

Parameters

  • $link_identifier : mixed = null

Return values

string —

error message.

F_db_query()

File: tce_db_dal_mysql.php line 87

F_db_query(mixed $query, mixed $link_identifier) : false

Parameters

  • $query : mixed: (string) The query tosend. The query string should not end with a semicolon.
  • $link_identifier : mixed: (resource) database link identifier.

Return values

false —

in case of error, TRUE or resource-identifier in case of success.

F_db_fetch_array()

File: tce_db_dal_mysql.php line 100

F_db_fetch_array(mixed $result) : Returns

Note: This function sets NULL fields to PHP NULL value.

Parameters

  • $result : mixed: (resource) result resource to the query result.

Return values

Returns —

an array that corresponds to the fetched row, or FALSE if there are no more rows.

F_db_fetch_assoc()

File: tce_db_dal_mysql.php line 111

F_db_fetch_assoc(mixed $result) : Returns

Note: This function sets NULL fields to PHP NULL value.

Parameters

  • $result : mixed: (resource) result resource to the query result.

Return values

Returns —

an array that corresponds to the fetched row, or FALSE if there are no more rows.

F_db_affected_rows()

File: tce_db_dal_mysql.php line 122

F_db_affected_rows(mixed $link_identifier, mixed $result) : Number

Parameters

  • $link_identifier : mixed: (resource) database link identifier.
  • $result : mixed: (resource) result resource to the query result [UNUSED].

Return values

Number —

of rows.

F_db_num_rows()

File: tce_db_dal_mysql.php line 132

F_db_num_rows(mixed $result) : Number

Parameters

  • $result : mixed: (resource) result resource to the query result.

Return values

Number —

of affected rows.

F_db_insert_id()

File: tce_db_dal_mysql.php line 144

F_db_insert_id(mixed $link_identifier[, mixed $tablename = '' ][, mixed $fieldname = '' ]) : int

Parameters

  • $link_identifier : mixed: (resource) database link identifier.
  • $tablename : mixed = ‘’: (string) Table name.
  • $fieldname : mixed = ‘’: (string) Field name (column name).

Return values

int —

ID generated from the last INSERT operation.

F_db_datetime_diff_seconds()

File: tce_db_dal_mysql.php line 168

F_db_datetime_diff_seconds(mixed $start_date_field, mixed $end_date_field) : SQL

Parameters

  • $start_date_field : mixed
  • $end_date_field : mixed

Return values

SQL —

query string

F_escape_sql()

File: tce_db_dal_mysql.php line 181

F_escape_sql(mixed $link_identifier, mixed $str[, mixed $stripslashes = true ]) : string

Parameters

  • $link_identifier : mixed: (resource) database link identifier.
  • $str : mixed: (string) The string that is to be escaped.
  • $stripslashes : mixed = true: (boolean) if true strip slashes from string

Tags

  • since: 5.0.005 2007-12-05

Return values

string —

Returns the escaped string, or FALSE on error.

F_db_connect()

File: tce_db_dal_mysqli.php line 45

F_db_connect([mixed $host = 'localhost' ][, mixed $port = '3306' ][, mixed $username = 'root' ][, mixed $password = '' ][, mixed $database = '' ]) : MySQL

Parameters

  • $host : mixed = ’localhost’: (string) database server host name.
  • $port : mixed = ‘3306’: (string) database connection port
  • $username : mixed = ‘root’: (string) Name of the user that owns the server process.
  • $password : mixed = ‘’: (string) Password of the user that owns the server process.
  • $database : mixed = ‘’: (string) Database name.

Return values

MySQL —

link identifier on success, or FALSE on failure.

F_db_close()

File: tce_db_dal_mysqli.php line 68

F_db_close(mixed $link_identifier) : bool

Parameters

  • $link_identifier : mixed: (resource) database link identifier.

Return values

bool —

TRUE on success or FALSE on failure

F_db_error()

File: tce_db_dal_mysqli.php line 77

F_db_error([mixed $link_identifier = null ]) : string

Parameters

  • $link_identifier : mixed = null

Return values

string —

error message.

F_db_query()

File: tce_db_dal_mysqli.php line 92

F_db_query(mixed $query, mixed $link_identifier) : false

Parameters

  • $query : mixed: (string) The query tosend. The query string should not end with a semicolon.
  • $link_identifier : mixed: (resource) database link identifier.

Return values

false —

in case of error, TRUE or resource-identifier in case of success.

F_db_fetch_array()

File: tce_db_dal_mysqli.php line 105

F_db_fetch_array(mixed $result) : Returns

Note: This function sets NULL fields to PHP NULL value.

Parameters

  • $result : mixed: (resource) result resource to the query result.

Return values

Returns —

an array that corresponds to the fetched row, or FALSE if there are no more rows.

F_db_fetch_assoc()

File: tce_db_dal_mysqli.php line 116

F_db_fetch_assoc(mixed $result) : Returns

Note: This function sets NULL fields to PHP NULL value.

Parameters

  • $result : mixed: (resource) result resource to the query result.

Return values

Returns —

an array that corresponds to the fetched row, or FALSE if there are no more rows.

F_db_affected_rows()

File: tce_db_dal_mysqli.php line 127

F_db_affected_rows(mixed $link_identifier, mixed $result) : Number

Parameters

  • $link_identifier : mixed: (resource) database link identifier.
  • $result : mixed: (resource) result resource to the query result [UNUSED].

Return values

Number —

of rows.

F_db_num_rows()

File: tce_db_dal_mysqli.php line 137

F_db_num_rows(mixed $result) : Number

Parameters

  • $result : mixed: (resource) result resource to the query result.

Return values

Number —

of affected rows.

F_db_insert_id()

File: tce_db_dal_mysqli.php line 149

F_db_insert_id(mixed $link_identifier[, mixed $tablename = '' ][, mixed $fieldname = '' ]) : int

Parameters

  • $link_identifier : mixed: (resource) database link identifier.
  • $tablename : mixed = ‘’: (string) Table name. (unused here but required for other DAL).
  • $fieldname : mixed = ‘’: (string) Field name (column name). (unused here but required for other DAL).

Return values

int —

ID generated from the last INSERT operation.

F_db_datetime_diff_seconds()

File: tce_db_dal_mysqli.php line 158

F_db_datetime_diff_seconds(mixed $start_date_field, mixed $end_date_field) : SQL

Parameters

  • $start_date_field : mixed
  • $end_date_field : mixed

Return values

SQL —

query string

F_escape_sql()

File: tce_db_dal_mysqli.php line 171

F_escape_sql(mixed $link_identifier, mixed $str[, mixed $stripslashes = true ]) : string

Parameters

  • $link_identifier : mixed: (resource) database link identifier.
  • $str : mixed: (string) The string that is to be escaped.
  • $stripslashes : mixed = true: (boolean) if true strip slashes from string

Tags

  • since: 5.0.005 2007-12-05

Return values

string —

Returns the escaped string, or FALSE on error.

F_db_connect()

File: tce_db_dal_oracle.php line 37

F_db_connect([mixed $host = 'localhost' ][, mixed $port = '1521' ][, mixed $username = 'root' ][, mixed $password = '' ][, mixed $database = '' ]) : Oracle

If a second call is made to this function with the same arguments, no new link will be established, but instead, the link identifier of the already opened link will be returned.

Parameters

  • $host : mixed = ’localhost’: (string) database server host name.
  • $port : mixed = ‘1521’: (string) database connection port
  • $username : mixed = ‘root’: (string) Name of the user that owns the server process.
  • $password : mixed = ‘’: (string) Password of the user that owns the server process.
  • $database : mixed = ‘’: (string) Database name.

Return values

Oracle —

link identifier on success, or FALSE on failure.

F_db_close()

File: tce_db_dal_oracle.php line 64

F_db_close(mixed $link_identifier) : bool

Parameters

  • $link_identifier : mixed: (resource) database link identifier.

Return values

bool —

TRUE on success or FALSE on failure

F_db_error()

File: tce_db_dal_oracle.php line 73

F_db_error([mixed $link_identifier = null ]) : string

Parameters

  • $link_identifier : mixed = null

Return values

string —

error message.

F_db_query()

File: tce_db_dal_oracle.php line 86

F_db_query(mixed $query, mixed $link_identifier) : false

Parameters

  • $query : mixed: (string) The query tosend. The query string should not end with a semicolon.
  • $link_identifier : mixed: (resource) database link identifier.

Return values

false —

in case of error, TRUE or resource-identifier in case of success.

F_db_fetch_array()

File: tce_db_dal_oracle.php line 115

F_db_fetch_array(mixed $result) : Returns

Note: This function sets NULL fields to PHP NULL value.

Parameters

  • $result : mixed: (resource) result resource to the query result.

Return values

Returns —

an array that corresponds to the fetched row, or FALSE if there are no more rows.

F_db_fetch_assoc()

File: tce_db_dal_oracle.php line 132

F_db_fetch_assoc(mixed $result) : Returns

Note: This function sets NULL fields to PHP NULL value.

Parameters

  • $result : mixed: (resource) result resource to the query result.

Return values

Returns —

an array that corresponds to the fetched row, or FALSE if there are no more rows.

F_db_affected_rows()

File: tce_db_dal_oracle.php line 149

F_db_affected_rows(mixed $link_identifier, mixed $result) : Number

Parameters

  • $link_identifier : mixed: (resource) database link identifier [UNUSED].
  • $result : mixed: (resource) result resource to the query result.

Return values

Number —

of rows.

F_db_num_rows()

File: tce_db_dal_oracle.php line 159

F_db_num_rows(mixed $result) : Number

Parameters

  • $result : mixed: (resource) result resource to the query result.

Return values

Number —

of affected rows.

F_db_insert_id()

File: tce_db_dal_oracle.php line 173

F_db_insert_id(mixed $link_identifier[, mixed $tablename = '' ][, mixed $fieldname = '' ]) : int

Parameters

  • $link_identifier : mixed: (resource) database link identifier.
  • $tablename : mixed = ‘’: (string) Table name.
  • $fieldname : mixed = ‘’: (string) Field name (column name).

Return values

int —

ID generated from the last INSERT operation.

F_db_datetime_diff_seconds()

File: tce_db_dal_oracle.php line 187

F_db_datetime_diff_seconds(mixed $start_date_field, mixed $end_date_field) : SQL

Parameters

  • $start_date_field : mixed
  • $end_date_field : mixed

Return values

SQL —

query string

F_escape_sql()

File: tce_db_dal_oracle.php line 200

F_escape_sql(mixed $link_identifier, mixed $str[, mixed $stripslashes = true ]) : string

Parameters

  • $link_identifier : mixed: (resource) database link identifier.
  • $str : mixed: (string) The string that is to be escaped.
  • $stripslashes : mixed = true: (boolean) if true strip slashes from string

Tags

  • since: 5.0.005 2007-12-05

Return values

string —

Returns the escaped string, or FALSE on error.

F_db_connect()

File: tce_db_dal_postgresql.php line 37

F_db_connect([mixed $host = 'localhost' ][, mixed $port = '5432' ][, mixed $username = 'postgres' ][, mixed $password = '' ][, mixed $database = 'template1' ]) : PostgreSQL

If a second call is made to this function with the same arguments, no new link will be established, but instead, the link identifier of the already opened link will be returned.

Parameters

  • $host : mixed = ’localhost’: (string) database server host name.
  • $port : mixed = ‘5432’: (string) database connection port
  • $username : mixed = ‘postgres’: (string) Name of the user that owns the server process.
  • $password : mixed = ‘’: (string) Password of the user that owns the server process.
  • $database : mixed = ’template1’: (string) Database name.

Return values

PostgreSQL —

link identifier on success, or FALSE on failure.

F_db_close()

File: tce_db_dal_postgresql.php line 69

F_db_close(mixed $link_identifier) : bool

Parameters

  • $link_identifier : mixed: (resource) database link identifier.

Return values

bool —

TRUE on success or FALSE on failure

F_db_error()

File: tce_db_dal_postgresql.php line 78

F_db_error([mixed $link_identifier = null ]) : string

Parameters

  • $link_identifier : mixed = null

Return values

string —

error message.

F_db_query()

File: tce_db_dal_postgresql.php line 90

F_db_query(mixed $query, mixed $link_identifier) : false

Parameters

  • $query : mixed: (string) The query tosend. The query string should not end with a semicolon.
  • $link_identifier : mixed: (resource) database link identifier.

Return values

false —

in case of error, TRUE or resource-identifier in case of success.

F_db_fetch_array()

File: tce_db_dal_postgresql.php line 103

F_db_fetch_array(mixed $result) : Returns

Note: This function sets NULL fields to PHP NULL value.

Parameters

  • $result : mixed: (resource) result resource to the query result.

Return values

Returns —

an array that corresponds to the fetched row, or FALSE if there are no more rows.

F_db_fetch_assoc()

File: tce_db_dal_postgresql.php line 114

F_db_fetch_assoc(mixed $result) : Returns

Note: This function sets NULL fields to PHP NULL value.

Parameters

  • $result : mixed: (resource) result resource to the query result.

Return values

Returns —

an array that corresponds to the fetched row, or FALSE if there are no more rows.

F_db_affected_rows()

File: tce_db_dal_postgresql.php line 125

F_db_affected_rows(mixed $link_identifier, mixed $result) : Number

Parameters

  • $link_identifier : mixed: (resource) database link identifier [UNUSED].
  • $result : mixed: (resource) result resource to the query result.

Return values

Number —

of rows.

F_db_num_rows()

File: tce_db_dal_postgresql.php line 135

F_db_num_rows(mixed $result) : Number

Parameters

  • $result : mixed: (resource) result resource to the query result.

Return values

Number —

of affected rows.

F_db_insert_id()

File: tce_db_dal_postgresql.php line 147

F_db_insert_id(mixed $link_identifier[, mixed $tablename = '' ][, mixed $fieldname = '' ]) : int

Parameters

  • $link_identifier : mixed: (resource) database link identifier.
  • $tablename : mixed = ‘’: (string) Table name.
  • $fieldname : mixed = ‘’: (string) Field name (column name).

Return values

int —

ID generated from the last INSERT operation.

F_db_datetime_diff_seconds()

File: tce_db_dal_postgresql.php line 165

F_db_datetime_diff_seconds(mixed $start_date_field, mixed $end_date_field) : SQL

Parameters

  • $start_date_field : mixed
  • $end_date_field : mixed

Return values

SQL —

query string

F_escape_sql()

File: tce_db_dal_postgresql.php line 178

F_escape_sql(mixed $link_identifier, mixed $str[, mixed $stripslashes = true ]) : string

Parameters

  • $link_identifier : mixed: (resource) database link identifier.
  • $str : mixed: (string) The string that is to be escaped.
  • $stripslashes : mixed = true: (boolean) if true strip slashes from string

Tags

  • since: 5.0.005 2007-12-05

Return values

string —

Returns the escaped string, or FALSE on error.

F_select_modules_sql()

File: tce_functions_auth_sql.php line 30

F_select_modules_sql([mixed $andwhere = '' ]) : string

Parameters

  • $andwhere : mixed = ‘’: (string) additional WHERE statements (e.g.: “module_enabled=‘1’”)

Tags

  • author: Nicola Asuni
  • since: 2010-06-16

Return values

string —

sql statement

F_select_subjects_sql()

File: tce_functions_auth_sql.php line 56

F_select_subjects_sql([mixed $andwhere = '' ]) : string

Parameters

  • $andwhere : mixed = ‘’: (string) additional WHERE statements (e.g.: “subject_enabled=‘1’”)

Tags

  • author: Nicola Asuni
  • since: 2006-03-12

Return values

string —

sql statement

F_select_module_subjects_sql()

File: tce_functions_auth_sql.php line 68

F_select_module_subjects_sql([mixed $andwhere = '' ]) : string

Parameters

  • $andwhere : mixed = ‘’: (string) additional WHERE statements (e.g.: “subject_enabled=‘1’”)

Tags

  • author: Nicola Asuni
  • since: 2008-11-28

Return values

string —

sql statement

F_select_tests_sql()

File: tce_functions_auth_sql.php line 93

F_select_tests_sql() : string

Tags

  • author: Nicola Asuni
  • since: 2006-03-12

Return values

string —

sql statement

F_select_executed_tests_sql()

File: tce_functions_auth_sql.php line 111

F_select_executed_tests_sql() : string

Tags

  • author: Nicola Asuni
  • since: 2006-06-26

Return values

string —

sql statement

F_loginForm()

File: tce_functions_authorization.php line 39

F_loginForm(mixed $faction, mixed $fid, mixed $fmethod, mixed $fenctype, mixed $username) : XHTML

Parameters

  • $faction : mixed
  • $fid : mixed
  • $fmethod : mixed
  • $fenctype : mixed
  • $username : mixed

Return values

XHTML —

string for login form

F_login_form()

File: tce_functions_authorization.php line 156

F_login_form() : mixed

NOTE: This function calls exit() after execution.

F_logout_form()

File: tce_functions_authorization.php line 207

F_logout_form() : XHTML

Return values

XHTML —

string for logout form.

F_logout_page()

File: tce_functions_authorization.php line 242

F_logout_page() : mixed

NOTE: This function calls exit() after execution.

F_isAuthorizedUser()

File: tce_functions_authorization.php line 263

F_isAuthorizedUser(mixed $table, mixed $field_id_name, mixed $value_id, mixed $field_user_id) : bool

Parameters

  • $table : mixed: (string) table to be modified
  • $field_id_name : mixed: (string) name of the main ID field of the table
  • $value_id : mixed: (int) value of the ID field of the table
  • $field_user_id : mixed: (string) name of the foreign key to to user_id

Tags

  • author: Nicola Asuni
  • since: 2006-03-11

Return values

bool —

true if the user is authorized, false otherwise

F_getAuthorizedUsers()

File: tce_functions_authorization.php line 333

F_getAuthorizedUsers(mixed $user_id) : string

Parameters

  • $user_id : mixed: (int) user ID

Tags

  • author: Nicola Asuni
  • since: 2006-03-11

Return values

string

F_syncUserGroups()

File: tce_functions_authorization.php line 363

F_syncUserGroups(mixed $usrid, mixed $grpids) : mixed

Parameters

  • $usrid : mixed: (int) ID of the user to update.
  • $grpids : mixed: (mixed) Group ID or comma separated list of group IDs (0=all available groups).

Tags

  • author: Nicola Asuni
  • since: 2012-09-11

F_isSslCertificateValid()

File: tce_functions_authorization.php line 430

F_isSslCertificateValid() : true

Tags

  • author: Nicola Asuni
  • since: 2013-03-26

Return values

true —

if the client has a valid SSL certificate, false otherwise.

F_getSSLCertificateHash()

File: tce_functions_authorization.php line 457

F_getSSLCertificateHash(string $cert[, bool $pkcs12 = false ]) : array<string|int, mixed>

Parameters

  • $cert : string: String containing the certificate data.
  • $pkcs12 : bool = false: Set this variable to true if the certificate is in PKCS12 format.

Tags

  • author: Nicola Asuni
  • since: 2013-07-01

Return values

array<string|int, mixed> —

containing the hash code and the validity end date in unix epoch.

F_getSSLClientHash()

File: tce_functions_authorization.php line 492

F_getSSLClientHash() : string

Tags

  • author: Nicola Asuni
  • since: 2013-07-01

Return values

string —

containing the hash code.

F_print_error()

File: tce_functions_errmsg.php line 41

F_print_error([mixed $messagetype = 'MESSAGE' ][, mixed $messagetoprint = '' ][, mixed $exit = false ]) : mixed

Print a message

Parameters

  • $messagetype : mixed = ‘MESSAGE’: (string) Type of message: 0=no message, message; warning; error.
  • $messagetoprint : mixed = ‘’: (string) message to print.
  • $exit : mixed = false: (bool) if true output a message and terminate the current script [default = false].

F_display_db_error()

File: tce_functions_errmsg.php line 114

F_display_db_error([mixed $exit = true ]) : mixed

Parameters

  • $exit : mixed = true: (bool) if true output a message and terminate the current script [default = true].

F_error_handler()

File: tce_functions_errmsg.php line 129

F_error_handler(mixed $errno, mixed $errstr, mixed $errfile, mixed $errline) : mixed

Parameters

  • $errno : mixed: (int) The first parameter, errno, contains the level of the error raised, as an integer.
  • $errstr : mixed: (string) The second parameter, errstr, contains the error message, as a string.
  • $errfile : mixed: (string) The third parameter is optional, errfile, which contains the filename that the error was raised in, as a string.
  • $errline : mixed: (int) The fourth parameter is optional, errline, which contains the line number the error was raised at, as an integer.

F_url_exists()

File: tce_functions_errmsg.php line 153

F_url_exists(mixed $url) : Returns

Parameters

  • $url : mixed

Return values

Returns —

TRUE if the URL exists; FALSE otherwise.

F_file_exists()

File: tce_functions_errmsg.php line 181

F_file_exists(mixed $filename) : Returns

Checks whether a file or directory exists. Only allows some protocols and local files.

Parameters

  • $filename : mixed

Return values

Returns —

TRUE if the file or directory specified by filename exists; FALSE otherwise.

F_decode_form_fields()

File: tce_functions_form.php line 59

F_decode_form_fields() : array<string|int, mixed>

Return values

array<string|int, mixed> —

containing form fields

F_check_required_fields()

File: tce_functions_form.php line 70

F_check_required_fields(mixed $formfields) : array<string|int, mixed>

Parameters

  • $formfields : mixed: (string) input array containing form fields

Return values

array<string|int, mixed> —

containing a list of missing fields (if any)

F_get_field_format_registry()

File: tce_functions_form.php line 116

F_get_field_format_registry() : array<string, string>

This is the single source of truth used by F_check_fields_format() to validate submitted values. The matching pattern is resolved here, on the server, by field name.

Field names are static across the application, so a flat “name => un-delimited regex” map is sufficient. Configurable constants are reused where they already exist.

Return values

array<string, string> —

map of field name to un-delimited regular expression

F_check_fields_format()

File: tce_functions_form.php line 162

F_check_fields_format(mixed $formfields) : string

For every field present in F_get_field_format_registry() that was submitted with a non-empty value, the value is matched against its canonical (server-authored) pattern. The client-supplied ‘x_’ value is ignored entirely, so a tampered/omitted/malicious pattern can neither bypass validation nor be executed as a regular expression.

Parameters

  • $formfields : mixed: (array) input array containing form fields

Return values

string —

comma-separated list of wrong fields (empty when all valid)

F_check_form_fields()

File: tce_functions_form.php line 212

F_check_form_fields() : false

see: F_check_required_fields, F_check_fields_format

Return values

false —

in case of error, true otherwise

F_close_button()

File: tce_functions_form.php line 239

F_close_button([mixed $onclick = '' ]) : XHTML

Parameters

  • $onclick : mixed = ‘’: (string) additional javascript code to execute before closing the window.

Return values

XHTML —

code string

F_submit_button()

File: tce_functions_form.php line 270

F_submit_button(mixed $name, mixed $value[, mixed $title = '' ][, mixed $extra = '' ]) : XHTML

Parameters

  • $name : mixed: (string) button name
  • $value : mixed: (string) label for button
  • $title : mixed = ‘’: (string) button title, default=’’
  • $extra : mixed = ‘’: (string) optional extra fields to add to the input tag, default=’’

Return values

XHTML —

code string

F_getCSRFTokenField()

File: tce_functions_form.php line 291

F_getCSRFTokenField() : XHTML

Return values

XHTML —

code string

getRequiredMark()

File: tce_functions_form.php line 302

getRequiredMark([mixed $required = false ]) : string

The control itself should also carry aria-required=“true”.

Parameters

  • $required : mixed = false: (boolean) true if the field is required.

Return values

string —

XHTML code (empty string when the field is not required).

getFormRowTextInput()

File: tce_functions_form.php line 334

getFormRowTextInput(mixed $field_name, mixed $name[, mixed $description = '' ][, mixed $tip = '' ][, mixed $value = '' ][, mixed $format = '' ][, mixed $maxlen = 255 ][, mixed $date = false ][, mixed $datetime = false ][, mixed $password = false ][, mixed $prefix = '' ][, mixed $required = false ][, mixed $autocomplete = '' ][, mixed $inputtype = '' ]) : string

Parameters

  • $field_name : mixed: (string) Name of the form field.
  • $name : mixed: (string) Label.
  • $description : mixed = ‘’: (string) Label description (tooltip).
  • $tip : mixed = ‘’: (string) Help to be displayed on the right of the input field.
  • $value : mixed = ‘’: (string) Initial value.
  • $format : mixed = ‘’: (string) Regular expression to check the format of the field.
  • $maxlen : mixed = 255: (int) Maximum input length.
  • $date : mixed = false: (boolean) True if the field is a date input.
  • $datetime : mixed = false: (boolean) True if the field is a date-time input.
  • $password : mixed = false: (boolean) True if the field is a password.
  • $prefix : mixed = ‘’: (string) code to be displayed after label.
  • $required : mixed = false: (boolean) If true the field is marked as required.
  • $autocomplete : mixed = ‘’: (string) HTML autocomplete token (e.g. ’email’, ‘username’, ‘current-password’, ’new-password’).
  • $inputtype : mixed = ‘’: (string) Override for the HTML input type (e.g. ’email’, ’tel’, ’number’); ignored for password/date/datetime fields.

Return values

string

getFormRowTextBox()

File: tce_functions_form.php line 481

getFormRowTextBox(mixed $field_name, mixed $name[, mixed $description = '' ][, mixed $value = '' ][, mixed $disabled = false ][, mixed $prefix = '' ][, mixed $required = false ]) : string

Parameters

  • $field_name : mixed: (string) Name of the form field.
  • $name : mixed: (string) Label.
  • $description : mixed = ‘’: (string) Label description (tooltip).
  • $value : mixed = ‘’: (string) Initial value.
  • $disabled : mixed = false: (boolean) If true disable the field.
  • $prefix : mixed = ‘’: (string) code to be displayed after label.
  • $required : mixed = false: (boolean) If true the field is marked as required.

Return values

string

getFormRowSelectBox()

File: tce_functions_form.php line 541

getFormRowSelectBox(mixed $field_name, mixed $name[, mixed $description = '' ][, mixed $tip = '' ][, mixed $value = '' ][, mixed $items = [] ][, mixed $prefix = '' ][, mixed $required = false ]) : string

Parameters

  • $field_name : mixed: (string) Name of the form field.
  • $name : mixed: (string) Label.
  • $description : mixed = ‘’: (string) Label description (tooltip).
  • $tip : mixed = ‘’: (string) Help to be displayed on the right of the input field.
  • $value : mixed = ‘’: (string) Initial value.
  • $items : mixed = []: (array) array of items to print key => value.
  • $prefix : mixed = ‘’: (string) code to be displayed after label.
  • $required : mixed = false

Return values

string

getFormRowCheckBox()

File: tce_functions_form.php line 616

getFormRowCheckBox(mixed $field_name, mixed $name[, mixed $description = '' ][, mixed $tip = '' ][, mixed $value = '' ][, mixed $selected = false ][, mixed $disabled = false ][, mixed $prefix = '' ]) : string

Parameters

  • $field_name : mixed: (string) Name of the form field.
  • $name : mixed: (string) Label.
  • $description : mixed = ‘’: (string) Label description (tooltip).
  • $tip : mixed = ‘’: (string) Help to be displayed on the right of the input field.
  • $value : mixed = ‘’: (string) Initial value.
  • $selected : mixed = false: (boolean) set to true if selected.
  • $disabled : mixed = false: (boolean) set to true to disable the field
  • $prefix : mixed = ‘’: (string) code to be displayed after label.

Return values

string

getFormRowFixedValue()

File: tce_functions_form.php line 693

getFormRowFixedValue(mixed $field_name, mixed $name[, mixed $description = '' ][, mixed $tip = '' ][, mixed $value = '' ][, mixed $currency = false ][, mixed $prefix = '' ]) : string

Parameters

  • $field_name : mixed: (string) Name of the form field.
  • $name : mixed: (string) Label.
  • $description : mixed = ‘’: (string) Label description (tooltip).
  • $tip : mixed = ‘’: (string) Help to be displayed on the right of the input field.
  • $value : mixed = ‘’: (string) Initial value.
  • $currency : mixed = false: (boolean) if true the value is a curency number.
  • $prefix : mixed = ‘’: (string) code to be displayed after label.

Return values

string

getFormSmallVertSpace()

File: tce_functions_form.php line 762

getFormSmallVertSpace() : string

Return values

string

getFormSmallDivSpace()

File: tce_functions_form.php line 771

getFormSmallDivSpace() : string

Return values

string

getFormRowVertSpace()

File: tce_functions_form.php line 780

getFormRowVertSpace() : string

Return values

string

getFormRowVertDiv()

File: tce_functions_form.php line 790

getFormRowVertDiv([mixed $title = '' ]) : string

Parameters

  • $title : mixed = ‘’: (string) Title to be printed.

Return values

string

getFormNoscriptSelect()

File: tce_functions_form.php line 805

getFormNoscriptSelect([mixed $name = 'selectrecord' ]) : string

Parameters

  • $name : mixed = ‘selectrecord’: (string) Name of the input form field.

Return values

string

getFormDescriptionLine()

File: tce_functions_form.php line 827

getFormDescriptionLine(mixed $name[, mixed $description = '' ][, mixed $value = '' ]) : string

Parameters

  • $name : mixed: (string) Label.
  • $description : mixed = ‘’: (string) Label description (tooltip).
  • $value : mixed = ‘’: (string) Initial value.

Return values

string

getFormUploadFile()

File: tce_functions_form.php line 852

getFormUploadFile(mixed $field_name, mixed $field_id, mixed $name[, mixed $description = '' ][, mixed $onchange = '' ]) : string

Parameters

  • $field_name : mixed: (string) Name of the form field.
  • $field_id : mixed: (string) ID of the form field.
  • $name : mixed: (string) Label.
  • $description : mixed = ‘’: (string) Label description (tooltip).
  • $onchange : mixed = ‘’: (string) Javascript code to execute at onchange event.

Return values

string

F_count_rows()

File: tce_functions_general.php line 29

F_count_rows(mixed $dbtable[, mixed $where = '' ]) : number

Parameters

  • $dbtable : mixed: (string) database table name
  • $where : mixed = ‘’: (string) optional where SQL clause (including the WHERE keyword).

Return values

number —

of rows

F_empty_to_null()

File: tce_functions_general.php line 52

F_empty_to_null(mixed $str) : string

Parameters

  • $str : mixed: (string) string to check.

Return values

string —

$str quoted if not empty, NULL otherwise

F_zero_to_null()

File: tce_functions_general.php line 69

F_zero_to_null(mixed $num) : string

Parameters

  • $num : mixed: (string) string to check.

Return values

string —

$num if != 0, NULL otherwise

F_getBoolean()

File: tce_functions_general.php line 86

F_getBoolean(mixed $str) : bool

Parameters

  • $str : mixed: (string) string to check.

Return values

bool —

value.

F_check_unique()

File: tce_functions_general.php line 107

F_check_unique(mixed $table, mixed $where[, mixed $fieldname = false ][, mixed $fieldid = false ]) : bool

Parameters

  • $table : mixed: (string) table name
  • $where : mixed: (string) SQL where clause
  • $fieldname : mixed = false: (mixed) name of table column to check
  • $fieldid : mixed = false: (mixed) ID of table row to check

Return values

bool —

true if unique, false otherwise

unhtmlentities()

File: tce_functions_general.php line 139

unhtmlentities(mixed $text_to_convert[, mixed $preserve_tagsign = false ]) : converted

Parameters

  • $text_to_convert : mixed: (string) input string to convert
  • $preserve_tagsign : mixed = false: (boolean) if true preserve <> symbols, default=FALSE

Return values

converted —

string

F_compact_string()

File: tce_functions_general.php line 161

F_compact_string(mixed $string[, mixed $dquotes = false ]) : converted

Parameters

  • $string : mixed: (string) input string to convert
  • $dquotes : mixed = false: (boolean) If true add slash in fron of double quotes;

Return values

converted —

string

F_replace_angulars()

File: tce_functions_general.php line 182

F_replace_angulars(mixed $str) : converted

Parameters

  • $str : mixed: (string) input string to convert

Return values

converted —

string

F_substr_utf8()

File: tce_functions_general.php line 198

F_substr_utf8(mixed $str, mixed $start, mixed $length) : substring

Parameters

  • $str : mixed: (string) input string
  • $start : mixed: (int) substring start index
  • $length : mixed: (int) substring max length

Return values

substring

F_text_to_xml()

File: tce_functions_general.php line 238

F_text_to_xml(mixed $str) : converted

Parameters

  • $str : mixed: (string) input string to convert

Return values

converted —

string

F_xml_to_text()

File: tce_functions_general.php line 258

F_xml_to_text(mixed $str) : converted

Parameters

  • $str : mixed: (string) input string to convert

Return values

converted —

string

F_text_to_tsv()

File: tce_functions_general.php line 277

F_text_to_tsv(mixed $str) : converted

Parameters

  • $str : mixed: (string) input string to convert

Return values

converted —

string

F_tsv_to_text()

File: tce_functions_general.php line 297

F_tsv_to_text(mixed $str) : converted

Parameters

  • $str : mixed: (string) input string to convert

Return values

converted —

string

showRequiredField()

File: tce_functions_general.php line 316

showRequiredField([mixed $mode = 1 ]) : html

Parameters

  • $mode : mixed = 1: (int) field mode: 1=not required; 2=required.

Return values

html —

string

utrim()

File: tce_functions_general.php line 332

utrim(mixed $txt) : string

Parameters

  • $txt : mixed: (string) The string that will be trimmed.

Return values

string —

The trimmed string.

getNormalizedIP()

File: tce_functions_general.php line 349

getNormalizedIP(mixed $ip) : string|false

Parameters

  • $ip : mixed: (string) IP address to normalize.

Tags

  • since: 7.1.000 (2009-02-13)

Return values

string|false —

IPv6 address in expanded notation or false in case of invalid input.

getIpAsBytes()

File: tce_functions_general.php line 426

getIpAsBytes(mixed $ip) : string|false

This preserves full 128-bit precision and is case-insensitive, so the returned fixed-width byte strings can be ordered and range-compared losslessly with strcmp() (see F_isValidIP). Input may use any notation accepted by getNormalizedIP() (IPv4, IPv6, or the expanded form already stored in the database).

Parameters

  • $ip : mixed: (string) IP address to convert.

Tags

  • since: 17.1.0 (2026-06-23)

Return values

string|false —

16-byte packed IPv6 address, or false on invalid input.

getIpAsString()

File: tce_functions_general.php line 445

getIpAsString(mixed $ip) : string

The stored form is the expanded IPv6 produced by getNormalizedIP(); this compacts it (and unwraps IPv4-mapped IPv6, e.g. ::ffff:127.0.0.1 -> 127.0.0.1) so it reads naturally and fits report/result columns.

Parameters

  • $ip : mixed: (string) IP address to convert.

Tags

  • since: 9.0.033 (2009-11-03)

Return values

string —

IP address as a readable string.

F_formatFloat()

File: tce_functions_general.php line 475

F_formatFloat(mixed $num) : formatted

Parameters

  • $num : mixed: (float) number to be formatted

Return values

formatted —

string

F_formatPercentage()

File: tce_functions_general.php line 486

F_formatPercentage(mixed $num[, mixed $ratio = true ]) : formatted

Parameters

  • $num : mixed: (float) Number to be formatted.
  • $ratio : mixed = true: (boolean) Set to true if the number is a ratio between 0 and 1, false if is a percentage number between 0 an 100.

Return values

formatted —

string

F_formatPdfPercentage()

File: tce_functions_general.php line 501

F_formatPdfPercentage(mixed $num[, mixed $ratio = true ]) : string

Parameters

  • $num : mixed: (float) number to be formatted
  • $ratio : mixed = true: (boolean) Set to true if the number is a ratio between 0 and 1, false if is a percentage number between 0 an 100.

Return values

string

F_formatXMLPercentage()

File: tce_functions_general.php line 516

F_formatXMLPercentage(mixed $num[, mixed $ratio = true ]) : string

Parameters

  • $num : mixed: (float) number to be formatted
  • $ratio : mixed = true: (boolean) Set to true if the number is a ratio between 0 and 1, false if is a percentage number between 0 an 100.

Return values

string

F_getUTCoffset()

File: tce_functions_general.php line 530

F_getUTCoffset(mixed $timezone) : int

Parameters

  • $timezone : mixed: (string) current user timezone

Return values

int —

UTC time offset in seconds

F_db_getUTCoffset()

File: tce_functions_general.php line 542

F_db_getUTCoffset(mixed $timezone) : string

Parameters

  • $timezone : mixed: (string) current user timezone

Return values

string —

UTC time offset (+HH:mm)

getDataXML()

File: tce_functions_general.php line 555

getDataXML(mixed $data[, mixed $level = 1 ]) : string

Parameters

  • $data : mixed: (array) Array of data (key => value).
  • $level : mixed = 1: (int) Indentation level.

Return values

string —

XML data

getDataTSVHeader()

File: tce_functions_general.php line 585

getDataTSVHeader(mixed $data[, mixed $prefix = '' ]) : string

Parameters

  • $data : mixed: (array) Array of data (key => value).
  • $prefix : mixed = ‘’: (string) Prefix to add to keys.

Return values

string —

data

getDataTSV()

File: tce_functions_general.php line 604

getDataTSV(mixed $data) : string

Parameters

  • $data : mixed: (array) Array of data.

Return values

string —

XML data

F_html_to_TSV()

File: tce_functions_general.php line 623

F_html_to_TSV(mixed $str) : string

Parameters

  • $str : mixed: (string) HTML string to convert.

Return values

string —

TSV

F_select_table_header_element()

File: tce_functions_general.php line 678

F_select_table_header_element(mixed $order_field, mixed $orderdir, mixed $title, mixed $name[, mixed $current_order_field = '' ][, mixed $filter = '' ]) : table

Parameters

  • $order_field : mixed: (string) name of table field
  • $orderdir : mixed: (string) order direction
  • $title : mixed: title (string) field of anchor link
  • $name : mixed: column (string) name
  • $current_order_field : mixed = ‘’: (string) current order field name
  • $filter : mixed = ‘’: (string) additional parameters to pass on URL

Return values

table —

header element string

getContrastColor()

File: tce_functions_general.php line 716

getContrastColor(mixed $color) : string

Parameters

  • $color : mixed: (string) color in HEX format.

Return values

string —

Color.

F_isURL()

File: tce_functions_general.php line 737

F_isURL(mixed $str) : bool

Parameters

  • $str : mixed: (string) String to check.

Return values

bool —

true or false.

F_utf8_normalizer()

File: tce_functions_general.php line 750

F_utf8_normalizer(mixed $str[, mixed $mode = 'NONE' ]) : normalized

Modes greater than 0 requires php5-intl module. Please edit this function to implement your custom normalization method.

Parameters

  • $str : mixed: (string) UTF-8 string to normalize.
  • $mode : mixed = ‘NONE’: (int) Normalization type: NONE=None; C=Normalization Form C (NFC) - Canonical Decomposition followed by Canonical Composition; D=Normalization Form D (NFD) - Canonical Decomposition; KC=Normalization Form KC (NFKC) - Compatibility Decomposition, followed by Canonical Composition; KD=Normalization Form KD (NFKD) - Compatibility Decomposition; CUSTOM=Custom normalization using user defined function ‘user_utf8_custom_normalizer’.

Return values

normalized —

string using the specified algorithm.

bcdechex()

File: tce_functions_general.php line 803

bcdechex(string|int $dec) : string

Parameters

  • $dec : string|int: Decimal number to convert.

Tags

  • author: Nicola Asuni
  • since: 2013-07-02

Return values

string —

containing the HEX representation in uppercase.

F_html_to_text()

File: tce_functions_html2txt.php line 30

F_html_to_text(mixed $str[, mixed $preserve_newlines = false ][, mixed $display_links = false ]) : text

Parameters

  • $str : mixed: (string) HTML code string to convert.
  • $preserve_newlines : mixed = false: (boolean) If true convert newline characters to HTML line breaks.
  • $display_links : mixed = false: (boolean) If true gives a textual representation of links and images.

Return values

text —

string

File: tce_functions_menu.php line 30

F_menu_link(mixed $link, mixed $data[, mixed $level = 0 ]) : mixed

If the link refers to the current page, only the name will be returned.

Parameters

  • $link : mixed: (string) URL
  • $data : mixed: (array) link data
  • $level : mixed = 0: (int) item level

F_menu_isChildActive()

File: tce_functions_menu.php line 75

F_menu_isChildActive(mixed $data) : mixed

Parameters

  • $data : mixed: (array) link data

F_getRandomOTPkey()

File: tce_functions_otp.php line 27

F_getRandomOTPkey() : Base32

Return values

Base32 —

encoded key.

F_decodeBase32()

File: tce_functions_otp.php line 45

F_decodeBase32(mixed $code) : Decoded

Parameters

  • $code : mixed: (string) Base32 code to be decoded.

Return values

Decoded —

key.

F_getOTP()

File: tce_functions_otp.php line 75

F_getOTP(mixed $otpkey[, mixed $mtime = 0 ]) : OTP

Parameters

  • $otpkey : mixed: (string) One Time Password secret key.
  • $mtime : mixed = 0: (int) Reference time in microseconds.

Return values

OTP

F_show_page_navigator()

File: tce_functions_page.php line 32

F_show_page_navigator(mixed $script_name, mixed $sql, mixed $firstrow, mixed $rowsperpage, mixed $param_array) : mixed

Parameters

  • $script_name : mixed: (string) url of the calling page
  • $sql : mixed: (string) sql used to select records
  • $firstrow : mixed: (int) first row number
  • $rowsperpage : mixed: (int) number of max rows per page
  • $param_array : mixed: (string) parameters to pass on url via GET

Return values

mixed —

the number of pages in case of success, FALSE otherwise

F_session_string_to_array()

File: tce_functions_session.php line 212

F_session_string_to_array(mixed $sd) : array<string|int, mixed>

Parameters

  • $sd : mixed: (string) input data string

Tags

  • author: Nicola Asuni
  • since: 2001-10-18

Return values

array<string|int, mixed>

getClientFingerprint()

File: tce_functions_session.php line 232

getClientFingerprint() : string

Tags

  • author: Nicola Asuni
  • since: 2010-10-04

Return values

string —

client ID

getNewSessionID()

File: tce_functions_session.php line 268

getNewSessionID() : string

Tags

  • author: Nicola Asuni
  • since: 2010-10-04

Return values

string —

PHPSESSID

getPasswordHash()

File: tce_functions_session.php line 278

getPasswordHash(mixed $password) : string

Parameters

  • $password : mixed: (string) Password to hash.

Return values

string —

password hash

checkPassword()

File: tce_functions_session.php line 290

checkPassword(mixed $password, mixed $hash) : bool

Parameters

  • $password : mixed: (string) The password to verify
  • $hash : mixed: (string) Password hash

Return values

bool

F_isRandomSecurityConfigured()

File: tce_functions_session.php line 304

F_isRandomSecurityConfigured([mixed $secret = null ]) : bool

Security-sensitive checks that rely on the secrecy of K_RANDOM_SECURITY (e.g. the result-access token that bypasses the normal authorization check) MUST fail closed when this returns false, otherwise an attacker who knows the public default can forge a valid token. The installer replaces the placeholder with a random value at install time.

Parameters

  • $secret : mixed = null

Return values

bool —

true if the seed is configured, false if it is still the shipped default.

getPlainCSRFToken()

File: tce_functions_session.php line 321

getPlainCSRFToken() : string

Return values

string

checkCSRFToken()

File: tce_functions_session.php line 333

checkCSRFToken(mixed $token) : bool

Parameters

  • $token : mixed: (string) tocken to check

Return values

bool

F_getCSRFToken()

File: tce_functions_session.php line 343

F_getCSRFToken() : string

Return values

string

F_getArrayStatistics()

File: tce_functions_statistics.php line 30

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

Parameters

  • $data : mixed: (array) input data as bidimesional array. The first dimension is a set of data, the second contains data.

Tags

  • author: Nicola Asuni
  • since: 2008-12-25

Return values

array<string|int, mixed> —

of statistical results. The keys of the input data are peserved.

F_getSVGGraphCode()

File: tce_functions_svg_graph.php line 30

F_getSVGGraphCode(mixed $p[, mixed $w = '' ][, mixed $h = '' ]) : converted

Parameters

  • $p : mixed: (string) String containing point data.
  • $w : mixed = ‘’: (int) Graph width.
  • $h : mixed = ‘’: (int) Graph height.

Return values

converted —

string

F_getSVGGraph()

File: tce_functions_svg_graph.php line 157

F_getSVGGraph(mixed $p[, mixed $w = '' ][, mixed $h = '' ]) : converted

Parameters

  • $p : mixed: (string) String containing point data.
  • $w : mixed = ‘’: (int) Graph width.
  • $h : mixed = ‘’: (int) Graph height.

Return values

converted —

string

F_decode_tcecode()

File: tce_functions_tcecode.php line 31

F_decode_tcecode(mixed $text_to_decode) : string

Parameters

  • $text_to_decode : mixed: (string) text to convert

Return values

string —

XHTML code

F_bbcode_to_tcecode()

File: tce_functions_tcecode.php line 109

F_bbcode_to_tcecode(mixed $text) : string

Parameters

  • $text : mixed

Return values

string

F_tcecode_url()

File: tce_functions_tcecode.php line 124

F_tcecode_url(mixed $text) : string

Parameters

  • $text : mixed

Return values

string

F_tcecode_tag()

File: tce_functions_tcecode.php line 162

F_tcecode_tag(mixed $text) : string

Parameters

  • $text : mixed

Return values

string

F_tcecode_tag_arg()

File: tce_functions_tcecode.php line 199

F_tcecode_tag_arg(mixed $text) : string

Parameters

  • $text : mixed

Return values

string

F_latex_callback()

File: tce_functions_tcecode.php line 236

F_latex_callback(mixed $matches) : string

Returns replacement image for LaTeX code.

Parameters

  • $matches : mixed: (string) array containing matches: $matches[0] is the complete match, $matches[1] the match for the first subpattern enclosed in ‘(…)’ (the LaTeX code)

Return values

string —

replacement HTML code string to include the equivalent LaTeX image.

F_mathml_callback()

File: tce_functions_tcecode.php line 364

F_mathml_callback(mixed $matches) : string

Returns replacement code for MathML code.

Parameters

  • $matches : mixed: (string) array containing matches: $matches[0] is the complete match, $matches[1] the match for the first subpattern enclosed in ‘(…)’ (the MathML code)

Return values

string —

MathML code.

F_objects_callback()

File: tce_functions_tcecode.php line 389

F_objects_callback(mixed $matches) : string

Returns replacement code by MIME type.

Parameters

  • $matches : mixed: (string) array containing matches: $matches[0] is the complete match, $matches[1] the match for the first subpattern enclosed in ‘(…)’ and so on

Return values

string —

replacement string by file extension

F_objects_replacement()

File: tce_functions_tcecode.php line 420

F_objects_replacement(mixed $name, mixed $extension[, mixed $width = 0 ][, mixed $height = 0 ][, mixed $alt = '' ][, mixed &$maxwidth = 0 ][, mixed &$maxheight = 0 ]) : string

Parameters

  • $name : mixed: (string) object path excluded extension
  • $extension : mixed: (string) object extension (e.g.: gif, jpg, swf, …)
  • $width : mixed = 0: (int) object width
  • $height : mixed = 0: (int) object height
  • $alt : mixed = ‘’: (string) alternative content
  • $maxwidth : mixed = 0: (int) object max or default width
  • $maxheight : mixed = 0: (int) object max or default height

Return values

string —

replacement string

F_remove_tcecode()

File: tce_functions_tcecode.php line 545

F_remove_tcecode(mixed $str) : string

Parameters

  • $str : mixed: (string) text to process

Return values

string —

without tcecode markup tags

F_tcecodeToLine()

File: tce_functions_tcecode.php line 575

F_tcecodeToLine(mixed $str) : mixed

Parameters

  • $str : mixed: (string) text to process return string

F_tcecodeToTitle()

File: tce_functions_tcecode.php line 601

F_tcecodeToTitle(mixed $str) : mixed

Parameters

  • $str : mixed: (string) text to process return string

F_substrHTML()

File: tce_functions_tcecode.php line 618

F_substrHTML(mixed $htmltext[, mixed $min_length = 100 ][, mixed $offset_length = 20 ]) : mixed

It also prevents chopping while a tag is still open. this function is based on a public-domain script posted on www.php.net by fox@conskript.server and mr@bbp.biz

Parameters

  • $htmltext : mixed: (string)
  • $min_length : mixed = 100: (int) (default=100) the approximate length you want the concatenated text to be
  • $offset_length : mixed = 20: (int) (default=20) the max variation in how long the text can be

F_getUserTests()

File: tce_functions_test.php line 28

F_getUserTests() : string

Return values

string —

containing an XHTML table of user’s tests.

F_repeatTest()

File: tce_functions_test.php line 243

F_repeatTest(mixed $test_id) : mixed

Parameters

  • $test_id : mixed: (int) Test ID

F_isValidIP()

File: tce_functions_test.php line 287

F_isValidIP(mixed $user_ip, mixed $test_ips) : bool

Parameters

  • $user_ip : mixed: (string) user’s IP address (IPv4 or IPv6).
  • $test_ips : mixed: (string) comma separated list of valid test IP addresses. The ‘*’ character may be used to indicate any number in IPv4 addresses. Intervals must be specified using the ‘-’ character.

Return values

bool —

true if IP is valid, false otherwise

F_isValidSSLCert()

File: tce_functions_test.php line 368

F_isValidSSLCert(mixed $test_id) : true

Parameters

  • $test_id : mixed: (int) Test ID

Return values

true —

if the client certifiate is valid, false otherwise

F_isValidTestUser()

File: tce_functions_test.php line 401

F_isValidTestUser(mixed $test_id, mixed $user_ip, mixed $test_ip) : true

Parameters

  • $test_id : mixed: (int) ID of the selected test
  • $user_ip : mixed: (int) user’s IP address.
  • $test_ip : mixed: (int) test IP valid addresses. Various IP addresses may be separated using comma character. The asterisk character may be used to indicate “any number”.

Return values

true —

if is user is authorized, false otherwise

F_terminateUserTest()

File: tce_functions_test.php line 435

F_terminateUserTest(mixed $test_id) : mixed

Parameters

  • $test_id : mixed: (int) test ID

Tags

  • since: 4.0.000 (2006-09-27)

F_countUserTest()

File: tce_functions_test.php line 464

F_countUserTest(mixed $user_id, mixed $test_id) : retried

Parameters

  • $user_id : mixed: (int) user ID
  • $test_id : mixed: (int) test ID

Return values

retried —

times

F_checkTestStatus()

File: tce_functions_test.php line 479

F_checkTestStatus(mixed $user_id, mixed $test_id, mixed $duration) : array<string|int, mixed>

Parameters

  • $user_id : mixed: (int) user ID
  • $test_id : mixed: (int) test ID
  • $duration : mixed: (int) test duration in seconds

Return values

array<string|int, mixed> —

of (test_status_code, testuser_id). test_status_code:

  • 0 = the test generation process is started but not completed;
  • 1 = the test has been successfully created;
  • 2 = all questions have been displayed to the user;
  • 3 = all questions have been answered;
  • 4 = test locked (for timeout);
  • 5 or more = old version of repeated test;

File: tce_functions_test.php line 596

F_testInfoLink(mixed $test_id[, mixed $link_name = '' ]) : mixed

Parameters

  • $test_id : mixed: (int) test ID
  • $link_name : mixed = ‘’: (string) link caption return XHTML code

F_printTestInfo()

File: tce_functions_test.php line 630

F_printTestInfo(mixed $test_id[, mixed $showip = false ]) : string

Parameters

  • $test_id : mixed: (int) test ID
  • $showip : mixed = false: (boolean) if true display enabled users’ IP range

Return values

string —

containing an XHTML code

F_getTestData()

File: tce_functions_test.php line 709

F_getTestData(mixed $test_id) : array<string|int, mixed>

Parameters

  • $test_id : mixed: (int) test ID.

Return values

array<string|int, mixed> —

containing test data.

F_getUserData()

File: tce_functions_test.php line 733

F_getUserData(mixed $user_id) : array<string|int, mixed>

Parameters

  • $user_id : mixed: (int) User ID.

Return values

array<string|int, mixed> —

containing test data.

F_getTestPassword()

File: tce_functions_test.php line 757

F_getTestPassword(mixed $test_id) : string

Parameters

  • $test_id : mixed: (int) test ID.

Return values

string —

test password or empty string in case of error.

F_getTestName()

File: tce_functions_test.php line 769

F_getTestName(mixed $test_id) : string

Parameters

  • $test_id : mixed: (int) test ID.

Return values

string —

test name or empty string in case of error.

F_getTestDuration()

File: tce_functions_test.php line 781

F_getTestDuration(mixed $test_id) : int

Parameters

  • $test_id : mixed: (int) test ID

Return values

int —

test duration time in seconds

F_getTestStartTime()

File: tce_functions_test.php line 794

F_getTestStartTime(mixed $testuser_id) : int

Parameters

  • $testuser_id : mixed: (int) user’s test ID

Return values

int —

start time in seconds

F_twoColRow()

File: tce_functions_test.php line 826

F_twoColRow([mixed $label = '' ][, mixed $description = '' ][, mixed $value = '' ]) : string

Parameters

  • $label : mixed = ‘’: (string) string to display on the left column
  • $description : mixed = ‘’: (string) string to display on the title attribute of the left column field
  • $value : mixed = ‘’: (string) string to display on the right column

Return values

string —

XHTML code

F_executeTest()

File: tce_functions_test.php line 847

F_executeTest(mixed $test_id) : true

Parameters

  • $test_id : mixed: (int) test ID.

Return values

true —

if user is authorized, false otherwise.

F_isRightTestlogUser()

File: tce_functions_test.php line 927

F_isRightTestlogUser(mixed $test_id, mixed $testlog_id) : bool

Parameters

  • $test_id : mixed: (int) test ID
  • $testlog_id : mixed: (int) test log ID

Return values

bool —

TRUE in case of success, FALSE otherwise

F_selectAnswers()

File: tce_functions_test.php line 964

F_selectAnswers(mixed $question_id[, mixed $isright = '' ][, mixed $ordering = false ][, mixed $limit = 0 ][, mixed $startindex = 0 ][, mixed $randorder = true ][, mixed $ordmode = 0 ]) : array<string|int, mixed>

Parameters

  • $question_id : mixed: (int) Question ID.
  • $isright : mixed = ‘’: (int) Value (0 = false, 1 = true), if non-empty checks for answer_isright value on WHERE clause.
  • $ordering : mixed = false: (int) Ordering type question (0 = false, 1 = true).
  • $limit : mixed = 0: (int) Maximum number of IDs to return.
  • $startindex : mixed = 0: (int) Array starting index (default = 0).
  • $randorder : mixed = true: (boolean) If true user random order.
  • $ordmode : mixed = 0: (int) Ordering mode: 0=position; 1=alphabetical; 2=ID.

Return values

array<string|int, mixed> —

id of selected answers

F_addLogAnswers()

File: tce_functions_test.php line 1055

F_addLogAnswers(mixed $testlog_id, mixed $answers_ids) : bool

Parameters

  • $testlog_id : mixed: (int) testlog ID
  • $answers_ids : mixed: (array) array of answer IDs to add

Return values

bool —

true in case of success, false otherwise

F_getFirstTestUser()

File: tce_functions_test.php line 1087

F_getFirstTestUser(mixed $test_id) : int

Parameters

  • $test_id : mixed: (int) test ID

Return values

int —

testuser ID

F_newTestLog()

File: tce_functions_test.php line 1119

F_newTestLog(mixed $testuser_id, mixed $question_id, mixed $score, mixed $order[, mixed $num_answers = 0 ]) : int

Parameters

  • $testuser_id : mixed: (int) ID of tce_tests_users
  • $question_id : mixed: (int) question ID
  • $score : mixed: (int) score for unanswered questions
  • $order : mixed: (int) question display order
  • $num_answers : mixed = 0: (int) number of alternative answers

Return values

int —

testlog ID

F_isTestOverLimits()

File: tce_functions_test.php line 1171

F_isTestOverLimits() : bool

Return values

bool —

true/false.

F_count_executed_tests()

File: tce_functions_test.php line 1225

F_count_executed_tests(mixed $startdate, mixed $enddate) : int

Parameters

  • $startdate : mixed: (string) Star date-time interval.
  • $enddate : mixed: (string) End date-time interval.

Return values

int —

number of executed tests.

F_updateTestuserStat()

File: tce_functions_test.php line 1249

F_updateTestuserStat(mixed $date) : mixed

Parameters

  • $date : mixed: (string) date-time when the test was generated.

F_createTest()

File: tce_functions_test.php line 1265

F_createTest(mixed $test_id, mixed $user_id) : bool

Parameters

  • $test_id : mixed: (int) test ID.
  • $user_id : mixed: (int) user ID.

Return values

bool —

TRUE in case of success, FALSE otherwise.

F_addQuestionAnswers()

File: tce_functions_test.php line 1623

F_addQuestionAnswers(mixed $testlog_id, mixed $question_id, mixed $question_type, mixed $num_answers, mixed $firsttest, mixed $testdata) : bool

Parameters

  • $testlog_id : mixed: (int) testlog ID.
  • $question_id : mixed: (int) question ID.
  • $question_type : mixed: (int) type of question.
  • $num_answers : mixed: (int) number of alternative answers to display.
  • $firsttest : mixed: (int) ID of first test testuser_id.
  • $testdata : mixed: (array) array of test data.

Return values

bool —

TRUE in case of success, FALSE otherwise.

F_updateQuestionLog()

File: tce_functions_test.php line 1741

F_updateQuestionLog(mixed $test_id, mixed $testlog_id[, mixed $answpos = [] ][, mixed $answer_text = '' ][, mixed $reaction_time = 0 ]) : bool

Parameters

  • $test_id : mixed: (int) test ID
  • $testlog_id : mixed: (int) test log ID
  • $answpos : mixed = []: (array) Array of answer positions
  • $answer_text : mixed = ‘’: (string) answer text
  • $reaction_time : mixed = 0: (int) reaction time in milliseconds

Return values

bool —

TRUE in case of success, FALSE otherwise

F_getAnswerIdFromPosition()

File: tce_functions_test.php line 2012

F_getAnswerIdFromPosition(mixed $testlog_id, mixed $answpos) : int

Parameters

  • $testlog_id : mixed: (int) Test Log ID
  • $answpos : mixed: (array) Answer positions (order in wich they are displayed)

Return values

int —

answer ID

F_questionForm()

File: tce_functions_test.php line 2051

F_questionForm(mixed $test_id, mixed $testlog_id, mixed $formname) : string

Parameters

  • $test_id : mixed: (int) test ID
  • $testlog_id : mixed: (int) test log ID
  • $formname : mixed: (string) form name (form ID)

Return values

string —

XHTML code

F_questionsMenu()

File: tce_functions_test.php line 2501

F_questionsMenu(mixed $testdata, mixed $testuser_id[, mixed $testlog_id = 0 ][, mixed $disable = false ]) : string

Parameters

  • $testdata : mixed: (array) test data
  • $testuser_id : mixed: (int) user’s test ID
  • $testlog_id : mixed = 0: (int) test log ID
  • $disable : mixed = false: (boolean) if TRUE disable the questions list.

Return values

string —

XHTML code

F_getNumOmittedQuestions()

File: tce_functions_test.php line 2693

F_getNumOmittedQuestions(mixed $test_id) : int

Parameters

  • $test_id : mixed: (int) test ID

Return values

int —

number

F_testComment()

File: tce_functions_test.php line 2717

F_testComment(mixed $test_id) : string

Parameters

  • $test_id : mixed: (int) test ID

Tags

  • since: 4.0.000 (2006-10-01)

Return values

string —

XHTML code

F_updateTestComment()

File: tce_functions_test.php line 2772

F_updateTestComment(mixed $test_id, mixed $testcomment) : string

Parameters

  • $test_id : mixed: (int) test ID
  • $testcomment : mixed: (string) user comment.

Tags

  • since: 4.0.000 (2006-10-01)

Return values

string —

XHTML code

F_testLoginForm()

File: tce_functions_test.php line 2814

F_testLoginForm(mixed $faction, mixed $fid, mixed $fmethod, mixed $fenctype, mixed $test_id) : XHTML

Parameters

  • $faction : mixed
  • $fid : mixed
  • $fmethod : mixed
  • $fenctype : mixed
  • $test_id : mixed

Return values

XHTML —

string for login form

F_getTestGroups()

File: tce_functions_test.php line 2872

F_getTestGroups(mixed $test_id) : string

Parameters

  • $test_id : mixed: (int) ID of the selected test

Return values

string —

containing a comma separated list fo group IDs.

F_getTestSSLCerts()

File: tce_functions_test.php line 2901

F_getTestSSLCerts(mixed $test_id) : string

Parameters

  • $test_id : mixed: (int) ID of the selected test

Return values

string —

containing a comma separated list SSL certificates IDs.

F_getUserTestStat()

File: tce_functions_test_stats.php line 31

F_getUserTestStat(mixed $test_id[, mixed $user_id = 0 ][, mixed $testuser_id = 0 ][, mixed $pubmode = false ]) : mixed

Parameters

  • $test_id : mixed: (int) test ID.
  • $user_id : mixed = 0: (int) user ID - if greater than zero, filter stats for the specified user.
  • $testuser_id : mixed = 0: (int) test-user ID - if greater than zero, filter stats for the specified test-user.
  • $pubmode : mixed = false: (boolean) If true filter the results for the public interface. return $data array containing test-user statistics.

F_getUserTestTotals()

File: tce_functions_test_stats.php line 52

F_getUserTestTotals(mixed $test_id[, mixed $user_id = 0 ][, mixed $testuser_id = 0 ][, mixed $pubmode = false ]) : mixed

Parameters

  • $test_id : mixed: (int) test ID.
  • $user_id : mixed = 0: (int) user ID - if greater than zero, filter stats for the specified user.
  • $testuser_id : mixed = 0: (int) test-user ID - if greater than zero, filter stats for the specified test-user.
  • $pubmode : mixed = false: (boolean) If true filter the results for the public interface. return $data array containing test-user statistics.

F_getTestStat()

File: tce_functions_test_stats.php line 119

F_getTestStat(mixed $test_id[, mixed $group_id = 0 ][, mixed $user_id = 0 ][, mixed $startdate = 0 ][, mixed $enddate = 0 ][, mixed $testuser_id = 0 ][, mixed $pubmode = false ]) : mixed

Parameters

  • $test_id : mixed: (int) test ID.
  • $group_id : mixed = 0: (int) group ID - if greater than zero, filter stats for the specified user group.
  • $user_id : mixed = 0: (int) user ID - if greater than zero, filter stats for the specified user.
  • $startdate : mixed = 0: (int) start date ID - if greater than zero, filter stats for the specified starting date
  • $enddate : mixed = 0: (int) end date ID - if greater than zero, filter stats for the specified ending date
  • $testuser_id : mixed = 0: (int) test-user ID - if greater than zero, filter stats for the specified test-user.
  • $pubmode : mixed = false: (boolean) If true filter the results for the public interface. return $data array containing test statistics.

F_getRawTestStat()

File: tce_functions_test_stats.php line 148

F_getRawTestStat(mixed $test_id[, mixed $group_id = 0 ][, mixed $user_id = 0 ][, mixed $startdate = 0 ][, mixed $enddate = 0 ][, mixed $testuser_id = 0 ][, mixed $data = [] ][, mixed $pubmode = false ]) : mixed

Parameters

  • $test_id : mixed: (int) test ID.
  • $group_id : mixed = 0: (int) group ID - if greater than zero, filter stats for the specified user group.
  • $user_id : mixed = 0: (int) user ID - if greater than zero, filter stats for the specified user.
  • $startdate : mixed = 0: (int) start date ID - if greater than zero, filter stats for the specified starting date
  • $enddate : mixed = 0: (int) end date ID - if greater than zero, filter stats for the specified ending date
  • $testuser_id : mixed = 0: (int) test-user ID - if greater than zero, filter stats for the specified test-user.
  • $data : mixed = []: (array) Array of existing data to be merged with the current one.
  • $pubmode : mixed = false: (boolean) If true filter the results for the public interface. return $data array containing test statistics.

F_normalizeTestStatAverages()

File: tce_functions_test_stats.php line 682

F_normalizeTestStatAverages(mixed $data) : mixed

Parameters

  • $data : mixed: (array) Raw data array. return $data (array) Processed array.

F_printTestStat()

File: tce_functions_test_stats.php line 798

F_printTestStat(mixed $test_id[, mixed $group_id = 0 ][, mixed $user_id = 0 ][, mixed $startdate = 0 ][, mixed $enddate = 0 ][, mixed $testuser_id = 0 ][, mixed $ts = [] ][, mixed $display_mode = 2 ][, mixed $pubmode = false ]) : mixed

Parameters

  • $test_id : mixed: (int) test ID.
  • $group_id : mixed = 0: (int) group ID - if greater than zero, filter stats for the specified user group.
  • $user_id : mixed = 0: (int) user ID - if greater than zero, filter stats for the specified user.
  • $startdate : mixed = 0: (int) start date ID - if greater than zero, filter stats for the specified starting date
  • $enddate : mixed = 0: (int) end date ID - if greater than zero, filter stats for the specified ending date
  • $testuser_id : mixed = 0: (int) test-user ID - if greater than zero, filter stats for the specified test-user.
  • $ts : mixed = []: (array) array of stats to print (leave empty to automatically generate new data).
  • $display_mode : mixed = 2: display (int) mode: 0 = disabled; 1 = minimum; 2 = module; 3 = subject; 4 = question; 5 = answer.
  • $pubmode : mixed = false: (boolean) If true filter the results for the public interface. return $data string containing HTML table.

F_printTestResultStat()

File: tce_functions_test_stats.php line 1262

F_printTestResultStat(mixed $data, mixed $nextorderdir, mixed $order_field, mixed $filter[, mixed $pubmode = false ][, mixed $stats = 1 ]) : mixed

Parameters

  • $data : mixed: (array) Array containing test statistics.
  • $nextorderdir : mixed: (int) next order direction.
  • $order_field : mixed: (string) order fields.
  • $filter : mixed: (string) filter string for URLs.
  • $pubmode : mixed = false: (boolean) If true filter the results for the public interface.
  • $stats : mixed = 1: (int) 2 = full stats; 1 = user stats; 0 = disabled stats; return HTML table string.

F_printUserTestStat()

File: tce_functions_test_stats.php line 1624

F_printUserTestStat(mixed $testuser_id) : mixed

Parameters

  • $testuser_id : mixed: (int) test-user ID - if greater than zero, filter stats for the specified test-user. return $data string containing HTML table.

F_getAllUsersTestStat()

File: tce_functions_test_stats.php line 1829

F_getAllUsersTestStat(mixed $test_id[, mixed $group_id = 0 ][, mixed $user_id = 0 ][, mixed $startdate = 0 ][, mixed $enddate = 0 ][, mixed $full_order_field = 'total_score' ][, mixed $pubmode = false ][, mixed $stats = 2 ]) : mixed

Parameters

  • $test_id : mixed: (int) test ID.
  • $group_id : mixed = 0: (int) group ID - if greater than zero, filter stats for the specified user group.
  • $user_id : mixed = 0: (int) user ID - if greater than zero, filter stats for the specified user.
  • $startdate : mixed = 0: (string) start date ID - if greater than zero, filter stats for the specified starting date
  • $enddate : mixed = 0: (string) end date ID - if greater than zero, filter stats for the specified ending date
  • $full_order_field : mixed = ’total_score’: (string) Ordering fields for SQL query.
  • $pubmode : mixed = false: (boolean) If true filter the results for the public interface.
  • $stats : mixed = 2: (int) 2 = full stats; 1 = user stats; 0 = disabled stats; return $data array containing test statistics.

F_getSafeUsersTestStatOrderBy()

File: tce_functions_test_stats.php line 2071

F_getSafeUsersTestStatOrderBy(mixed $full_order_field) : string

Parameters

  • $full_order_field : mixed: Raw ORDER BY input.

Return values

string

F_lockUserTest()

File: tce_functions_test_stats.php line 2116

F_lockUserTest(mixed $test_id, mixed $user_id) : mixed

Parameters

  • $test_id : mixed: (int) test ID
  • $user_id : mixed: (int) user ID

F_getTestIDResults()

File: tce_functions_test_stats.php line 2144

F_getTestIDResults(mixed $test_id, mixed $user_id) : string

Parameters

  • $test_id : mixed: (int) Test ID.
  • $user_id : mixed

Return values

string

F_getTestIDReports()

File: tce_functions_test_stats.php line 2154

F_getTestIDReports(mixed $test_id, mixed $user_id) : string

Parameters

  • $test_id : mixed: (int) Test ID.
  • $user_id : mixed

Return values

string

F_getTestIDs()

File: tce_functions_test_stats.php line 2164

F_getTestIDs(mixed $test_id, mixed $user_id[, mixed $filter = 'test_results_to_users' ]) : string

Parameters

  • $test_id : mixed: (int) Test ID.
  • $user_id : mixed
  • $filter : mixed = ’test_results_to_users’

Return values

string

F_send_user_reg_email()

File: tce_functions_user_registration.php line 29

F_send_user_reg_email(mixed $user_id, mixed $user_email, mixed $user_verifycode) : mixed

Parameters

  • $user_id : mixed: (int) User ID
  • $user_email : mixed: (string) User email
  • $user_verifycode : mixed: (string) user verification code

custom_auth_basic_check_login()

File: basic.php line 9

custom_auth_basic_check_login() : mixed

Function name format “custom_auth_[auth method name]_check_login”.