-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathswad_test_config.h
79 lines (62 loc) · 3.33 KB
/
swad_test_config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// swad_test_config.h: self-assessment tests configuration
#ifndef _SWAD_TST_CFG
#define _SWAD_TST_CFG
/*
SWAD (Shared Workspace At a Distance in Spanish),
is a web platform developed at the University of Granada (Spain),
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2025 Antonio Cañas Vargas
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*****************************************************************************/
/********************************* Headers ***********************************/
/*****************************************************************************/
#include <mysql/mysql.h> // To access MySQL databases
#include <stdbool.h> // For boolean type
/*****************************************************************************/
/***************************** Public constants ******************************/
/*****************************************************************************/
#define TstCfg_MAX_QUESTIONS_PER_TEST 100 // Absolute maximum number of questions in a test
#define TstCfg_DEFAULT_MIN_QUESTIONS 1
#define TstCfg_DEFAULT_DEF_QUESTIONS 20 // Number of questions to be generated by default in a self-assessment test
#define TstCfg_DEFAULT_MAX_QUESTIONS 30 // Maximum number of questions to be generated in a self-assessment test
/*****************************************************************************/
/******************************* Public types ********************************/
/*****************************************************************************/
#define TstCfg_NUM_OPTIONS_PLUGGABLE 3
typedef enum
{
TstCfg_PLUGGABLE_UNKNOWN = 0,
TstCfg_PLUGGABLE_NO = 1,
TstCfg_PLUGGABLE_YES = 2,
} TstCfg_Pluggable_t;
/*****************************************************************************/
/***************************** Public prototypes *****************************/
/*****************************************************************************/
void TstCfg_CheckAndShowFormConfig (void);
bool TstCfg_CheckIfPluggableIsUnknownAndCrsHasTests (void);
void TstCfg_GetConfig (void);
void TstCfg_ReceiveConfigTst (void);
void TstCfg_SetConfigPluggable (TstCfg_Pluggable_t Pluggable);
TstCfg_Pluggable_t TstCfg_GetConfigPluggable (void);
void TstCfg_SetConfigMin (unsigned Min);
unsigned TstCfg_GetConfigMin (void);
void TstCfg_SetConfigDef (unsigned Def);
unsigned TstCfg_GetConfigDef (void);
void TstCfg_SetConfigMax (unsigned Max);
unsigned TstCfg_GetConfigMax (void);
void TstCfg_SetConfigMinTimeNxtTstPerQst (unsigned long MinTimeNxtTstPerQst);
unsigned long TstCfg_GetConfigMinTimeNxtTstPerQst (void);
void TstCfg_SetConfigVisibility (unsigned Visibility);
unsigned TstCfg_GetConfigVisibility (void);
#endif