mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-08 17:55:24 +02:00
Version 16.64.21
This commit is contained in:
parent
8d92afa50a
commit
0863d9ea5e
|
@ -170,13 +170,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.64.20 (2016-11-19)"
|
#define Log_PLATFORM_VERSION "SWAD 16.64.21 (2016-11-19)"
|
||||||
#define CSS_FILE "swad16.60.1.css"
|
#define CSS_FILE "swad16.60.1.css"
|
||||||
#define JS_FILE "swad16.46.1.js"
|
#define JS_FILE "swad16.46.1.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
||||||
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 16.64.21: Nov 19, 2016 Input fields required in form to configure tests. (207324 lines)
|
||||||
Version 16.64.20: Nov 19, 2016 Input field required in new link form. (207316 lines)
|
Version 16.64.20: Nov 19, 2016 Input field required in new link form. (207316 lines)
|
||||||
Version 16.64.19: Nov 19, 2016 Input field required in new folder form. (207314 lines)
|
Version 16.64.19: Nov 19, 2016 Input field required in new folder form. (207314 lines)
|
||||||
Version 16.64.18: Nov 19, 2016 Input field required in search form. (207312 lines)
|
Version 16.64.18: Nov 19, 2016 Input field required in search form. (207312 lines)
|
||||||
|
|
|
@ -2276,18 +2276,18 @@ mysql> DESCRIBE tst_answers;
|
||||||
/***** Table tst_config *****/
|
/***** Table tst_config *****/
|
||||||
/*
|
/*
|
||||||
mysql> DESCRIBE tst_config;
|
mysql> DESCRIBE tst_config;
|
||||||
+---------------------+--------------------------------------------------------------+------+-----+---------+-------+
|
+---------------------+------------------------------------------------------------------------------+------+-----+---------+-------+
|
||||||
| Field | Type | Null | Key | Default | Extra |
|
| Field | Type | Null | Key | Default | Extra |
|
||||||
+---------------------+--------------------------------------------------------------+------+-----+---------+-------+
|
+---------------------+------------------------------------------------------------------------------+------+-----+---------+-------+
|
||||||
| CrsCod | int(11) | NO | PRI | -1 | |
|
| CrsCod | int(11) | NO | PRI | -1 | |
|
||||||
| Pluggable | enum('N','Y') | NO | | N | |
|
| Pluggable | enum('unknown','N','Y') | NO | | unknown | |
|
||||||
| Min | int(11) | NO | | NULL | |
|
| Min | int(11) | NO | | NULL | |
|
||||||
| Def | int(11) | NO | | NULL | |
|
| Def | int(11) | NO | | NULL | |
|
||||||
| Max | int(11) | NO | | NULL | |
|
| Max | int(11) | NO | | NULL | |
|
||||||
| MinTimeNxtTstPerQst | int(11) | NO | | 0 | |
|
| MinTimeNxtTstPerQst | int(11) | NO | | 0 | |
|
||||||
| Feedback | enum('nothing','total_result','each_result','each_good_bad') | NO | | NULL | |
|
| Feedback | enum('nothing','total_result','each_result','each_good_bad','full_feedback') | NO | | NULL | |
|
||||||
+---------------------+--------------------------------------------------------------+------+-----+---------+-------+
|
+---------------------+------------------------------------------------------------------------------+------+-----+---------+-------+
|
||||||
7 rows in set (0.00 sec)
|
7 rows in set (0,00 sec)
|
||||||
*/
|
*/
|
||||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS tst_config ("
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS tst_config ("
|
||||||
"CrsCod INT NOT NULL DEFAULT -1,"
|
"CrsCod INT NOT NULL DEFAULT -1,"
|
||||||
|
|
17
swad_test.c
17
swad_test.c
|
@ -1866,7 +1866,8 @@ static void Tst_ShowFormConfigTst (void)
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"LEFT_MIDDLE\">"
|
"<td class=\"LEFT_MIDDLE\">"
|
||||||
"<input type=\"text\" name=\"NumQstMin\""
|
"<input type=\"text\" name=\"NumQstMin\""
|
||||||
" size=\"3\" maxlength=\"3\" value=\"%u\" />"
|
" size=\"3\" maxlength=\"3\" value=\"%u\""
|
||||||
|
" required=\"required\" />"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
Txt_minimum,Gbl.Test.Config.Min);
|
Txt_minimum,Gbl.Test.Config.Min);
|
||||||
|
@ -1878,7 +1879,8 @@ static void Tst_ShowFormConfigTst (void)
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"LEFT_MIDDLE\">"
|
"<td class=\"LEFT_MIDDLE\">"
|
||||||
"<input type=\"text\" name=\"NumQstDef\""
|
"<input type=\"text\" name=\"NumQstDef\""
|
||||||
" size=\"3\" maxlength=\"3\" value=\"%u\" />"
|
" size=\"3\" maxlength=\"3\" value=\"%u\""
|
||||||
|
" required=\"required\" />"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
Txt_default,Gbl.Test.Config.Def);
|
Txt_default,Gbl.Test.Config.Def);
|
||||||
|
@ -1890,7 +1892,8 @@ static void Tst_ShowFormConfigTst (void)
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"LEFT_MIDDLE\">"
|
"<td class=\"LEFT_MIDDLE\">"
|
||||||
"<input type=\"text\" name=\"NumQstMax\""
|
"<input type=\"text\" name=\"NumQstMax\""
|
||||||
" size=\"3\" maxlength=\"3\" value=\"%u\" />"
|
" size=\"3\" maxlength=\"3\" value=\"%u\""
|
||||||
|
" required=\"required\" />"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>"
|
"</tr>"
|
||||||
"</table>"
|
"</table>"
|
||||||
|
@ -1905,7 +1908,8 @@ static void Tst_ShowFormConfigTst (void)
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"LEFT_MIDDLE\">"
|
"<td class=\"LEFT_MIDDLE\">"
|
||||||
"<input type=\"text\" name=\"MinTimeNxtTstPerQst\""
|
"<input type=\"text\" name=\"MinTimeNxtTstPerQst\""
|
||||||
" size=\"7\" maxlength=\"7\" value=\"%lu\" />"
|
" size=\"7\" maxlength=\"7\" value=\"%lu\""
|
||||||
|
" required=\"required\" />"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
The_ClassForm[Gbl.Prefs.Theme],
|
The_ClassForm[Gbl.Prefs.Theme],
|
||||||
|
@ -2139,14 +2143,15 @@ void Tst_ReceiveConfigTst (void)
|
||||||
Gbl.Test.Config.FeedbackType = Tst_GetFeedbackTypeFromForm ();
|
Gbl.Test.Config.FeedbackType = Tst_GetFeedbackTypeFromForm ();
|
||||||
|
|
||||||
/***** Update database *****/
|
/***** Update database *****/
|
||||||
sprintf (Query,"REPLACE INTO tst_config (CrsCod,Pluggable,Min,Def,Max,MinTimeNxtTstPerQst,Feedback)"
|
sprintf (Query,"REPLACE INTO tst_config"
|
||||||
|
" (CrsCod,Pluggable,Min,Def,Max,MinTimeNxtTstPerQst,Feedback)"
|
||||||
" VALUES ('%ld','%s','%u','%u','%u','%lu','%s')",
|
" VALUES ('%ld','%s','%u','%u','%u','%lu','%s')",
|
||||||
Gbl.CurrentCrs.Crs.CrsCod,
|
Gbl.CurrentCrs.Crs.CrsCod,
|
||||||
Tst_PluggableDB[Gbl.Test.Config.Pluggable],
|
Tst_PluggableDB[Gbl.Test.Config.Pluggable],
|
||||||
Gbl.Test.Config.Min,Gbl.Test.Config.Def,Gbl.Test.Config.Max,
|
Gbl.Test.Config.Min,Gbl.Test.Config.Def,Gbl.Test.Config.Max,
|
||||||
Gbl.Test.Config.MinTimeNxtTstPerQst,
|
Gbl.Test.Config.MinTimeNxtTstPerQst,
|
||||||
Tst_FeedbackDB[Gbl.Test.Config.FeedbackType]);
|
Tst_FeedbackDB[Gbl.Test.Config.FeedbackType]);
|
||||||
DB_QueryREPLACE (Query,"can not save configuration of test");
|
DB_QueryREPLACE (Query,"can not save configuration of tests");
|
||||||
|
|
||||||
/***** Show confirmation message *****/
|
/***** Show confirmation message *****/
|
||||||
Lay_ShowAlert (Lay_SUCCESS,Txt_The_test_configuration_has_been_updated);
|
Lay_ShowAlert (Lay_SUCCESS,Txt_The_test_configuration_has_been_updated);
|
||||||
|
|
|
@ -74,7 +74,9 @@ typedef enum
|
||||||
struct Tst_Config
|
struct Tst_Config
|
||||||
{
|
{
|
||||||
Tst_Pluggable_t Pluggable;
|
Tst_Pluggable_t Pluggable;
|
||||||
unsigned Min,Def,Max;
|
unsigned Min; // Minimum number of questions
|
||||||
|
unsigned Def; // Default number of questions
|
||||||
|
unsigned Max; // Maximum number of questions
|
||||||
unsigned long MinTimeNxtTstPerQst;
|
unsigned long MinTimeNxtTstPerQst;
|
||||||
Tst_Feedback_t FeedbackType;
|
Tst_Feedback_t FeedbackType;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user