mirror of https://github.com/acanas/swad-core.git
Version 21.62.3: Nov 25, 2021 Fixed bug in test questions. Reported by Javier Fernández Baldomero and others.
This commit is contained in:
parent
bd74574f3c
commit
d0e3b8da03
|
@ -602,13 +602,14 @@ TODO: FIX BUG, URGENT! En las fechas como par
|
|||
|
||||
TODO: En las encuestas, que los estudiantes no puedan ver los resultados hasta que no finalice el plazo.
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 21.62.2 (2021-11-24)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 21.62.3 (2021-11-25)"
|
||||
#define CSS_FILE "swad21.59.css"
|
||||
#define JS_FILE "swad21.59.js"
|
||||
/*
|
||||
TODO: Rename CENTRE to CENTER in help wiki.
|
||||
TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams
|
||||
|
||||
Version 21.62.3: Nov 25, 2021 Fixed bug in test questions. Reported by Javier Fernández Baldomero and others. (319438 lines)
|
||||
Version 21.62.2: Nov 24, 2021 Fixed bug in forums. Reported by Javier Fernández Baldomero. (319422 lines)
|
||||
Version 21.62.1: Nov 24, 2021 Added some header files. (319422 lines)
|
||||
Version 21.62: Nov 24, 2021 Code refactoring in photos. (319415 lines)
|
||||
|
|
|
@ -1609,7 +1609,8 @@ void Qst_GetCorrectChoAnswerFromDB (struct Qst_Question *Question)
|
|||
unsigned NumOpt;
|
||||
|
||||
/***** Query database *****/
|
||||
Question->Answer.NumOptions = Qst_DB_GetTextOfAnswers (&mysql_res,Question->QstCod);
|
||||
// Question->Answer.NumOptions = Qst_DB_GetTextOfAnswers (&mysql_res,Question->QstCod); // TODO: Esta línea llevó al error del 25 de noviembre de 2021 Remove this line!!!!!!!
|
||||
Question->Answer.NumOptions = Qst_DB_GetQstAnswersCorr (&mysql_res,Question->QstCod);
|
||||
|
||||
/***** Get options *****/
|
||||
for (NumOpt = 0;
|
||||
|
|
|
@ -1351,6 +1351,21 @@ unsigned Qst_DB_GetTextOfAnswers (MYSQL_RES **mysql_res,long QstCod)
|
|||
return NumOptions;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********** Get answers correctness for a question in an exam set ************/
|
||||
/*****************************************************************************/
|
||||
|
||||
unsigned Qst_DB_GetQstAnswersCorr (MYSQL_RES **mysql_res,long QstCod)
|
||||
{
|
||||
return (unsigned)
|
||||
DB_QuerySELECT (mysql_res,"can not get correctness of answers of a question",
|
||||
"SELECT Correct" // row[0]
|
||||
" FROM tst_answers"
|
||||
" WHERE QstCod=%ld"
|
||||
" ORDER BY AnsInd",
|
||||
QstCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********** Get suffled/not-shuffled answers indexes of question ************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -67,6 +67,7 @@ unsigned Qst_DB_GetQstCodFromTypeAnsStem (MYSQL_RES **mysql_res,
|
|||
unsigned Qst_DB_GetNumAnswersQst (long QstCod);
|
||||
unsigned Qst_DB_GetDataOfAnswers (MYSQL_RES **mysql_res,long QstCod,bool Shuffle);
|
||||
unsigned Qst_DB_GetTextOfAnswers (MYSQL_RES **mysql_res,long QstCod);
|
||||
unsigned Qst_DB_GetQstAnswersCorr (MYSQL_RES **mysql_res,long QstCod);
|
||||
unsigned Qst_DB_GetShuffledAnswersIndexes (MYSQL_RES **mysql_res,
|
||||
const struct Qst_Question *Question);
|
||||
unsigned Qst_DB_GetMedCodsFromStemsOfQstsInCrs (MYSQL_RES **mysql_res,long CrsCod);
|
||||
|
|
|
@ -671,9 +671,9 @@ static void TstPrn_WriteQstAndAnsExam (struct UsrData *UsrDat,
|
|||
HTM_TxtColonNBSP (Txt_Score);
|
||||
HTM_SPAN_Begin ("class=\"%s\"",
|
||||
PrintedQuestions[QstInd].StrAnswers[0] ?
|
||||
(PrintedQuestions[QstInd].Score > 0 ? "ANS_OK" : // Correct/semicorrect
|
||||
"ANS_BAD") :// Wrong
|
||||
"ANS_0"); // Blank answer
|
||||
(PrintedQuestions[QstInd].Score > 0 ? "ANS_OK" : // Correct/semicorrect
|
||||
"ANS_BAD") : // Wrong
|
||||
"ANS_0"); // Blank answer
|
||||
HTM_Double2Decimals (PrintedQuestions[QstInd].Score);
|
||||
HTM_SPAN_End ();
|
||||
HTM_DIV_End ();
|
||||
|
|
|
@ -6387,7 +6387,7 @@ void Usr_ShowTableCellWithUsrData (struct UsrData *UsrDat,unsigned NumRows)
|
|||
HTM_Txt (UsrDat->FrstName);
|
||||
}
|
||||
|
||||
if (NextAction[UsrDat->Roles.InCurrentCrs] == ActUnk)
|
||||
if (!NextAction[UsrDat->Roles.InCurrentCrs])
|
||||
/* End div */
|
||||
HTM_DIV_End ();
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue