Version19.255.1

This commit is contained in:
acanas 2020-06-23 20:28:33 +02:00
parent 7e4973bb9d
commit 0b8f1357e0
5 changed files with 165 additions and 127 deletions

View File

@ -556,7 +556,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 19.255 (2020-06-23)"
#define Log_PLATFORM_VERSION "SWAD 19.255.1 (2020-06-23)"
#define CSS_FILE "swad19.253.css"
#define JS_FILE "swad19.254.js"
/*
@ -567,6 +567,7 @@ TODO: Fix bug: Cuando se pulsa en ver fichas, y luego en una ficha en "Ver traba
TODO: No limitar el número de preguntas en un examen a ExaPrn_MAX_QUESTIONS_PER_EXAM_PRINT, sino asignar PrintedQuestions dinámicamente con malloc
TODO: Que al generar un examen sólo se cojan preguntas válidas. Y si ya está generado, al entrar de nuevo, que se vean en rojo.
Version 19.255.1: Jun 23, 2020 Changes in listing of test results. (303655 lines)
Version 19.255: Jun 23, 2020 Code refactoring in test results. (303625 lines)
Version 19.254.2: Jun 23, 2020 Matches results can only be changed to visible when match is at the end.
If teacher goes back in match, the results change antumatically to hidden. (303667 lines)

View File

@ -708,9 +708,9 @@ static void ExaRes_ShowHeaderResults (Usr_MeOrOther_t MeOrOther)
extern const char *Txt_total;
extern const char *Txt_QUESTIONS_valid;
extern const char *Txt_QUESTIONS_invalid;
extern const char *Txt_correct_ANSWERS;
extern const char *Txt_wrong_ANSWERS;
extern const char *Txt_blank_ANSWERS;
extern const char *Txt_ANSWERS_correct;
extern const char *Txt_ANSWERS_wrong;
extern const char *Txt_ANSWERS_blank;
extern const char *Txt_average;
/***** First row *****/
@ -735,9 +735,9 @@ static void ExaRes_ShowHeaderResults (Usr_MeOrOther_t MeOrOther)
HTM_TH (2,1,"RT LINE_LEFT",Txt_total);
HTM_TH (2,1,"RT",Txt_QUESTIONS_valid);
HTM_TH (2,1,"RT",Txt_QUESTIONS_invalid);
HTM_TH (1,1,"RT LINE_LEFT",Txt_correct_ANSWERS);
HTM_TH (1,3,"CT",Txt_wrong_ANSWERS);
HTM_TH (1,1,"RT",Txt_blank_ANSWERS);
HTM_TH (1,1,"RT LINE_LEFT",Txt_ANSWERS_correct);
HTM_TH (1,3,"CT",Txt_ANSWERS_wrong);
HTM_TH (1,1,"RT",Txt_ANSWERS_blank);
HTM_TH (1,1,"RT LINE_LEFT",Txt_total);
HTM_TH (1,1,"RT",Txt_average);
@ -1402,9 +1402,9 @@ static void ExaRes_ShowExamResult (const struct Exa_Exam *Exam,
extern const char *Txt_QUESTIONS_valid;
extern const char *Txt_QUESTIONS_invalid;
extern const char *Txt_Valid_answers;
extern const char *Txt_correct_ANSWERS;
extern const char *Txt_wrong_ANSWERS;
extern const char *Txt_blank_ANSWERS;
extern const char *Txt_ANSWERS_correct;
extern const char *Txt_ANSWERS_wrong;
extern const char *Txt_ANSWERS_blank;
extern const char *Txt_Score;
extern const char *Txt_valid_score;
extern const char *Txt_Grade;
@ -1540,11 +1540,11 @@ static void ExaRes_ShowExamResult (const struct Exa_Exam *Exam,
"%s(<em>p<sub>i</sub></em>=0):&nbsp;%u; "
"%s(0&lt;<em>p<sub>i</sub></em>&lt;1):&nbsp;%u; "
"%s(<em>p<sub>i</sub></em>=0):&nbsp;%u",
Txt_correct_ANSWERS,Print->NumQsts.Valid.Correct,
Txt_wrong_ANSWERS ,Print->NumQsts.Valid.Wrong.Negative,
Txt_wrong_ANSWERS ,Print->NumQsts.Valid.Wrong.Zero,
Txt_wrong_ANSWERS ,Print->NumQsts.Valid.Wrong.Positive,
Txt_blank_ANSWERS ,Print->NumQsts.Valid.Blank);
Txt_ANSWERS_correct,Print->NumQsts.Valid.Correct,
Txt_ANSWERS_wrong ,Print->NumQsts.Valid.Wrong.Negative,
Txt_ANSWERS_wrong ,Print->NumQsts.Valid.Wrong.Zero,
Txt_ANSWERS_wrong ,Print->NumQsts.Valid.Wrong.Positive,
Txt_ANSWERS_blank ,Print->NumQsts.Valid.Blank);
else
Ico_PutIconNotVisible ();
HTM_TD_End ();

