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: En OpenSWAD:
ps2pdf source.ps destination.pdf 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 CSS_FILE "swad19.217.css"
#define JS_FILE "swad19.223.js" #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.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.1: May 13, 2020 Cache of linked GIFs and videos. (303612 lines)
Version 19.227: May 13, 2020 Cache of linked images. (303586 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, void ExaPrn_ComputeAnswerScore (struct TstPrn_PrintedQuestion *PrintedQuestion,
struct Tst_Question *Question) struct Tst_Question *Question)
{ {
/***** Write answer depending on type *****/ void (*ExaPrn_GetCorrectAndComputeAnsScore[Tst_NUM_ANS_TYPES]) (struct TstPrn_PrintedQuestion *PrintedQuestion,
switch (Question->Answer.Type) struct Tst_Question *Question) =
{ {
case Tst_ANS_INT: [Tst_ANS_INT ] = ExaPrn_GetCorrectAndComputeIntAnsScore,
ExaPrn_GetCorrectAndComputeIntAnsScore (PrintedQuestion,Question); break; [Tst_ANS_FLOAT ] = ExaPrn_GetCorrectAndComputeFltAnsScore,
case Tst_ANS_FLOAT: [Tst_ANS_TRUE_FALSE ] = ExaPrn_GetCorrectAndComputeTF_AnsScore,
ExaPrn_GetCorrectAndComputeFltAnsScore (PrintedQuestion,Question); break; [Tst_ANS_UNIQUE_CHOICE ] = ExaPrn_GetCorrectAndComputeChoAnsScore,
case Tst_ANS_TRUE_FALSE: [Tst_ANS_MULTIPLE_CHOICE] = ExaPrn_GetCorrectAndComputeChoAnsScore,
ExaPrn_GetCorrectAndComputeTF_AnsScore (PrintedQuestion,Question); break; [Tst_ANS_TEXT ] = ExaPrn_GetCorrectAndComputeTxtAnsScore,
case Tst_ANS_UNIQUE_CHOICE: };
case Tst_ANS_MULTIPLE_CHOICE:
ExaPrn_GetCorrectAndComputeChoAnsScore (PrintedQuestion,Question); break; /***** Get correct answer and compute answer score depending on type *****/
case Tst_ANS_TEXT: ExaPrn_GetCorrectAndComputeAnsScore[Question->Answer.Type] (PrintedQuestion,Question);
ExaPrn_GetCorrectAndComputeTxtAnsScore (PrintedQuestion,Question); break;
default:
break;
}
} }
/*****************************************************************************/ /*****************************************************************************/

View File

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

View File

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