From a8d8cadda6b1f0a61c90d5511a8c4bd349dd135b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sun, 6 Oct 2019 12:00:55 +0200 Subject: [PATCH] Version19.31.9 --- swad_ID.c | 6 +- swad_account.c | 38 ++++---- swad_agenda.c | 60 ++++++------ swad_announcement.c | 20 ++-- swad_assignment.c | 68 ++++++------- swad_attendance.c | 207 +++++++++++++++++++++------------------ swad_banner.c | 36 +++---- swad_centre.c | 231 +++++++++++++++++++++++--------------------- swad_changelog.h | 6 +- swad_chat.c | 17 ++-- swad_classroom.c | 58 ++++++----- swad_connected.c | 26 ++--- swad_country.c | 23 ++--- swad_course.c | 38 ++++---- swad_date.c | 4 +- swad_degree.c | 40 ++++---- swad_degree_type.c | 2 +- swad_department.c | 10 +- swad_duplicate.c | 6 +- swad_enrolment.c | 12 +-- swad_exam.c | 28 +++--- swad_figure.c | 8 +- swad_file_browser.c | 56 +++++------ swad_follow.c | 10 +- swad_forum.c | 16 +-- swad_game.c | 16 +-- swad_group.c | 42 ++++---- swad_help.c | 2 +- swad_hierarchy.c | 10 +- swad_holiday.c | 16 +-- swad_indicator.c | 6 +- swad_info.c | 4 +- swad_institution.c | 38 ++++---- swad_layout.c | 6 +- swad_link.c | 8 +- swad_mail.c | 12 +-- swad_mark.c | 4 +- swad_match.c | 14 +-- swad_match_result.c | 24 ++--- swad_message.c | 36 +++---- swad_nickname.c | 4 +- swad_notification.c | 8 +- swad_password.c | 2 +- swad_photo.c | 12 +-- swad_place.c | 6 +- swad_plugin.c | 14 +-- swad_privacy.c | 2 +- swad_profile.c | 4 +- swad_project.c | 30 +++--- swad_record.c | 78 +++++++-------- swad_statistic.c | 38 ++++---- swad_survey.c | 20 ++-- swad_syllabus.c | 12 +-- swad_table.c | 6 ++ swad_table.h | 6 +- swad_test.c | 106 ++++++++++---------- swad_test_import.c | 12 +-- swad_timetable.c | 2 +- swad_user.c | 30 +++--- swad_zip.c | 2 +- 60 files changed, 853 insertions(+), 805 deletions(-) diff --git a/swad_ID.c b/swad_ID.c index c5f85ee9..fe1bcfc1 100644 --- a/swad_ID.c +++ b/swad_ID.c @@ -665,7 +665,7 @@ static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat, ""); if (NumID == UsrDat->IDs.Num - 1) { - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } } @@ -676,7 +676,7 @@ static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat, Tbl_StartRow (); fprintf (Gbl.F.Out,""); Ale_ShowAlert (Ale_INFO,Txt_The_ID_is_used_in_order_to_facilitate_); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Form to enter new user's ID *****/ @@ -716,7 +716,7 @@ static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat, ""); // Show the most recent ID Btn_PutCreateButtonInline (Txt_Add_this_ID); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } diff --git a/swad_account.c b/swad_account.c index 6107ec09..1ac4164c 100644 --- a/swad_account.c +++ b/swad_account.c @@ -281,9 +281,9 @@ static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrD Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", Gbl.RowEvenOdd,NumUsr); + Tbl_EndCell (); /***** Write user's ID and name *****/ fprintf (Gbl.F.Out,"" @@ -296,7 +296,7 @@ static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrD fprintf (Gbl.F.Out,"%s",UsrDat->FullName); else fprintf (Gbl.F.Out,"%s",Txt_yet_unnamed); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Button to login with this account *****/ fprintf (Gbl.F.Out,"", @@ -305,7 +305,7 @@ static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrD Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Btn_PutCreateButtonInline (Txt_Its_me); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Courses of this user *****/ @@ -316,7 +316,7 @@ static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrD Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_TCH); Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_NET); Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_STD); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -369,37 +369,37 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith NewNicknameWithArroba[0] = '\0'; Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "" + "", + The_ClassFormInBox[Gbl.Prefs.Theme], + Txt_Nickname); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" "" - "", - The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Nickname, + " required=\"required\" />", 1 + Nck_MAX_CHARS_NICKNAME_WITHOUT_ARROBA, Txt_HELP_nickname, NewNicknameWithArroba); + Tbl_EndCell (); Tbl_EndRow (); /***** Email *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "" + "", + The_ClassFormInBox[Gbl.Prefs.Theme], + Txt_Email); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" "" - "", - The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Email, + " required=\"required\" />", Cns_MAX_CHARS_EMAIL_ADDRESS, Txt_HELP_email, NewEmail); + Tbl_EndCell (); Tbl_EndRow (); /***** Password *****/ diff --git a/swad_agenda.c b/swad_agenda.c index 0ed3c319..745aa038 100644 --- a/swad_agenda.c +++ b/swad_agenda.c @@ -747,13 +747,13 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod) for (StartEndTime = (Dat_StartEndTime_t) 0; StartEndTime <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1); StartEndTime++) + { fprintf (Gbl.F.Out,"" "" - "", + "", (unsigned) StartEndTime,UniqueId, AgdEvent.Hidden ? Dat_TimeStatusClassHidden[AgdEvent.TimeStatus] : Dat_TimeStatusClassVisible[AgdEvent.TimeStatus], @@ -761,6 +761,8 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod) (unsigned) StartEndTime,UniqueId, AgdEvent.TimeUTC[StartEndTime], (unsigned) Gbl.Prefs.DateFormat,Txt_Today); + Tbl_EndCell (); + } /* Event */ fprintf (Gbl.F.Out,"", @@ -770,16 +772,16 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod) Lay_StartArticle (Anchor); fprintf (Gbl.F.Out,"%s",AgdEvent.Event); Lay_EndArticle (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Location */ fprintf (Gbl.F.Out,"" - "
%s
" - "", + "
%s
", Gbl.RowEvenOdd, AgdEvent.Hidden ? "ASG_TITLE_LIGHT" : "ASG_TITLE", AgdEvent.Location); + Tbl_EndCell (); Tbl_EndRow (); @@ -799,7 +801,7 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod) break; } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Text of the event */ Agd_GetEventTxtFromDB (&AgdEvent,Txt); @@ -807,12 +809,12 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod) Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links fprintf (Gbl.F.Out,"" - "
%s
" - "", + "
%s
", Gbl.RowEvenOdd, AgdEvent.Hidden ? "DAT_LIGHT" : "DAT", Txt); + Tbl_EndCell (); Tbl_EndRow (); /***** Free anchor string *****/ @@ -1502,31 +1504,31 @@ void Agd_RequestCreatOrEditEvent (void) /***** Event *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "" + "", + The_ClassFormInBox[Gbl.Prefs.Theme], + Txt_Event); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" "" - "", - The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Event, + " required=\"required\" />", Agd_MAX_CHARS_EVENT,AgdEvent.Event); + Tbl_EndCell (); Tbl_EndRow (); /***** Location *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "" + "", + The_ClassFormInBox[Gbl.Prefs.Theme], + Txt_Location); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" "" - "", - The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Location, + " required=\"required\" />", Agd_MAX_CHARS_LOCATION,AgdEvent.Location); + Tbl_EndCell (); Tbl_EndRow (); /***** Start and end dates *****/ @@ -1536,17 +1538,17 @@ void Agd_RequestCreatOrEditEvent (void) /***** Text *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "" - "" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** End table, send button and end box *****/ diff --git a/swad_announcement.c b/swad_announcement.c index 8d3a4c87..2470fd16 100644 --- a/swad_announcement.c +++ b/swad_announcement.c @@ -415,11 +415,11 @@ void Ann_ShowFormAnnouncement (void) /***** Users' roles who can view the announcement *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%s: " - "" - "", + "%s: ", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Users); + Tbl_EndCell (); + fprintf (Gbl.F.Out,""); Rol_WriteSelectorRoles (1 << Rol_UNK | 1 << Rol_GST | 1 << Rol_STD | @@ -431,7 +431,7 @@ void Ann_ShowFormAnnouncement (void) 1 << Rol_NET | 1 << Rol_TCH, false,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** End table, send button and end box *****/ @@ -452,15 +452,15 @@ static void Ann_PutSubjectMessage (const char *Field,const char *Label, Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "" + "", + Field,The_ClassFormInBox[Gbl.Prefs.Theme],Label); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" "" - "", - Field,The_ClassFormInBox[Gbl.Prefs.Theme],Label, + "", Field,Field,Rows); + Tbl_EndCell (); Tbl_EndRow (); } diff --git a/swad_assignment.c b/swad_assignment.c index 8c5be15b..6e97589f 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -366,7 +366,7 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView) fprintf (Gbl.F.Out," COLOR%u\">",Gbl.RowEvenOdd); Asg_PutFormsToRemEditOneAsg (&Asg,Anchor); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Start/end date/time */ UniqueId++; @@ -387,10 +387,10 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView) "" - "", + "", (unsigned) StartEndTime,UniqueId,Asg.TimeUTC[StartEndTime], (unsigned) Gbl.Prefs.DateFormat,Txt_Today); + Tbl_EndCell (); } /* Assignment title */ @@ -403,7 +403,7 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView) Lay_StartArticle (Anchor); fprintf (Gbl.F.Out,"%s",Asg.Title); Lay_EndArticle (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Assignment folder */ fprintf (Gbl.F.Out,""); if (Asg.SendWork == Asg_SEND_WORK) Asg_WriteAssignmentFolder (&Asg,PrintView); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Write second row of data of this assignment *****/ @@ -425,7 +425,7 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView) /* Author of the assignment */ Asg_WriteAsgAuthor (&Asg); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Text of the assignment */ Asg_GetAssignmentTxtFromDB (Asg.AsgCod,Txt); @@ -440,11 +440,11 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView) if (Gbl.Crs.Grps.NumGrps) Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (&Asg); - fprintf (Gbl.F.Out,"
%s
" - "", + fprintf (Gbl.F.Out,"
%s
", Asg.Hidden ? "DAT_LIGHT" : "DAT", Txt); + Tbl_EndCell (); Tbl_EndRow (); /***** Free anchor string *****/ @@ -1160,15 +1160,15 @@ void Asg_RequestCreatOrEditAsg (void) /***** Assignment title *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "" + "", + The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Title); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" "" - "", - The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Title, + " required=\"required\" />", Asg_MAX_CHARS_ASSIGNMENT_TITLE,Asg.Title); + Tbl_EndCell (); Tbl_EndRow (); /***** Assignment start and end dates *****/ @@ -1177,33 +1177,33 @@ void Asg_RequestCreatOrEditAsg (void) /***** Send work? *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%s:" - "" - "" + "%s:", + The_ClassFormInBox[Gbl.Prefs.Theme], + Txt_Upload_files_QUESTION); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" "" - "", - The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Upload_files_QUESTION, + "", Txt_Folder, Brw_MAX_CHARS_FOLDER,Asg.Folder); + Tbl_EndCell (); Tbl_EndRow (); /***** Assignment text *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "" - "" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Groups *****/ @@ -1242,11 +1242,11 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod) /***** Start box and table *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%s:" - "" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Groups); + Tbl_EndCell (); + fprintf (Gbl.F.Out,""); Box_StartBoxTable ("100%",NULL,NULL, Hlp_USERS_Groups,Box_NOT_CLOSABLE,0); @@ -1259,9 +1259,9 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod) fprintf (Gbl.F.Out," checked=\"checked\""); fprintf (Gbl.F.Out," onclick=\"uncheckChildren(this,'GrpCods')\" />" "%s %s" - "" - "", + "", Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName); + Tbl_EndCell (); Tbl_EndRow (); /***** List the groups for each group type *****/ @@ -1274,7 +1274,7 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod) /***** End table and box *****/ Box_EndBoxTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } diff --git a/swad_attendance.c b/swad_attendance.c index 26e5f3b1..fa54185b 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -401,7 +401,7 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt default: break; } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Start/end date/time */ UniqueId++; @@ -421,10 +421,10 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt "" - "", + "", (unsigned) StartEndTime,UniqueId,Att->TimeUTC[StartEndTime], (unsigned) Gbl.Prefs.DateFormat,Txt_Today); + Tbl_EndCell (); } /* Attendance event title */ @@ -437,7 +437,7 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt Att->Hidden ? "ASG_TITLE_LIGHT" : "ASG_TITLE"); Lay_EndArticle (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Number of students in this event */ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", Att->NumStdsTotal); + Tbl_EndCell (); + Tbl_EndRow (); /***** Write second row of data of this attendance event *****/ @@ -461,7 +462,7 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt /* Author of the attendance event */ Att_WriteAttEventAuthor (Att); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Text of the attendance event */ Att_GetAttEventDescriptionFromDB (Att->AttCod,Description); @@ -481,7 +482,7 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt "DAT", Description); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Free anchor string *****/ @@ -1096,15 +1097,15 @@ void Att_RequestCreatOrEditAttEvent (void) /***** Attendance event title *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "" + "", + The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Title); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" "" - "", - The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Title, + " required=\"required\" />", Att_MAX_CHARS_ATTENDANCE_EVENT_TITLE,Att.Title); + Tbl_EndCell (); Tbl_EndRow (); /***** Assignment start and end dates *****/ @@ -1113,11 +1114,12 @@ void Att_RequestCreatOrEditAttEvent (void) /***** Visibility of comments *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "" - ""); fprintf (Gbl.F.Out,"", Txt_Visible_MALE_PLURAL); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Attendance event description *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "" - "" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Groups *****/ @@ -1186,10 +1188,10 @@ static void Att_ShowLstGrpsToEditAttEvent (long AttCod) /***** Start box and table *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%s:" - "" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Groups); + Tbl_EndCell (); + fprintf (Gbl.F.Out,""); Box_StartBoxTable ("100%",NULL,NULL, NULL,Box_NOT_CLOSABLE,0); @@ -1202,9 +1204,9 @@ static void Att_ShowLstGrpsToEditAttEvent (long AttCod) fprintf (Gbl.F.Out," checked=\"checked\""); fprintf (Gbl.F.Out," onclick=\"uncheckChildren(this,'GrpCods')\" />" "%s %s" - "" - "", + "", Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName); + Tbl_EndCell (); Tbl_EndRow (); /***** List the groups for each group type *****/ @@ -1217,7 +1219,7 @@ static void Att_ShowLstGrpsToEditAttEvent (long AttCod) /***** End table and box *****/ Box_EndBoxTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -2084,8 +2086,8 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, "" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Checkbox to select user *****/ fprintf (Gbl.F.Out,"" @@ -2097,17 +2099,17 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, fprintf (Gbl.F.Out," checked=\"checked\""); if (!ICanChangeStdAttendance) fprintf (Gbl.F.Out," disabled=\"disabled\""); - fprintf (Gbl.F.Out," />" - ""); + fprintf (Gbl.F.Out," />"); + Tbl_EndCell (); /***** Write number of student in the list *****/ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", UsrDat->Accepted ? "DAT_N" : "DAT", Gbl.RowEvenOdd, NumUsr); + Tbl_EndCell (); /***** Show student's photo *****/ if (Gbl.Usrs.Listing.WithPhotos) @@ -2118,7 +2120,7 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO45x60",Pho_ZOOM,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /***** Write user's ID ******/ @@ -2127,7 +2129,7 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, "DAT_SMALL", Gbl.RowEvenOdd); ID_WriteUsrIDs (UsrDat,NULL); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write student's name *****/ fprintf (Gbl.F.Out,"%s", @@ -2137,8 +2139,9 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, UsrDat->Surname1); if (UsrDat->Surname2[0]) fprintf (Gbl.F.Out," %s",UsrDat->Surname2); - fprintf (Gbl.F.Out,", %s", + fprintf (Gbl.F.Out,", %s", UsrDat->FirstName); + Tbl_EndCell (); /***** Student's comment: write form or text */ fprintf (Gbl.F.Out,"", @@ -2155,7 +2158,7 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, CommentStd,Cns_MAX_BYTES_TEXT,false); fprintf (Gbl.F.Out,"%s",CommentStd); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Teacher's comment: write form, text or nothing */ fprintf (Gbl.F.Out,"", @@ -2172,7 +2175,7 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, CommentTch,Cns_MAX_BYTES_TEXT,false); fprintf (Gbl.F.Out,"%s",CommentTch); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; @@ -3134,36 +3137,36 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView) Gbl.AttEvents.Lst[NumAttEvent].AttCod); if (Gbl.AttEvents.Lst[NumAttEvent].Selected) fprintf (Gbl.F.Out," checked=\"checked\""); - fprintf (Gbl.F.Out," />" - "" - "" - "" - "" - "" + fprintf (Gbl.F.Out," />"); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" + "", + Gbl.RowEvenOdd, + NumAttEvent,NumAttEvent + 1); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" "" "" - "" - "" - "%s" - "" - "" - "%u" - "", - Gbl.RowEvenOdd, - NumAttEvent,NumAttEvent + 1, + "", Gbl.RowEvenOdd, NumAttEvent,UniqueId, UniqueId,Gbl.AttEvents.Lst[NumAttEvent].TimeUTC[Att_START_TIME], - (unsigned) Gbl.Prefs.DateFormat,Txt_Today, + (unsigned) Gbl.Prefs.DateFormat,Txt_Today); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" + "%s", Gbl.RowEvenOdd, - Gbl.AttEvents.Lst[NumAttEvent].Title, + Gbl.AttEvents.Lst[NumAttEvent].Title); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" + "%u", Gbl.RowEvenOdd, Gbl.AttEvents.Lst[NumAttEvent].NumStdsTotal); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3176,7 +3179,7 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView) The_ClassFormInBoxBold[Gbl.Prefs.Theme], NULL); Ico_PutCalculateIconWithText (Txt_Update_attendance); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3256,26 +3259,26 @@ static void Att_ListUsrsAttendanceTable (Att_TypeOfView_t TypeOfView, { Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%s:" - "", + "%s:", Gbl.Usrs.Listing.WithPhotos ? 4 : 3, Txt_Number_of_users); + Tbl_EndCell (); for (NumAttEvent = 0, Total = 0; NumAttEvent < Gbl.AttEvents.Num; NumAttEvent++) if (Gbl.AttEvents.Lst[NumAttEvent].Selected) { fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", Gbl.AttEvents.Lst[NumAttEvent].NumStdsFromList); + Tbl_EndCell (); Total += Gbl.AttEvents.Lst[NumAttEvent].NumStdsFromList; } fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", Total); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3355,12 +3358,12 @@ static void Att_WriteRowUsrSeveralAttEvents (unsigned NumUsr,struct UsrData *Usr /***** Write number of user in the list *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", UsrDat->Accepted ? "DAT_N" : "DAT", Gbl.RowEvenOdd, NumUsr + 1); + Tbl_EndCell (); /***** Show user's photo *****/ if (Gbl.Usrs.Listing.WithPhotos) @@ -3372,7 +3375,7 @@ static void Att_WriteRowUsrSeveralAttEvents (unsigned NumUsr,struct UsrData *Usr Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO21x28",Pho_ZOOM,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /***** Write user's ID ******/ @@ -3381,7 +3384,7 @@ static void Att_WriteRowUsrSeveralAttEvents (unsigned NumUsr,struct UsrData *Usr "DAT_SMALL", Gbl.RowEvenOdd); ID_WriteUsrIDs (UsrDat,NULL); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write user's name *****/ fprintf (Gbl.F.Out,"" @@ -3392,8 +3395,9 @@ static void Att_WriteRowUsrSeveralAttEvents (unsigned NumUsr,struct UsrData *Usr UsrDat->Surname1); if (UsrDat->Surname2[0]) fprintf (Gbl.F.Out," %s",UsrDat->Surname2); - fprintf (Gbl.F.Out,", %s", + fprintf (Gbl.F.Out,", %s", UsrDat->FirstName); + Tbl_EndCell (); /***** Check/cross to show if the user is present/absent *****/ for (NumAttEvent = 0, NumTimesPresent = 0; @@ -3410,7 +3414,7 @@ static void Att_WriteRowUsrSeveralAttEvents (unsigned NumUsr,struct UsrData *Usr fprintf (Gbl.F.Out,"", Gbl.RowEvenOdd); Att_PutCheckOrCross (Present); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); if (Present) NumTimesPresent++; @@ -3418,10 +3422,10 @@ static void Att_WriteRowUsrSeveralAttEvents (unsigned NumUsr,struct UsrData *Usr /***** Last column with the number of times this user is present *****/ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", Gbl.RowEvenOdd, NumTimesPresent); + Tbl_EndCell (); Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; @@ -3518,12 +3522,12 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat) NumUsr++; Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%u:" - "", + "%u:", UsrDat->Accepted ? "DAT_N" : "DAT", Gbl.RowEvenOdd, NumUsr); + Tbl_EndCell (); /***** Show student's photo *****/ fprintf (Gbl.F.Out,"", @@ -3532,7 +3536,7 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat) Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO21x28",Pho_ZOOM,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write user's ID ******/ fprintf (Gbl.F.Out,"", @@ -3543,7 +3547,7 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat) UsrDat->Accepted ? "DAT_N" : "DAT"); ID_WriteUsrIDs (UsrDat,NULL); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write student's name *****/ fprintf (Gbl.F.Out,"%s", @@ -3552,11 +3556,12 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat) UsrDat->Surname1); if (UsrDat->Surname2[0]) fprintf (Gbl.F.Out," %s",UsrDat->Surname2); - fprintf (Gbl.F.Out,", %s", + fprintf (Gbl.F.Out,", %s", UsrDat->FirstName); + Tbl_EndCell (); Tbl_EndRow (); Tbl_EndTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** List the events with students *****/ @@ -3578,43 +3583,52 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat) /***** Write a row for this event *****/ Tbl_StartRow (); + Tbl_PutEmptyColouredCells (1); + fprintf (Gbl.F.Out,"" - "%u:" - "" - "", + "%u:", Present ? "DAT_GREEN" : "DAT_RED", Gbl.RowEvenOdd, - NumAttEvent + 1, + NumAttEvent + 1); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"", Gbl.RowEvenOdd); Att_PutCheckOrCross (Present); - fprintf (Gbl.F.Out,"" - "" + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" "" "
%s" "" - "", + "", Gbl.RowEvenOdd, NumUsr,UniqueId, Gbl.AttEvents.Lst[NumAttEvent].Title, NumUsr,UniqueId, Gbl.AttEvents.Lst[NumAttEvent].TimeUTC[Att_START_TIME], (unsigned) Gbl.Prefs.DateFormat,Txt_Today); + Tbl_EndCell (); + Tbl_EndRow (); /***** Write comments for this student *****/ if (ShowCommentStd || ShowCommentTch) { Tbl_StartRow (); + Tbl_PutEmptyColouredCells (2); - fprintf (Gbl.F.Out,"" - "" + + fprintf (Gbl.F.Out,"", + Gbl.RowEvenOdd); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" "
", - Gbl.RowEvenOdd, Gbl.RowEvenOdd); if (ShowCommentStd) { @@ -3633,8 +3647,9 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat) Txt_Teachers_comment, CommentTch); } - fprintf (Gbl.F.Out,"
" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); + Tbl_EndRow (); } } diff --git a/swad_banner.c b/swad_banner.c index a173b740..4782f76a 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -424,7 +424,7 @@ static void Ban_ListBannersForEdition (void) Tbl_StartRow (); fprintf (Gbl.F.Out,""); Ico_PutContextualIconToRemove (ActRemBan,Ban_PutParamBanCodToEdit); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Put icon to hide/show banner */ fprintf (Gbl.F.Out,""); @@ -432,7 +432,7 @@ static void Ban_ListBannersForEdition (void) Ico_PutContextualIconToUnhide (ActShoBan,Anchor,Ban_PutParamBanCodToEdit); else Ico_PutContextualIconToHide (ActHidBan,Anchor,Ban_PutParamBanCodToEdit); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Banner code */ fprintf (Gbl.F.Out,"", @@ -441,7 +441,7 @@ static void Ban_ListBannersForEdition (void) Lay_StartArticle (Anchor); fprintf (Gbl.F.Out,"%ld",Ban->BanCod); Lay_EndArticle (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Banner short name */ fprintf (Gbl.F.Out,""); @@ -453,7 +453,7 @@ static void Ban_ListBannersForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Ban_MAX_CHARS_SHRT_NAME,Ban->ShrtName,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Banner full name */ fprintf (Gbl.F.Out,""); @@ -465,7 +465,7 @@ static void Ban_ListBannersForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Ban_MAX_CHARS_FULL_NAME,Ban->FullName,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Banner image */ fprintf (Gbl.F.Out,""); @@ -476,7 +476,7 @@ static void Ban_ListBannersForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Ban_MAX_CHARS_IMAGE,Ban->Img,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Banner WWW */ fprintf (Gbl.F.Out,""); @@ -488,7 +488,7 @@ static void Ban_ListBannersForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Cns_MAX_CHARS_WWW,Ban->WWW,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /* Free anchor string */ @@ -865,8 +865,10 @@ static void Ban_PutFormToCreateBanner (void) /***** Banner code *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_PutEmptyCells (1); /***** Banner short name *****/ @@ -874,35 +876,35 @@ static void Ban_PutFormToCreateBanner (void) "" - "", + " required=\"required\" />", Ban_MAX_CHARS_SHRT_NAME,Ban_EditingBan->ShrtName); + Tbl_EndCell (); /***** Banner full name *****/ fprintf (Gbl.F.Out,"" "" - "", + " required=\"required\" />", Ban_MAX_CHARS_FULL_NAME,Ban_EditingBan->FullName); + Tbl_EndCell (); /***** Banner image *****/ fprintf (Gbl.F.Out,"" "" - "", + " required=\"required\" />", Ban_MAX_CHARS_IMAGE,Ban_EditingBan->Img); + Tbl_EndCell (); /***** Banner WWW *****/ fprintf (Gbl.F.Out,"" "" - "", + " required=\"required\" />", Cns_MAX_CHARS_WWW,Ban_EditingBan->WWW); + Tbl_EndCell (); Tbl_EndRow (); /***** End table, send button and end box *****/ diff --git a/swad_centre.c b/swad_centre.c index c40e7346..0a9c3639 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -213,13 +213,13 @@ void Ctr_SeeCtrWithPendingDegs (void) BgColor); Ctr_DrawCentreLogoAndNameWithLink (&Ctr,ActSeeDeg, "DAT_NOBR","CENTER_MIDDLE"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Number of pending degrees (row[1]) */ fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", BgColor,row[1]); + Tbl_EndCell (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; Tbl_EndRow (); @@ -410,11 +410,11 @@ static void Ctr_Configuration (bool PrintView) /***** Institution *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Institution); + Tbl_EndCell (); + fprintf (Gbl.F.Out,""); if (!PrintView && Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) @@ -446,17 +446,18 @@ static void Ctr_Configuration (bool PrintView) else // I can not move centre to another institution fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ins.FullName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Centre full name *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Centre); + Tbl_EndCell (); + fprintf (Gbl.F.Out,""); + if (!PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM) // Only institution admins and system admins can edit centre full name @@ -475,17 +476,18 @@ static void Ctr_Configuration (bool PrintView) } else // I can not edit centre full name fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ctr.FullName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Centre short name *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Short_name); + Tbl_EndCell (); + fprintf (Gbl.F.Out,""); + if (!PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM) // Only institution admins and system admins can edit centre short name @@ -504,7 +506,7 @@ static void Ctr_Configuration (bool PrintView) } else // I can not edit centre short name fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ctr.ShrtName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Place *****/ @@ -512,11 +514,12 @@ static void Ctr_Configuration (bool PrintView) Plc_GetDataOfPlaceByCod (&Plc); Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%s:" - "" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Place); + Tbl_EndCell (); + fprintf (Gbl.F.Out,""); + if (!PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM) // Only centre admins, institution admins and system admins @@ -551,17 +554,18 @@ static void Ctr_Configuration (bool PrintView) } else // I can not change centre place fprintf (Gbl.F.Out,"%s",Plc.FullName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Centre WWW *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Web); + Tbl_EndCell (); + fprintf (Gbl.F.Out,""); + if (!PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM) // Only centre admins, institution admins and system admins @@ -586,41 +590,44 @@ static void Ctr_Configuration (bool PrintView) "", Gbl.Hierarchy.Ctr.WWW, Gbl.Hierarchy.Ctr.WWW); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Shortcut to the centre *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%s:" - "" - "" + "%s:", + The_ClassFormInBox[Gbl.Prefs.Theme], + Txt_Shortcut); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" "" "%s/%s?ctr=%ld" - "" - "", - The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Shortcut, + "", Cfg_URL_SWAD_CGI, Lan_STR_LANG_ID[Gbl.Prefs.Language], Gbl.Hierarchy.Ctr.CtrCod, Cfg_URL_SWAD_CGI, Lan_STR_LANG_ID[Gbl.Prefs.Language], Gbl.Hierarchy.Ctr.CtrCod); + Tbl_EndCell (); Tbl_EndRow (); if (PrintView) { /***** QR code with link to the centre *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_QR_code); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); QR_LinkTo (250,"ctr",Gbl.Hierarchy.Ctr.CtrCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); + Tbl_EndRow (); } else @@ -628,24 +635,24 @@ static void Ctr_Configuration (bool PrintView) /***** Number of users who claim to belong to this centre *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%s:" - "" - "" - "%u" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Users_of_the_centre, + Txt_Users_of_the_centre); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" + "%u", Usr_GetNumUsrsWhoClaimToBelongToCtr (Gbl.Hierarchy.Ctr.CtrCod)); + Tbl_EndCell (); Tbl_EndRow (); /***** Number of degrees *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%s:" - "" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_Degrees); + Tbl_EndCell (); + fprintf (Gbl.F.Out,""); /* Form to go to see degrees of this centre */ Frm_StartFormGoTo (ActSeeDeg); @@ -658,20 +665,20 @@ static void Ctr_Configuration (bool PrintView) Deg_GetNumDegsInCtr (Gbl.Hierarchy.Ctr.CtrCod)); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Number of courses *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%s:" - "" - "" - "%u" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Courses, + Txt_Courses); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" + "%u", Crs_GetNumCrssInCtr (Gbl.Hierarchy.Ctr.CtrCod)); + Tbl_EndCell (); Tbl_EndRow (); /***** Number of users in courses of this centre *****/ @@ -748,16 +755,19 @@ static void Ctr_ShowNumUsrsInCrssOfCtr (Rol_Role_t Role) extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "" - "%u" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], (Role == Rol_UNK) ? Txt_Users_in_courses : - Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN], + Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN]); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", Usr_GetNumUsrsInCrssOfCtr (Role,Gbl.Hierarchy.Ctr.CtrCod)); + Tbl_EndCell (); + Tbl_EndRow (); } @@ -904,54 +914,55 @@ static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr) BgColor = (Ctr->CtrCod == Gbl.Hierarchy.Ctr.CtrCod) ? "LIGHT_BLUE" : Gbl.ColorRows[Gbl.RowEvenOdd]; - /***** Number of centre in this list *****/ Tbl_StartRow (); + + /***** Number of centre in this list *****/ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", TxtClassNormal,BgColor, NumCtr); + Tbl_EndCell (); /***** Centre logo and name *****/ fprintf (Gbl.F.Out,"",BgColor); Ctr_DrawCentreLogoAndNameWithLink (Ctr,ActSeeDeg, TxtClassStrong,"CENTER_MIDDLE"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Number of users who claim to belong to this centre *****/ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", TxtClassNormal,BgColor, Ctr->NumUsrsWhoClaimToBelongToCtr); + Tbl_EndCell (); /***** Place *****/ fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", TxtClassNormal,BgColor, Plc.ShrtName); + Tbl_EndCell (); /***** Number of degrees *****/ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", TxtClassNormal,BgColor, Ctr->Degs.Num); + Tbl_EndCell (); /***** Number of courses *****/ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", TxtClassNormal,BgColor, Ctr->NumCrss); + Tbl_EndCell (); /***** Number of users in courses of this centre *****/ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", TxtClassNormal,BgColor, Ctr->NumUsrs); + Tbl_EndCell (); /***** Centre status *****/ StatusTxt = Ctr_GetStatusTxtFromStatusBits (Ctr->Status); @@ -959,7 +970,7 @@ static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr) TxtClassNormal,BgColor); if (StatusTxt != Ctr_STATUS_ACTIVE) // If active ==> do not show anything fprintf (Gbl.F.Out,"%s",Txt_CENTRE_STATUS[StatusTxt]); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; @@ -1510,20 +1521,20 @@ static void Ctr_ListCentresForEdition (void) Ico_PutIconRemove (); Frm_EndForm (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Centre code */ fprintf (Gbl.F.Out,"" - "%ld" - "", + "%ld", Ctr->CtrCod); + Tbl_EndCell (); /* Centre logo */ fprintf (Gbl.F.Out,"", Ctr->FullName); Log_DrawLogo (Hie_CTR,Ctr->CtrCod,Ctr->ShrtName,20,NULL,true); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Place */ fprintf (Gbl.F.Out,""); @@ -1555,7 +1566,7 @@ static void Ctr_ListCentresForEdition (void) NumPlc++) if (Gbl.Plcs.Lst[NumPlc].PlcCod == Ctr->PlcCod) fprintf (Gbl.F.Out,"%s",Gbl.Plcs.Lst[NumPlc].ShrtName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Centre short name */ fprintf (Gbl.F.Out,""); @@ -1569,11 +1580,11 @@ static void Ctr_ListCentresForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Hie_MAX_CHARS_SHRT_NAME,Ctr->ShrtName,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } else fprintf (Gbl.F.Out,"%s",Ctr->ShrtName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Centre full name */ fprintf (Gbl.F.Out,""); @@ -1587,11 +1598,11 @@ static void Ctr_ListCentresForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Hie_MAX_CHARS_FULL_NAME,Ctr->FullName,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } else fprintf (Gbl.F.Out,"%s",Ctr->FullName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Centre WWW */ fprintf (Gbl.F.Out,""); @@ -1618,32 +1629,32 @@ static void Ctr_ListCentresForEdition (void) "", Ctr->WWW,Ctr->WWW,WWW); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Number of users who claim to belong to this centre */ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", Ctr->NumUsrsWhoClaimToBelongToCtr); + Tbl_EndCell (); /* Number of degrees */ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", Ctr->Degs.Num); + Tbl_EndCell (); /* Number of users in courses of this centre */ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", Ctr->NumUsrs); + Tbl_EndCell (); /* Centre requester */ UsrDat.UsrCod = Ctr->RequesterUsrCod; Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS); fprintf (Gbl.F.Out,""); Msg_WriteMsgAuthor (&UsrDat,true,NULL); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Centre status */ StatusTxt = Ctr_GetStatusTxtFromStatusBits (Ctr->Status); @@ -1667,7 +1678,7 @@ static void Ctr_ListCentresForEdition (void) } else if (StatusTxt != Ctr_STATUS_ACTIVE) // If active ==> do not show anything fprintf (Gbl.F.Out,"%s",Txt_CENTRE_STATUS[StatusTxt]); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -2522,15 +2533,17 @@ static void Ctr_PutFormToCreateCentre (void) /***** Column to remove centre, disabled here *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Centre code *****/ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Centre logo *****/ fprintf (Gbl.F.Out,""); Log_DrawLogo (Hie_CTR,-1L,"",20,NULL,true); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Place *****/ fprintf (Gbl.F.Out,"" @@ -2547,59 +2560,59 @@ static void Ctr_PutFormToCreateCentre (void) (Gbl.Plcs.Lst[NumPlc].PlcCod == Ctr_EditingCtr->PlcCod) ? " selected=\"selected\"" : "", Gbl.Plcs.Lst[NumPlc].ShrtName); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Centre short name *****/ fprintf (Gbl.F.Out,"" "" - "", + " required=\"required\" />", Hie_MAX_CHARS_SHRT_NAME,Ctr_EditingCtr->ShrtName); + Tbl_EndCell (); /***** Centre full name *****/ fprintf (Gbl.F.Out,"" "" - "", + " required=\"required\" />", Hie_MAX_CHARS_FULL_NAME,Ctr_EditingCtr->FullName); + Tbl_EndCell (); /***** Centre WWW *****/ fprintf (Gbl.F.Out,"" "" - "", + " required=\"required\" />", Cns_MAX_CHARS_WWW,Ctr_EditingCtr->WWW); + Tbl_EndCell (); /***** Number of users who claim to belong to this centre *****/ fprintf (Gbl.F.Out,"" - "0" - ""); + "0"); + Tbl_EndCell (); /***** Number of degrees *****/ fprintf (Gbl.F.Out,"" - "0" - ""); + "0"); + Tbl_EndCell (); /***** Number of users in courses of this centre *****/ fprintf (Gbl.F.Out,"" - "0" - ""); + "0"); + Tbl_EndCell (); /***** Centre requester *****/ fprintf (Gbl.F.Out,""); Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true,NULL); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Centre status *****/ - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** End table, send button and end box *****/ diff --git a/swad_changelog.h b/swad_changelog.h index 616956ae..81201c17 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -487,13 +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.7 (2019-10-05)" +#define Log_PLATFORM_VERSION "SWAD 19.31.9 (2019-10-06)" #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.7: Oct 05, 2019 Code refactoring in HTML tables. (? lines) + Version 19.31.9: Oct 06, 2019 Code refactoring in HTML tables. (247097 lines) + Version 19.31.8: Oct 05, 2019 Code refactoring in HTML tables. (247089 lines) + Version 19.31.7: Oct 05, 2019 Code refactoring in HTML tables. (247076 lines) Version 19.31.6: Oct 05, 2019 Code refactoring in HTML tables. (247066 lines) Version 19.31.5: Oct 05, 2019 Code refactoring in HTML tables. (247044 lines) Version 19.31.4: Oct 04, 2019 Code refactoring in HTML tables. (247043 lines) diff --git a/swad_chat.c b/swad_chat.c index 96363a84..08f36ffc 100644 --- a/swad_chat.c +++ b/swad_chat.c @@ -301,14 +301,19 @@ void Cht_ShowListOfChatRoomsWithUsrs (void) { /* Get next chat room */ row = mysql_fetch_row (mysql_res); + Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s" - "" - "" - "%s" - "", - row[0],row[1]); + "%s", + row[0]); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", + row[1]); + Tbl_EndCell (); + Tbl_EndRow (); } diff --git a/swad_classroom.c b/swad_classroom.c index 2e5024d6..a3e00083 100644 --- a/swad_classroom.c +++ b/swad_classroom.c @@ -140,34 +140,36 @@ void Cla_SeeClassrooms (void) NumCla < Gbl.Classrooms.Num; NumCla++, RowEvenOdd = 1 - RowEvenOdd) { - /* Short name */ Tbl_StartRow (); + + /* Short name */ fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", Gbl.ColorRows[RowEvenOdd], Gbl.Classrooms.Lst[NumCla].ShrtName); + Tbl_EndRow (); /* Full name */ fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", Gbl.ColorRows[RowEvenOdd], Gbl.Classrooms.Lst[NumCla].FullName); + Tbl_EndRow (); /* Capacity */ fprintf (Gbl.F.Out,"", Gbl.ColorRows[RowEvenOdd]); Cla_WriteCapacity (Gbl.Classrooms.Lst[NumCla].Capacity); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Location */ fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", Gbl.ColorRows[RowEvenOdd], Gbl.Classrooms.Lst[NumCla].Location); Tbl_EndRow (); + + Tbl_EndRow (); } /***** End table *****/ @@ -491,13 +493,13 @@ static void Cla_ListClassroomsForEdition (void) Cla_PutParamClaCod (Cla->ClaCod); Ico_PutIconRemove (); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Classroom code */ fprintf (Gbl.F.Out,"" - "%ld" - "", + "%ld", Cla->ClaCod); + Tbl_EndRow (); /* Classroom short name */ fprintf (Gbl.F.Out,""); @@ -509,7 +511,7 @@ static void Cla_ListClassroomsForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Cla_MAX_CHARS_SHRT_NAME,Cla->ShrtName,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Classroom full name */ fprintf (Gbl.F.Out,""); @@ -521,7 +523,7 @@ static void Cla_ListClassroomsForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Cla_MAX_CHARS_FULL_NAME,Cla->FullName,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Seating capacity */ fprintf (Gbl.F.Out,""); @@ -533,7 +535,7 @@ static void Cla_ListClassroomsForEdition (void) fprintf (Gbl.F.Out,"\" onchange=\"document.getElementById('%s').submit();\" />", Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Classroom location */ fprintf (Gbl.F.Out,""); @@ -545,7 +547,7 @@ static void Cla_ListClassroomsForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Cla_MAX_CHARS_LOCATION,Cla->Location,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -900,48 +902,52 @@ static void Cla_PutFormToCreateClassroom (void) /***** Write heading *****/ Cla_PutHeadClassrooms (); - /***** Column to remove classroom, disabled here *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,""); + + /***** Column to remove classroom, disabled here *****/ + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Classroom code *****/ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); + Tbl_EndRow (); /***** Classroom short name *****/ fprintf (Gbl.F.Out,"" "" - "", + " required=\"required\" />", Cla_MAX_CHARS_SHRT_NAME,Cla_EditingCla->ShrtName); + Tbl_EndRow (); /***** Classroom full name *****/ fprintf (Gbl.F.Out,"" "" - "", + " required=\"required\" />", Cla_MAX_CHARS_FULL_NAME,Cla_EditingCla->FullName); + Tbl_EndRow (); /***** Seating capacity *****/ fprintf (Gbl.F.Out,"" "Capacity); - fprintf (Gbl.F.Out,"\" />" - ""); + fprintf (Gbl.F.Out,"\" />"); + Tbl_EndRow (); /***** Classroom location *****/ fprintf (Gbl.F.Out,"" "" - "", + " class=\"INPUT_FULL_NAME\" />", Cla_MAX_CHARS_LOCATION,Cla_EditingCla->Location); Tbl_EndRow (); + Tbl_EndRow (); + /***** End table, send button and end box *****/ Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_classroom); diff --git a/swad_connected.c b/swad_connected.c index 3bce53d5..66176c87 100644 --- a/swad_connected.c +++ b/swad_connected.c @@ -106,10 +106,10 @@ void Con_ShowConnectedUsrs (void) fprintf (Gbl.F.Out,"" - "", + "", (long) Gbl.StartExecutionTimeUTC, (unsigned) Gbl.Prefs.DateFormat); + Tbl_EndRow (); /***** Number of connected users in the whole platform *****/ Con_ShowGlobalConnectedUsrs (); @@ -359,12 +359,12 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentLocationOnMainZone ( { Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%u %s" - "", + "%u %s", Usrs.NumUsrs, (Usrs.NumUsrs == 1) ? Txt_ROLES_SINGUL_abc[Role][Usrs.Sex] : Txt_ROLES_PLURAL_abc[Role][Usrs.Sex]); Tbl_EndRow (); + Tbl_EndRow (); /***** I can see connected users *****/ Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Role); @@ -393,12 +393,12 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentCrsOnRightColumn (Ro Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%u %s" - "", + "%u %s", NumUsrsThisRole, (NumUsrsThisRole == 1) ? Txt_ROLES_SINGUL_abc[Role][UsrSex] : Txt_ROLES_PLURAL_abc[Role][UsrSex]); Tbl_EndRow (); + Tbl_EndRow (); /***** I can see connected users *****/ Con_ShowConnectedUsrsCurrentCrsOneByOneOnRightColumn (Role); @@ -419,7 +419,7 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentCrsOnRightColumn (Ro Cfg_URL_ICON_PUBLIC, Txt_Connected_users,Txt_Connected_users); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } } @@ -823,7 +823,7 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role) Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO21x28",Pho_ZOOM,true); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write full name and link *****/ Font = (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].ThisCrs ? "CON_NAME_NARROW CON_CRS" : @@ -853,7 +853,7 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role) fprintf (Gbl.F.Out,"" ""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write time from last access *****/ Font = (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].ThisCrs ? "CON_SINCE CON_CRS" : @@ -867,7 +867,7 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role) Dat_WriteHoursMinutesSecondsFromSeconds (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].TimeDiff); fprintf (Gbl.F.Out,""); // Used for automatic update, only when displayed on right column - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); if (!ItsMe) @@ -1043,7 +1043,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO21x28",Pho_ZOOM,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write full name and link *****/ Font = (ThisCrs ? "CON_NAME_WIDE CON_CRS" : @@ -1075,7 +1075,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R fprintf (Gbl.F.Out,""); if (PutLinkToRecord) Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write time from last access *****/ Font = (ThisCrs ? "CON_SINCE CON_CRS" : @@ -1083,7 +1083,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R fprintf (Gbl.F.Out,"", Font,Gbl.RowEvenOdd); Dat_WriteHoursMinutesSecondsFromSeconds (TimeDiff); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; diff --git a/swad_country.c b/swad_country.c index 1a64273c..508e49de 100644 --- a/swad_country.c +++ b/swad_country.c @@ -182,23 +182,24 @@ void Cty_SeeCtyWithPendingInss (void) /* Get data of country */ Cty_GetDataOfCountryByCod (&Cty,Cty_GET_BASIC_DATA); - /* Country map */ Tbl_StartRow (); + + /* Country map */ fprintf (Gbl.F.Out,"", BgColor); Cty_DrawCountryMapAndNameWithLink (&Cty,ActSeeIns, "COUNTRY_SMALL", "COUNTRY_MAP_SMALL", "DAT"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Number of pending institutions (row[1]) */ fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", BgColor,row[1]); Tbl_EndRow (); + Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; } @@ -338,7 +339,7 @@ static void Cty_Configuration (bool PrintView) fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]); if (!PrintView && Gbl.Hierarchy.Cty.WWW[Gbl.Prefs.Language][0]) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Link to the country inside platform *****/ @@ -371,7 +372,7 @@ static void Cty_Configuration (bool PrintView) The_ClassFormInBox[Gbl.Prefs.Theme], Txt_QR_code); QR_LinkTo (250,"cty",Gbl.Hierarchy.Cty.CtyCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } else @@ -409,7 +410,7 @@ static void Cty_Configuration (bool PrintView) Ins_GetNumInssInCty (Gbl.Hierarchy.Cty.CtyCod)); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Number of centres *****/ @@ -724,7 +725,7 @@ static void Cty_ListOneCountryForSeeing (struct Country *Cty,unsigned NumCty) "COUNTRY_SMALL", "COUNTRY_MAP_SMALL", "DAT_N"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write stats of this country */ fprintf (Gbl.F.Out,"" @@ -1626,7 +1627,7 @@ static void Cty_ListCountriesForEdition (void) Ico_PutIconRemove (); Frm_EndForm (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Numerical country code (ISO 3166-1) */ fprintf (Gbl.F.Out,"" @@ -1680,7 +1681,7 @@ static void Cty_ListCountriesForEdition (void) Cty_MAX_CHARS_NAME, Cty->Name[Lan],Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* WWW */ fprintf (Gbl.F.Out,""); @@ -1694,7 +1695,7 @@ static void Cty_ListCountriesForEdition (void) Cns_MAX_CHARS_WWW, Cty->WWW[Lan],Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } diff --git a/swad_course.c b/swad_course.c index 8eeed7d4..5b78bcf0 100644 --- a/swad_course.c +++ b/swad_course.c @@ -276,7 +276,7 @@ static void Crs_Configuration (bool PrintView) else // I can not move course to another degree fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Deg.FullName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Course full name *****/ @@ -305,7 +305,7 @@ static void Crs_Configuration (bool PrintView) } else // I can not edit course full name fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Crs.FullName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Course short name *****/ @@ -334,7 +334,7 @@ static void Crs_Configuration (bool PrintView) } else // I can not edit course short name fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Crs.ShrtName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Course year *****/ @@ -367,7 +367,7 @@ static void Crs_Configuration (bool PrintView) fprintf (Gbl.F.Out,"%s", Gbl.Hierarchy.Crs.Year ? Txt_YEAR_OF_DEGREE[Gbl.Hierarchy.Crs.Year] : Txt_Not_applicable); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); if (!PrintView) @@ -395,7 +395,7 @@ static void Crs_Configuration (bool PrintView) } else fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Crs.InstitutionalCrsCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Internal code of the course *****/ @@ -442,7 +442,7 @@ static void Crs_Configuration (bool PrintView) The_ClassFormInBox[Gbl.Prefs.Theme], Txt_QR_code); QR_LinkTo (250,"crs",Gbl.Hierarchy.Crs.CrsCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } else @@ -478,7 +478,7 @@ static void Crs_Configuration (bool PrintView) "exclamation-triangle.svg", Gbl.Title); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -1309,7 +1309,7 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year) fprintf (Gbl.F.Out,"%s", Crs->FullName); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Current number of teachers in this course */ fprintf (Gbl.F.Out,"" @@ -1332,7 +1332,7 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year) TxtClassNormal,BgColor); if (StatusTxt != Crs_STATUS_ACTIVE) // If active ==> do not show anything fprintf (Gbl.F.Out,"%s",Txt_COURSE_STATUS[StatusTxt]); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } } @@ -1485,7 +1485,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) Ico_PutIconRemove (); Frm_EndForm (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Course code */ fprintf (Gbl.F.Out,"" @@ -1510,7 +1510,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) } else fprintf (Gbl.F.Out,"%s",Crs->InstitutionalCrsCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Course year */ fprintf (Gbl.F.Out,""); @@ -1535,7 +1535,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) } else fprintf (Gbl.F.Out,"%s",Txt_YEAR_OF_DEGREE[Crs->Year]); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Course short name */ fprintf (Gbl.F.Out,""); @@ -1553,7 +1553,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) } else fprintf (Gbl.F.Out,"%s",Crs->ShrtName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Course full name */ fprintf (Gbl.F.Out,""); @@ -1571,7 +1571,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) } else fprintf (Gbl.F.Out,"%s",Crs->FullName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Current number of teachers in this course */ fprintf (Gbl.F.Out,"" @@ -1591,7 +1591,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS); fprintf (Gbl.F.Out,""); Msg_WriteMsgAuthor (&UsrDat,true,NULL); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Course status */ StatusTxt = Crs_GetStatusTxtFromStatusBits (Crs->Status); @@ -1615,7 +1615,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) } else if (StatusTxt != Crs_STATUS_ACTIVE) // If active ==> do not show anything fprintf (Gbl.F.Out,"%s",Txt_COURSE_STATUS[StatusTxt]); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } } @@ -1764,7 +1764,7 @@ static void Crs_PutFormToCreateCourse (void) /***** Course requester *****/ fprintf (Gbl.F.Out,""); Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true,NULL); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Course status *****/ fprintf (Gbl.F.Out,"" @@ -3313,7 +3313,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA "", row[2],row[6]); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write year (row[4]) *****/ fprintf (Gbl.F.Out,"" @@ -3332,7 +3332,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA Frm_LinkFormSubmit (Gbl.Title,Style,NULL); fprintf (Gbl.F.Out,"%s",row[5]); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write number of teachers in course *****/ fprintf (Gbl.F.Out,"" diff --git a/swad_date.c b/swad_date.c index 62106ffb..48394a52 100644 --- a/swad_date.c +++ b/swad_date.c @@ -477,7 +477,7 @@ 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,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -517,7 +517,7 @@ 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,""); + Tbl_EndCell (); Tbl_EndRow (); } } diff --git a/swad_degree.c b/swad_degree.c index 8ecef372..65ebbef8 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -218,7 +218,7 @@ void Deg_SeeDegWithPendingCrss (void) BgColor); Deg_DrawDegreeLogoAndNameWithLink (&Deg,ActSeeCrs, "DAT_NOBR","CENTER_MIDDLE"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Number of pending courses (row[1]) */ fprintf (Gbl.F.Out,"" @@ -380,7 +380,7 @@ 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,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Degree full name *****/ @@ -410,7 +410,7 @@ 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,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Degree short name *****/ @@ -440,7 +440,7 @@ 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,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Degree WWW *****/ @@ -475,7 +475,7 @@ static void Deg_Configuration (bool PrintView) "", Gbl.Hierarchy.Deg.WWW, Gbl.Hierarchy.Deg.WWW); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Shortcut to the degree *****/ @@ -509,7 +509,7 @@ 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,""); + Tbl_EndCell (); Tbl_EndRow (); } else @@ -534,7 +534,7 @@ static void Deg_Configuration (bool PrintView) Crs_GetNumCrssInDeg (Gbl.Hierarchy.Deg.DegCod)); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Number of users *****/ @@ -732,7 +732,7 @@ static void Deg_ListDegreesForEdition (void) Ico_PutIconRemove (); Frm_EndForm (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Degree code */ fprintf (Gbl.F.Out,"" @@ -744,7 +744,7 @@ static void Deg_ListDegreesForEdition (void) fprintf (Gbl.F.Out,"", Deg->FullName); Log_DrawLogo (Hie_DEG,Deg->DegCod,Deg->ShrtName,20,NULL,true); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Degree short name */ fprintf (Gbl.F.Out,""); @@ -761,7 +761,7 @@ static void Deg_ListDegreesForEdition (void) } else fprintf (Gbl.F.Out,"%s",Deg->ShrtName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Degree full name */ fprintf (Gbl.F.Out,""); @@ -778,7 +778,7 @@ static void Deg_ListDegreesForEdition (void) } else fprintf (Gbl.F.Out,"%s",Deg->FullName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Degree type */ fprintf (Gbl.F.Out,""); @@ -810,7 +810,7 @@ static void Deg_ListDegreesForEdition (void) NumDegTyp++) if (Gbl.DegTypes.Lst[NumDegTyp].DegTypCod == Deg->DegTypCod) fprintf (Gbl.F.Out,"%s",Gbl.DegTypes.Lst[NumDegTyp].DegTypName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Degree WWW */ fprintf (Gbl.F.Out,""); @@ -837,7 +837,7 @@ static void Deg_ListDegreesForEdition (void) "", Deg->WWW,Deg->WWW,WWW); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Current number of courses in this degree */ fprintf (Gbl.F.Out,"" @@ -850,7 +850,7 @@ static void Deg_ListDegreesForEdition (void) Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS); fprintf (Gbl.F.Out,""); Msg_WriteMsgAuthor (&UsrDat,true,NULL); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Degree status */ StatusTxt = Deg_GetStatusTxtFromStatusBits (Deg->Status); @@ -874,7 +874,7 @@ 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,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -974,7 +974,7 @@ static void Deg_PutFormToCreateDegree (void) /***** Degree logo *****/ fprintf (Gbl.F.Out,""); Log_DrawLogo (Hie_DEG,-1L,"",20,NULL,true); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Degree short name *****/ fprintf (Gbl.F.Out,"" @@ -1028,7 +1028,7 @@ static void Deg_PutFormToCreateDegree (void) /***** Degree requester *****/ fprintf (Gbl.F.Out,""); Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true,NULL); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Degree status *****/ fprintf (Gbl.F.Out,"" @@ -1306,7 +1306,7 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg) fprintf (Gbl.F.Out,"",BgColor); Deg_DrawDegreeLogoAndNameWithLink (Deg,ActSeeCrs, TxtClassStrong,"CENTER_MIDDLE"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Type of degree *****/ fprintf (Gbl.F.Out,"" @@ -1326,7 +1326,7 @@ 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,""); + Tbl_EndCell (); Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; @@ -2593,7 +2593,7 @@ void Hie_GetAndWriteInsCtrDegAdminBy (long UsrCod,unsigned ColSpan) Lay_WrongScopeExit (); break; } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } diff --git a/swad_degree_type.c b/swad_degree_type.c index cb7000e9..2ac88d5e 100644 --- a/swad_degree_type.c +++ b/swad_degree_type.c @@ -431,7 +431,7 @@ static void DT_ListDegreeTypesForEdition (void) Gbl.DegTypes.Lst[NumDegTyp].DegTypName, Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Number of degrees of this type */ fprintf (Gbl.F.Out,"" diff --git a/swad_department.c b/swad_department.c index b69246ff..17b7f9fe 100644 --- a/swad_department.c +++ b/swad_department.c @@ -520,7 +520,7 @@ static void Dpt_ListDepartmentsForEdition (void) Ico_PutIconRemove (); Frm_EndForm (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Department code */ fprintf (Gbl.F.Out,"" @@ -549,7 +549,7 @@ static void Dpt_ListDepartmentsForEdition (void) Gbl.Hierarchy.Cty.Inss.Lst[NumIns].ShrtName); fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Department short name */ fprintf (Gbl.F.Out,""); @@ -561,7 +561,7 @@ static void Dpt_ListDepartmentsForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Hie_MAX_CHARS_SHRT_NAME,Dpt->ShrtName,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Department full name */ fprintf (Gbl.F.Out,""); @@ -573,7 +573,7 @@ static void Dpt_ListDepartmentsForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Hie_MAX_CHARS_FULL_NAME,Dpt->FullName,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Department WWW */ fprintf (Gbl.F.Out,""); @@ -585,7 +585,7 @@ static void Dpt_ListDepartmentsForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Cns_MAX_CHARS_WWW,Dpt->WWW,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Number of teachers */ fprintf (Gbl.F.Out,"" diff --git a/swad_duplicate.c b/swad_duplicate.c index 0e21c9de..3d675d04 100644 --- a/swad_duplicate.c +++ b/swad_duplicate.c @@ -207,7 +207,7 @@ void Dup_ListDuplicateUsrs (void) /* Button to remove from list of possible duplicate users */ Dup_PutButtonToRemoveFromListOfDupUsrs (&UsrDat); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; @@ -333,7 +333,7 @@ static void Dup_ListSimilarUsrs (void) Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_NET); Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_STD); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Tbl_StartRow (); @@ -352,7 +352,7 @@ static void Dup_ListSimilarUsrs (void) if (Dup_CheckIfUsrIsDup (UsrDat.UsrCod)) Dup_PutButtonToRemoveFromListOfDupUsrs (&UsrDat); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; diff --git a/swad_enrolment.c b/swad_enrolment.c index 61c41786..8d8aa9dc 100644 --- a/swad_enrolment.c +++ b/swad_enrolment.c @@ -2301,7 +2301,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) "", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Scope); Sco_PutSelectorScope ("ScopeEnr",true); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /* Users' roles in listing */ @@ -2316,7 +2316,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) 1 << Rol_TCH, RolesSelected, false,true); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /* End table and form */ @@ -2882,7 +2882,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) "", Deg.ShrtName,Crs.ShrtName); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Number of teachers in the course *****/ fprintf (Gbl.F.Out,"" @@ -2897,7 +2897,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO21x28",Pho_ZOOM,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** User name *****/ fprintf (Gbl.F.Out,"" @@ -2938,7 +2938,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod); Btn_PutCreateButtonInline (Txt_Register); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Button to reject the request *****/ fprintf (Gbl.F.Out,""); @@ -2947,7 +2947,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod); Btn_PutRemoveButtonInline (Txt_Reject); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Mark possible notification as seen *****/ diff --git a/swad_exam.c b/swad_exam.c index 07d90083..6a8225b8 100644 --- a/swad_exam.c +++ b/swad_exam.c @@ -1069,7 +1069,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Deg.FullName); if (TypeViewExamAnnouncement == Exa_NORMAL_VIEW) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Title *****/ @@ -1106,7 +1106,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, else fprintf (Gbl.F.Out,"%s", Gbl.ExamAnns.ExaDat.CrsFullName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Year/semester (N.A., 1ş, 2ş, 3ş, 4ş, 5ş...) *****/ @@ -1138,7 +1138,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, else fprintf (Gbl.F.Out,"%s", Txt_YEAR_OF_DEGREE[Gbl.ExamAnns.ExaDat.Year]); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Exam session *****/ @@ -1157,7 +1157,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Exa_MAX_CHARS_SESSION,Gbl.ExamAnns.ExaDat.Session); else fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.Session); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Date of the exam *****/ @@ -1175,7 +1175,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Gbl.Now.Date.Year + 1,"Exam", &(Gbl.ExamAnns.ExaDat.ExamDate), false,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } else { @@ -1231,7 +1231,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, fprintf (Gbl.F.Out,"%2u:%02u", Gbl.ExamAnns.ExaDat.StartTime.Hour, Gbl.ExamAnns.ExaDat.StartTime.Minute); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Approximate duration of the exam *****/ @@ -1297,7 +1297,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Gbl.ExamAnns.ExaDat.Duration.Minute,Txt_minutes); } } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Place where the exam will be made *****/ @@ -1322,7 +1322,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Cns_MAX_BYTES_TEXT,false); fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.Place); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Exam mode *****/ @@ -1347,7 +1347,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Cns_MAX_BYTES_TEXT,false); fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.Mode); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Structure of the exam *****/ @@ -1372,7 +1372,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Cns_MAX_BYTES_TEXT,false); fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.Structure); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Documentation required *****/ @@ -1397,7 +1397,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Cns_MAX_BYTES_TEXT,false); fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.DocRequired); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Material required *****/ @@ -1422,7 +1422,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Cns_MAX_BYTES_TEXT,false); fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.MatRequired); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Material allowed *****/ @@ -1447,7 +1447,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Cns_MAX_BYTES_TEXT,false); fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.MatAllowed); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Other information to students *****/ @@ -1471,7 +1471,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Cns_MAX_BYTES_TEXT,false); fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.OtherInfo); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** End table, send button and end box *****/ diff --git a/swad_figure.c b/swad_figure.c index 26996e5d..63060e22 100644 --- a/swad_figure.c +++ b/swad_figure.c @@ -559,7 +559,7 @@ static void Fig_GetAndShowUsersRanking (void) fprintf (Gbl.F.Out,"" ""); Prf_GetAndShowRankingMsgSnt (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** End table and box *****/ @@ -1025,7 +1025,7 @@ static void Fig_ShowHierarchyCell (const char *ClassTxt,int Num) fprintf (Gbl.F.Out,"%d",Num); else // < 0 ==> do not show number fprintf (Gbl.F.Out,"-"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -1455,7 +1455,7 @@ static void Fig_ShowInss (MYSQL_RES **mysql_res,unsigned NumInss, NumberThisRow); /***** End user's cell *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); if ((++NumIns % Gbl.Usrs.ClassPhoto.Cols) == 0) { @@ -1514,7 +1514,7 @@ static void Fig_ShowInss (MYSQL_RES **mysql_res,unsigned NumInss, fprintf (Gbl.F.Out,"%s",Ins.FullName); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write statistic *****/ fprintf (Gbl.F.Out,"" diff --git a/swad_file_browser.c b/swad_file_browser.c index 5454cf46..49d0c7ab 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -3199,7 +3199,7 @@ static void Brw_ShowFileBrowsersAsgWrkCrs (void) Brw_InitializeFileBrowser (); Brw_ShowFileBrowser (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } } @@ -3367,7 +3367,7 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat) Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO60x80",Pho_ZOOM,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Start form to send a message to this user *****/ fprintf (Gbl.F.Out,""); @@ -3415,7 +3415,7 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -5616,7 +5616,7 @@ static bool Brw_WriteRowFileBrowser (unsigned Level,const char *RowId, /* Icon with file type or link */ fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); Brw_PutIconFileWithLinkToViewMetadata (16,&FileMetadata); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /* Check if is a new file or folder */ @@ -5630,7 +5630,7 @@ static bool Brw_WriteRowFileBrowser (unsigned Level,const char *RowId, /* End column */ Tbl_EndRow (); Tbl_EndTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); if (AdminMarks) /***** Header and footer rows *****/ @@ -5651,7 +5651,7 @@ static bool Brw_WriteRowFileBrowser (unsigned Level,const char *RowId, !SeeMarks && // Do not ZIP folders when seeing marks !(SeeDocsZone && RowSetAsHidden)) // When seeing docs, if folder is not hidden (this could happen for Level == 0) Brw_PutButtonToDownloadZIPOfAFolder (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } else // File or link /***** User who created the file or folder *****/ @@ -5765,7 +5765,7 @@ static void Brw_PutIconRemove (void) else Ico_PutIconRemovalNotAllowed (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -5780,7 +5780,7 @@ static void Brw_PutIconCopy (void) Ico_PutContextualIconToCopy (Brw_ActCopy[Gbl.FileBrowser.Type], Brw_PutImplicitParamsFileBrowser); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -5807,7 +5807,7 @@ static void Brw_PutIconPaste (unsigned Level) Ico_PutIconOff ("paste.svg",Txt_Copy_not_allowed); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -5852,11 +5852,11 @@ static void Brw_IndentAndWriteIconExpandContract (unsigned Level, false); // Visible break; } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Tbl_EndTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -5952,7 +5952,7 @@ static void Brw_PutIconShow (const char *Anchor) fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); Ico_PutContextualIconToUnhide (Brw_ActShow[Gbl.FileBrowser.Type],Anchor, Brw_PutImplicitParamsFileBrowser); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -5964,7 +5964,7 @@ static void Brw_PutIconHide (const char *Anchor) fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); Ico_PutContextualIconToHide (Brw_ActHide[Gbl.FileBrowser.Type],Anchor, Brw_PutImplicitParamsFileBrowser); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -6055,7 +6055,7 @@ static void Brw_PutIconFolder (unsigned Level, } /***** End cell *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -6285,7 +6285,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic) /***** End cell *****/ fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } else // File or link { @@ -6414,7 +6414,7 @@ static void Brw_WriteDatesAssignment (void) else fprintf (Gbl.F.Out," (%s)", Txt_unknown_assignment); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -6455,7 +6455,7 @@ static void Brw_WriteFileSizeAndDate (struct FileMetadata *FileMetadata) UniqueId,(long) FileMetadata->Time, (unsigned) Gbl.Prefs.DateFormat,Txt_Today); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -6497,7 +6497,7 @@ static void Brw_WriteFileOrFolderPublisher (unsigned Level,unsigned long UsrCod) Txt_Unknown_or_without_photo, Txt_Unknown_or_without_photo); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); if (Level && UsrCod > 0) /***** Free memory used for user's data *****/ @@ -9498,7 +9498,7 @@ void Brw_ShowFileMetadata (void) fprintf (Gbl.F.Out,""); Brw_WriteBigLinkToDownloadFile (URL,&FileMetadata,FileNameToShow); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Filename *****/ @@ -9509,7 +9509,7 @@ void Brw_ShowFileMetadata (void) "", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Filename); Brw_WriteSmallLinkToDownloadFile (URL,&FileMetadata,FileNameToShow); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Publisher's data *****/ @@ -9534,7 +9534,7 @@ void Brw_ShowFileMetadata (void) else /* Unknown publisher */ fprintf (Gbl.F.Out,"%s",Txt_ROLES_SINGUL_Abc[Rol_UNK][Usr_SEX_UNKNOWN]); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Free memory used for publisher's data *****/ @@ -9601,7 +9601,7 @@ void Brw_ShowFileMetadata (void) fprintf (Gbl.F.Out,"%s", FileMetadata.IsPublic ? Txt_Public_open_educational_resource_OER_for_everyone : Txt_Private_available_to_certain_users_identified); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** License *****/ @@ -9628,7 +9628,7 @@ void Brw_ShowFileMetadata (void) } else // I can not edit file properties fprintf (Gbl.F.Out,"%s",Txt_LICENSES[FileMetadata.License]); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Write my number of views *****/ @@ -11941,7 +11941,7 @@ static void Brw_WriteRowDocData (unsigned long *NumDocsNotHidden,MYSQL_ROW row) fprintf (Gbl.F.Out," %s",InsShortName); Frm_EndForm (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write centre logo, centre short name *****/ fprintf (Gbl.F.Out,"", @@ -11958,7 +11958,7 @@ static void Brw_WriteRowDocData (unsigned long *NumDocsNotHidden,MYSQL_ROW row) fprintf (Gbl.F.Out," %s",CtrShortName); Frm_EndForm (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write degree logo, degree short name *****/ fprintf (Gbl.F.Out,"", @@ -11975,7 +11975,7 @@ static void Brw_WriteRowDocData (unsigned long *NumDocsNotHidden,MYSQL_ROW row) fprintf (Gbl.F.Out," %s",DegShortName); Frm_EndForm (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write course short name *****/ fprintf (Gbl.F.Out,"", @@ -11991,7 +11991,7 @@ static void Brw_WriteRowDocData (unsigned long *NumDocsNotHidden,MYSQL_ROW row) fprintf (Gbl.F.Out,"%s",CrsShortName); Frm_EndForm (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write file zone *****/ switch (FileMetadata.FileBrowser) @@ -12107,7 +12107,7 @@ static void Brw_WriteRowDocData (unsigned long *NumDocsNotHidden,MYSQL_ROW row) /* End form */ Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; diff --git a/swad_follow.c b/swad_follow.c index 51ff6d9b..88cb20ac 100644 --- a/swad_follow.c +++ b/swad_follow.c @@ -850,7 +850,7 @@ static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat) NULL, "PHOTO60x80",Pho_ZOOM,false); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Show user's name and icon to follow/unfollow *****/ fprintf (Gbl.F.Out,""); @@ -882,7 +882,7 @@ static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat) /* Form to follow */ Fol_PutIconToFollow (UsrDat); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -908,7 +908,7 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat) NULL, "PHOTO21x28",Pho_ZOOM,false); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** User's name *****/ fprintf (Gbl.F.Out,"", @@ -925,7 +925,7 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat) ""); Frm_EndForm (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Icon to follow *****/ fprintf (Gbl.F.Out,"", @@ -944,7 +944,7 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat) /* Form to follow */ Fol_PutIconToFollow (UsrDat); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; diff --git a/swad_forum.c b/swad_forum.c index dc6c9a50..0a408f2f 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -1211,7 +1211,7 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod, } else fprintf (Gbl.F.Out,"[%s]",Txt_FORUM_Post_banned); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Form to ban/unban post *****/ @@ -1282,7 +1282,7 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod, Frm_EndForm (); } } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write author *****/ Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS); @@ -1292,7 +1292,7 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod, if (Enabled) /* Write number of posts from this user */ For_WriteNumberOfPosts (UsrDat.UsrCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write post content *****/ fprintf (Gbl.F.Out,""); @@ -1307,7 +1307,7 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod, } else fprintf (Gbl.F.Out,"%s",Txt_This_post_has_been_banned_probably_for_not_satisfy_the_rules_of_the_forums); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Free image *****/ @@ -3424,7 +3424,7 @@ static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE], Thr.NumMyPosts); fprintf (Gbl.F.Out,"\" class=\"PHOTO15x20\" />"); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Put an icon with thread status *****/ fprintf (Gbl.F.Out,"" @@ -3475,7 +3475,7 @@ static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE], Frm_EndForm (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write subject and links to thread pages *****/ fprintf (Gbl.F.Out,"",BgColor); @@ -3491,7 +3491,7 @@ static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE], Thr.NumUnreadPosts ? The_ClassFormInBoxBold[Gbl.Prefs.Theme] : The_ClassFormInBox[Gbl.Prefs.Theme], true); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write the authors and date-times of first and last posts *****/ for (Order = For_FIRST_MSG; @@ -3505,7 +3505,7 @@ static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE], Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS); fprintf (Gbl.F.Out,"",Style,BgColor); Msg_WriteMsgAuthor (&UsrDat,Thr.Enabled[Order],BgColor); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write the date of first or last message (it's in YYYYMMDDHHMMSS format) */ TimeUTC = Thr.WriteTime[Order]; diff --git a/swad_game.c b/swad_game.c index d2b477a3..a59544bc 100644 --- a/swad_game.c +++ b/swad_game.c @@ -410,7 +410,7 @@ void Gam_ShowOneGame (long GamCod, /* Icons to remove/edit this game */ Gam_PutFormsToRemEditOneGame (&Game,Anchor); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /***** Start/end date/time *****/ @@ -434,7 +434,7 @@ void Gam_ShowOneGame (long GamCod, (unsigned) StartEndTime,UniqueId, Game.TimeUTC[StartEndTime], (unsigned) Gbl.Prefs.DateFormat,Txt_Today); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /***** Game title and main data *****/ @@ -463,7 +463,7 @@ void Gam_ShowOneGame (long GamCod, Txt_No_of_questions, Game.NumQsts); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Number of matches in game *****/ fprintf (Gbl.F.Out,"",Game.NumMchs); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** End 1st row of this game *****/ Tbl_EndRow (); @@ -496,7 +496,7 @@ void Gam_ShowOneGame (long GamCod, fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd); fprintf (Gbl.F.Out,"\">"); Gam_WriteAuthor (&Game); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Text of the game *****/ fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write number of question */ fprintf (Gbl.F.Out,"" @@ -1754,7 +1754,7 @@ static void Gam_ListOneOrMoreQuestionsForEdition (long GamCod,unsigned NumQsts, fprintf (Gbl.F.Out,"", Gbl.RowEvenOdd); Tst_GetAndWriteTagsQst (Gbl.Test.QstCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write stem (row[3]) */ fprintf (Gbl.F.Out,"", @@ -1776,7 +1776,7 @@ static void Gam_ListOneOrMoreQuestionsForEdition (long GamCod,unsigned NumQsts, /* Show answers */ Tst_WriteAnswersEdit (Gbl.Test.QstCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Destroy test question *****/ diff --git a/swad_group.c b/swad_group.c index 888b773e..1b255d2c 100644 --- a/swad_group.c +++ b/swad_group.c @@ -1300,7 +1300,7 @@ static void Grp_ListGroupTypesForEdition (void) Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); Ico_PutIconRemove (); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Name of group type */ fprintf (Gbl.F.Out,""); @@ -1313,7 +1313,7 @@ static void Grp_ListGroupTypesForEdition (void) Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName, Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Is it mandatory to register in any group? */ fprintf (Gbl.F.Out,""); @@ -1335,7 +1335,7 @@ static void Grp_ListGroupTypesForEdition (void) "", Txt_It_is_mandatory_to_choose_a_group); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Is it possible to register in multiple groups? */ fprintf (Gbl.F.Out,""); @@ -1357,7 +1357,7 @@ static void Grp_ListGroupTypesForEdition (void) "", Txt_A_student_can_belong_to_several_groups); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Open time */ fprintf (Gbl.F.Out,""); @@ -1389,11 +1389,11 @@ static void Grp_ListGroupTypesForEdition (void) Dat_FORM_SECONDS_ON, Dat_HMS_DO_NOT_SET, // Don't set hour, minute and second true); // Submit on change - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Tbl_EndTable (); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Number of groups of this type */ fprintf (Gbl.F.Out,"" @@ -1516,7 +1516,7 @@ static void Grp_ListGroupsForEdition (void) Grp_PutParamGrpCod (Grp->GrpCod); Ico_PutIconRemove (); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Icon to open/close group *****/ fprintf (Gbl.F.Out,""); @@ -1532,7 +1532,7 @@ static void Grp_ListGroupsForEdition (void) "lock.svg", Gbl.Title); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Icon to activate file zones for this group *****/ fprintf (Gbl.F.Out,""); @@ -1548,7 +1548,7 @@ static void Grp_ListGroupsForEdition (void) "folder-red.svg", Gbl.Title); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Group type *****/ /* Start selector */ @@ -1574,7 +1574,7 @@ static void Grp_ListGroupsForEdition (void) /* End selector */ fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Group name *****/ fprintf (Gbl.F.Out,""); @@ -1585,7 +1585,7 @@ static void Grp_ListGroupsForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Grp_MAX_CHARS_GROUP_NAME,Grp->GrpName,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Classroom *****/ /* Start selector */ @@ -1626,7 +1626,7 @@ static void Grp_ListGroupsForEdition (void) /* End selector */ fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Current number of users in this group *****/ for (Role = Rol_TCH; @@ -1647,7 +1647,7 @@ static void Grp_ListGroupsForEdition (void) fprintf (Gbl.F.Out,"\" onchange=\"document.getElementById('%s').submit();\" />", Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } } @@ -2164,7 +2164,7 @@ static void Grp_ListGrpsToAddOrRemUsrs (struct GroupType *GrpTyp,long UsrCod) fprintf (Gbl.F.Out," />"); /* End cell for checkbox */ - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write cell for group */ Grp_WriteRowGrp (Grp,UsrBelongsToThisGroup); @@ -2364,7 +2364,7 @@ static void Grp_WriteGrpHead (struct GroupType *GrpTyp) UniqueId,(long) GrpTyp->OpenTimeUTC, (unsigned) Gbl.Prefs.DateFormat,Txt_Today); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Head row with title of each column *****/ @@ -2419,7 +2419,7 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight) Ico_PutIconOff (Grp->Open ? "unlock.svg" : "lock.svg", Gbl.Title); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Group name *****/ fprintf (Gbl.F.Out," 0 ? (unsigned) Vacant : 0); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -2577,10 +2577,10 @@ static void Grp_PutFormToCreateGroupType (void) Dat_FORM_SECONDS_ON, Dat_HMS_DO_NOT_SET, // Don't set hour, minute and second false); // Don't submit on change - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Tbl_EndTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Number of groups of this type *****/ fprintf (Gbl.F.Out,"" @@ -2630,12 +2630,12 @@ static void Grp_PutFormToCreateGroup (void) /***** Disabled icon to open group *****/ fprintf (Gbl.F.Out,""); Ico_PutIconOff ("lock.svg",Txt_Group_closed); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Disabled icon for archive zone *****/ fprintf (Gbl.F.Out,""); Ico_PutIconOff ("folder-red.svg",Txt_File_zones_disabled); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Group type *****/ /* Start selector */ diff --git a/swad_help.c b/swad_help.c index 9dd2e9c5..b8424cd9 100644 --- a/swad_help.c +++ b/swad_help.c @@ -283,7 +283,7 @@ static void Hlp_ShowRowHelpWhatWouldYouLikeToDo (const char *Description, Frm_StartForm (Action); Btn_PutButtonInline (Button,TxtButton); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } diff --git a/swad_hierarchy.c b/swad_hierarchy.c index 1962c311..744b1682 100644 --- a/swad_hierarchy.c +++ b/swad_hierarchy.c @@ -110,7 +110,7 @@ void Hie_WriteMenuHierarchy (void) "", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Country); Cty_WriteSelectorOfCountry (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); if (Gbl.Hierarchy.Cty.CtyCod > 0) @@ -124,7 +124,7 @@ void Hie_WriteMenuHierarchy (void) "", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Institution); Ins_WriteSelectorOfInstitution (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); if (Gbl.Hierarchy.Ins.InsCod > 0) @@ -138,7 +138,7 @@ void Hie_WriteMenuHierarchy (void) "", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Centre); Ctr_WriteSelectorOfCentre (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); if (Gbl.Hierarchy.Ctr.CtrCod > 0) @@ -152,7 +152,7 @@ void Hie_WriteMenuHierarchy (void) "", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Degree); Deg_WriteSelectorOfDegree (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); if (Gbl.Hierarchy.Deg.DegCod > 0) @@ -166,7 +166,7 @@ void Hie_WriteMenuHierarchy (void) "", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Course); Crs_WriteSelectorOfCourse (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } } diff --git a/swad_holiday.c b/swad_holiday.c index 5aecd561..a5c1e8d4 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -568,7 +568,7 @@ static void Hld_ListHolidaysForEdition (void) Hld_PutParamHldCod (Hld->HldCod); Ico_PutIconRemove (); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Holiday code */ fprintf (Gbl.F.Out,"" @@ -597,7 +597,7 @@ static void Hld_ListHolidaysForEdition (void) Gbl.Plcs.Lst[NumPlc].ShrtName); fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Holiday type */ fprintf (Gbl.F.Out,""); @@ -616,7 +616,7 @@ static void Hld_ListHolidaysForEdition (void) Txt_HOLIDAY_TYPES[HolidayType]); fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Holiday date / Non school period start date */ fprintf (Gbl.F.Out,""); @@ -628,7 +628,7 @@ static void Hld_ListHolidaysForEdition (void) &(Gbl.Hlds.Lst[NumHld].StartDate), true,false); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Non school period end date */ fprintf (Gbl.F.Out,""); @@ -640,7 +640,7 @@ static void Hld_ListHolidaysForEdition (void) &(Gbl.Hlds.Lst[NumHld].EndDate), true,(Hld->HldTyp == Hld_HOLIDAY)); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Holiday name */ fprintf (Gbl.F.Out,""); @@ -651,7 +651,7 @@ static void Hld_ListHolidaysForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Hld_MAX_CHARS_HOLIDAY_NAME,Hld->Name,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -1033,7 +1033,7 @@ static void Hld_PutFormToCreateHoliday (void) "Start", &Hld_EditingHld->StartDate, false,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Non school period end date *****/ fprintf (Gbl.F.Out,""); @@ -1042,7 +1042,7 @@ static void Hld_PutFormToCreateHoliday (void) "End", &Hld_EditingHld->EndDate, false,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Holiday name *****/ fprintf (Gbl.F.Out,"" diff --git a/swad_indicator.c b/swad_indicator.c index b09a1192..0b943ecd 100644 --- a/swad_indicator.c +++ b/swad_indicator.c @@ -127,7 +127,7 @@ void Ind_ReqIndicatorsCourses (void) "", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Scope); Sco_PutSelectorScope ("ScopeInd",true); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /* Compute stats for a type of degree */ @@ -158,7 +158,7 @@ void Ind_ReqIndicatorsCourses (void) -1L, // First option Txt_Any_department, // Text when no department selected true); // Submit on change - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Get courses from database *****/ @@ -181,7 +181,7 @@ void Ind_ReqIndicatorsCourses (void) The_ClassFormInBox[Gbl.Prefs.Theme], Txt_No_of_indicators); Ind_ShowNumCoursesWithIndicators (NumCrssWithIndicatorYes,NumCrss,true); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /* End table and form */ diff --git a/swad_info.c b/swad_info.c index 988fb70b..1735854b 100644 --- a/swad_info.c +++ b/swad_info.c @@ -1157,7 +1157,7 @@ void Inf_FormsToSelSendInfo (void) } fprintf (Gbl.F.Out," />"); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Form for this info source */ fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } diff --git a/swad_institution.c b/swad_institution.c index e3264553..b6b4076e 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -206,7 +206,7 @@ void Ins_SeeInsWithPendingCtrs (void) BgColor); Ins_DrawInstitutionLogoAndNameWithLink (&Ins,ActSeeCtr, "DAT_NOBR","CENTER_MIDDLE"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Number of pending centres (row[1]) */ fprintf (Gbl.F.Out,"" @@ -394,7 +394,7 @@ static void Ins_Configuration (bool PrintView) else // I can not move institution to another country fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Institution full name *****/ @@ -423,7 +423,7 @@ static void Ins_Configuration (bool PrintView) } else // I can not edit institution full name fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ins.FullName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Institution short name *****/ @@ -452,7 +452,7 @@ static void Ins_Configuration (bool PrintView) } else // I can not edit institution short name fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ins.ShrtName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Institution WWW *****/ @@ -487,7 +487,7 @@ static void Ins_Configuration (bool PrintView) "", Gbl.Hierarchy.Ins.WWW, Gbl.Hierarchy.Ins.WWW); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Shortcut to the institution *****/ @@ -521,7 +521,7 @@ static void Ins_Configuration (bool PrintView) The_ClassFormInBox[Gbl.Prefs.Theme], Txt_QR_code); QR_LinkTo (250,"ins",Gbl.Hierarchy.Ins.InsCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } else @@ -559,7 +559,7 @@ static void Ins_Configuration (bool PrintView) Ctr_GetNumCtrsInIns (Gbl.Hierarchy.Ins.InsCod)); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Number of degrees *****/ @@ -801,7 +801,7 @@ static void Ins_ListOneInstitutionForSeeing (struct Instit *Ins,unsigned NumIns) fprintf (Gbl.F.Out,"",BgColor); Ins_DrawInstitutionLogoAndNameWithLink (Ins,ActSeeCtr, TxtClassStrong,"CENTER_MIDDLE"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Stats *****/ /* Number of users who claim to belong to this institution */ @@ -846,7 +846,7 @@ static void Ins_ListOneInstitutionForSeeing (struct Instit *Ins,unsigned NumIns) TxtClassNormal,BgColor); if (StatusTxt != Ins_STATUS_ACTIVE) // If active ==> do not show anything fprintf (Gbl.F.Out,"%s",Txt_INSTITUTION_STATUS[StatusTxt]); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; @@ -1497,7 +1497,7 @@ static void Ins_ListInstitutionsForEdition (void) Ico_PutIconRemove (); Frm_EndForm (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Institution code */ fprintf (Gbl.F.Out,"" @@ -1510,7 +1510,7 @@ static void Ins_ListInstitutionsForEdition (void) " style=\"width:25px;\">", Ins->FullName); Log_DrawLogo (Hie_INS,Ins->InsCod,Ins->ShrtName,20,NULL,true); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Institution short name */ fprintf (Gbl.F.Out,""); @@ -1528,7 +1528,7 @@ static void Ins_ListInstitutionsForEdition (void) } else fprintf (Gbl.F.Out,"%s",Ins->ShrtName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Institution full name */ fprintf (Gbl.F.Out,""); @@ -1547,7 +1547,7 @@ static void Ins_ListInstitutionsForEdition (void) } else fprintf (Gbl.F.Out,"%s",Ins->FullName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Institution WWW */ fprintf (Gbl.F.Out,""); @@ -1563,7 +1563,7 @@ static void Ins_ListInstitutionsForEdition (void) Ins->WWW, Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } else { @@ -1577,7 +1577,7 @@ static void Ins_ListInstitutionsForEdition (void) "", Ins->WWW,Ins->WWW,WWW); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Number of users who claim to belong to this institution */ fprintf (Gbl.F.Out,"" @@ -1602,7 +1602,7 @@ static void Ins_ListInstitutionsForEdition (void) Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS); fprintf (Gbl.F.Out,""); Msg_WriteMsgAuthor (&UsrDat,true,NULL); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Institution status */ StatusTxt = Ins_GetStatusTxtFromStatusBits (Ins->Status); @@ -1626,7 +1626,7 @@ static void Ins_ListInstitutionsForEdition (void) } else if (StatusTxt != Ins_STATUS_ACTIVE) // If active ==> do not show anything fprintf (Gbl.F.Out,"%s",Txt_INSTITUTION_STATUS[StatusTxt]); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -2249,7 +2249,7 @@ static void Ins_PutFormToCreateInstitution (void) /***** Institution logo *****/ fprintf (Gbl.F.Out,""); Log_DrawLogo (Hie_INS,-1L,"",20,NULL,true); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Institution short name *****/ fprintf (Gbl.F.Out,"" @@ -2296,7 +2296,7 @@ static void Ins_PutFormToCreateInstitution (void) /***** Institution requester *****/ fprintf (Gbl.F.Out,""); Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true,NULL); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Institution status *****/ fprintf (Gbl.F.Out,"" diff --git a/swad_layout.c b/swad_layout.c index 7306b818..046b2ece 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -1629,7 +1629,7 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto, if (!PrintView) fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Second column: class photo title *****/ fprintf (Gbl.F.Out,""); @@ -1665,7 +1665,7 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto, Grp_WriteNamesOfSelectedGrps (); } } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Third column: degree logo *****/ fprintf (Gbl.F.Out,""); @@ -1679,7 +1679,7 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto, if (!PrintView) fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** End table *****/ Tbl_EndRow (); diff --git a/swad_link.c b/swad_link.c index be64b03f..09a4fdb4 100644 --- a/swad_link.c +++ b/swad_link.c @@ -429,7 +429,7 @@ static void Lnk_ListLinksForEdition (void) Lnk_PutParamLnkCod (Lnk->LnkCod); Ico_PutIconRemove (); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Link code */ fprintf (Gbl.F.Out,"" @@ -448,7 +448,7 @@ static void Lnk_ListLinksForEdition (void) Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk->ShrtName, Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Link full name */ fprintf (Gbl.F.Out,""); @@ -461,7 +461,7 @@ static void Lnk_ListLinksForEdition (void) Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk->FullName, Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Link WWW */ fprintf (Gbl.F.Out,""); @@ -474,7 +474,7 @@ static void Lnk_ListLinksForEdition (void) Cns_MAX_CHARS_WWW,Lnk->WWW, Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } diff --git a/swad_mail.c b/swad_mail.c index 9d72eb33..79ba8ba7 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -491,7 +491,7 @@ static void Mai_ListMailDomainsForEdition (void) Mai_PutParamMaiCod (Mai->MaiCod); Ico_PutIconRemove (); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Mail code */ fprintf (Gbl.F.Out,"" @@ -509,7 +509,7 @@ static void Mai_ListMailDomainsForEdition (void) Cns_MAX_CHARS_EMAIL_ADDRESS,Mai->Domain, Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Mail domain info */ fprintf (Gbl.F.Out,""); @@ -521,7 +521,7 @@ static void Mai_ListMailDomainsForEdition (void) Mai_MAX_CHARS_MAIL_INFO,Mai->Info, Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Number of users */ fprintf (Gbl.F.Out,"" @@ -1373,10 +1373,10 @@ static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe, Btn_PutConfirmButtonInline ((ItsMe && NumEmail == 1) ? Txt_Confirm_email : Txt_Use_this_email); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -1417,7 +1417,7 @@ static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe, Btn_PutCreateButtonInline (NumEmails ? Txt_Change_email : // User already has an email address Txt_Save_changes); // User has no email address yet Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** End table *****/ diff --git a/swad_mark.c b/swad_mark.c index 996d00d1..1cacb99b 100644 --- a/swad_mark.c +++ b/swad_mark.c @@ -138,7 +138,7 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void) Gbl.RowEvenOdd, Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write the number of rows of footer *****/ fprintf (Gbl.F.Out,"", @@ -158,7 +158,7 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void) Gbl.RowEvenOdd, Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } } diff --git a/swad_match.c b/swad_match.c index b397e4a6..a5cc4fd2 100644 --- a/swad_match.c +++ b/swad_match.c @@ -526,7 +526,7 @@ static void Mch_ListOneOrMoreMatchesIcons (const struct Match *Match) else Ico_PutIconRemovalNotAllowed (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -538,7 +538,7 @@ static void Mch_ListOneOrMoreMatchesAuthor (const struct Match *Match) /***** Match author (teacher) *****/ fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); Usr_WriteAuthor1Line (Match->UsrCod,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -586,7 +586,7 @@ static void Mch_ListOneOrMoreMatchesTitleGrps (const struct Match *Match) if (Gbl.Crs.Grps.NumGrps) Mch_GetAndWriteNamesOfGrpsAssociatedToMatch (Match); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -716,7 +716,7 @@ static void Mch_ListOneOrMoreMatchesStatus (const struct Match *Match,unsigned N break; } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -780,7 +780,7 @@ static void Mch_ListOneOrMoreMatchesResult (const struct Match *Match, break; } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -1284,7 +1284,7 @@ static void Mch_ShowLstGrpsToCreateMatch (void) /***** End table and box *****/ Box_EndBoxTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -2516,7 +2516,7 @@ static void Mch_ShowQuestionAndAnswersStd (struct Match *Match) Frm_EndForm (); /* End table cell */ - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** End row *****/ Tbl_EndRow (); diff --git a/swad_match_result.c b/swad_match_result.c index c9ae097e..b7659dc3 100644 --- a/swad_match_result.c +++ b/swad_match_result.c @@ -217,7 +217,7 @@ void McR_SelUsrsToViewUsrsMchResults (void) Usr_ListUsersToSelect (Rol_NET); Usr_ListUsersToSelect (Rol_STD); Tbl_EndTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Starting and ending dates in the search *****/ @@ -504,7 +504,7 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther) if (ShowResultThisMatch) fprintf (Gbl.F.Out,"%.2lf", ScoreInThisResult); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write average score per question */ fprintf (Gbl.F.Out,"", @@ -513,7 +513,7 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther) fprintf (Gbl.F.Out,"%.2lf", NumQstsInThisResult ? ScoreInThisResult / (double) NumQstsInThisResult : 0.0); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write score over Tst_SCORE_MAX */ fprintf (Gbl.F.Out,"", @@ -522,7 +522,7 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther) fprintf (Gbl.F.Out,"%.2lf", NumQstsInThisResult ? ScoreInThisResult * Tst_SCORE_MAX / (double) NumQstsInThisResult : 0.0); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Link to show this result */ fprintf (Gbl.F.Out,"", @@ -548,7 +548,7 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther) } else Ico_PutIconOff ("eye-slash.svg",Txt_Hidden_result); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -599,21 +599,21 @@ static void McR_ShowMchResultsSummaryRow (bool ShowSummaryResults, Gbl.RowEvenOdd); if (NumResults) fprintf (Gbl.F.Out,"%u",NumTotalQsts); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write total number of questions not blank *****/ fprintf (Gbl.F.Out,"", Gbl.RowEvenOdd); if (NumResults) fprintf (Gbl.F.Out,"%u",NumTotalQstsNotBlank); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write total score *****/ fprintf (Gbl.F.Out,"", Gbl.RowEvenOdd); if (ShowSummaryResults) fprintf (Gbl.F.Out,"%.2lf",TotalScoreOfAllResults); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write average score per question *****/ fprintf (Gbl.F.Out,"", @@ -622,7 +622,7 @@ static void McR_ShowMchResultsSummaryRow (bool ShowSummaryResults, fprintf (Gbl.F.Out,"%.2lf", NumTotalQsts ? TotalScoreOfAllResults / (double) NumTotalQsts : 0.0); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write score over Tst_SCORE_MAX *****/ fprintf (Gbl.F.Out,"", @@ -632,7 +632,7 @@ static void McR_ShowMchResultsSummaryRow (bool ShowSummaryResults, NumTotalQsts ? TotalScoreOfAllResults * Tst_SCORE_MAX / (double) NumTotalQsts : 0.0); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Last cell *****/ fprintf (Gbl.F.Out,"", @@ -803,7 +803,7 @@ void McR_ShowOneMchResult (void) Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO45x60",Pho_ZOOM,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /* Start/end time (for user in this match) */ @@ -867,7 +867,7 @@ void McR_ShowOneMchResult (void) "", Txt_Tags); Gam_ShowTstTagsPresentInAGame (Match.GamCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Write answers and solutions *****/ diff --git a/swad_message.c b/swad_message.c index ecb7319d..73592982 100644 --- a/swad_message.c +++ b/swad_message.c @@ -313,7 +313,7 @@ static void Msg_PutFormMsgUsrs (char Content[Cns_MAX_BYTES_LONG_TEXT + 1]) Tbl_EndTable (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Subject and content sections *****/ @@ -2972,7 +2972,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod) Gbl.Msg.MsgCod = MsgCod; // Message to be deleted Ico_PutContextualIconToRemove (ActionDelMsg[Gbl.Msg.TypeOfMessages], Msg_PutHiddenParamsOneMsg); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write message number *****/ Msg_WriteMsgNumber (MsgNum,!Open); @@ -2984,7 +2984,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod) Open ? "MSG_AUT_BG" : "MSG_AUT_BG_NEW"); Msg_WriteMsgAuthor (&UsrDat,true,NULL); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write subject *****/ Msg_WriteSentOrReceivedMsgSubject (MsgCod,Subject,Open,Expanded); @@ -3005,7 +3005,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod) Tbl_StartRow (); fprintf (Gbl.F.Out,""); FromThisCrs = Msg_WriteCrsOrgMsg (CrsCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Form to reply message *****/ @@ -3015,11 +3015,11 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod) Gbl.Usrs.Me.Role.Logged >= Rol_USR) // Guests (users without courses) can read messages but not reply them Msg_WriteFormToReply (MsgCod,CrsCod,FromThisCrs,Replied,&UsrDat); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Tbl_EndTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write "From:" *****/ fprintf (Gbl.F.Out,"" @@ -3028,7 +3028,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod) "", Txt_MSG_From); Msg_WriteMsgFrom (&UsrDat,Deleted); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Write "To:" *****/ @@ -3039,7 +3039,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod) "", Txt_MSG_To); Msg_WriteMsgTo (MsgCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Write "Content:" *****/ @@ -3060,7 +3060,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod) if (Content[0]) Msg_WriteMsgContent (Content,Cns_MAX_BYTES_LONG_TEXT,true,false); Med_ShowMedia (&Media,"MSG_IMG_CONTAINER","MSG_IMG"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Free image *****/ @@ -3175,7 +3175,7 @@ static void Msg_WriteSentOrReceivedMsgSubject (long MsgCod,const char *Subject,b Frm_EndForm (); /***** End cell *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -3212,7 +3212,7 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled,const char *BgColor Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO30x40",Pho_ZOOM,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Second column with user name (if author has a web page, put a link to it) *****/ fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** End table *****/ @@ -3391,7 +3391,7 @@ static void Msg_WriteMsgFrom (struct UsrData *UsrDat,bool Deleted) else fprintf (Gbl.F.Out,"[%s]", Txt_ROLES_SINGUL_abc[Rol_UNK][Usr_SEX_UNKNOWN]); // User not found, likely an old user who has been removed - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Tbl_EndTable (); } @@ -3541,7 +3541,7 @@ static void Msg_WriteMsgTo (long MsgCod) fprintf (Gbl.F.Out,"%s",UsrDat.FullName); else fprintf (Gbl.F.Out,"[%s]",Txt_unknown_recipient); // User not found, likely a user who has been removed - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3575,7 +3575,7 @@ static void Msg_WriteMsgTo (long MsgCod) NumRecipientsKnown - NumRecipientsToShow); fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3616,7 +3616,7 @@ void Msg_WriteMsgDate (time_t TimeUTC,const char *ClassBackground) (unsigned) Gbl.Prefs.DateFormat,Txt_Today); /***** End cell *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -3857,7 +3857,7 @@ void Msg_ListBannedUsrs (void) Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod); Ico_PutIconLink ("lock.svg",Txt_Sender_banned_click_to_unban_him); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Show photo */ fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write user's full name */ fprintf (Gbl.F.Out,"" diff --git a/swad_nickname.c b/swad_nickname.c index ca4dce2e..8282abb9 100644 --- a/swad_nickname.c +++ b/swad_nickname.c @@ -362,7 +362,7 @@ static void Nck_ShowFormChangeUsrNickname (const struct UsrData *UsrDat,bool Its Frm_EndForm (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -405,7 +405,7 @@ static void Nck_ShowFormChangeUsrNickname (const struct UsrData *UsrDat,bool Its Btn_PutCreateButtonInline (NumNicks ? Txt_Change_nickname : // I already have a nickname Txt_Save_changes); // I have no nickname yet); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** End table and box *****/ diff --git a/swad_notification.c b/swad_notification.c index be787524..287b89bd 100644 --- a/swad_notification.c +++ b/swad_notification.c @@ -507,7 +507,7 @@ void Ntf_ShowMyNotifications (void) else Ico_PutIconOff (Ntf_Icons[NotifyEvent], Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent]); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write event type */ fprintf (Gbl.F.Out,"", @@ -525,12 +525,12 @@ void Ntf_ShowMyNotifications (void) else fprintf (Gbl.F.Out,"%s", ClassAnchor,Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent]); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write user (from) */ fprintf (Gbl.F.Out,"",ClassAuthorBg); Msg_WriteMsgAuthor (&UsrDat,true,NULL); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write location */ fprintf (Gbl.F.Out,"", @@ -583,7 +583,7 @@ void Ntf_ShowMyNotifications (void) else fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write date and time */ Msg_WriteMsgDate (DateTimeUTC,ClassBackground); diff --git a/swad_password.c b/swad_password.c index 6280223f..d5063282 100644 --- a/swad_password.c +++ b/swad_password.c @@ -706,7 +706,7 @@ void Pwd_ShowFormChgMyPwd (void) fprintf (Gbl.F.Out,""); Ale_ShowAlert (Ale_INFO,Txt_Your_password_must_be_at_least_X_characters_and_can_not_contain_spaces_, Pwd_MIN_CHARS_PLAIN_PASSWORD); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** New password *****/ diff --git a/swad_photo.c b/swad_photo.c index bdf773d8..f6f25033 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -1810,7 +1810,7 @@ static void Pho_PutSelectorForTypeOfAvg (void) } fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -1871,7 +1871,7 @@ static void Pho_PutSelectorForHowComputePhotoSize (void) } fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -1932,7 +1932,7 @@ static void Pho_PutSelectorForHowOrderDegrees (void) } fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -2152,7 +2152,7 @@ static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrin /***** Show average photo of students belonging to this degree *****/ fprintf (Gbl.F.Out,""); Pho_ShowDegreeAvgPhotoAndStat (&Deg,SeeOrPrint,Usr_SEX_ALL,NumStds,NumStdsWithPhoto); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); if ((++NumDegsNotEmpty % Gbl.Usrs.ClassPhoto.Cols) == 0) { @@ -2256,7 +2256,7 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint) Log_DrawLogo (Hie_DEG,Deg.DegCod,Deg.ShrtName,20,"CENTER_TOP",true); fprintf (Gbl.F.Out," %s",Deg.FullName); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); for (Sex = (Usr_Sex_t) 0; Sex < Usr_NUM_SEXS; @@ -2270,7 +2270,7 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint) Pho_ShowDegreeAvgPhotoAndStat (&Deg,SeeOrPrint,Sex,NumStds,NumStdsWithPhoto); else Pho_ShowDegreeStat (NumStds,NumStdsWithPhoto); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } Tbl_EndRow (); } diff --git a/swad_place.c b/swad_place.c index 29ea46bc..a86a9827 100644 --- a/swad_place.c +++ b/swad_place.c @@ -534,7 +534,7 @@ static void Plc_ListPlacesForEdition (void) Ico_PutIconRemove (); Frm_EndForm (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Place code */ fprintf (Gbl.F.Out,"" @@ -552,7 +552,7 @@ static void Plc_ListPlacesForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Plc_MAX_CHARS_PLACE_SHRT_NAME,Plc->ShrtName,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Place full name */ fprintf (Gbl.F.Out,""); @@ -564,7 +564,7 @@ static void Plc_ListPlacesForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Plc_MAX_CHARS_PLACE_FULL_NAME,Plc->FullName,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Number of centres */ fprintf (Gbl.F.Out,"" diff --git a/swad_plugin.c b/swad_plugin.c index 226e0db3..17274b56 100644 --- a/swad_plugin.c +++ b/swad_plugin.c @@ -399,7 +399,7 @@ static void Plg_ListPluginsForEdition (void) Plg_PutParamPlgCod (Plg->PlgCod); Ico_PutIconRemove (); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Plugin code */ fprintf (Gbl.F.Out,"" @@ -428,7 +428,7 @@ static void Plg_ListPluginsForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Plg_MAX_CHARS_PLUGIN_NAME,Plg->Name,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Plugin description */ fprintf (Gbl.F.Out,""); @@ -439,7 +439,7 @@ static void Plg_ListPluginsForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Plg_MAX_CHARS_PLUGIN_DESCRIPTION,Plg->Description,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Plugin logo */ fprintf (Gbl.F.Out,""); @@ -450,7 +450,7 @@ static void Plg_ListPluginsForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Plg_MAX_CHARS_PLUGIN_LOGO,Plg->Logo,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Plugin application key */ fprintf (Gbl.F.Out,""); @@ -461,7 +461,7 @@ static void Plg_ListPluginsForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg->AppKey,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Plugin URL */ fprintf (Gbl.F.Out,""); @@ -472,7 +472,7 @@ static void Plg_ListPluginsForEdition (void) " onchange=\"document.getElementById('%s').submit();\" />", Cns_MAX_CHARS_WWW,Plg->URL,Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Plugin IP */ fprintf (Gbl.F.Out,""); @@ -484,7 +484,7 @@ static void Plg_ListPluginsForEdition (void) Cns_MAX_CHARS_IP,Plg->IP, Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } diff --git a/swad_privacy.c b/swad_privacy.c index 32c0d738..74b06680 100644 --- a/swad_privacy.c +++ b/swad_privacy.c @@ -196,7 +196,7 @@ static void Pri_PutFormVisibility (const char *TxtLabel, fprintf (Gbl.F.Out,""); if (Action != ActUnk) Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } diff --git a/swad_profile.c b/swad_profile.c index 41d5c618..afc7a958 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -1735,7 +1735,7 @@ void Prf_GetAndShowRankingClicksPerDay (void) " style=\"height:50px;\">", Gbl.RowEvenOdd); Str_WriteFloatNum (Gbl.F.Out,NumClicksPerDay); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -1797,5 +1797,5 @@ static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank) Frm_EndForm (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } diff --git a/swad_project.c b/swad_project.c index db617a15..a9a3d10c 100644 --- a/swad_project.c +++ b/swad_project.c @@ -993,7 +993,7 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj, "DATE_BLUE", Gbl.RowEvenOdd); fprintf (Gbl.F.Out,"%u",NumIndex); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); break; default: break; @@ -1009,7 +1009,7 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj, fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd); fprintf (Gbl.F.Out,"\">"); Prj_PutFormsToRemEditOnePrj (Prj,Anchor,ICanViewProjectFiles); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); break; default: break; @@ -1071,7 +1071,7 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj, else fprintf (Gbl.F.Out,"%s",Prj->Title); Lay_EndArticle (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Department */ Prj_ShowOneProjectDepartment (Prj,ProjectView); @@ -1112,7 +1112,7 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj, Txt_No); Ico_PutIconOff (PreassignedNonpreassigImage[Prj->Preassigned], Txt_PROJECT_PREASSIGNED_NONPREASSIGNED_SINGUL[Prj->Preassigned]); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Number of students *****/ @@ -1162,27 +1162,27 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj, fprintf (Gbl.F.Out,"", Gbl.RowEvenOdd); Prj_PutIconToToggleProject (UniqueId,"angle-down.svg",Txt_See_more); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Tbl_StartRowAttr ("id=\"prj_con_%u\" style=\"display:none;\"",UniqueId); fprintf (Gbl.F.Out,"", Gbl.RowEvenOdd); Prj_PutIconToToggleProject (UniqueId,"angle-up.svg",Txt_See_less); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); break; case Prj_FILE_BROWSER_PROJECT: Tbl_StartRowAttr ("id=\"prj_exp_%u\"",UniqueId); fprintf (Gbl.F.Out,""); Prj_PutIconToToggleProject (UniqueId,"angle-down.svg",Txt_See_more); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Tbl_StartRowAttr ("id=\"prj_con_%u\" style=\"display:none;\"",UniqueId); fprintf (Gbl.F.Out,""); Prj_PutIconToToggleProject (UniqueId,"angle-up.svg",Txt_See_less); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); break; default: @@ -1411,7 +1411,7 @@ static void Prj_ShowOneProjectDepartment (const struct Project *Prj, fprintf (Gbl.F.Out,"%s",Dpt.FullName); if (PutLink) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -1560,7 +1560,7 @@ static void Prj_ShowOneProjectURL (const struct Project *Prj, fprintf (Gbl.F.Out,"%s",Prj->URL); if (PutLink) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -1720,7 +1720,7 @@ static void Prj_ShowOneProjectMembersWithARole (const struct Project *Prj, Prj_PutCurrentParams, "trash.svg", Txt_Remove); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /* Put user's photo */ @@ -1729,7 +1729,7 @@ static void Prj_ShowOneProjectMembersWithARole (const struct Project *Prj, Pho_ShowUsrPhoto (&Gbl.Usrs.Other.UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO21x28",Pho_ZOOM,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write user's name */ fprintf (Gbl.F.Out,"%s", @@ -1766,7 +1766,7 @@ static void Prj_ShowOneProjectMembersWithARole (const struct Project *Prj, Tbl_EndTable (); /***** End row with label and listing of users *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -1822,7 +1822,7 @@ static void Prj_ShowTableAllProjectsMembersWithARole (const struct Project *Prj, DB_FreeMySQLResult (&mysql_res); /***** End column with list of all members with this role *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -3354,7 +3354,7 @@ static void Prj_PutFormProject (struct Project *Prj,bool ItsANewProject) 0, // First option Txt_Another_department, // Text when no department selected false); // Don't submit on change - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /* Preassigned? */ diff --git a/swad_record.c b/swad_record.c index 9ff477a3..618aa71b 100644 --- a/swad_record.c +++ b/swad_record.c @@ -303,7 +303,7 @@ void Rec_ListFieldsRecordsForEdition (void) Par_PutHiddenParamLong ("FieldCod",Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod); Ico_PutIconRemove (); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Name of the field */ fprintf (Gbl.F.Out,""); @@ -316,7 +316,7 @@ void Rec_ListFieldsRecordsForEdition (void) Gbl.Crs.Records.LstFields.Lst[NumField].Name, Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Number of lines in the form */ fprintf (Gbl.F.Out,""); @@ -328,7 +328,7 @@ void Rec_ListFieldsRecordsForEdition (void) Gbl.Crs.Records.LstFields.Lst[NumField].NumLines, Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Visibility of a field */ fprintf (Gbl.F.Out,""); @@ -349,7 +349,7 @@ void Rec_ListFieldsRecordsForEdition (void) } fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } } @@ -380,7 +380,7 @@ void Rec_ShowFormCreateRecordField (void) Tbl_StartRow (); fprintf (Gbl.F.Out,""); Ico_PutIconRemovalNotAllowed (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Field name *****/ fprintf (Gbl.F.Out,"" @@ -1763,7 +1763,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView, UsrDat->FullName); Tbl_EndRow (); Tbl_EndTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Fields of the record that depends on the course *****/ @@ -1806,7 +1806,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView, TypeOfView == Rec_CRS_LIST_SEVERAL_RECORDS) fprintf (Gbl.F.Out," (%s)", Txt_RECORD_FIELD_VISIBILITY_RECORD[Gbl.Crs.Records.LstFields.Lst[NumField].Visibility]); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Get the text of the field */ if (Rec_GetFieldFromCrsRecord (UsrDat->UsrCod,Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod,&mysql_res)) @@ -1844,7 +1844,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView, else fprintf (Gbl.F.Out,"-"); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /* Free structure that stores the query result */ @@ -2442,7 +2442,7 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView, break; } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -2702,7 +2702,7 @@ static void Rec_ShowInstitutionInHead (struct Instit *Ins,bool PutFormLinks) Frm_EndForm (); } } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Institution name *****/ fprintf (Gbl.F.Out,""); @@ -2722,7 +2722,7 @@ static void Rec_ShowInstitutionInHead (struct Instit *Ins,bool PutFormLinks) Frm_EndForm (); } } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -2739,7 +2739,7 @@ static void Rec_ShowPhoto (struct UsrData *UsrDat) Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO186x248",Pho_ZOOM,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -2810,7 +2810,7 @@ static void Rec_ShowCountryInHead (struct UsrData *UsrDat,bool ShowData) /* Link to see country information */ Cty_WriteCountryName (UsrDat->CtyCod, "REC_DAT_BOLD"); // Put link to country - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -2823,7 +2823,7 @@ static void Rec_ShowWebsAndSocialNets (struct UsrData *UsrDat, fprintf (Gbl.F.Out,""); if (TypeOfView != Rec_SHA_RECORD_PRINT) Net_ShowWebsAndSocialNets (UsrDat); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -2853,7 +2853,7 @@ static void Rec_ShowEmail (struct UsrData *UsrDat,const char *ClassForm) fprintf (Gbl.F.Out,"********"); fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -2873,7 +2873,7 @@ static void Rec_ShowUsrIDs (struct UsrData *UsrDat,const char *ClassForm, "", ClassForm,Txt_ID); ID_WriteUsrIDs (UsrDat,Anchor); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3097,7 +3097,7 @@ static void Rec_ShowRole (struct UsrData *UsrDat, default: break; } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } else if (SexForm) @@ -3122,7 +3122,7 @@ static void Rec_ShowRole (struct UsrData *UsrDat, "", Usr_StringsSexIcons[Sex],Txt_SEX_SINGULAR_Abc[Sex]); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } else // RoleForm == false, SexForm == false @@ -3178,7 +3178,7 @@ static void Rec_ShowSurname1 (struct UsrData *UsrDat, } else if (UsrDat->Surname1[0]) fprintf (Gbl.F.Out,"%s",UsrDat->Surname1); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3210,7 +3210,7 @@ static void Rec_ShowSurname2 (struct UsrData *UsrDat, UsrDat->Surname2); else if (UsrDat->Surname2[0]) fprintf (Gbl.F.Out,"%s",UsrDat->Surname2); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3251,7 +3251,7 @@ static void Rec_ShowFirstName (struct UsrData *UsrDat, } else if (UsrDat->FirstName[0]) fprintf (Gbl.F.Out,"%s",UsrDat->FirstName); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3340,7 +3340,7 @@ static void Rec_ShowOriginPlace (struct UsrData *UsrDat, else if (UsrDat->OriginPlace[0]) fprintf (Gbl.F.Out,"%s",UsrDat->OriginPlace); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3371,7 +3371,7 @@ static void Rec_ShowDateOfBirth (struct UsrData *UsrDat, else if (UsrDat->StrBirthday[0]) fprintf (Gbl.F.Out,"%s",UsrDat->StrBirthday); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3405,7 +3405,7 @@ static void Rec_ShowLocalAddress (struct UsrData *UsrDat, else if (UsrDat->LocalAddress[0]) fprintf (Gbl.F.Out,"%s",UsrDat->LocalAddress); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3441,7 +3441,7 @@ static void Rec_ShowLocalPhone (struct UsrData *UsrDat, UsrDat->LocalPhone, UsrDat->LocalPhone); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3475,7 +3475,7 @@ static void Rec_ShowFamilyAddress (struct UsrData *UsrDat, else if (UsrDat->FamilyAddress[0]) fprintf (Gbl.F.Out,"%s",UsrDat->FamilyAddress); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3511,7 +3511,7 @@ static void Rec_ShowFamilyPhone (struct UsrData *UsrDat, UsrDat->FamilyPhone, UsrDat->FamilyPhone); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3546,7 +3546,7 @@ static void Rec_ShowComments (struct UsrData *UsrDat, fprintf (Gbl.F.Out,"%s",UsrDat->Comments); } } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3600,7 +3600,7 @@ static void Rec_ShowInstitution (struct Instit *Ins, if (Ins->WWW[0]) fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3635,7 +3635,7 @@ static void Rec_ShowCentre (struct UsrData *UsrDat, fprintf (Gbl.F.Out,""); } } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3670,7 +3670,7 @@ static void Rec_ShowDepartment (struct UsrData *UsrDat, fprintf (Gbl.F.Out,""); } } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3691,7 +3691,7 @@ static void Rec_ShowOffice (struct UsrData *UsrDat, ClassForm,Txt_Office); if (ShowData) fprintf (Gbl.F.Out,"%s",UsrDat->Tch.Office); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3714,7 +3714,7 @@ static void Rec_ShowOfficePhone (struct UsrData *UsrDat, fprintf (Gbl.F.Out,"%s", UsrDat->Tch.OfficePhone, UsrDat->Tch.OfficePhone); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -4026,7 +4026,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher) } fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Institution *****/ @@ -4070,7 +4070,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher) } fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); if (IAmATeacher) @@ -4116,7 +4116,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher) } fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Department *****/ @@ -4134,7 +4134,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher) "", // Text when no department selected true); // Submit on change Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Office *****/ @@ -4155,7 +4155,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher) Gbl.Usrs.Me.UsrDat.Tch.Office, Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Phone *****/ @@ -4177,7 +4177,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher) Gbl.Usrs.Me.UsrDat.Tch.OfficePhone, Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } diff --git a/swad_statistic.c b/swad_statistic.c index 02907961..58838a37 100644 --- a/swad_statistic.c +++ b/swad_statistic.c @@ -386,7 +386,7 @@ void Sta_AskShowCrsHits (void) Usr_ListUsersToSelect (Rol_NET); Usr_ListUsersToSelect (Rol_STD); Tbl_EndTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Initial and final dates of the search *****/ @@ -576,7 +576,7 @@ void Sta_AskShowGblHits (void) Gbl.Scope.Default = Hie_SYS; Sco_GetScope ("ScopeSta"); Sco_PutSelectorScope ("ScopeSta",false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Count type for the statistic *****/ @@ -1602,7 +1602,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql fprintf (Gbl.F.Out,"<%s", Txt_PAGES_Previous); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); if (FirstRow > 1) Frm_EndForm (); @@ -1639,13 +1639,13 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql "", Txt_PAGES_Next); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); if (LastRow < NumRows) Frm_EndForm (); Tbl_EndRow (); Tbl_EndTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Write heading *****/ @@ -1756,7 +1756,7 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql fprintf (Gbl.F.Out,"", Gbl.RowEvenOdd); Sta_WriteLogComments (LogCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -1864,7 +1864,7 @@ static void Sta_ShowNumHitsPerUsr (unsigned long NumRows,MYSQL_RES *mysql_res) Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO15x20",Pho_ZOOM,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write the user's ID if user is a student in current course */ fprintf (Gbl.F.Out,"", @@ -2126,7 +2126,7 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES fprintf (Gbl.F.Out,"" ""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Compute maximum number of pages generated per day-hour *****/ @@ -2164,7 +2164,7 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES " style=\"width:%upx;\">", GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH); Sta_DrawBarColors (SelectedColorType,Hits.Max); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Tbl_StartRow (); @@ -2385,14 +2385,14 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,float HitsMax) GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5, GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5); Str_WriteFloatNum (Gbl.F.Out,(float) Interval * HitsMax / 5.0); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } fprintf (Gbl.F.Out,"", (GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2, (GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2); Str_WriteFloatNum (Gbl.F.Out,HitsMax); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Tbl_StartRow (); @@ -3057,7 +3057,7 @@ static void Sta_WriteLabelsXAxisAccMin (float IncX,const char *Format) " style=\"width:%upx;\">", Sta_WIDTH_DIVISION_GRAPHIC); fprintf (Gbl.F.Out,Format,NumX); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } Tbl_EndRow (); } @@ -3130,7 +3130,7 @@ static void Sta_WriteAccessMinute (unsigned Minute,float HitsNum,float MaxX) BarWidth); /***** End cell of graphic and end row *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3473,7 +3473,7 @@ static void Sta_WriteCountry (long CtyCod) fprintf (Gbl.F.Out," - "); /***** End cell *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -3569,7 +3569,7 @@ static void Sta_WriteInstitution (long InsCod) fprintf (Gbl.F.Out,"> - "); /***** End cell *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -3665,7 +3665,7 @@ static void Sta_WriteCentre (long CtrCod) fprintf (Gbl.F.Out,"> - "); /***** End cell *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -3761,7 +3761,7 @@ static void Sta_WriteDegree (long DegCod) fprintf (Gbl.F.Out,"> - "); /***** End cell *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -3863,7 +3863,7 @@ static void Sta_ShowNumHitsPerCourse (unsigned long NumRows, fprintf (Gbl.F.Out," "); if (CrsOK) Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Draw bar proportional to number of hits */ Hits.Num = Str_GetFloatNumFromStr (row[1]); @@ -4243,7 +4243,7 @@ void Sta_GetAndShowLastClicks (void) if (row[8]) if (row[8][0]) fprintf (Gbl.F.Out,"%s",row[8]); // Action - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } Tbl_EndTable (); diff --git a/swad_survey.c b/swad_survey.c index 86bded60..dedc35fc 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -467,7 +467,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, fprintf (Gbl.F.Out,"\">"); if (Svy.Status.ICanEdit) Svy_PutFormsToRemEditOneSvy (&Svy,Anchor); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Start date/time */ UniqueId++; @@ -576,7 +576,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, } } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Write second row of data of this survey *****/ @@ -667,7 +667,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, Tbl_StartRow (); fprintf (Gbl.F.Out,""); Svy_ListSvyQuestions (&Svy,SvyQst); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -1867,7 +1867,7 @@ void Svy_RequestCreatOrEditSvy (void) Svy_SetDefaultAndAllowedScope (&Svy); Sco_GetScope ("ScopeSvy"); Sco_PutSelectorScope ("ScopeSvy",false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Survey title *****/ @@ -1916,7 +1916,7 @@ void Svy_RequestCreatOrEditSvy (void) 1 << Rol_TCH, Svy.Roles, false,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Groups *****/ @@ -2070,7 +2070,7 @@ static void Svy_ShowLstGrpsToEditSurvey (long SvyCod) /***** End table and box *****/ Box_EndBoxTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -2716,7 +2716,7 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst, "
", Txt_SURVEY_STR_ANSWER_TYPES[AnsType]); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Answers *****/ @@ -2750,7 +2750,7 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst, Tbl_EndRow (); } Tbl_EndTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); @@ -3240,7 +3240,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy, Svy_CurrentQstCod = SvyQst->QstCod; Ico_PutContextualIconToEdit (ActEdiOneSvyQst,Svy_PutParamsToEditQuestion); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /* Write index of question inside survey (row[1]) */ @@ -3264,7 +3264,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy, Gbl.RowEvenOdd); Svy_WriteQstStem (row[3]); Svy_WriteAnswersOfAQst (Svy,SvyQst,PutFormAnswerSurvey); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } diff --git a/swad_syllabus.c b/swad_syllabus.c index a7f5fbcd..a3fc4c72 100644 --- a/swad_syllabus.c +++ b/swad_syllabus.c @@ -617,7 +617,7 @@ static void Syl_ShowRowSyllabus (unsigned NumItem, Ico_PutIconRemove (); Frm_EndForm (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Icon to get up an item *****/ Syl_CalculateUpSubtreeSyllabus (&Subtree,NumItem); @@ -636,7 +636,7 @@ static void Syl_ShowRowSyllabus (unsigned NumItem, } else Ico_PutIconOff ("arrow-up.svg",Txt_Movement_not_allowed); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Icon to get down item *****/ Syl_CalculateDownSubtreeSyllabus (&Subtree,NumItem); @@ -655,7 +655,7 @@ static void Syl_ShowRowSyllabus (unsigned NumItem, } else Ico_PutIconOff ("arrow-down.svg",Txt_Movement_not_allowed); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Icon to increase the level of an item *****/ fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); @@ -672,7 +672,7 @@ static void Syl_ShowRowSyllabus (unsigned NumItem, } else Ico_PutIconOff ("arrow-left.svg",Txt_Movement_not_allowed); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Icon to decrease level item *****/ fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); @@ -690,7 +690,7 @@ static void Syl_ShowRowSyllabus (unsigned NumItem, } else Ico_PutIconOff ("arrow-right.svg",Txt_Movement_not_allowed); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); LastLevel = Level; } @@ -925,7 +925,7 @@ static void Syl_PutFormItemSyllabus (bool NewItem,unsigned NumItem,int Level,int fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\" />", Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ diff --git a/swad_table.c b/swad_table.c index 08b87c28..a5646e59 100644 --- a/swad_table.c +++ b/swad_table.c @@ -213,6 +213,12 @@ void Tbl_EndRow (void) /********************************* Table cells *******************************/ /*****************************************************************************/ +void Tbl_EndCell (void) + { + fprintf (Gbl.F.Out, + ""); + } + void Tbl_PutEmptyCells (unsigned NumColumns) { unsigned NumCol; diff --git a/swad_table.h b/swad_table.h index 726e9271..e0b77ab7 100644 --- a/swad_table.h +++ b/swad_table.h @@ -40,25 +40,21 @@ /*****************************************************************************/ void Tbl_StartTableClass (const char *fmt,...); - void Tbl_StartTablePadding (unsigned CellPadding); void Tbl_StartTable (void); - void Tbl_StartTableCenterPadding (unsigned CellPadding); void Tbl_StartTableCenter (void); - void Tbl_StartTableWidePadding (unsigned CellPadding); void Tbl_StartTableWide (void); - void Tbl_StartTableWideMarginPadding (unsigned CellPadding); void Tbl_StartTableWideMargin (void); - void Tbl_EndTable (void); void Tbl_StartRowAttr (const char *fmt,...); void Tbl_StartRow (void); void Tbl_EndRow (void); +void Tbl_EndCell (void); void Tbl_PutEmptyCells (unsigned NumColumns); void Tbl_PutEmptyColouredCells (unsigned NumColumns); diff --git a/swad_test.c b/swad_test.c index 41a424b8..8d1e6d97 100644 --- a/swad_test.c +++ b/swad_test.c @@ -1078,7 +1078,7 @@ static void Tst_WriteQstAndAnsTest (Tst_ActionToDoWithQuestions_t ActionToDoWith default: break; } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Destroy test question *****/ @@ -1770,7 +1770,7 @@ static void Tst_ShowFormSelTags (unsigned long NumRows,MYSQL_RES *mysql_res, } Tbl_EndTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -1826,7 +1826,7 @@ static void Tst_ShowFormEditTags (void) " onchange=\"document.getElementById('%s').submit();\" />", Tst_MAX_CHARS_TAG,row[1],Gbl.Form.Id); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -1856,7 +1856,7 @@ static void Tst_PutIconEnable (long TagCod,const char *TagTxt) TagTxt); Ico_PutIconLink ("eye-slash.svg",Gbl.Title); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -1875,7 +1875,7 @@ static void Tst_PutIconDisable (long TagCod,const char *TagTxt) TagTxt); Ico_PutIconLink ("eye.svg",Gbl.Title); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /*****************************************************************************/ @@ -1933,7 +1933,7 @@ static void Tst_ShowFormConfigTst (void) "
", Txt_TST_PLUGGABLE[Pluggable]); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Number of questions *****/ @@ -1952,7 +1952,7 @@ static void Tst_ShowFormConfigTst (void) Tst_PutInputFieldNumQst ("NumQstMax",Txt_maximum, Gbl.Test.Config.Max); // Maximum number of questions Tbl_EndTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Minimum time between consecutive tests, per question *****/ @@ -1994,7 +1994,7 @@ static void Tst_ShowFormConfigTst (void) "
", Txt_TST_STR_FEEDBACK[Feedback]); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); Tbl_EndTable (); @@ -2366,7 +2366,7 @@ static void Tst_ShowFormAnswerTypes (unsigned NumCols) } Tbl_EndTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -2903,7 +2903,7 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows, /* Write icon to edit the question */ Ico_PutContextualIconToEdit (ActEdiOneTstQst,Tst_PutParamQstCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write number of question */ fprintf (Gbl.F.Out,"" @@ -2940,7 +2940,7 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows, fprintf (Gbl.F.Out,"", Gbl.RowEvenOdd); Tst_GetAndWriteTagsQst (Gbl.Test.QstCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write if shuffle is enabled (row[3]) */ fprintf (Gbl.F.Out,"", @@ -2962,7 +2962,7 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows, Gbl.Form.Id); Frm_EndForm (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write stem (row[4]) */ fprintf (Gbl.F.Out,"", @@ -2979,7 +2979,7 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows, /* Write feedback (row[5]) and answers */ Tst_WriteQstFeedback (row[5],"TEST_EDI_LIGHT"); Tst_WriteAnswersEdit (Gbl.Test.QstCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Get number of hits (number of times that the question has been answered, @@ -3013,7 +3013,7 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows, (double) NumHitsThisQst); else fprintf (Gbl.F.Out,"N.A."); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write number of times this question has been answered (not blank) */ fprintf (Gbl.F.Out,"" @@ -3030,7 +3030,7 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows, (double) NumHitsNotBlankThisQst); else fprintf (Gbl.F.Out,"N.A."); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Destroy test question *****/ @@ -3178,7 +3178,7 @@ static void Tst_ListOneOrMoreQuestionsForSelection (unsigned long NumRows, fprintf (Gbl.F.Out,"", Gbl.RowEvenOdd); Tst_GetAndWriteTagsQst (Gbl.Test.QstCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write the question type (row[2]) */ Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]); @@ -3197,7 +3197,7 @@ static void Tst_ListOneOrMoreQuestionsForSelection (unsigned long NumRows, fprintf (Gbl.F.Out," checked=\"checked\""); fprintf (Gbl.F.Out," disabled=\"disabled\" />"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write stem (row[4]) */ fprintf (Gbl.F.Out,"", @@ -3216,7 +3216,7 @@ static void Tst_ListOneOrMoreQuestionsForSelection (unsigned long NumRows, /* Write answers */ Tst_WriteAnswersEdit (Gbl.Test.QstCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Destroy test question *****/ @@ -3424,7 +3424,7 @@ void Tst_WriteAnswersEdit (long QstCod) Cfg_URL_ICON_PUBLIC, Txt_TST_Answer_given_by_the_teachers, Txt_TST_Answer_given_by_the_teachers); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write the number of option */ fprintf (Gbl.F.Out,"" @@ -3669,7 +3669,7 @@ static void Tst_WriteTFAnsAssessTest (struct UsrData *UsrDat, "ANS_BAD") : "ANS_0"); Tst_WriteAnsTF (AnsTF); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write the correct answer *****/ fprintf (Gbl.F.Out,""); @@ -3678,7 +3678,7 @@ static void Tst_WriteTFAnsAssessTest (struct UsrData *UsrDat, Tst_WriteAnsTF (row[1][0]); else fprintf (Gbl.F.Out,"?"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Write the mark *****/ @@ -3797,7 +3797,7 @@ static void Tst_WriteChoiceAnsViewTest (unsigned NumQst,long QstCod,bool Shuffle Med_ShowMedia (&Gbl.Test.Answer.Options[NumOpt].Media, "TEST_MED_SHOW_CONTAINER", "TEST_MED_SHOW"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -3917,7 +3917,7 @@ static void Tst_WriteChoiceAnsAssessTest (struct UsrData *UsrDat, "%s" "", Gbl.Test.Answer.Options[Indexes[NumOpt]].Feedback); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -4236,7 +4236,7 @@ static void Tst_WriteChoiceAnsViewMatch (long MchCod,unsigned QstInd,long QstCod NumAnswerersQst, Gbl.Test.Answer.Options[Indexes[NumOpt]].Correct); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** End row for this option *****/ Tbl_EndRow (); @@ -4362,7 +4362,7 @@ static void Tst_WriteTextAnsAssessTest (struct UsrData *UsrDat, } else // If user has omitted the answer fprintf (Gbl.F.Out,">"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write the correct answers *****/ if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD || @@ -4394,7 +4394,7 @@ static void Tst_WriteTextAnsAssessTest (struct UsrData *UsrDat, "%s" "", Gbl.Test.Answer.Options[NumOpt].Feedback); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -4403,7 +4403,7 @@ static void Tst_WriteTextAnsAssessTest (struct UsrData *UsrDat, else fprintf (Gbl.F.Out,"" "?"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Compute the mark *****/ @@ -4506,7 +4506,7 @@ static void Tst_WriteIntAnsAssessTest (struct UsrData *UsrDat, } else // If user has omitted the answer fprintf (Gbl.F.Out,">"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write the correct answer *****/ fprintf (Gbl.F.Out,""); @@ -4515,7 +4515,7 @@ static void Tst_WriteIntAnsAssessTest (struct UsrData *UsrDat, fprintf (Gbl.F.Out,"%ld",IntAnswerCorr); else fprintf (Gbl.F.Out,"?"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Compute the score *****/ @@ -4628,7 +4628,7 @@ static void Tst_WriteFloatAnsAssessTest (struct UsrData *UsrDat, } else // If user has omitted the answer fprintf (Gbl.F.Out,">"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write the correct answer *****/ fprintf (Gbl.F.Out,""); @@ -4637,7 +4637,7 @@ static void Tst_WriteFloatAnsAssessTest (struct UsrData *UsrDat, fprintf (Gbl.F.Out,"[%lg; %lg]",FloatAnsCorr[0],FloatAnsCorr[1]); else fprintf (Gbl.F.Out,"?"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Compute mark *****/ @@ -5074,7 +5074,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1], Tbl_StartRow (); fprintf (Gbl.F.Out,""); Lay_HelpPlainEditor (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Get tags already existing for questions in current course *****/ @@ -5142,7 +5142,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1], } Tbl_EndTable (); // Table for tags - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /* Free structure that stores the query result */ @@ -5202,7 +5202,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1], "
", Txt_TST_STR_ANSWER_TYPES[AnsType]); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Answers *****/ @@ -5234,7 +5234,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1], Gbl.Test.Answer.FloatingPoint[0]); Tst_PutFloatInputField (Txt_Real_number_between_A_and_B_2,"AnsFloatMax", Gbl.Test.Answer.FloatingPoint[1]); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /* T/F answer */ @@ -5243,7 +5243,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1], fprintf (Gbl.F.Out,""); Tst_PutTFInputField (Txt_TF_QST[0],'T'); Tst_PutTFInputField (Txt_TF_QST[1],'F'); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /* Questions can be shuffled? */ @@ -5313,7 +5313,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1], fprintf (Gbl.F.Out," checked=\"checked\""); fprintf (Gbl.F.Out," />"); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Center column: letter of the answer and expand / contract icon *****/ fprintf (Gbl.F.Out,"" @@ -5349,7 +5349,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1], NumOpt,Cfg_URL_ICON_PUBLIC, Gbl.Title,Gbl.Title); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Right column: content of the answer *****/ fprintf (Gbl.F.Out,"" @@ -5397,7 +5397,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1], Tbl_EndRow (); } Tbl_EndTable (); // Table with choice answers - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** End table *****/ @@ -7465,7 +7465,7 @@ void Tst_SelUsrsToViewUsrsTstResults (void) Usr_ListUsersToSelect (Rol_NET); Usr_ListUsersToSelect (Rol_STD); Tbl_EndTable (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Starting and ending dates in the search *****/ @@ -7830,21 +7830,21 @@ static void Tst_ShowTstResults (struct UsrData *UsrDat) ClassDat,Gbl.RowEvenOdd); if (ICanViewTest) fprintf (Gbl.F.Out,"%u",NumQstsInThisTest); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write number of questions not blank */ fprintf (Gbl.F.Out,"", ClassDat,Gbl.RowEvenOdd); if (ICanViewTest) fprintf (Gbl.F.Out,"%u",NumQstsNotBlankInThisTest); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write score */ fprintf (Gbl.F.Out,"", ClassDat,Gbl.RowEvenOdd); if (ICanViewScore) fprintf (Gbl.F.Out,"%.2lf",ScoreInThisTest); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write average score per question */ fprintf (Gbl.F.Out,"", @@ -7853,7 +7853,7 @@ static void Tst_ShowTstResults (struct UsrData *UsrDat) fprintf (Gbl.F.Out,"%.2lf", NumQstsInThisTest ? ScoreInThisTest / (double) NumQstsInThisTest : 0.0); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write score over Tst_SCORE_MAX */ fprintf (Gbl.F.Out,"", @@ -7862,7 +7862,7 @@ static void Tst_ShowTstResults (struct UsrData *UsrDat) fprintf (Gbl.F.Out,"%.2lf", NumQstsInThisTest ? ScoreInThisTest * Tst_SCORE_MAX / (double) NumQstsInThisTest : 0.0); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Link to show this result */ fprintf (Gbl.F.Out,"", @@ -7875,7 +7875,7 @@ static void Tst_ShowTstResults (struct UsrData *UsrDat) Ico_PutIconLink ("tasks.svg",Txt_View_test); Frm_EndForm (); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); if (Gbl.Test.AllowTeachers) @@ -7968,21 +7968,21 @@ static void Tst_ShowTestResultsSummaryRow (bool ItsMe, Gbl.RowEvenOdd); if (NumExams) fprintf (Gbl.F.Out,"%u",NumTotalQsts); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write total number of questions not blank *****/ fprintf (Gbl.F.Out,"", Gbl.RowEvenOdd); if (NumExams) fprintf (Gbl.F.Out,"%u",NumTotalQstsNotBlank); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write total score *****/ fprintf (Gbl.F.Out,"", Gbl.RowEvenOdd); if (ICanViewTotalScore) fprintf (Gbl.F.Out,"%.2lf",TotalScoreOfAllTests); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write average score per question *****/ fprintf (Gbl.F.Out,"", @@ -7991,7 +7991,7 @@ static void Tst_ShowTestResultsSummaryRow (bool ItsMe, fprintf (Gbl.F.Out,"%.2lf", NumTotalQsts ? TotalScoreOfAllTests / (double) NumTotalQsts : 0.0); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write score over Tst_SCORE_MAX *****/ fprintf (Gbl.F.Out,"", @@ -8001,7 +8001,7 @@ static void Tst_ShowTestResultsSummaryRow (bool ItsMe, NumTotalQsts ? TotalScoreOfAllTests * Tst_SCORE_MAX / (double) NumTotalQsts : 0.0); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Last cell *****/ fprintf (Gbl.F.Out,"", @@ -8136,7 +8136,7 @@ void Tst_ShowOneTstResult (void) Pho_ShowUsrPhoto (&Gbl.Usrs.Other.UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO45x60",Pho_ZOOM,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /* Test date */ @@ -8192,7 +8192,7 @@ void Tst_ShowOneTstResult (void) "", Txt_Tags); Tst_ShowTstTagsPresentInATestResult (TstCod); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Write answers and solutions *****/ diff --git a/swad_test_import.c b/swad_test_import.c index a1d74111..48453db2 100644 --- a/swad_test_import.c +++ b/swad_test_import.c @@ -1037,7 +1037,7 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem, ClassData,Gbl.RowEvenOdd); if (!QuestionExists) fprintf (Gbl.F.Out,"%u ",++NumNonExistingQst); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write the question tags *****/ fprintf (Gbl.F.Out,"", @@ -1067,7 +1067,7 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem, fprintf (Gbl.F.Out," (%s) ", ClassData,Txt_no_tags); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write the question type *****/ fprintf (Gbl.F.Out,"" @@ -1091,7 +1091,7 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem, Txt_TST_Answer_given_by_the_teachers, QuestionExists ? "ICO_HIDDEN " : ""); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write the stem and the answers *****/ fprintf (Gbl.F.Out,"", @@ -1161,7 +1161,7 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem, Txt_TST_Answer_given_by_the_teachers, QuestionExists ? "ICO_HIDDEN " : ""); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Write the number of option */ fprintf (Gbl.F.Out,"" @@ -1180,7 +1180,7 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem, "%s" "", AnswerFeedback); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /* Free memory allocated for the answer and the feedback */ @@ -1193,6 +1193,6 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem, default: break; } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } diff --git a/swad_timetable.c b/swad_timetable.c index 2213b981..e4a70364 100644 --- a/swad_timetable.c +++ b/swad_timetable.c @@ -1713,5 +1713,5 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co Frm_EndForm (); /***** End cell *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } diff --git a/swad_user.c b/swad_user.c index dbb1392b..d0113247 100644 --- a/swad_user.c +++ b/swad_user.c @@ -3647,7 +3647,7 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat, { fprintf (Gbl.F.Out,"",BgColor); Usr_PutCheckboxToSelectUser (Role,UsrDat->EncryptedUsrCod,UsrIsTheMsgSender); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /***** User has accepted enrolment? *****/ @@ -3683,7 +3683,7 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat, Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO21x28",Pho_ZOOM,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /****** Write user's IDs ******/ @@ -3692,7 +3692,7 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat, "DAT_SMALL", BgColor); ID_WriteUsrIDs (UsrDat,NULL); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Write rest of main user's data *****/ Ins.InsCod = UsrDat->InsCod; @@ -3700,7 +3700,7 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat, Usr_WriteMainUsrDataExceptUsrID (UsrDat,BgColor); fprintf (Gbl.F.Out,"",BgColor); Ins_DrawInstitutionLogoWithLink (&Ins,25); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** End row *****/ Tbl_EndRow (); @@ -3730,7 +3730,7 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat) Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO21x28",Pho_NO_ZOOM,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /****** Write user's ID ******/ @@ -3832,7 +3832,7 @@ static void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames) Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO21x28",Pho_NO_ZOOM,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /****** Write user's ID ******/ @@ -3951,7 +3951,7 @@ static void Usr_WriteRowTchAllData (struct UsrData *UsrDat) Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO21x28",Pho_NO_ZOOM,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /****** Write the user's ID ******/ @@ -4030,7 +4030,7 @@ static void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat) Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO21x28",Pho_ZOOM,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } /****** Write the user's ID ******/ @@ -4047,7 +4047,7 @@ static void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat) Usr_WriteMainUsrDataExceptUsrID (UsrDat,Gbl.ColorRows[Gbl.RowEvenOdd]); fprintf (Gbl.F.Out,"",Gbl.ColorRows[Gbl.RowEvenOdd]); Ins_DrawInstitutionLogoWithLink (&Ins,25); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** Write degrees which are administrated by this administrator *****/ @@ -6558,7 +6558,7 @@ static void Usr_ListMainDataStds (bool PutCheckBoxToSelectUsr) fprintf (Gbl.F.Out,"", 1 + Usr_NUM_MAIN_FIELDS_DATA_USR); Grp_WriteNamesOfSelectedGrps (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -6887,7 +6887,7 @@ void Usr_ListAllDataStds (void) fprintf (Gbl.F.Out,"", NumColumnsTotal); Grp_WriteNamesOfSelectedGrps (); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -7251,7 +7251,7 @@ unsigned Usr_ListUsrsFound (Rol_Role_t Role, } else Crs_GetAndWriteCrssOfAUsr (&UsrDat,Role); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); } @@ -8981,7 +8981,7 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType, fprintf (Gbl.F.Out,""); /***** End user's cell *****/ - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); if ((++NumUsr % Gbl.Usrs.ClassPhoto.Cols) == 0) { @@ -9749,7 +9749,7 @@ void Usr_ShowTableCellWithUsrData (struct UsrData *UsrDat,unsigned NumRows) Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO45x60",Pho_ZOOM,false); - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Start form to go to user's record card *****/ fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } diff --git a/swad_zip.c b/swad_zip.c index 6cbdbbbb..1fd1161e 100644 --- a/swad_zip.c +++ b/swad_zip.c @@ -618,7 +618,7 @@ static void ZIP_ShowLinkToDownloadZIP (const char *FileName,const char *URL, fprintf (Gbl.F.Out," (%s %s)", FileSizeStr,Txt_FILE_uncompressed); } - fprintf (Gbl.F.Out,""); + Tbl_EndCell (); Tbl_EndRow (); /***** End table and box *****/