Version19.12.2

This commit is contained in:
Antonio Cañas Vargas 2019-09-24 15:00:46 +02:00
parent f77322a716
commit 2541eaa540
3 changed files with 19 additions and 26 deletions

View File

@ -50,7 +50,7 @@
(tv2.tv_usec - tv1.tv_usec);
*/
/*
DB_QueryINSERT ("can not debug",
DB_QueryINSERT ("can not debug", // TODO: Remove
"INSERT INTO debug"
" (DebugTime,Txt)"
" VALUES"
@ -470,10 +470,11 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 19.12.1 (2019-09-24)"
#define Log_PLATFORM_VERSION "SWAD 19.12.2 (2019-09-24)"
#define CSS_FILE "swad19.3.css"
#define JS_FILE "swad18.130.2.js"
/*
Version 19.12.2: Sep 24, 2019 View matches results. Not finished. (245977 lines)
Version 19.12.1: Sep 24, 2019 View matches results. Not finished. (245987 lines)
Version 19.12: Sep 24, 2019 View matches results. Not finished. (245973 lines)
1 change necessary in database:

View File

@ -2508,19 +2508,6 @@ void Mch_ReceiveQstAnsFromStd (void)
Mch_ComputeScore (Match.MchCod,Gbl.Usrs.Me.UsrDat.UsrCod,
&NumQsts,&NumQstsNotBlank,&TotalScore);
DB_QueryINSERT ("can not debug", // TODO: Remove
"INSERT INTO debug"
" (DebugTime,Txt)"
" VALUES"
" (NOW(),'NumQsts = %u')",
NumQsts);
DB_QueryINSERT ("can not debug", // TODO: Remove
"INSERT INTO debug"
" (DebugTime,Txt)"
" VALUES"
" (NOW(),'NumQstsNotBlank = %u')",
NumQstsNotBlank);
Str_SetDecimalPointToUS (); // To print the floating point as a dot
if (DB_QueryCOUNT ("can not get if match result exists",
"SELECT COUNT(*) FROM mch_results"

View File

@ -4048,24 +4048,29 @@ void Tst_GetAnswersFromStr (const char StrAnswersOneQst[Tst_MAX_BYTES_ANSWERS_ON
unsigned NumOpt;
const char *Ptr;
char StrOneAnswer[10 + 1];
int AnsUsr;
unsigned AnsUsr;
/***** Initialize all answers to false *****/
for (NumOpt = 0;
NumOpt < Tst_MAX_OPTIONS_PER_QUESTION;
NumOpt++)
AnswersUsr[NumOpt] = false;
/***** Set selected answers to true *****/
for (NumOpt = 0, Ptr = StrAnswersOneQst;
NumOpt < Gbl.Test.Answer.NumOptions;
NumOpt < Tst_MAX_OPTIONS_PER_QUESTION && *Ptr;
NumOpt++)
if (*Ptr)
{
Par_GetNextStrUntilSeparParamMult (&Ptr,StrOneAnswer,10);
if (sscanf (StrOneAnswer,"%d",&AnsUsr) != 1)
Lay_ShowErrorAndExit ("Bad user's answer.");
if (AnsUsr < 0 || AnsUsr >= Tst_MAX_OPTIONS_PER_QUESTION)
Lay_ShowErrorAndExit ("Bad user's answer.");
AnswersUsr[AnsUsr] = true;
}
{
Par_GetNextStrUntilSeparParamMult (&Ptr,StrOneAnswer,10);
if (sscanf (StrOneAnswer,"%u",&AnsUsr) != 1)
Lay_ShowErrorAndExit ("Bad user's answer.");
if (AnsUsr >= Tst_MAX_OPTIONS_PER_QUESTION)
Lay_ShowErrorAndExit ("Bad user's answer.");
AnswersUsr[AnsUsr] = true;
}
}
/*****************************************************************************/