diff --git a/swad_changelog.h b/swad_changelog.h index 61b254429..44f3d099e 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -487,14 +487,15 @@ 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.2 (2019-10-04)" +#define Log_PLATFORM_VERSION "SWAD 19.31.3 (2019-10-04)" #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) + Version 19.31.3: Oct 04, 2019 Code refactoring in HTML tables. (247039 lines) Version 19.31.2: Oct 04, 2019 Fixed bug while removing the matches of a course, reported by Pedro A. García Sánchez. - Fixed bug in degree logo. (? lines) + Fixed bug in degree logo. (247038 lines) Version 19.31.1: Oct 04, 2019 Code refactoring in HTML tables. (247035 lines) Version 19.31 : Oct 04, 2019 Code refactoring in HTML tables. (246967 lines) Version 19.30.6: Oct 03, 2019 Code refactoring in HTML tables. (246928 lines) diff --git a/swad_date.c b/swad_date.c index 0f7c918f3..62106ffbe 100644 --- a/swad_date.c +++ b/swad_date.c @@ -454,10 +454,10 @@ void Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (bool SetHMS00000 " onclick=\"setDateToYesterday('Start','End');\" />" "" - "" - "", + "", Txt_Yesterday, Txt_Today); + Tbl_EndRow (); /***** End date-time *****/ Tbl_StartRow (); @@ -477,8 +477,8 @@ void Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (bool SetHMS00000 SetHMS000000To235959 ? Dat_HMS_TO_235959 : // Set hour, minute and second to 23:59:59 Dat_HMS_DO_NOT_SET, // Don't set hour, minute and second false); // Don't submit on change - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /*****************************************************************************/ @@ -517,8 +517,8 @@ void Dat_PutFormStartEndClientLocalDateTimes (time_t TimeUTC[2], FormSeconds, Dat_HMS_DO_NOT_SET, // Don't set hour, minute and second false); // Don't submit on change - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } } @@ -665,7 +665,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id, } /***** End table *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); Tbl_EndTable (); /***** Hidden field with UTC time (seconds since 1970) used to send time *****/ @@ -895,7 +895,7 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear, ""); /***** End table *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); Tbl_EndTable (); } diff --git a/swad_degree.c b/swad_degree.c index dc2a2d9bc..8ecef372c 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -191,10 +191,10 @@ void Deg_SeeDegWithPendingCrss (void) "" "" "%s" - "" - "", + "", Txt_Degree, Txt_Courses_ABBREVIATION); + Tbl_EndRow (); /***** List the degrees *****/ for (NumDeg = 0; @@ -223,9 +223,9 @@ void Deg_SeeDegWithPendingCrss (void) /* Number of pending courses (row[1]) */ fprintf (Gbl.F.Out,"" "%s" - "" - "", + "", BgColor,row[1]); + Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; } @@ -380,8 +380,8 @@ static void Deg_Configuration (bool PrintView) else // I can not move degree to another centre fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ctr.FullName); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Degree full name *****/ Tbl_StartRow (); @@ -410,8 +410,8 @@ static void Deg_Configuration (bool PrintView) } else // I can not edit degree full name fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Deg.FullName); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Degree short name *****/ Tbl_StartRow (); @@ -440,8 +440,8 @@ static void Deg_Configuration (bool PrintView) } else // I can not edit degree short name fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Deg.ShrtName); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Degree WWW *****/ Tbl_StartRow (); @@ -475,8 +475,8 @@ static void Deg_Configuration (bool PrintView) "", Gbl.Hierarchy.Deg.WWW, Gbl.Hierarchy.Deg.WWW); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Shortcut to the degree *****/ Tbl_StartRow (); @@ -487,8 +487,7 @@ static void Deg_Configuration (bool PrintView) "" "%s/%s?deg=%ld" "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Shortcut, Cfg_URL_SWAD_CGI, @@ -497,6 +496,7 @@ static void Deg_Configuration (bool PrintView) Cfg_URL_SWAD_CGI, Lan_STR_LANG_ID[Gbl.Prefs.Language], Gbl.Hierarchy.Deg.DegCod); + Tbl_EndRow (); if (PrintView) { @@ -509,8 +509,8 @@ static void Deg_Configuration (bool PrintView) The_ClassFormInBox[Gbl.Prefs.Theme], Txt_QR_code); QR_LinkTo (250,"deg",Gbl.Hierarchy.Deg.DegCod); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } else { @@ -534,8 +534,8 @@ static void Deg_Configuration (bool PrintView) Crs_GetNumCrssInDeg (Gbl.Hierarchy.Deg.DegCod)); Frm_EndForm (); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Number of users *****/ Deg_ShowNumUsrsInCrssOfDeg (Rol_TCH); @@ -583,12 +583,12 @@ static void Deg_ShowNumUsrsInCrssOfDeg (Rol_Role_t Role) "" "" "%u" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], (Role == Rol_UNK) ? Txt_Users_in_courses : Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN], Usr_GetNumUsrsInCrssOfDeg (Role,Gbl.Hierarchy.Deg.DegCod)); + Tbl_EndRow (); } /*****************************************************************************/ @@ -874,8 +874,8 @@ static void Deg_ListDegreesForEdition (void) } else if (StatusTxt != Deg_STATUS_ACTIVE) // If active ==> do not show anything fprintf (Gbl.F.Out,"%s",Txt_DEGREE_STATUS[StatusTxt]); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /***** End table *****/ @@ -1032,8 +1032,8 @@ static void Deg_PutFormToCreateDegree (void) /***** Degree status *****/ fprintf (Gbl.F.Out,"" - "" - ""); + ""); + Tbl_EndRow (); /***** End table, send button and end box *****/ Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_degree); @@ -1065,11 +1065,11 @@ static void Deg_PutHeadDegreesForSeeing (void) "%s" "" "" - "" - "", + "", Txt_Degree, Txt_Type, Txt_Courses_ABBREVIATION); + Tbl_EndRow (); } /*****************************************************************************/ @@ -1111,8 +1111,7 @@ static void Deg_PutHeadDegreesForEdition (void) "%s" "" "" - "" - "", + "", Txt_Code, Txt_Short_name_of_the_degree, Txt_Full_name_of_the_degree, @@ -1120,6 +1119,7 @@ static void Deg_PutHeadDegreesForEdition (void) Txt_WWW, Txt_Courses_ABBREVIATION, Txt_Requester); + Tbl_EndRow (); } /*****************************************************************************/ @@ -1326,8 +1326,8 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg) TxtClassNormal,BgColor); if (StatusTxt != Deg_STATUS_ACTIVE) // If active ==> do not show anything fprintf (Gbl.F.Out,"%s",Txt_DEGREE_STATUS[StatusTxt]); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; } @@ -2593,8 +2593,8 @@ void Hie_GetAndWriteInsCtrDegAdminBy (long UsrCod,unsigned ColSpan) Lay_WrongScopeExit (); break; } - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /***** Free structure that stores the query result *****/ diff --git a/swad_degree_type.c b/swad_degree_type.c index 6049a3da5..cb7000e91 100644 --- a/swad_degree_type.c +++ b/swad_degree_type.c @@ -346,9 +346,9 @@ static void DT_ListDegreeTypesForSeeing (void) /* Number of degrees of this type */ fprintf (Gbl.F.Out,"" "%u" - "" - "", + "", BgColor,Gbl.DegTypes.Lst[NumDegTyp].NumDegs); + Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; } @@ -436,9 +436,9 @@ static void DT_ListDegreeTypesForEdition (void) /* Number of degrees of this type */ fprintf (Gbl.F.Out,"" "%u" - "" - "", + "", Gbl.DegTypes.Lst[NumDegTyp].NumDegs); + Tbl_EndRow (); } /***** End table *****/ @@ -491,8 +491,8 @@ static void DT_PutFormToCreateDegreeType (void) /***** Number of degrees of this degree type ****/ fprintf (Gbl.F.Out,"" "0" - "" - ""); + ""); + Tbl_EndRow (); /***** End table, send button and end box *****/ Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_type_of_degree); @@ -563,11 +563,11 @@ static void DT_PutHeadDegreeTypesForEdition (void) "" "" "%s" - "" - "", + "", Txt_Code, Txt_Type_of_degree, Txt_Degrees); + Tbl_EndRow (); } /*****************************************************************************/ diff --git a/swad_department.c b/swad_department.c index 88b342df3..b69246ffc 100644 --- a/swad_department.c +++ b/swad_department.c @@ -138,7 +138,7 @@ void Dpt_SeeDepts (void) Frm_EndForm (); fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Write all the departments and their nuber of teachers *****/ for (NumDpt = 0; @@ -154,11 +154,11 @@ void Dpt_SeeDepts (void) "" "" "%u" - "" - "", + "", Gbl.Dpts.Lst[NumDpt].WWW, Gbl.Dpts.Lst[NumDpt].FullName, Gbl.Dpts.Lst[NumDpt].NumTchs); + Tbl_EndRow (); /* Update number of teachers from the current institution with department */ @@ -169,8 +169,8 @@ void Dpt_SeeDepts (void) Tbl_StartRow (); fprintf (Gbl.F.Out,"" " " - "" - ""); + ""); + Tbl_EndRow (); /***** Write teachers with other department *****/ NumTchsInOtherDpts = Usr_GetNumTchsCurrentInsInDepartment (0); @@ -180,9 +180,9 @@ void Dpt_SeeDepts (void) "" "" "%u" - "" - "", + "", Txt_Other_departments,NumTchsInOtherDpts); + Tbl_EndRow (); NumTchsInsWithDpt += NumTchsInOtherDpts; /***** Write teachers with no department *****/ @@ -192,13 +192,13 @@ void Dpt_SeeDepts (void) "" "" "%u" - "" - "", + "", Txt_Department_unspecified, Usr_GetTotalNumberOfUsersInCourses (Hie_INS, 1 << Rol_NET | 1 << Rol_TCH) - NumTchsInsWithDpt); + Tbl_EndRow (); /***** End table and box *****/ Box_EndBoxTable (); @@ -590,9 +590,9 @@ static void Dpt_ListDepartmentsForEdition (void) /* Number of teachers */ fprintf (Gbl.F.Out,"" "%u" - "" - "", + "", Dpt->NumTchs); + Tbl_EndRow (); } /***** End table *****/ @@ -919,12 +919,12 @@ static void Dpt_PutFormToCreateDepartment (void) "" "" "%s" - "" - "", + "", Txt_Institution, Txt_Short_name, Txt_Full_name, Txt_WWW); + Tbl_EndRow (); /***** Institution *****/ Tbl_StartRow (); @@ -969,9 +969,9 @@ static void Dpt_PutFormToCreateDepartment (void) " maxlength=\"%u\" value=\"%s\"" " class=\"INPUT_WWW\"" " required=\"required\" />" - "" - "", + "", Cns_MAX_CHARS_WWW,Dpt_EditingDpt->WWW); + Tbl_EndRow (); /***** End table, send button and end box *****/ Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_department); @@ -1013,14 +1013,14 @@ static void Dpt_PutHeadDepartments (void) "" "" "%s" - "" - "", + "", Txt_Code, Txt_Institution, Txt_Short_name, Txt_Full_name, Txt_WWW, Txt_ROLES_PLURAL_BRIEF_Abc[Rol_TCH]); + Tbl_EndRow (); } /*****************************************************************************/ diff --git a/swad_duplicate.c b/swad_duplicate.c index 605c1343f..0e21c9de6 100644 --- a/swad_duplicate.c +++ b/swad_duplicate.c @@ -207,8 +207,8 @@ void Dup_ListDuplicateUsrs (void) /* Button to remove from list of possible duplicate users */ Dup_PutButtonToRemoveFromListOfDupUsrs (&UsrDat); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; } @@ -333,8 +333,8 @@ static void Dup_ListSimilarUsrs (void) Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_NET); Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_STD); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); Tbl_StartRow (); fprintf (Gbl.F.Out,"" @@ -352,8 +352,8 @@ static void Dup_ListSimilarUsrs (void) if (Dup_CheckIfUsrIsDup (UsrDat.UsrCod)) Dup_PutButtonToRemoveFromListOfDupUsrs (&UsrDat); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; } diff --git a/swad_enrolment.c b/swad_enrolment.c index a23ac41cd..61c417862 100644 --- a/swad_enrolment.c +++ b/swad_enrolment.c @@ -936,10 +936,10 @@ static void Enr_PutAreaToEnterUsrsIDs (void) "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_List_of_nicks_emails_or_IDs); + Tbl_EndRow (); Tbl_EndTable (); } @@ -2301,8 +2301,8 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) "", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Scope); Sco_PutSelectorScope ("ScopeEnr",true); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /* Users' roles in listing */ Tbl_StartRow (); @@ -2316,8 +2316,8 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) 1 << Rol_TCH, RolesSelected, false,true); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /* End table and form */ Tbl_EndTable (); @@ -2819,13 +2819,13 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) "%s" "" "" - "" - "", + "", Txt_Course, Txt_ROLES_PLURAL_BRIEF_Abc[Rol_TCH], Txt_Requester, Txt_Role, Txt_Date); + Tbl_EndRow (); /* List requests */ for (NumReq = 0; @@ -2947,8 +2947,8 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod); Btn_PutRemoveButtonInline (Txt_Reject); Frm_EndForm (); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Mark possible notification as seen *****/ Ntf_MarkNotifAsSeen (Ntf_EVENT_ENROLMENT_REQUEST, diff --git a/swad_exam.c b/swad_exam.c index 258e84e65..3e610bf38 100644 --- a/swad_exam.c +++ b/swad_exam.c @@ -1185,7 +1185,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, "", StyleNormal,StrExamDate); } - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Start time *****/ Tbl_StartRow (); diff --git a/swad_figure.c b/swad_figure.c index 1630c7617..f595bbb37 100644 --- a/swad_figure.c +++ b/swad_figure.c @@ -1013,7 +1013,7 @@ static void Fig_ShowHierarchyRow (const char *Text1,const char *Text2, Fig_ShowHierarchyCell (ClassTxt,NumCrss); /***** End row *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } static void Fig_ShowHierarchyCell (const char *ClassTxt,int Num) @@ -1458,12 +1458,12 @@ static void Fig_ShowInss (MYSQL_RES **mysql_res,unsigned NumInss, if ((++NumIns % Gbl.Usrs.ClassPhoto.Cols) == 0) { - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); TRIsOpen = false; } } if (TRIsOpen) - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); break; case Usr_LIST_AS_LISTING: diff --git a/swad_file_browser.c b/swad_file_browser.c index b33deddbd..1bd9c683f 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -5628,7 +5628,7 @@ static bool Brw_WriteRowFileBrowser (unsigned Level,const char *RowId, Brw_WriteFileName (Level,FileMetadata.IsPublic); /* End column */ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); Tbl_EndTable (); fprintf (Gbl.F.Out,""); @@ -5659,7 +5659,7 @@ static bool Brw_WriteRowFileBrowser (unsigned Level,const char *RowId, /***** End this row *****/ free ((void *) Anchor); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; @@ -5854,7 +5854,7 @@ static void Brw_IndentAndWriteIconExpandContract (unsigned Level, } fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); Tbl_EndTable (); fprintf (Gbl.F.Out,""); } diff --git a/swad_follow.c b/swad_follow.c index 2686246eb..f3629495c 100644 --- a/swad_follow.c +++ b/swad_follow.c @@ -170,7 +170,7 @@ void Fol_SuggestUsrsToFollowMainZone (void) Fol_ShowFollowedOrFollower (&UsrDat); if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == (Fol_NUM_COLUMNS_FOLLOW-1) || NumUsr == NumUsrs - 1) - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /***** Free memory used for user's data *****/ @@ -722,7 +722,7 @@ static void Fol_ListFollowingUsr (struct UsrData *UsrDat) Fol_ShowFollowedOrFollower (&FollowingUsrDat); if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == (Fol_NUM_COLUMNS_FOLLOW-1) || NumUsr == NumUsrs - 1) - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /***** End table and box *****/ @@ -805,7 +805,7 @@ static void Fol_ListFollowersUsr (struct UsrData *UsrDat) Fol_ShowFollowedOrFollower (&FollowerUsrDat); if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == (Fol_NUM_COLUMNS_FOLLOW-1) || NumUsr == NumUsrs - 1) - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /***** End table and box *****/ diff --git a/swad_game.c b/swad_game.c index 6f31ffe63..baf07c023 100644 --- a/swad_game.c +++ b/swad_game.c @@ -238,7 +238,7 @@ static void Gam_ListAllGames (void) fprintf (Gbl.F.Out,"%s",Txt_Matches); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Write all the games *****/ for (NumGame = Pagination.FirstItemVisible; @@ -485,7 +485,7 @@ void Gam_ShowOneGame (long GamCod, fprintf (Gbl.F.Out,""); /***** End 1st row of this game *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Start 2nd row of this game *****/ Tbl_StartRow (); @@ -514,7 +514,7 @@ void Gam_ShowOneGame (long GamCod, Txt); /***** End 2nd row of this game *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** End table *****/ if (ShowOnlyThisGame) diff --git a/swad_group.c b/swad_group.c index 1c57c00c1..a7c76be8c 100644 --- a/swad_group.c +++ b/swad_group.c @@ -1767,7 +1767,7 @@ void Grp_ListGrpsToEditAsgAttSvyMch (struct GroupType *GrpTyp,long Cod, Grp_WriteRowGrp (Grp,IBelongToThisGroup); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /***** Free memory with the list of groups which I belongs to *****/ @@ -2072,7 +2072,7 @@ static bool Grp_ListGrpsForChangeMySelection (struct GroupType *GrpTyp, Grp_WriteRowGrp (Grp,IBelongToThisGroup); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /***** Free memory with the list of groups a the that belongs the user *****/ @@ -2170,7 +2170,7 @@ static void Grp_ListGrpsToAddOrRemUsrs (struct GroupType *GrpTyp,long UsrCod) Grp_WriteRowGrp (Grp,UsrBelongsToThisGroup); /* End row */ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /***** Free memory with the lists of groups *****/ @@ -2264,7 +2264,7 @@ static void Grp_ListGrpsForMultipleSelection (struct GroupType *GrpTyp, Grp_WriteRowGrp (Grp,IBelongToThisGroup); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /***** Free memory with the list of groups which I belongs to *****/ diff --git a/swad_layout.c b/swad_layout.c index 184ffb65d..8dbba04b6 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -1682,7 +1682,7 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto, fprintf (Gbl.F.Out,""); /***** End table *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); Tbl_EndTable (); } diff --git a/swad_mail.c b/swad_mail.c index 18f44a336..6e88c6c0a 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -146,7 +146,7 @@ void Mai_SeeMailDomains (void) Frm_EndForm (); fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Write all the mail domains *****/ for (NumMai = 0; diff --git a/swad_match.c b/swad_match.c index ddd946b05..b504a6457 100644 --- a/swad_match.c +++ b/swad_match.c @@ -409,7 +409,7 @@ static void Mch_ListOneOrMoreMatches (struct Game *Game, Mch_ListOneOrMoreMatchesResult (&Match, ICanPlayThisMatchBasedOnGrps); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /***** End table *****/ @@ -467,7 +467,7 @@ static void Mch_ListOneOrMoreMatchesHeading (bool ICanEditMatches) Txt_Result); /***** End row *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /*****************************************************************************/ @@ -2519,7 +2519,7 @@ static void Mch_ShowQuestionAndAnswersStd (struct Match *Match) fprintf (Gbl.F.Out,""); /***** End row *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /***** End table *****/ @@ -3155,7 +3155,7 @@ static void Mch_DrawBarNumUsrs (unsigned NumAnswerersAns,unsigned NumAnswerersQs (i < BarWidth) ? (Correct ? "MATCH_RES_CORRECT" : "MATCH_RES_WRONG") : "MATCH_RES_VOID"); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); Tbl_EndTable (); /***** Write the number of users *****/ diff --git a/swad_match_result.c b/swad_match_result.c index 8ab6ba3c2..1a15357ab 100644 --- a/swad_match_result.c +++ b/swad_match_result.c @@ -550,7 +550,7 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther) Ico_PutIconOff ("eye-slash.svg",Txt_Hidden_result); fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /***** Write totals for this user *****/ @@ -562,7 +562,7 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther) else { Tbl_PutEmptyCells (8); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /***** Free structure that stores the query result *****/ @@ -639,7 +639,7 @@ static void McR_ShowMchResultsSummaryRow (bool ShowSummaryResults, Gbl.RowEvenOdd); /***** End row *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /*****************************************************************************/ diff --git a/swad_message.c b/swad_message.c index d8309629a..23c0cb224 100644 --- a/swad_message.c +++ b/swad_message.c @@ -2993,7 +2993,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod) Msg_WriteMsgDate (CreatTimeUTC,Open ? "MSG_TIT_BG" : "MSG_TIT_BG_NEW"); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); if (Expanded) { diff --git a/swad_photo.c b/swad_photo.c index f2fe9065f..1f378ae31 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -908,7 +908,7 @@ static void Pho_UpdatePhoto2 (void) Txt_PHOTO_PROCESSING_CAPTIONS[NumPhoto], Pho_PHOTO_REAL_WIDTH,Pho_PHOTO_REAL_HEIGHT, Txt_PHOTO_PROCESSING_CAPTIONS[NumPhoto]); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); Tbl_EndTable (); /***** End alert *****/ @@ -2156,13 +2156,13 @@ static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrin if ((++NumDegsNotEmpty % Gbl.Usrs.ClassPhoto.Cols) == 0) { - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); TRIsOpen = false; } } } if (TRIsOpen) - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); Tbl_EndTable (); } @@ -2221,7 +2221,7 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint) "%s" "", Txt_SEX_PLURAL_Abc[Sex]); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Get degrees *****/ for (NumDeg = 0, Gbl.RowEvenOdd = 0, NumDegsNotEmpty = 0; @@ -2272,7 +2272,7 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint) Pho_ShowDegreeStat (NumStds,NumStdsWithPhoto); fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /***** Photos end *****/ diff --git a/swad_place.c b/swad_place.c index 5cf35cc09..a1d6c7e42 100644 --- a/swad_place.c +++ b/swad_place.c @@ -132,7 +132,7 @@ void Plc_SeePlaces (void) Frm_EndForm (); fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Write all places and their nuber of centres *****/ for (NumPlc = 0; diff --git a/swad_project.c b/swad_project.c index 1a0747cf6..3f83ac8a3 100644 --- a/swad_project.c +++ b/swad_project.c @@ -786,7 +786,7 @@ static void Prj_ShowTableAllProjectsHead (void) Txt_Required_materials, Txt_URL); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /*****************************************************************************/ @@ -1378,7 +1378,7 @@ static void Prj_ShowTableAllProjectsOneRow (struct Project *Prj) Prj_ShowTableAllProjectsURL (Prj); /***** End row *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; } @@ -1744,7 +1744,7 @@ static void Prj_ShowOneProjectMembersWithARole (const struct Project *Prj, Gbl.Usrs.Other.UsrDat.FullName); /* End row for this user */ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } } diff --git a/swad_record.c b/swad_record.c index ab6f91367..039a06907 100644 --- a/swad_record.c +++ b/swad_record.c @@ -2263,23 +2263,23 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView, Tbl_StartRow (); Rec_ShowInstitutionInHead (&Ins,PutFormLinks); Rec_ShowPhoto (UsrDat); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Full name *****/ Tbl_StartRow (); Rec_ShowFullName (UsrDat); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** User's nickname *****/ Tbl_StartRow (); Rec_ShowNickname (UsrDat,PutFormLinks); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** User's country, web and social networks *****/ Tbl_StartRow (); Rec_ShowCountryInHead (UsrDat,ShowData); Rec_ShowWebsAndSocialNets (UsrDat,TypeOfView); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); if (ShowIDRows || ShowAddressRows || diff --git a/swad_statistic.c b/swad_statistic.c index 00befd89c..f09e43723 100644 --- a/swad_statistic.c +++ b/swad_statistic.c @@ -1643,7 +1643,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql if (LastRow < NumRows) Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); Tbl_EndTable (); fprintf (Gbl.F.Out,"" ""); @@ -2173,7 +2173,7 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES "%02uh" "", GRAPH_DISTRIBUTION_PER_HOUR_HOUR_WIDTH,Hour); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Write rows beginning by the most recent day and ending by the oldest one *****/ mysql_data_seek (mysql_res,0); @@ -2237,7 +2237,7 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES Sta_DrawAccessesPerHourForADay (SelectedColorType,NumAccPerHour,Hits.Max); else // D < NumDaysFromLastDateToCurrDate Sta_DrawAccessesPerHourForADay (SelectedColorType,NumAccPerHourZero,Hits.Max); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /* Decrease day */ Dat_GetDateBefore (&Date,&Date); @@ -2288,7 +2288,7 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES Sta_DrawAccessesPerHourForADay (SelectedColorType,NumAccPerHour,Hits.Max); else // D < NumDaysFromLastDateToCurrDate Sta_DrawAccessesPerHourForADay (SelectedColorType,NumAccPerHourZero,Hits.Max); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /* Decrease day */ Dat_GetDateBefore (&Date,&Date); @@ -2324,7 +2324,7 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES /* Draw the color proportional to number of clicks */ Sta_DrawAccessesPerHourForADay (SelectedColorType,NumAccPerHourZero,Hits.Max); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /* Decrease day */ Dat_GetDateBefore (&Date,&Date); @@ -2407,7 +2407,7 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,float HitsMax) "", R,G,B,Cfg_URL_ICON_PUBLIC); } - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); Tbl_EndTable (); } @@ -2873,7 +2873,7 @@ static void Sta_ShowNumHitsPerHour (unsigned long NumRows, H++, Hour++) Sta_WriteAccessHour (H,&Hits,ColumnWidth); } - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } } @@ -3056,7 +3056,7 @@ static void Sta_WriteLabelsXAxisAccMin (float IncX,const char *Format) fprintf (Gbl.F.Out,Format,NumX); fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /*****************************************************************************/ diff --git a/swad_survey.c b/swad_survey.c index ca39666eb..33323d608 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -3440,7 +3440,7 @@ static void Svy_WriteAnswersOfAQst (struct Survey *Svy, if (Svy->Status.ICanViewResults) Svy_DrawBarNumUsrs (NumUsrsThisAnswer,Svy->NumUsrs); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /* Free memory allocated for the answer */ Svy_FreeTextChoiceAnswer (SvyQst,NumAns); diff --git a/swad_syllabus.c b/swad_syllabus.c index 42b7130ce..a7f5fbcda 100644 --- a/swad_syllabus.c +++ b/swad_syllabus.c @@ -726,7 +726,7 @@ static void Syl_ShowRowSyllabus (unsigned NumItem, } /***** End of the row *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; } diff --git a/swad_test.c b/swad_test.c index 12542e4a8..d4e0da78f 100644 --- a/swad_test.c +++ b/swad_test.c @@ -2857,7 +2857,7 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows, fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Write rows *****/ for (NumRow = 0, UniqueId = 1; @@ -3658,7 +3658,7 @@ static void Tst_WriteTFAnsAssessTest (struct UsrData *UsrDat, Tbl_StartTablePadding (2); Tbl_StartRow (); Tst_WriteHeadUserCorrect (UsrDat); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Write the user answer *****/ Tbl_StartRow (); @@ -4240,7 +4240,7 @@ static void Tst_WriteChoiceAnsViewMatch (long MchCod,unsigned QstInd,long QstCod fprintf (Gbl.F.Out,""); /***** End row for this option *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /***** End table *****/ @@ -4319,7 +4319,7 @@ static void Tst_WriteTextAnsAssessTest (struct UsrData *UsrDat, Tbl_StartTablePadding (2); Tbl_StartRow (); Tst_WriteHeadUserCorrect (UsrDat); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Write the user answer *****/ Tbl_StartRow (); @@ -4482,7 +4482,7 @@ static void Tst_WriteIntAnsAssessTest (struct UsrData *UsrDat, Tbl_StartTablePadding (2); Tbl_StartRow (); Tst_WriteHeadUserCorrect (UsrDat); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Write the user answer *****/ Tbl_StartRow (); @@ -4607,7 +4607,7 @@ static void Tst_WriteFloatAnsAssessTest (struct UsrData *UsrDat, Tbl_StartTablePadding (2); Tbl_StartRow (); Tst_WriteHeadUserCorrect (UsrDat); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Write the user answer *****/ Tbl_StartRow (); @@ -5139,7 +5139,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1], "", NumTag,NumTag,Tst_MAX_CHARS_TAG,Gbl.Test.Tags.Txt[NumTag],NumTag); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } Tbl_EndTable (); // Table for tags @@ -7891,7 +7891,7 @@ static void Tst_ShowTstResults (struct UsrData *UsrDat) else { Tbl_PutEmptyCells (7); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /***** Free structure that stores the query result *****/ @@ -8009,7 +8009,7 @@ static void Tst_ShowTestResultsSummaryRow (bool ItsMe, Gbl.RowEvenOdd); /***** End row *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /*****************************************************************************/ diff --git a/swad_timetable.c b/swad_timetable.c index 5b7751d31..16b643d84 100644 --- a/swad_timetable.c +++ b/swad_timetable.c @@ -1241,7 +1241,7 @@ static void TT_DrawTimeTable (void) Min, "LEFT_MIDDLE"); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /***** Free list of groups types and groups in this course *****/ @@ -1254,7 +1254,7 @@ static void TT_DrawTimeTable (void) TT_DrawCellAlignTimeTable (); TT_TimeTableDrawDaysCells (); TT_DrawCellAlignTimeTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Bottom row used for column adjustement *****/ TT_TimeTableDrawAdjustRow (); diff --git a/swad_user.c b/swad_user.c index 5dcce98dc..cdb03a0a5 100644 --- a/swad_user.c +++ b/swad_user.c @@ -3703,7 +3703,7 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat, fprintf (Gbl.F.Out,""); /***** End row *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /*****************************************************************************/ @@ -3801,7 +3801,7 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat) NULL,true,false); /***** End row *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /*****************************************************************************/ @@ -3921,7 +3921,7 @@ static void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames) } /***** End row *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /*****************************************************************************/ @@ -3999,7 +3999,7 @@ static void Usr_WriteRowTchAllData (struct UsrData *UsrDat) " ", NULL,true,UsrDat->Accepted); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /*****************************************************************************/ @@ -6476,7 +6476,7 @@ void Usr_WriteHeaderFieldsUsrDat (bool PutCheckBoxToSelectUsr) "", Usr_UsrDatMainFieldNames[NumCol]); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); } /*****************************************************************************/ @@ -6642,7 +6642,7 @@ static void Usr_ListMainDataTchs (Rol_Role_t Role,bool PutCheckBoxToSelectUsr) Usr_UsrDatMainFieldNames[NumCol]); /* End row */ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Initialize structure with user's data *****/ Usr_UsrDataConstructor (&UsrDat); @@ -6748,7 +6748,7 @@ void Usr_ListAllDataGsts (void) FieldNames[NumCol]); /* End row */ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Initialize structure with user's data *****/ Usr_UsrDataConstructor (&UsrDat); @@ -6931,7 +6931,7 @@ void Usr_ListAllDataStds (void) Gbl.Crs.Records.LstFields.Lst[NumField].Name); /* 4. Visibility type for the record fields that depend on the course, in other row */ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); Tbl_StartRow (); for (NumCol = 0; NumCol < NumColumnsCardAndGroups; @@ -6950,7 +6950,7 @@ void Usr_ListAllDataStds (void) } /* End row */ - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Initialize structure with user's data *****/ Usr_UsrDataConstructor (&UsrDat); @@ -7143,7 +7143,7 @@ static void Usr_ListRowsAllDataTchs (Rol_Role_t Role, "%s " "", FieldNames[NumCol]); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Initialize structure with user's data *****/ Usr_UsrDataConstructor (&UsrDat); @@ -7392,7 +7392,7 @@ void Usr_ListDataAdms (void) "%s " "", FieldNames[NumCol]); - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Initialize structure with user's data *****/ Usr_UsrDataConstructor (&UsrDat); @@ -8985,12 +8985,12 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType, if ((++NumUsr % Gbl.Usrs.ClassPhoto.Cols) == 0) { - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); TRIsOpen = false; } } if (TRIsOpen) - fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Free memory used for user's data *****/ Usr_UsrDataDestructor (&UsrDat);