diff --git a/swad_changelog.h b/swad_changelog.h index 2689e8d21..6cfdd4366 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -487,7 +487,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.31.28 (2019-10-08)" +#define Log_PLATFORM_VERSION "SWAD 19.31.29 (2019-10-08)" #define CSS_FILE "swad19.29.css" #define JS_FILE "swad19.30.js" /* @@ -495,6 +495,7 @@ ps2pdf source.ps destination.pdf // TODO: Un TFG preasignado sin 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.29: Oct 08, 2019 Code refactoring in HTML tables. (246740 lines) Version 19.31.28: Oct 08, 2019 Code refactoring in HTML tables. (246783 lines) Version 19.31.27: Oct 08, 2019 Code refactoring in HTML tables. (246823 lines) Version 19.31.26: Oct 08, 2019 Code refactoring in HTML tables. (246850 lines) diff --git a/swad_info.c b/swad_info.c index f81e1f68d..a6be9eb3b 100644 --- a/swad_info.c +++ b/swad_info.c @@ -1161,11 +1161,11 @@ void Inf_FormsToSelSendInfo (void) Tbl_EndCell (); /* Form for this info source */ - fprintf (Gbl.F.Out,"" - "", + Tbl_StartCellAttr ("class=\"LEFT_TOP LIGHT_BLUE\""); + else + Tbl_StartCellAttr ("class=\"LEFT_TOP\""); + fprintf (Gbl.F.Out,"", (unsigned) InfoSrc,The_ClassFormInBox[Gbl.Prefs.Theme], Txt_INFO_SRC_FULL_TEXT[InfoSrc]); if (Txt_INFO_SRC_HELP[InfoSrc]) diff --git a/swad_match.c b/swad_match.c index 21035e221..f1a9f7b3e 100644 --- a/swad_match.c +++ b/swad_match.c @@ -558,7 +558,7 @@ static void Mch_ListOneOrMoreMatchesTimes (const struct Match *Match,unsigned Un " class=\"%s LEFT_TOP COLOR%u\">", (unsigned) StartEndTime,UniqueId, Match->Status.QstInd >= Mch_AFTER_LAST_QUESTION ? "DATE_RED" : - "DATE_GREEN", + "DATE_GREEN", Gbl.RowEvenOdd); fprintf (Gbl.F.Out,"", (unsigned) StartEndTime,UniqueId, - Gbl.RowEvenOdd, - (unsigned) StartEndTime,UniqueId, (long) TimeUTC[StartEndTime], (unsigned) Gbl.Prefs.DateFormat,Txt_Today); Tbl_EndCell (); } /* Write match title */ - fprintf (Gbl.F.Out,"%s", - Gbl.RowEvenOdd,Match.Title); + fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); + fprintf (Gbl.F.Out,"%s",Match.Title); Tbl_EndCell (); /* Get number of questions (row[3]) */ @@ -495,26 +494,24 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther) } /* Write number of questions */ - fprintf (Gbl.F.Out,"%u", - Gbl.RowEvenOdd,NumQstsInThisResult); + fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); + fprintf (Gbl.F.Out,"%u",NumQstsInThisResult); Tbl_EndCell (); /* Write number of questions not blank */ - fprintf (Gbl.F.Out,"%u", - Gbl.RowEvenOdd,NumQstsNotBlankInThisResult); + fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); + fprintf (Gbl.F.Out,"%u",NumQstsNotBlankInThisResult); Tbl_EndCell (); /* Write score */ - fprintf (Gbl.F.Out,"", - Gbl.RowEvenOdd); + fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); if (ShowResultThisMatch) fprintf (Gbl.F.Out,"%.2lf", ScoreInThisResult); Tbl_EndCell (); /* Write average score per question */ - fprintf (Gbl.F.Out,"", - Gbl.RowEvenOdd); + fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); if (ShowResultThisMatch) fprintf (Gbl.F.Out,"%.2lf", NumQstsInThisResult ? ScoreInThisResult / (double) NumQstsInThisResult : @@ -522,17 +519,16 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther) Tbl_EndCell (); /* Write score over Tst_SCORE_MAX */ - fprintf (Gbl.F.Out,"", - Gbl.RowEvenOdd); + fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); if (ShowResultThisMatch) fprintf (Gbl.F.Out,"%.2lf", - NumQstsInThisResult ? ScoreInThisResult * Tst_SCORE_MAX / (double) NumQstsInThisResult : + NumQstsInThisResult ? ScoreInThisResult * Tst_SCORE_MAX / + (double) NumQstsInThisResult : 0.0); Tbl_EndCell (); /* Link to show this result */ - fprintf (Gbl.F.Out,"", - Gbl.RowEvenOdd); + fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); if (ShowResultThisMatch) { Gam_SetParamCurrentGamCod (Match.GamCod); // Used to pass parameter @@ -593,37 +589,30 @@ static void McR_ShowMchResultsSummaryRow (bool ShowSummaryResults, Tbl_StartRow (); /***** Row title *****/ - fprintf (Gbl.F.Out,"" - "%s: %u", - Gbl.RowEvenOdd, - Txt_Matches,NumResults); + fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); + fprintf (Gbl.F.Out,"%s: %u",Txt_Matches,NumResults); Tbl_EndCell (); /***** Write total number of questions *****/ - fprintf (Gbl.F.Out,"", - Gbl.RowEvenOdd); + fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); if (NumResults) fprintf (Gbl.F.Out,"%u",NumTotalQsts); Tbl_EndCell (); /***** Write total number of questions not blank *****/ - fprintf (Gbl.F.Out,"", - Gbl.RowEvenOdd); + fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); if (NumResults) fprintf (Gbl.F.Out,"%u",NumTotalQstsNotBlank); Tbl_EndCell (); /***** Write total score *****/ - fprintf (Gbl.F.Out,"", - Gbl.RowEvenOdd); + fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); if (ShowSummaryResults) fprintf (Gbl.F.Out,"%.2lf",TotalScoreOfAllResults); Tbl_EndCell (); /***** Write average score per question *****/ - fprintf (Gbl.F.Out,"", - Gbl.RowEvenOdd); + fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); if (ShowSummaryResults) fprintf (Gbl.F.Out,"%.2lf", NumTotalQsts ? TotalScoreOfAllResults / (double) NumTotalQsts : @@ -631,8 +620,7 @@ static void McR_ShowMchResultsSummaryRow (bool ShowSummaryResults, Tbl_EndCell (); /***** Write score over Tst_SCORE_MAX *****/ - fprintf (Gbl.F.Out,"", - Gbl.RowEvenOdd); + fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); if (ShowSummaryResults) fprintf (Gbl.F.Out,"%.2lf", NumTotalQsts ? TotalScoreOfAllResults * Tst_SCORE_MAX / @@ -641,8 +629,7 @@ static void McR_ShowMchResultsSummaryRow (bool ShowSummaryResults, Tbl_EndCell (); /***** Last cell *****/ - fprintf (Gbl.F.Out,"", - Gbl.RowEvenOdd); + fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); Tbl_EndCell (); /***** End row *****/ @@ -792,9 +779,8 @@ void McR_ShowOneMchResult (void) /* User */ Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s:", - Txt_ROLES_SINGUL_Abc[UsrDat->Roles.InCurrentCrs.Role][UsrDat->Sex]); + fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,"%s:",Txt_ROLES_SINGUL_Abc[UsrDat->Roles.InCurrentCrs.Role][UsrDat->Sex]); Tbl_EndCell (); fprintf (Gbl.F.Out,""); @@ -823,18 +809,17 @@ void McR_ShowOneMchResult (void) { Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s:", - Txt_START_END_TIME[StartEndTime]); + fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,"%s:",Txt_START_END_TIME[StartEndTime]); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "", (unsigned) StartEndTime, - (unsigned) StartEndTime, TimeUTC[StartEndTime], (unsigned) Gbl.Prefs.DateFormat,Txt_Today); Tbl_EndCell (); @@ -845,13 +830,12 @@ void McR_ShowOneMchResult (void) /* Number of questions */ Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s:", - Txt_Questions); + fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,"%s:",Txt_Questions); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u (%u %s)", + fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,"%u (%u %s)", NumQsts,NumQstsNotBlank,Txt_non_blank_QUESTIONS); Tbl_EndCell (); @@ -860,9 +844,8 @@ void McR_ShowOneMchResult (void) /* Score */ Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s:", - Txt_Score); + fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,"%s:",Txt_Score); Tbl_EndCell (); fprintf (Gbl.F.Out,""); @@ -882,9 +865,8 @@ void McR_ShowOneMchResult (void) /* Tags present in this result */ Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s:", - Txt_Tags); + fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,"%s:",Txt_Tags); Tbl_EndCell (); fprintf (Gbl.F.Out,""); diff --git a/swad_message.c b/swad_message.c index b164f390e..ff44e5263 100644 --- a/swad_message.c +++ b/swad_message.c @@ -292,9 +292,8 @@ static void Msg_PutFormMsgUsrs (char Content[Cns_MAX_BYTES_LONG_TEXT + 1]) /***** "To:" section (recipients) *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s:", - The_ClassFormInBox[Gbl.Prefs.Theme],Txt_MSG_To); + fprintf (Gbl.F.Out,"",The_ClassFormInBox[Gbl.Prefs.Theme]); + fprintf (Gbl.F.Out,"%s:",Txt_MSG_To); Tbl_EndCell (); fprintf (Gbl.F.Out,""); @@ -495,11 +494,11 @@ static void Msg_WriteFormUsrsIDsOrNicksOtherRecipients (void) /***** Textarea with users' @nicknames, emails or IDs *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out," 1) - fprintf (Gbl.F.Out," colspan=\"%u\"",Colspan); - fprintf (Gbl.F.Out," class=\"LEFT_MIDDLE\">" - "