View File

@ -741,7 +741,7 @@ static void MchRes_ShowHeaderMchResults (Usr_MeOrOther_t MeOrOther)
extern const char *Txt_Match;
extern const char *Txt_START_END_TIME[Dat_NUM_START_END_TIME];
extern const char *Txt_Questions;
extern const char *Txt_Non_blank_BR_questions;
extern const char *Txt_ANSWERS_non_blank;
extern const char *Txt_Score;
extern const char *Txt_Average_BR_score_BR_per_question;
extern const char *Txt_Grade;
@ -754,7 +754,7 @@ static void MchRes_ShowHeaderMchResults (Usr_MeOrOther_t MeOrOther)
HTM_TH (1,1,"LT",Txt_START_END_TIME[Dat_END_TIME ]);
HTM_TH (1,1,"LT",Txt_Match);
HTM_TH (1,1,"RT",Txt_Questions);
HTM_TH (1,1,"RT",Txt_Non_blank_BR_questions);
HTM_TH (1,1,"RT",Txt_ANSWERS_non_blank);
HTM_TH (1,1,"RT",Txt_Score);
HTM_TH (1,1,"RT",Txt_Average_BR_score_BR_per_question);
HTM_TH (1,1,"RT",Txt_Grade);

View File

@ -1998,22 +1998,45 @@ static void TstPrn_ShowHeaderPrints (void)
extern const char *Txt_User[Usr_NUM_SEXS];
extern const char *Txt_START_END_TIME[Dat_NUM_START_END_TIME];
extern const char *Txt_Questions;
extern const char *Txt_Non_blank_BR_questions;
extern const char *Txt_Answers;
extern const char *Txt_Score;
extern const char *Txt_Average_BR_score_BR_per_question;
extern const char *Txt_Grade;
extern const char *Txt_ANSWERS_non_blank;
extern const char *Txt_ANSWERS_blank;
extern const char *Txt_total;
extern const char *Txt_average;
/***** First row *****/
HTM_TR_Begin (NULL);
HTM_TH (1,2,"CT",Txt_User[Usr_SEX_UNKNOWN]);
HTM_TH (1,1,"LT",Txt_START_END_TIME[Dat_START_TIME]);
HTM_TH (1,1,"LT",Txt_START_END_TIME[Dat_END_TIME ]);
HTM_TH (1,1,"RT",Txt_Questions);
HTM_TH (1,1,"RT",Txt_Non_blank_BR_questions);
HTM_TH (1,1,"RT",Txt_Score);
HTM_TH (1,1,"RT",Txt_Average_BR_score_BR_per_question);
HTM_TH (1,1,"RT",Txt_Grade);
HTM_TH_Empty (1);
HTM_TH (3,2,"CT",Txt_User[Usr_SEX_UNKNOWN]);
HTM_TH (3,1,"LT",Txt_START_END_TIME[Dat_START_TIME]);
HTM_TH (3,1,"LT",Txt_START_END_TIME[Dat_END_TIME ]);
HTM_TH (3,1,"RT LINE_LEFT",Txt_Questions);
HTM_TH (1,2,"CT LINE_LEFT",Txt_Answers);
HTM_TH (1,2,"CT LINE_LEFT",Txt_Score);
HTM_TH (3,1,"RT LINE_LEFT",Txt_Grade);
HTM_TH (3,1,"LINE_LEFT",NULL);
HTM_TR_End ();
/***** Second row *****/
HTM_TR_Begin (NULL);
HTM_TH (1,1,"RT LINE_LEFT",Txt_ANSWERS_non_blank);
HTM_TH (1,1,"RT",Txt_ANSWERS_blank);
HTM_TH (1,1,"RT LINE_LEFT",Txt_total);
HTM_TH (1,1,"RT",Txt_average);
HTM_TR_End ();
/***** Third row *****/
HTM_TR_Begin (NULL);
HTM_TH (1,1,"RT LINE_LEFT","-1&le;<em>p<sub>i</sub></em>&le;1");
HTM_TH (1,1,"RT","<em>p<sub>i</sub></em>=0");
HTM_TH (1,1,"RT LINE_LEFT","<em>&Sigma;p<sub>i</sub></em>");
HTM_TH (1,1,"RT","-1&le;<em style=\"text-decoration:overline;\">p</em>&le;1");
HTM_TR_End ();
}
@ -2107,23 +2130,31 @@ static void TstPrn_ShowUsrPrints (struct UsrData *UsrDat)
}
/* Write number of questions */
HTM_TD_Begin ("class=\"%s RT COLOR%u\"",ClassDat,Gbl.RowEvenOdd);
HTM_TD_Begin ("class=\"%s LINE_LEFT RT COLOR%u\"",ClassDat,Gbl.RowEvenOdd);
if (ICanView.Result)
HTM_Unsigned (Print.NumQsts);
else
Ico_PutIconNotVisible ();
HTM_TD_End ();
/* Write number of questions not blank */
HTM_TD_Begin ("class=\"%s RT COLOR%u\"",ClassDat,Gbl.RowEvenOdd);
/* Write number of non-blank answers */
HTM_TD_Begin ("class=\"%s LINE_LEFT RT COLOR%u\"",ClassDat,Gbl.RowEvenOdd);
if (ICanView.Result)
HTM_Unsigned (Print.NumQstsNotBlank);
else
Ico_PutIconNotVisible ();
HTM_TD_End ();
/* Write score */
/* Write number of blank answers */
HTM_TD_Begin ("class=\"%s RT COLOR%u\"",ClassDat,Gbl.RowEvenOdd);
if (ICanView.Result)
HTM_Unsigned (Print.NumQsts - Print.NumQstsNotBlank);
else
Ico_PutIconNotVisible ();
HTM_TD_End ();
/* Write score */
HTM_TD_Begin ("class=\"%s LINE_LEFT RT COLOR%u\"",ClassDat,Gbl.RowEvenOdd);
if (ICanView.Score)
{
HTM_Double2Decimals (Print.Score);
@ -2145,7 +2176,7 @@ static void TstPrn_ShowUsrPrints (struct UsrData *UsrDat)
HTM_TD_End ();
/* Write grade */
HTM_TD_Begin ("class=\"%s RT COLOR%u\"",ClassDat,Gbl.RowEvenOdd);
HTM_TD_Begin ("class=\"%s LINE_LEFT RT COLOR%u\"",ClassDat,Gbl.RowEvenOdd);
if (ICanView.Score)
TstPrn_ComputeAndShowGrade (Print.NumQsts,Print.Score,Tst_SCORE_MAX);
else
@ -2153,7 +2184,7 @@ static void TstPrn_ShowUsrPrints (struct UsrData *UsrDat)
HTM_TD_End ();
/* Link to show this test exam */
HTM_TD_Begin ("class=\"RT COLOR%u\"",Gbl.RowEvenOdd);
HTM_TD_Begin ("class=\"LINE_LEFT RT COLOR%u\"",Gbl.RowEvenOdd);
if (ICanView.Result)
{
Frm_StartForm (Gbl.Action.Act == ActSeeMyTstResCrs ? ActSeeOneTstResMe :
@ -2246,25 +2277,31 @@ static void TstPrn_ShowPrintsSummaryRow (bool ItsMe,
HTM_TR_Begin (NULL);
/***** Row title *****/
HTM_TD_Begin ("colspan=\"2\" class=\"DAT_N LINE_TOP RM COLOR%u\"",Gbl.RowEvenOdd);
HTM_TD_Begin ("colspan=\"2\" class=\"DAT_N LINE_TOP LINE_BOTTOM RM COLOR%u\"",Gbl.RowEvenOdd);
HTM_TxtColonNBSP (Txt_Visible_tests);
HTM_Unsigned (NumPrints);
HTM_TD_End ();
/***** Write total number of questions *****/
HTM_TD_Begin ("class=\"DAT_N LINE_TOP RM COLOR%u\"",Gbl.RowEvenOdd);
HTM_TD_Begin ("class=\"DAT_N LINE_TOP LINE_BOTTOM LINE_LEFT RM COLOR%u\"",Gbl.RowEvenOdd);
if (NumPrints)
HTM_Unsigned (NumTotalQsts);
HTM_TD_End ();
/***** Write total number of questions not blank *****/
HTM_TD_Begin ("class=\"DAT_N LINE_TOP RM COLOR%u\"",Gbl.RowEvenOdd);
/***** Write total number of non-blank answers *****/
HTM_TD_Begin ("class=\"DAT_N LINE_TOP LINE_BOTTOM LINE_LEFT RM COLOR%u\"",Gbl.RowEvenOdd);
if (NumPrints)
HTM_Unsigned (NumTotalQstsNotBlank);
HTM_TD_End ();
/***** Write total number of blank answers *****/
HTM_TD_Begin ("class=\"DAT_N LINE_TOP LINE_BOTTOM RM COLOR%u\"",Gbl.RowEvenOdd);
if (NumPrints)
HTM_Unsigned (NumTotalQsts - NumTotalQstsNotBlank);
HTM_TD_End ();
/***** Write total score *****/
HTM_TD_Begin ("class=\"DAT_N LINE_TOP RM COLOR%u\"",Gbl.RowEvenOdd);
HTM_TD_Begin ("class=\"DAT_N LINE_TOP LINE_BOTTOM LINE_LEFT RM COLOR%u\"",Gbl.RowEvenOdd);
if (ICanViewTotalScore)
{
HTM_Double2Decimals (TotalScoreOfAllTests);
@ -2274,20 +2311,20 @@ static void TstPrn_ShowPrintsSummaryRow (bool ItsMe,
HTM_TD_End ();
/***** Write average score per question *****/
HTM_TD_Begin ("class=\"DAT_N LINE_TOP RM COLOR%u\"",Gbl.RowEvenOdd);
HTM_TD_Begin ("class=\"DAT_N LINE_TOP LINE_BOTTOM RM COLOR%u\"",Gbl.RowEvenOdd);
if (ICanViewTotalScore)
HTM_Double2Decimals (NumTotalQsts ? TotalScoreOfAllTests / (double) NumTotalQsts :
0.0);
HTM_TD_End ();
/***** Write score over Tst_SCORE_MAX *****/
HTM_TD_Begin ("class=\"DAT_N LINE_TOP RM COLOR%u\"",Gbl.RowEvenOdd);
/***** Write grade over Tst_SCORE_MAX *****/
HTM_TD_Begin ("class=\"DAT_N LINE_TOP LINE_BOTTOM LINE_LEFT RM COLOR%u\"",Gbl.RowEvenOdd);
if (ICanViewTotalScore)
TstPrn_ComputeAndShowGrade (NumTotalQsts,TotalScoreOfAllTests,Tst_SCORE_MAX);
HTM_TD_End ();
/***** Last cell *****/
HTM_TD_Begin ("class=\"DAT_N LINE_TOP COLOR%u\"",Gbl.RowEvenOdd);
HTM_TD_Begin ("class=\"DAT_N LINE_TOP LINE_BOTTOM LINE_LEFT COLOR%u\"",Gbl.RowEvenOdd);
HTM_TD_End ();
/***** End row *****/

View File

@ -2075,6 +2075,90 @@ const char *Txt_Answers = // Answers of test
"Respostas";
#endif
const char *Txt_ANSWERS_blank =
#if L==1 // ca
"en&nbsp;blanc";
#elif L==2 // de
"leere";
#elif L==3 // en
"blank";
#elif L==4 // es
"en&nbsp;blanco";
#elif L==5 // fr
"vides";
#elif L==6 // gn
"en&nbsp;blanco"; // Okoteve traducción
#elif L==7 // it
"vuote";
#elif L==8 // pl
"puste";
#elif L==9 // pt
"em&nbsp;branco";
#endif
const char *Txt_ANSWERS_correct =
#if L==1 // ca
"correctes";
#elif L==2 // de
"richtige";
#elif L==3 // en
"correct";
#elif L==4 // es
"correctas";
#elif L==5 // fr
"bonnes";
#elif L==6 // gn
"correctas"; // Okoteve traducción
#elif L==7 // it
"corrette";
#elif L==8 // pl
"prawid&lstrok;owe";
#elif L==9 // pt
"corretas";
#endif
const char *Txt_ANSWERS_non_blank =
#if L==1 // ca
"contestades";
#elif L==2 // de
"non-blank";
#elif L==3 // en
"non-blank";
#elif L==4 // es
"contestadas";
#elif L==5 // fr
"non vide";
#elif L==6 // gn
"contestadas"; // Okoteve traducción
#elif L==7 // it
"risposte";
#elif L==8 // pl
"niepustych";
#elif L==9 // pt
"respondidas";
#endif
const char *Txt_ANSWERS_wrong =
#if L==1 // ca
"incorrectes";
#elif L==2 // de
"falsche";
#elif L==3 // en
"wrong";
#elif L==4 // es
"err&oacute;neas";
#elif L==5 // fr
"mauvaises";
#elif L==6 // gn
"err&oacute;neas"; // Okoteve traducción
#elif L==7 // it
"sbagliate";
#elif L==8 // pl
"z&lstrok;e";
#elif L==9 // pt
"erradas";
#endif
const char *Txt_Any_action =
#if L==1 // ca
"Qualsevol acci&oacute;";
@ -3107,27 +3191,6 @@ const char *Txt_Before_going_to_any_other_option_you_must_fill_in_your_email_add
"voc&ecirc; deve preencher seu endere&ccedil;o de email.";
#endif
const char *Txt_blank_ANSWERS =
#if L==1 // ca
"en&nbsp;blanc";
#elif L==2 // de
"leere";
#elif L==3 // en
"blank";
#elif L==4 // es
"en&nbsp;blanco";
#elif L==5 // fr
"vides";
#elif L==6 // gn
"en&nbsp;blanco"; // Okoteve traducción
#elif L==7 // it
"vuote";
#elif L==8 // pl
"puste";
#elif L==9 // pt
"em&nbsp;branco";
#endif
const char *Txt_Briefcase_of_THE_USER_X_has_been_removed = // Warning: it is very important to include %s in the following sentences
#if L==1 // ca
"Se ha eliminado el malet&iacute;n de <strong>%s</strong>."; // Necessita traduccio
@ -5009,27 +5072,6 @@ const char *Txt_Copy_source =
"Origem da copia";
#endif
const char *Txt_correct_ANSWERS =
#if L==1 // ca
"correctes";
#elif L==2 // de
"richtige";
#elif L==3 // en
"correct";
#elif L==4 // es
"correctas";
#elif L==5 // fr
"bonnes";
#elif L==6 // gn
"correctas"; // Okoteve traducción
#elif L==7 // it
"corrette";
#elif L==8 // pl
"prawid&lstrok;owe";
#elif L==9 // pt
"corretas";
#endif
const char *Txt_Could_not_detect_any_face_in_front_position_ =
#if L==1 // ca
"No s'ha detectat cap rostre en posici&oacute; frontal.";
@ -27228,27 +27270,6 @@ const char *Txt_nobody_else_can_access_this_content =
"ningu&eacute;m mais pode acessar este conte&uacute;do";
#endif
const char *Txt_Non_blank_BR_questions =
#if L==1 // ca
"Preguntes<br />contestades";
#elif L==2 // de
"Non-blank<br />Fragen";
#elif L==3 // en
"Non-blank<br />questions";
#elif L==4 // es
"Preguntas<br />contestadas";
#elif L==5 // fr
"Questions<br />non vide";
#elif L==6 // gn
"Preguntas<br />contestadas"; // Okoteve traducción
#elif L==7 // it
"Domande<br />risposte";
#elif L==8 // pl
"Niepustych<br />pytania";
#elif L==9 // pt
"Perguntas<br />respondidas";
#endif
const char *Txt_Not_applicable =
#if L==1 // ca
"No aplicable";
@ -57148,27 +57169,6 @@ const char *Txt_Write_a_message =
"Escrever uma mensagem";
#endif
const char *Txt_wrong_ANSWERS =
#if L==1 // ca
"incorrectes";
#elif L==2 // de
"falsche";
#elif L==3 // en
"wrong";
#elif L==4 // es
"err&oacute;neas";
#elif L==5 // fr
"mauvaises";
#elif L==6 // gn
"err&oacute;neas"; // Okoteve traducción
#elif L==7 // it
"sbagliate";
#elif L==8 // pl
"z&lstrok;e";
#elif L==9 // pt
"erradas";
#endif
const char *Txt_Wrong_file_type =
#if L==1 // ca
"Tipus d'arxiu incorrecte.";