Version19.228.1

This commit is contained in:
acanas 2020-05-13 13:13:03 +02:00
parent 4377742d58
commit e5d8df51c3
4 changed files with 29 additions and 35 deletions

View File

@ -548,10 +548,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.228 (2020-05-13)"
#define Log_PLATFORM_VERSION "SWAD 19.228.1 (2020-05-13)"
#define CSS_FILE "swad19.217.css"
#define JS_FILE "swad19.223.js"
/*
Version 19.228.1: May 13, 2020 Code refactoring in exam prints. (303828 lines)
Version 19.228: May 13, 2020 Code refactoring and bug fixing in exam prints. (303837 lines)
Version 19.227.1: May 13, 2020 Cache of linked GIFs and videos. (303612 lines)
Version 19.227: May 13, 2020 Cache of linked images. (303586 lines)

View File

@ -1095,23 +1095,19 @@ static void ExaPrn_ComputeScoreAndStoreQuestionOfPrint (struct ExaPrn_Print *Pri
void ExaPrn_ComputeAnswerScore (struct TstPrn_PrintedQuestion *PrintedQuestion,
struct Tst_Question *Question)
{
/***** Write answer depending on type *****/
switch (Question->Answer.Type)
{
case Tst_ANS_INT:
ExaPrn_GetCorrectAndComputeIntAnsScore (PrintedQuestion,Question); break;
case Tst_ANS_FLOAT:
ExaPrn_GetCorrectAndComputeFltAnsScore (PrintedQuestion,Question); break;
case Tst_ANS_TRUE_FALSE:
ExaPrn_GetCorrectAndComputeTF_AnsScore (PrintedQuestion,Question); break;
case Tst_ANS_UNIQUE_CHOICE:
case Tst_ANS_MULTIPLE_CHOICE:
ExaPrn_GetCorrectAndComputeChoAnsScore (PrintedQuestion,Question); break;
case Tst_ANS_TEXT:
ExaPrn_GetCorrectAndComputeTxtAnsScore (PrintedQuestion,Question); break;
default:
break;
}
void (*ExaPrn_GetCorrectAndComputeAnsScore[Tst_NUM_ANS_TYPES]) (struct TstPrn_PrintedQuestion *PrintedQuestion,
struct Tst_Question *Question) =
{
[Tst_ANS_INT ] = ExaPrn_GetCorrectAndComputeIntAnsScore,
[Tst_ANS_FLOAT ] = ExaPrn_GetCorrectAndComputeFltAnsScore,
[Tst_ANS_TRUE_FALSE ] = ExaPrn_GetCorrectAndComputeTF_AnsScore,
[Tst_ANS_UNIQUE_CHOICE ] = ExaPrn_GetCorrectAndComputeChoAnsScore,
[Tst_ANS_MULTIPLE_CHOICE] = ExaPrn_GetCorrectAndComputeChoAnsScore,
[Tst_ANS_TEXT ] = ExaPrn_GetCorrectAndComputeTxtAnsScore,
};
/***** Get correct answer and compute answer score depending on type *****/
ExaPrn_GetCorrectAndComputeAnsScore[Question->Answer.Type] (PrintedQuestion,Question);
}
/*****************************************************************************/

View File

@ -403,23 +403,19 @@ void TstPrn_ComputeScoresAndStoreQuestionsOfPrint (struct TstPrn_Print *Print,
void TstPrn_ComputeAnswerScore (struct TstPrn_PrintedQuestion *PrintedQuestion,
struct Tst_Question *Question)
{
/***** Write answer depending on type *****/
switch (Question->Answer.Type)
{
case Tst_ANS_INT:
TstPrn_GetCorrectAndComputeIntAnsScore (PrintedQuestion,Question); break;
case Tst_ANS_FLOAT:
TstPrn_GetCorrectAndComputeFltAnsScore (PrintedQuestion,Question); break;
case Tst_ANS_TRUE_FALSE:
TstPrn_GetCorrectAndComputeTF_AnsScore (PrintedQuestion,Question); break;
case Tst_ANS_UNIQUE_CHOICE:
case Tst_ANS_MULTIPLE_CHOICE:
TstPrn_GetCorrectAndComputeChoAnsScore (PrintedQuestion,Question); break;
case Tst_ANS_TEXT:
TstPrn_GetCorrectAndComputeTxtAnsScore (PrintedQuestion,Question); break;
default:
break;
}
void (*TstPrn_GetCorrectAndComputeAnsScore[Tst_NUM_ANS_TYPES]) (struct TstPrn_PrintedQuestion *PrintedQuestion,
struct Tst_Question *Question) =
{
[Tst_ANS_INT ] = TstPrn_GetCorrectAndComputeIntAnsScore,
[Tst_ANS_FLOAT ] = TstPrn_GetCorrectAndComputeFltAnsScore,
[Tst_ANS_TRUE_FALSE ] = TstPrn_GetCorrectAndComputeTF_AnsScore,
[Tst_ANS_UNIQUE_CHOICE ] = TstPrn_GetCorrectAndComputeChoAnsScore,
[Tst_ANS_MULTIPLE_CHOICE] = TstPrn_GetCorrectAndComputeChoAnsScore,
[Tst_ANS_TEXT ] = TstPrn_GetCorrectAndComputeTxtAnsScore,
};
/***** Get correct answer and compute answer score depending on type *****/
TstPrn_GetCorrectAndComputeAnsScore[Question->Answer.Type] (PrintedQuestion,Question);
}
/*****************************************************************************/

View File

@ -78,6 +78,7 @@ void TstPrn_ComputeAnswerScore (struct TstPrn_PrintedQuestion *PrintedQuestion,
struct Tst_Question *Question);
//-----------------------------------------------------------------------------
void TstPrn_ComputeIntAnsScore (struct TstPrn_PrintedQuestion *PrintedQuestion,
const struct Tst_Question *Question);
void TstPrn_ComputeFltAnsScore (struct TstPrn_PrintedQuestion *PrintedQuestion,