From e99957efd5c10c524249d77c1f77cadb835fb273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Thu, 10 Oct 2019 11:08:53 +0200 Subject: [PATCH] Version19.31.37 --- swad_changelog.h | 6 ++++-- swad_test.c | 34 ++++++++++++++++++---------------- swad_user.c | 24 +++++++++++++----------- 3 files changed, 35 insertions(+), 29 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 6606e0f1b..61febfaf1 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -487,14 +487,16 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.31.36 (2019-10-10)" +#define Log_PLATFORM_VERSION "SWAD 19.31.37 (2019-10-10)" #define CSS_FILE "swad19.29.css" #define JS_FILE "swad19.30.js" /* // TODO: Perico: poner un candado de bloqueo de creación/edición de proyectos (por ejemplo en asignaturas obsoletas) -// TODO: Un TFG preasignado sin estudiante tiene que salir un triángulo amarillo +// TODO: En un TFG preasignado sin estudiante tiene que salir un triángulo amarillo +// TODO: En un TFG no preasignado con estudiante tiene que salir un triángulo amarillo // TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.) + Version 19.31.37: Oct 10, 2019 Code refactoring in HTML tables. (246626 lines) Version 19.31.36: Oct 10, 2019 Code refactoring in HTML tables. (246620 lines) Version 19.31.35: Oct 10, 2019 Code refactoring in HTML tables. (246629 lines) Version 19.31.34: Oct 10, 2019 Code refactoring in HTML tables. (246628 lines) diff --git a/swad_test.c b/swad_test.c index fb1dd3420..6f23395e5 100644 --- a/swad_test.c +++ b/swad_test.c @@ -4345,7 +4345,6 @@ static void Tst_WriteTextAnsAssessTest (struct UsrData *UsrDat, Tbl_StartRow (); /***** Write the user answer *****/ - fprintf (Gbl.F.Out,"" - "%s", - (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD || - Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) ? - (Correct ? "ANS_OK" : - "ANS_BAD") : - "ANS_0", - Gbl.Test.StrAnswersOneQst[NumQst]); + Tbl_StartCellAttr ("class=\"%s CENTER_TOP\"", + (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD || + Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) ? + (Correct ? "ANS_OK" : + "ANS_BAD") : + "ANS_0"); + fprintf (Gbl.F.Out,"%s",Gbl.Test.StrAnswersOneQst[NumQst]); } else // If user has omitted the answer - fprintf (Gbl.F.Out,">"); + Tbl_StartCell (); Tbl_EndCell (); /***** Write the correct answers *****/ @@ -4641,24 +4639,28 @@ static void Tst_WriteFloatAnsAssessTest (struct UsrData *UsrDat, Tbl_StartRow (); /***** Write the user answer *****/ - fprintf (Gbl.F.Out,"%lg", + { + Tbl_StartCellAttr ("class=\"%s CENTER_MIDDLE\"", (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD || Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) ? ((FloatAnsUsr >= FloatAnsCorr[0] && FloatAnsUsr <= FloatAnsCorr[1]) ? "ANS_OK" : "ANS_BAD") : - "ANS_0", - FloatAnsUsr); + "ANS_0"); + fprintf (Gbl.F.Out,"%lg",FloatAnsUsr); + } else // Not a floating point number - fprintf (Gbl.F.Out," class=\"ANS_0 CENTER_MIDDLE\">?"); + { + Tbl_StartCellAttr ("class=\"ANS_0 CENTER_MIDDLE\""); + fprintf (Gbl.F.Out,"?"); + } } else // If user has omitted the answer - fprintf (Gbl.F.Out,">"); + Tbl_StartCell (); Tbl_EndCell (); /***** Write the correct answer *****/ diff --git a/swad_user.c b/swad_user.c index a61be0698..c0d67b3be 100644 --- a/swad_user.c +++ b/swad_user.c @@ -3651,19 +3651,21 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat, } /***** User has accepted enrolment? *****/ - fprintf (Gbl.F.Out,"Accepted ? "USR_LIST_NUM_N" : + "USR_LIST_NUM", + UsrDat->Accepted ? Txt_Enrolment_confirmed : + Txt_Enrolment_not_confirmed); else - fprintf (Gbl.F.Out,"BM%u",Gbl.RowEvenOdd); - fprintf (Gbl.F.Out," %s\" title=\"%s\">" - "%s", - UsrDat->Accepted ? "USR_LIST_NUM_N" : - "USR_LIST_NUM", - UsrDat->Accepted ? Txt_Enrolment_confirmed : - Txt_Enrolment_not_confirmed, - UsrDat->Accepted ? "✓" : - "✗"); + Tbl_StartCellAttr ("class=\"BM%u %s\" title=\"%s\"", + Gbl.RowEvenOdd, + UsrDat->Accepted ? "USR_LIST_NUM_N" : + "USR_LIST_NUM", + UsrDat->Accepted ? Txt_Enrolment_confirmed : + Txt_Enrolment_not_confirmed); + fprintf (Gbl.F.Out,"%s",UsrDat->Accepted ? "✓" : + "✗"); Tbl_EndCell (); /***** Write number of user in the list *****/