From f38ad3fbdac6811c78a36913f22cc106642e5ba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sun, 10 Nov 2019 12:36:37 +0100 Subject: [PATCH] Version19.61 --- swad_HTML.c | 15 ++++++-- swad_HTML.h | 2 ++ swad_ID.c | 4 +-- swad_agenda.c | 10 +++--- swad_alert.c | 2 +- swad_announcement.c | 4 +-- swad_assignment.c | 10 +++--- swad_attendance.c | 30 ++++++++-------- swad_box.c | 2 +- swad_button.c | 12 +++---- swad_centre.c | 36 +++++++++---------- swad_changelog.h | 3 +- swad_chat.c | 4 +-- swad_classroom.c | 10 +++--- swad_cookie.c | 3 +- swad_country.c | 26 +++++++------- swad_course.c | 50 ++++++++++++-------------- swad_database.c | 2 +- swad_degree.c | 30 ++++++++-------- swad_degree_type.c | 4 +-- swad_department.c | 8 ++--- swad_enrolment.c | 27 +++++++------- swad_exam.c | 39 ++++++++++---------- swad_figure.c | 87 ++++++++++++++++++++++----------------------- swad_file_browser.c | 32 ++++++++--------- swad_follow.c | 6 ++-- swad_form.c | 3 +- swad_forum.c | 8 ++--- swad_game.c | 12 +++---- swad_group.c | 12 +++---- swad_hierarchy.c | 33 ++++++++--------- swad_holiday.c | 7 ++-- swad_indicator.c | 64 ++++++++++++++++----------------- swad_info.c | 10 +++--- swad_institution.c | 28 +++++++-------- swad_layout.c | 18 +++++----- swad_link.c | 2 +- swad_mail.c | 10 +++--- swad_match.c | 12 +++---- swad_match_result.c | 4 +-- swad_media.c | 8 ++--- swad_menu.c | 2 +- swad_message.c | 26 +++++++------- swad_network.c | 2 +- swad_notice.c | 4 +-- swad_notification.c | 8 ++--- swad_pagination.c | 2 +- swad_password.c | 2 +- swad_photo.c | 9 +++-- swad_place.c | 8 ++--- swad_plugin.c | 2 +- swad_privacy.c | 2 +- swad_project.c | 38 ++++++++++---------- swad_record.c | 59 +++++++++++++++--------------- swad_report.c | 7 ++-- swad_role.c | 2 +- swad_statistic.c | 23 ++++++------ swad_survey.c | 42 +++++++++++----------- swad_syllabus.c | 4 +-- swad_tab.c | 2 +- swad_test.c | 77 ++++++++++++++++++++------------------- swad_test_import.c | 6 ++-- swad_timeline.c | 12 +++---- swad_timetable.c | 17 +++++---- swad_user.c | 33 +++++++++-------- swad_zip.c | 4 +-- 66 files changed, 536 insertions(+), 546 deletions(-) diff --git a/swad_HTML.c b/swad_HTML.c index dd3f3abe..35e7dfdd 100644 --- a/swad_HTML.c +++ b/swad_HTML.c @@ -290,7 +290,7 @@ void HTM_TH (unsigned RowSpan,unsigned ColSpan,const char *Class,const char *Txt HTM_TH_Begin (RowSpan,ColSpan,Class); if (Txt) if (Txt[0]) - fprintf (Gbl.F.Out,"%s",Txt); + HTM_Txt (Txt); HTM_TH_End (); } @@ -1413,7 +1413,7 @@ void HTM_OPTION (HTM_Type_t Type,const void *ValuePtr,bool Selected,bool Disable fprintf (Gbl.F.Out,"%ld",*((long *) ValuePtr)); break; case HTM_Type_STRING: - fprintf (Gbl.F.Out,"%s",(char *) ValuePtr); + HTM_Txt ((char *) ValuePtr); break; } fprintf (Gbl.F.Out,"\""); @@ -1437,7 +1437,7 @@ void HTM_OPTION (HTM_Type_t Type,const void *ValuePtr,bool Selected,bool Disable Lay_NotEnoughMemoryExit (); /***** Print HTML *****/ - fprintf (Gbl.F.Out,"%s",Content); + HTM_Txt (Content); free (Content); } @@ -1504,3 +1504,12 @@ void HTM_BR (void) { fprintf (Gbl.F.Out,"
"); } + +/*****************************************************************************/ +/********************************** Text *************************************/ +/*****************************************************************************/ + +void HTM_Txt (const char *Txt) + { + fprintf (Gbl.F.Out,"%s",Txt); + } diff --git a/swad_HTML.h b/swad_HTML.h index 1655e20f..c938bb36 100644 --- a/swad_HTML.h +++ b/swad_HTML.h @@ -149,4 +149,6 @@ void HTM_IMG (const char *URL,const char *Icon,const char *Title, void HTM_BR (void); +void HTM_Txt (const char *Txt); + #endif diff --git a/swad_ID.c b/swad_ID.c index 103e73db..7f50ec9e 100644 --- a/swad_ID.c +++ b/swad_ID.c @@ -390,9 +390,9 @@ void ID_WriteUsrIDs (struct UsrData *UsrDat,const char *Anchor) UsrDat->IDs.List[NumID].Confirmed ? "USR_ID_C" : "USR_ID_NC"); if (ICanSeeUsrID) - fprintf (Gbl.F.Out,"%s",UsrDat->IDs.List[NumID].ID); + HTM_Txt (UsrDat->IDs.List[NumID].ID); else - fprintf (Gbl.F.Out,"********"); + HTM_Txt ("********"); HTM_SPAN_End (); if (ICanConfirmUsrID && diff --git a/swad_agenda.c b/swad_agenda.c index 1241e8b4..1eb61a45 100644 --- a/swad_agenda.c +++ b/swad_agenda.c @@ -592,7 +592,7 @@ static void Agd_WriteHeaderListEvents (Agd_AgendaType_t AgendaType) Frm_LinkFormSubmit (Txt_START_END_TIME_HELP[Order],"TIT_TBL",NULL); if (Order == Gbl.Agenda.SelectedOrder) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,"%s",Txt_START_END_TIME[Order]); + HTM_Txt (Txt_START_END_TIME[Order]); if (Order == Gbl.Agenda.SelectedOrder) fprintf (Gbl.F.Out,""); Frm_LinkFormEnd (); @@ -767,7 +767,7 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod) "ASG_TITLE", Gbl.RowEvenOdd); HTM_ARTICLE_Begin (Anchor); - fprintf (Gbl.F.Out,"%s",AgdEvent.Event); + HTM_Txt (AgdEvent.Event); HTM_ARTICLE_End (); HTM_TD_End (); @@ -775,7 +775,7 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod) HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd); HTM_DIV_Begin ("class=\"%s\"",AgdEvent.Hidden ? "ASG_TITLE_LIGHT" : "ASG_TITLE"); - fprintf (Gbl.F.Out,"%s",AgdEvent.Location); + HTM_Txt (AgdEvent.Location); HTM_DIV_End (); HTM_TD_End (); @@ -806,7 +806,7 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod) HTM_TD_Begin ("colspan=\"2\" class=\"LT COLOR%u\"",Gbl.RowEvenOdd); HTM_DIV_Begin ("class=\"PAR %s\"",AgdEvent.Hidden ? "DAT_LIGHT" : "DAT"); - fprintf (Gbl.F.Out,"%s",Txt); + HTM_Txt (Txt); HTM_DIV_End (); HTM_TD_End (); @@ -1544,7 +1544,7 @@ void Agd_RequestCreatOrEditEvent (void) HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" cols=\"60\" rows=\"10\""); if (!ItsANewEvent) - fprintf (Gbl.F.Out,"%s",Txt); + HTM_Txt (Txt); HTM_TEXTAREA_End (); HTM_TD_End (); diff --git a/swad_alert.c b/swad_alert.c index 3d881cd6..a41e14d2 100644 --- a/swad_alert.c +++ b/swad_alert.c @@ -432,7 +432,7 @@ static void Ale_ShowFixAlertAndButton1 (Ale_AlertType_t AlertType,const char *Tx else HTM_DIV_Begin ("class=\"ALERT_TXT\" style=\"background-image:url('%s/%s');\"", Cfg_URL_ICON_PUBLIC,Ale_AlertIcons[AlertType]); - fprintf (Gbl.F.Out,"%s",Txt); + HTM_Txt (Txt); HTM_DIV_End (); } diff --git a/swad_announcement.c b/swad_announcement.c index 67d3f92a..66d88fe2 100644 --- a/swad_announcement.c +++ b/swad_announcement.c @@ -324,12 +324,12 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status, /***** Write the subject of the announcement *****/ HTM_DIV_Begin ("class=\"%s\"",SubjectClass[Status]); - fprintf (Gbl.F.Out,"%s",Subject); + HTM_Txt (Subject); HTM_DIV_End (); /***** Write the content of the announcement *****/ HTM_DIV_Begin ("class=\"%s\"",ContentClass[Status]); - fprintf (Gbl.F.Out,"%s",Content); + HTM_Txt (Content); HTM_DIV_End (); /***** Write form *****/ diff --git a/swad_assignment.c b/swad_assignment.c index ab762d75..ceaede0d 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -223,7 +223,7 @@ static void Asg_PutHeadForSeeing (bool PrintView) if (Order == Gbl.Asgs.SelectedOrder) fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,"%s",Txt_START_END_TIME[Order]); + HTM_Txt (Txt_START_END_TIME[Order]); if (!PrintView) { if (Order == Gbl.Asgs.SelectedOrder) @@ -408,7 +408,7 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView) "ASG_TITLE", Gbl.RowEvenOdd); HTM_ARTICLE_Begin (Anchor); - fprintf (Gbl.F.Out,"%s",Asg.Title); + HTM_Txt (Asg.Title); HTM_ARTICLE_End (); HTM_TD_End (); @@ -448,7 +448,7 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView) Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (&Asg); HTM_DIV_Begin ("class=\"PAR %s\"",Asg.Hidden ? "DAT_LIGHT" : "DAT"); - fprintf (Gbl.F.Out,"%s",Txt); + HTM_Txt (Txt); HTM_DIV_End (); HTM_TD_End (); @@ -537,7 +537,7 @@ static void Asg_WriteAssignmentFolder (struct Assignment *Asg,bool PrintView) Txt_Folder); /***** Folder name *****/ - fprintf (Gbl.F.Out,"%s",Asg->Folder); + HTM_Txt (Asg->Folder); } /*****************************************************************************/ @@ -1212,7 +1212,7 @@ void Asg_RequestCreatOrEditAsg (void) HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" cols=\"60\" rows=\"10\""); if (!ItsANewAssignment) - fprintf (Gbl.F.Out,"%s",Txt); + HTM_Txt (Txt); HTM_TEXTAREA_End (); HTM_TD_End (); diff --git a/swad_attendance.c b/swad_attendance.c index e30c09ca..1ddc7b41 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -256,7 +256,7 @@ static void Att_ShowAllAttEvents (void) Frm_LinkFormSubmit (Txt_START_END_TIME_HELP[Order],"TIT_TBL",NULL); if (Order == Gbl.AttEvents.SelectedOrder) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,"%s",Txt_START_END_TIME[Order]); + HTM_Txt (Txt_START_END_TIME[Order]); if (Order == Gbl.AttEvents.SelectedOrder) fprintf (Gbl.F.Out,""); Frm_LinkFormEnd (); @@ -485,7 +485,7 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (Att); HTM_DIV_Begin ("class=\"%s\"",Att->Hidden ? "DAT_LIGHT" : "DAT"); - fprintf (Gbl.F.Out,"%s",Description); + HTM_Txt (Description); HTM_DIV_End (); HTM_TD_End (); @@ -1151,7 +1151,7 @@ void Att_RequestCreatOrEditAttEvent (void) HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" cols=\"60\" rows=\"5\""); if (!ItsANewAttEvent) - fprintf (Gbl.F.Out,"%s",Description); + HTM_Txt (Description); HTM_TEXTAREA_End (); HTM_TD_End (); @@ -2119,7 +2119,7 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, UsrDat->Accepted ? "DAT_SMALL_N" : "DAT_SMALL", Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",UsrDat->Surname1); + HTM_Txt (UsrDat->Surname1); if (UsrDat->Surname2[0]) fprintf (Gbl.F.Out," %s",UsrDat->Surname2); fprintf (Gbl.F.Out,", %s",UsrDat->FirstName); @@ -2131,14 +2131,14 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, { HTM_TEXTAREA_Begin ("name=\"CommentStd%ld\" cols=\"40\" rows=\"3\"", UsrDat->UsrCod); - fprintf (Gbl.F.Out,"%s",CommentStd); + HTM_Txt (CommentStd); HTM_TEXTAREA_End (); } else // Show without form { Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, CommentStd,Cns_MAX_BYTES_TEXT,false); - fprintf (Gbl.F.Out,"%s",CommentStd); + HTM_Txt (CommentStd); } HTM_TD_End (); @@ -2148,14 +2148,14 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, { HTM_TEXTAREA_Begin ("name=\"CommentTch%ld\" cols=\"40\" rows=\"3\"", UsrDat->UsrCod); - fprintf (Gbl.F.Out,"%s",CommentTch); + HTM_Txt (CommentTch); HTM_TEXTAREA_End (); } else if (Att->CommentTchVisible) // Show without form { Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, CommentTch,Cns_MAX_BYTES_TEXT,false); - fprintf (Gbl.F.Out,"%s",CommentTch); + HTM_Txt (CommentTch); } HTM_TD_End (); HTM_TR_End (); @@ -2175,7 +2175,7 @@ static void Att_PutLinkAttEvent (struct AttendanceEvent *AttEvent, Att_PutParamAttCod (AttEvent->AttCod); Att_PutParamsCodGrps (AttEvent->AttCod); Frm_LinkFormSubmit (Title,LinkStyle,NULL); - fprintf (Gbl.F.Out,"%s",Txt); + HTM_Txt (Txt); Frm_LinkFormEnd (); Frm_EndForm (); } @@ -3143,7 +3143,7 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView) free (Id); HTM_TD_Begin ("class=\"DAT LT COLOR%u\"",Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",Gbl.AttEvents.Lst[NumAttEvent].Title); + HTM_Txt (Gbl.AttEvents.Lst[NumAttEvent].Title); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RT COLOR%u\"",Gbl.RowEvenOdd); @@ -3373,7 +3373,7 @@ static void Att_WriteRowUsrSeveralAttEvents (unsigned NumUsr,struct UsrData *Usr UsrDat->Accepted ? "DAT_SMALL_N" : "DAT_SMALL", Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",UsrDat->Surname1); + HTM_Txt (UsrDat->Surname1); if (UsrDat->Surname2[0]) fprintf (Gbl.F.Out," %s",UsrDat->Surname2); fprintf (Gbl.F.Out,", %s", @@ -3530,7 +3530,7 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat) HTM_TD_Begin ("class=\"%s LM\"", UsrDat->Accepted ? "DAT_SMALL_N" : "DAT_SMALL"); - fprintf (Gbl.F.Out,"%s",UsrDat->Surname1); + HTM_Txt (UsrDat->Surname1); if (UsrDat->Surname2[0]) fprintf (Gbl.F.Out," %s",UsrDat->Surname2); fprintf (Gbl.F.Out,", %s",UsrDat->FirstName); @@ -3580,7 +3580,7 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat) HTM_SPAN_Begin ("id=\"%s\"",Id); HTM_SPAN_End (); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Gbl.AttEvents.Lst[NumAttEvent].Title); + HTM_Txt (Gbl.AttEvents.Lst[NumAttEvent].Title); Dat_WriteLocalDateHMSFromUTC (Id,Gbl.AttEvents.Lst[NumAttEvent].TimeUTC[Att_START_TIME], Gbl.Prefs.DateFormat,Dat_SEPARATOR_COMMA, true,true,true,0x7); @@ -3610,7 +3610,7 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat) fprintf (Gbl.F.Out,"%s:",Txt_Student_comment); HTM_DT_End (); HTM_DD_Begin (); - fprintf (Gbl.F.Out,"%s",CommentStd); + HTM_Txt (CommentStd); HTM_DD_End (); } if (ShowCommentTch) @@ -3621,7 +3621,7 @@ static void Att_ListAttEventsForAStd (unsigned NumUsr,struct UsrData *UsrDat) fprintf (Gbl.F.Out,"%s:",Txt_Teachers_comment); HTM_DT_End (); HTM_DD_Begin (); - fprintf (Gbl.F.Out,"%s",CommentTch); + HTM_Txt (CommentTch); HTM_DD_End (); } HTM_DL_End (); diff --git a/swad_box.c b/swad_box.c index 338ad2ed..5a78c039 100644 --- a/swad_box.c +++ b/swad_box.c @@ -197,7 +197,7 @@ static void Box_StartBoxInternal (const char *Width,const char *Title, HTM_DIV_Begin ("class=\"FRAME_TITLE %s\"", Gbl.Box.Nested ? "FRAME_TITLE_SMALL" : "FRAME_TITLE_BIG"); - fprintf (Gbl.F.Out,"%s",Title); + HTM_Txt (Title); HTM_DIV_End (); } } diff --git a/swad_button.c b/swad_button.c index f17ecb36..a3cd6747 100644 --- a/swad_button.c +++ b/swad_button.c @@ -101,7 +101,7 @@ void Btn_PutCreateButton (const char *TxtButton) { HTM_DIV_Begin ("class=\"CM\""); HTM_BUTTON_Begin ("BT_SUBMIT BT_CREATE"); - fprintf (Gbl.F.Out,"%s",TxtButton); + HTM_Txt (TxtButton); HTM_BUTTON_End (); HTM_DIV_End (); } @@ -109,7 +109,7 @@ void Btn_PutCreateButton (const char *TxtButton) void Btn_PutCreateButtonInline (const char *TxtButton) { HTM_BUTTON_Begin ("BT_SUBMIT_INLINE BT_CREATE"); - fprintf (Gbl.F.Out,"%s",TxtButton); + HTM_Txt (TxtButton); HTM_BUTTON_End (); } @@ -117,7 +117,7 @@ void Btn_PutConfirmButton (const char *TxtButton) { HTM_DIV_Begin ("class=\"CM\""); HTM_BUTTON_Begin ("BT_SUBMIT BT_CONFIRM"); - fprintf (Gbl.F.Out,"%s",TxtButton); + HTM_Txt (TxtButton); HTM_BUTTON_End (); HTM_DIV_End (); } @@ -125,7 +125,7 @@ void Btn_PutConfirmButton (const char *TxtButton) void Btn_PutConfirmButtonInline (const char *TxtButton) { HTM_BUTTON_Begin ("BT_SUBMIT_INLINE BT_CONFIRM"); - fprintf (Gbl.F.Out,"%s",TxtButton); + HTM_Txt (TxtButton); HTM_BUTTON_End (); } @@ -133,7 +133,7 @@ void Btn_PutRemoveButton (const char *TxtButton) { HTM_DIV_Begin ("class=\"CM\""); HTM_BUTTON_Begin ("BT_SUBMIT BT_REMOVE"); - fprintf (Gbl.F.Out,"%s",TxtButton); + HTM_Txt (TxtButton); HTM_BUTTON_End (); HTM_DIV_End (); } @@ -141,6 +141,6 @@ void Btn_PutRemoveButton (const char *TxtButton) void Btn_PutRemoveButtonInline (const char *TxtButton) { HTM_BUTTON_Begin ("BT_SUBMIT_INLINE BT_REMOVE"); - fprintf (Gbl.F.Out,"%s",TxtButton); + HTM_Txt (TxtButton); HTM_BUTTON_End (); } diff --git a/swad_centre.c b/swad_centre.c index 4cb8f741..03a52d44 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -215,7 +215,7 @@ void Ctr_SeeCtrWithPendingDegs (void) /* Number of pending degrees (row[1]) */ HTM_TD_Begin ("class=\"DAT RM %s\"",BgColor); - fprintf (Gbl.F.Out,"%s",row[1]); + HTM_Txt (row[1]); HTM_TD_End (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; @@ -346,7 +346,7 @@ static void Ctr_Configuration (bool PrintView) Log_DrawLogo (Hie_CTR,Gbl.Hierarchy.Ctr.CtrCod, Gbl.Hierarchy.Ctr.ShrtName,64,NULL,true); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ctr.FullName); + HTM_Txt (Gbl.Hierarchy.Ctr.FullName); if (PutLink) HTM_A_End (); HTM_DIV_End (); @@ -391,7 +391,7 @@ static void Ctr_Configuration (bool PrintView) " onchange=\"document.getElementById('%s').submit();return false;\"", Gbl.Form.Id); if (PhotoAttribution) - fprintf (Gbl.F.Out,"%s",PhotoAttribution); + HTM_Txt (PhotoAttribution); HTM_TEXTAREA_End (); Frm_EndForm (); HTM_DIV_End (); @@ -399,7 +399,7 @@ static void Ctr_Configuration (bool PrintView) else if (PhotoAttribution) { HTM_DIV_Begin ("class=\"ATTRIBUTION\""); - fprintf (Gbl.F.Out,"%s",PhotoAttribution); + HTM_Txt (PhotoAttribution); HTM_DIV_End (); } @@ -445,7 +445,7 @@ static void Ctr_Configuration (bool PrintView) Ins_FreeListInstitutions (); } else // I can not move centre to another institution - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ins.FullName); + HTM_Txt (Gbl.Hierarchy.Ins.FullName); HTM_TD_End (); HTM_TR_End (); @@ -471,7 +471,7 @@ static void Ctr_Configuration (bool PrintView) Frm_EndForm (); } else // I can not edit centre full name - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ctr.FullName); + HTM_Txt (Gbl.Hierarchy.Ctr.FullName); HTM_TD_End (); HTM_TR_End (); @@ -497,7 +497,7 @@ static void Ctr_Configuration (bool PrintView) Frm_EndForm (); } else // I can not edit centre short name - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ctr.ShrtName); + HTM_Txt (Gbl.Hierarchy.Ctr.ShrtName); HTM_TD_End (); HTM_TR_End (); @@ -541,7 +541,7 @@ static void Ctr_Configuration (bool PrintView) Plc_FreeListPlaces (); } else // I can not change centre place - fprintf (Gbl.F.Out,"%s",Plc.FullName); + HTM_Txt (Plc.FullName); HTM_TD_End (); HTM_TR_End (); @@ -572,7 +572,7 @@ static void Ctr_Configuration (bool PrintView) HTM_DIV_Begin ("class=\"EXTERNAL_WWW_LONG\""); HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"DAT\"", Gbl.Hierarchy.Ctr.WWW); - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ctr.WWW); + HTM_Txt (Gbl.Hierarchy.Ctr.WWW); HTM_A_End (); HTM_DIV_End (); } @@ -917,7 +917,7 @@ static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr) /***** Place *****/ HTM_TD_Begin ("class=\"%s LM %s\"",TxtClassNormal,BgColor); - fprintf (Gbl.F.Out,"%s",Plc.ShrtName); + HTM_Txt (Plc.ShrtName); HTM_TD_End (); /***** Number of degrees *****/ @@ -1529,7 +1529,7 @@ static void Ctr_ListCentresForEdition (void) NumPlc < Gbl.Plcs.Num; NumPlc++) if (Gbl.Plcs.Lst[NumPlc].PlcCod == Ctr->PlcCod) - fprintf (Gbl.F.Out,"%s",Gbl.Plcs.Lst[NumPlc].ShrtName); + HTM_Txt (Gbl.Plcs.Lst[NumPlc].ShrtName); HTM_TD_End (); /* Centre short name */ @@ -1543,7 +1543,7 @@ static void Ctr_ListCentresForEdition (void) Frm_EndForm (); } else - fprintf (Gbl.F.Out,"%s",Ctr->ShrtName); + HTM_Txt (Ctr->ShrtName); HTM_TD_End (); /* Centre full name */ @@ -1557,7 +1557,7 @@ static void Ctr_ListCentresForEdition (void) Frm_EndForm (); } else - fprintf (Gbl.F.Out,"%s",Ctr->FullName); + HTM_Txt (Ctr->FullName); HTM_TD_End (); /* Centre WWW */ @@ -1577,7 +1577,7 @@ static void Ctr_ListCentresForEdition (void) HTM_DIV_Begin ("class=\"EXTERNAL_WWW_SHORT\""); HTM_A_Begin ("href=\"%s\" target=\"_blank\"" " class=\"DAT\" title=\"%s\"",Ctr->WWW,Ctr->WWW); - fprintf (Gbl.F.Out,"%s",WWW); + HTM_Txt (WWW); HTM_A_End (); HTM_DIV_End (); } @@ -1628,7 +1628,7 @@ static void Ctr_ListCentresForEdition (void) Frm_EndForm (); } else if (StatusTxt != Ctr_STATUS_ACTIVE) // If active ==> do not show anything - fprintf (Gbl.F.Out,"%s",Txt_CENTRE_STATUS[StatusTxt]); + HTM_Txt (Txt_CENTRE_STATUS[StatusTxt]); HTM_TD_End (); HTM_TR_End (); } @@ -2591,7 +2591,7 @@ static void Ctr_PutHeadCentresForSeeing (bool OrderSelectable) if (Order == Gbl.Hierarchy.Ins.Ctrs.SelectedOrder) fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,"%s",Txt_CENTRES_ORDER[Order]); + HTM_Txt (Txt_CENTRES_ORDER[Order]); if (OrderSelectable) { if (Order == Gbl.Hierarchy.Ins.Ctrs.SelectedOrder) @@ -2608,7 +2608,7 @@ static void Ctr_PutHeadCentresForSeeing (bool OrderSelectable) HTM_TH_Begin (1,1,"RM"); fprintf (Gbl.F.Out,"%s+",Txt_ROLES_PLURAL_BRIEF_Abc[Rol_TCH]); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD]); + HTM_Txt (Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD]); HTM_TH_End (); HTM_TH_Empty (1); @@ -2645,7 +2645,7 @@ static void Ctr_PutHeadCentresForEdition (void) HTM_TH_Begin (1,1,"RM"); fprintf (Gbl.F.Out,"%s+",Txt_ROLES_PLURAL_BRIEF_Abc[Rol_TCH]); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD]); + HTM_Txt (Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD]); HTM_TH_End (); HTM_TH (1,1,"LM",Txt_Requester); HTM_TH_Empty (1); diff --git a/swad_changelog.h b/swad_changelog.h index d288c86c..a4530b95 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -487,7 +487,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.60.3 (2019-11-09)" +#define Log_PLATFORM_VERSION "SWAD 19.61 (2019-11-10)" #define CSS_FILE "swad19.47.css" #define JS_FILE "swad19.39.js" /* @@ -495,6 +495,7 @@ ps2pdf source.ps destination.pdf // TODO: Impedir la creación y edición de proyectos si no son editables. // TODO: Importante: filtrar proyectos por usuarios (igual que en trabajos o en asistencia) + Version 19.61: Nov 10, 2019 Code refactoring in HTML text printing. (246298 lines) Version 19.60.3: Nov 09, 2019 Code refactoring in HTML select options. (246311 lines) Version 19.60.2: Nov 09, 2019 Code refactoring in HTML break lines. (246290 lines) Version 19.60.1: Nov 09, 2019 Code refactoring in HTML break lines. (246281 lines) diff --git a/swad_chat.c b/swad_chat.c index c3fa9193..a25302ec 100644 --- a/swad_chat.c +++ b/swad_chat.c @@ -279,11 +279,11 @@ void Cht_ShowListOfChatRoomsWithUsrs (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",row[0]); + HTM_Txt (row[0]); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); - fprintf (Gbl.F.Out,"%s",row[1]); + HTM_Txt (row[1]); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_classroom.c b/swad_classroom.c index e2a7b053..648db32e 100644 --- a/swad_classroom.c +++ b/swad_classroom.c @@ -127,7 +127,7 @@ void Cla_SeeClassrooms (void) Frm_LinkFormSubmit (Txt_CLASSROOMS_HELP_ORDER[Order],"TIT_TBL",NULL); if (Order == Gbl.Classrooms.SelectedOrder) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,"%s",Txt_CLASSROOMS_ORDER[Order]); + HTM_Txt (Txt_CLASSROOMS_ORDER[Order]); if (Order == Gbl.Classrooms.SelectedOrder) fprintf (Gbl.F.Out,""); Frm_LinkFormEnd (); @@ -145,23 +145,23 @@ void Cla_SeeClassrooms (void) /* Short name */ HTM_TD_Begin ("class=\"DAT LM %s\"",Gbl.ColorRows[RowEvenOdd]); - fprintf (Gbl.F.Out,"%s",Gbl.Classrooms.Lst[NumCla].ShrtName); + HTM_Txt (Gbl.Classrooms.Lst[NumCla].ShrtName); HTM_TD_End (); /* Full name */ HTM_TD_Begin ("class=\"DAT LM %s\"",Gbl.ColorRows[RowEvenOdd]); - fprintf (Gbl.F.Out,"%s",Gbl.Classrooms.Lst[NumCla].FullName); + HTM_Txt (Gbl.Classrooms.Lst[NumCla].FullName); HTM_TD_End (); /* Capacity */ HTM_TD_Begin ("class=\"DAT RM %s\"",Gbl.ColorRows[RowEvenOdd]); Cla_WriteCapacity (StrCapacity,Gbl.Classrooms.Lst[NumCla].Capacity); - fprintf (Gbl.F.Out,"%s",StrCapacity); + HTM_Txt (StrCapacity); HTM_TD_End (); /* Location */ HTM_TD_Begin ("class=\"DAT LM %s\"",Gbl.ColorRows[RowEvenOdd]); - fprintf (Gbl.F.Out,"%s",Gbl.Classrooms.Lst[NumCla].Location); + HTM_Txt (Gbl.Classrooms.Lst[NumCla].Location); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_cookie.c b/swad_cookie.c index 6460e38a..85a2aec8 100644 --- a/swad_cookie.c +++ b/swad_cookie.c @@ -84,8 +84,7 @@ void Coo_EditMyPrefsOnCookies (void) HTM_INPUT_CHECKBOX ("cookies",true, "value=\"Y\"%s", Gbl.Usrs.Me.UsrDat.Prefs.AcceptThirdPartyCookies ? " checked=\"checked\"" : ""); - fprintf (Gbl.F.Out,"%s", - Txt_Accept_third_party_cookies_to_view_multimedia_content_from_other_websites); + HTM_Txt (Txt_Accept_third_party_cookies_to_view_multimedia_content_from_other_websites); HTM_LABEL_End (); /* End container */ diff --git a/swad_country.c b/swad_country.c index 20a41044..5c60f719 100644 --- a/swad_country.c +++ b/swad_country.c @@ -190,7 +190,7 @@ void Cty_SeeCtyWithPendingInss (void) /* Number of pending institutions (row[1]) */ HTM_TD_Begin ("class=\"DAT RM %s\"",BgColor); - fprintf (Gbl.F.Out,"%s",row[1]); + HTM_Txt (row[1]); HTM_TD_End (); HTM_TR_End (); @@ -269,7 +269,7 @@ static void Cty_Configuration (bool PrintView) " class=\"FRAME_TITLE_BIG\" title=\"%s\"", Gbl.Hierarchy.Cty.WWW[Gbl.Prefs.Language], Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]); - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]); + HTM_Txt (Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]); if (PutLink) HTM_A_End (); HTM_DIV_End (); @@ -300,7 +300,7 @@ static void Cty_Configuration (bool PrintView) " onchange=\"document.getElementById('%s').submit();return false;\"", Gbl.Form.Id); if (MapAttribution) - fprintf (Gbl.F.Out,"%s",MapAttribution); + HTM_Txt (MapAttribution); HTM_TEXTAREA_End (); Frm_EndForm (); HTM_DIV_End (); @@ -308,7 +308,7 @@ static void Cty_Configuration (bool PrintView) else if (MapAttribution) { HTM_DIV_Begin ("class=\"ATTRIBUTION\""); - fprintf (Gbl.F.Out,"%s",MapAttribution); + HTM_Txt (MapAttribution); HTM_DIV_End (); } @@ -330,7 +330,7 @@ static void Cty_Configuration (bool PrintView) if (!PrintView && Gbl.Hierarchy.Cty.WWW[Gbl.Prefs.Language][0]) HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"DAT_N\"", Gbl.Hierarchy.Cty.WWW[Gbl.Prefs.Language]); - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]); + HTM_Txt (Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]); if (!PrintView && Gbl.Hierarchy.Cty.WWW[Gbl.Prefs.Language][0]) HTM_A_End (); HTM_TD_End (); @@ -561,7 +561,7 @@ void Cty_ListCountries2 (void) HTM_TD_End (); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",Txt_Other_countries); + HTM_Txt (Txt_Other_countries); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); @@ -597,7 +597,7 @@ void Cty_ListCountries2 (void) HTM_TD_End (); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",Txt_Country_unspecified); + HTM_Txt (Txt_Country_unspecified); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); @@ -672,7 +672,7 @@ static void Cty_PutHeadCountriesForSeeing (bool OrderSelectable) if (Order == Gbl.Hierarchy.Sys.Ctys.SelectedOrder) fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,"%s",Txt_COUNTRIES_ORDER[Order]); + HTM_Txt (Txt_COUNTRIES_ORDER[Order]); if (OrderSelectable) { if (Order == Gbl.Hierarchy.Sys.Ctys.SelectedOrder) @@ -690,7 +690,7 @@ static void Cty_PutHeadCountriesForSeeing (bool OrderSelectable) HTM_TH_Begin (1,1,"RM"); fprintf (Gbl.F.Out,"%s+",Txt_ROLES_PLURAL_BRIEF_Abc[Rol_TCH]); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD]); + HTM_Txt (Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD]); HTM_TH_End (); HTM_TR_End (); @@ -1294,13 +1294,13 @@ void Cty_WriteCountryName (long CtyCod,const char *ClassLink) Cty_PutParamCtyCod (CtyCod); Frm_LinkFormSubmit (Act_GetActionTextFromDB (Act_GetActCod (ActSeeCtyInf),ActTxt), ClassLink,NULL); - fprintf (Gbl.F.Out,"%s",CtyName); + HTM_Txt (CtyName); Frm_LinkFormEnd (); Frm_EndForm (); } else /***** Write country name without link *****/ - fprintf (Gbl.F.Out,"%s",CtyName); + HTM_Txt (CtyName); } /*****************************************************************************/ @@ -1634,7 +1634,7 @@ static void Cty_ListCountriesForEdition (void) /* Alphabetic country code with 2 letters (ISO 3166-1) */ HTM_TD_Begin ("rowspan=\"%u\" class=\"DAT RT\"",1 + Lan_NUM_LANGUAGES); - fprintf (Gbl.F.Out,"%s",Cty->Alpha2); + HTM_Txt (Cty->Alpha2); HTM_TD_End (); HTM_TD_Empty (3); @@ -2086,7 +2086,7 @@ static void Cty_PutFormToCreateCountry (void) /* Language */ HTM_TD_Begin ("class=\"DAT RT\""); - fprintf (Gbl.F.Out,"%s",Txt_STR_LANG_NAME[Lan]); + HTM_Txt (Txt_STR_LANG_NAME[Lan]); HTM_TD_End (); /* Name */ diff --git a/swad_course.c b/swad_course.c index 70871471..06dbd799 100644 --- a/swad_course.c +++ b/swad_course.c @@ -228,7 +228,7 @@ static void Crs_Configuration (bool PrintView) if (PutLink) HTM_A_End (); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Crs.FullName); + HTM_Txt (Gbl.Hierarchy.Crs.FullName); HTM_DIV_End (); /***** Begin table *****/ @@ -270,7 +270,7 @@ static void Crs_Configuration (bool PrintView) Deg_FreeListDegs (&Gbl.Hierarchy.Ctr.Degs); } else // I can not move course to another degree - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Deg.FullName); + HTM_Txt (Gbl.Hierarchy.Deg.FullName); HTM_TD_End (); @@ -297,7 +297,7 @@ static void Crs_Configuration (bool PrintView) Frm_EndForm (); } else // I can not edit course full name - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Crs.FullName); + HTM_Txt (Gbl.Hierarchy.Crs.FullName); HTM_TD_End (); HTM_TR_End (); @@ -323,7 +323,7 @@ static void Crs_Configuration (bool PrintView) Frm_EndForm (); } else // I can not edit course short name - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Crs.ShrtName); + HTM_Txt (Gbl.Hierarchy.Crs.ShrtName); HTM_TD_End (); HTM_TR_End (); @@ -354,9 +354,8 @@ static void Crs_Configuration (bool PrintView) Frm_EndForm (); } else - fprintf (Gbl.F.Out,"%s", - Gbl.Hierarchy.Crs.Year ? Txt_YEAR_OF_DEGREE[Gbl.Hierarchy.Crs.Year] : - Txt_Not_applicable); + HTM_Txt (Gbl.Hierarchy.Crs.Year ? Txt_YEAR_OF_DEGREE[Gbl.Hierarchy.Crs.Year] : + Txt_Not_applicable); HTM_TD_End (); HTM_TR_End (); @@ -383,7 +382,7 @@ static void Crs_Configuration (bool PrintView) Frm_EndForm (); } else - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Crs.InstitutionalCrsCod); + HTM_Txt (Gbl.Hierarchy.Crs.InstitutionalCrsCod); HTM_TD_End (); HTM_TR_End (); @@ -1236,20 +1235,18 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year) TxtClassNormal,BgColor, Crs->NumUsrs[Rol_UNK] ? Txt_COURSE_With_users : Txt_COURSE_Without_users); - fprintf (Gbl.F.Out,"%s",Crs->NumUsrs[Rol_UNK] ? "✓" : - " "); + HTM_Txt (Crs->NumUsrs[Rol_UNK] ? "✓" : + " "); HTM_TD_End (); /* Institutional code of the course */ - HTM_TD_Begin ("class=\"%s CM %s\"", - TxtClassNormal,BgColor); - fprintf (Gbl.F.Out,"%s",Crs->InstitutionalCrsCod); + HTM_TD_Begin ("class=\"%s CM %s\"",TxtClassNormal,BgColor); + HTM_Txt (Crs->InstitutionalCrsCod); HTM_TD_End (); /* Course year */ - HTM_TD_Begin ("class=\"%s CM %s\"", - TxtClassNormal,BgColor); - fprintf (Gbl.F.Out,"%s",Txt_YEAR_OF_DEGREE[Crs->Year]); + HTM_TD_Begin ("class=\"%s CM %s\"",TxtClassNormal,BgColor); + HTM_Txt (Txt_YEAR_OF_DEGREE[Crs->Year]); HTM_TD_End (); /* Course full name */ @@ -1260,7 +1257,7 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year) Txt_Go_to_X, Crs->FullName); Frm_LinkFormSubmit (Gbl.Title,TxtClassStrong,NULL); - fprintf (Gbl.F.Out,"%s",Crs->FullName); + HTM_Txt (Crs->FullName); Frm_LinkFormEnd (); Frm_EndForm (); HTM_TD_End (); @@ -1280,7 +1277,7 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year) StatusTxt = Crs_GetStatusTxtFromStatusBits (Crs->Status); HTM_TD_Begin ("class=\"%s LM %s\"",TxtClassNormal,BgColor); if (StatusTxt != Crs_STATUS_ACTIVE) // If active ==> do not show anything - fprintf (Gbl.F.Out,"%s",Txt_COURSE_STATUS[StatusTxt]); + HTM_Txt (Txt_COURSE_STATUS[StatusTxt]); HTM_TD_End (); HTM_TR_End (); @@ -1456,7 +1453,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) Frm_EndForm (); } else - fprintf (Gbl.F.Out,"%s",Crs->InstitutionalCrsCod); + HTM_Txt (Crs->InstitutionalCrsCod); HTM_TD_End (); /* Course year */ @@ -1477,7 +1474,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) Frm_EndForm (); } else - fprintf (Gbl.F.Out,"%s",Txt_YEAR_OF_DEGREE[Crs->Year]); + HTM_Txt (Txt_YEAR_OF_DEGREE[Crs->Year]); HTM_TD_End (); /* Course short name */ @@ -1491,7 +1488,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) Frm_EndForm (); } else - fprintf (Gbl.F.Out,"%s",Crs->ShrtName); + HTM_Txt (Crs->ShrtName); HTM_TD_End (); /* Course full name */ @@ -1505,7 +1502,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) Frm_EndForm (); } else - fprintf (Gbl.F.Out,"%s",Crs->FullName); + HTM_Txt (Crs->FullName); HTM_TD_End (); /* Current number of teachers in this course */ @@ -1549,7 +1546,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) Frm_EndForm (); } else if (StatusTxt != Crs_STATUS_ACTIVE) // If active ==> do not show anything - fprintf (Gbl.F.Out,"%s",Txt_COURSE_STATUS[StatusTxt]); + HTM_Txt (Txt_COURSE_STATUS[StatusTxt]); HTM_TD_End (); HTM_TR_End (); @@ -3157,8 +3154,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA BgColor, Accepted ? Txt_Enrolment_confirmed : Txt_Enrolment_not_confirmed); - fprintf (Gbl.F.Out,"%s", - Accepted ? "✓" : + HTM_Txt (Accepted ? "✓" : "✗"); HTM_TD_End (); } @@ -3185,7 +3181,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA /***** Write year (row[4]) *****/ HTM_TD_Begin ("class=\"%s CT %s\"",Style,BgColor); - fprintf (Gbl.F.Out,"%s",Txt_YEAR_OF_DEGREE[Deg_ConvStrToYear (row[4])]); + HTM_Txt (Txt_YEAR_OF_DEGREE[Deg_ConvStrToYear (row[4])]); HTM_TD_End (); /***** Write course full name (row[5]) *****/ @@ -3196,7 +3192,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA Txt_Go_to_X, row[6]); Frm_LinkFormSubmit (Gbl.Title,Style,NULL); - fprintf (Gbl.F.Out,"%s",row[5]); + HTM_Txt (row[5]); Frm_LinkFormEnd (); Frm_EndForm (); HTM_TD_End (); diff --git a/swad_database.c b/swad_database.c index feaf2435..bbca7f56 100644 --- a/swad_database.c +++ b/swad_database.c @@ -3238,7 +3238,7 @@ mysql> DESCRIBE ws_keys; static void DB_CreateTable (const char *Query) { HTM_LI_Begin ("class=\"DAT\""); - fprintf (Gbl.F.Out,"%s",Query); + HTM_Txt (Query); HTM_LI_End (); if (mysql_query (&Gbl.mysql,Query)) diff --git a/swad_degree.c b/swad_degree.c index f2b4e42e..18d12e86 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -218,7 +218,7 @@ void Deg_SeeDegWithPendingCrss (void) /* Number of pending courses (row[1]) */ HTM_TD_Begin ("class=\"DAT RM %s\"",BgColor); - fprintf (Gbl.F.Out,"%s",row[1]); + HTM_Txt (row[1]); HTM_TD_End (); HTM_TR_End (); @@ -330,7 +330,7 @@ static void Deg_Configuration (bool PrintView) Log_DrawLogo (Hie_DEG,Gbl.Hierarchy.Deg.DegCod, Gbl.Hierarchy.Deg.ShrtName,64,NULL,true); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Deg.FullName); + HTM_Txt (Gbl.Hierarchy.Deg.FullName); if (PutLink) HTM_A_End (); HTM_DIV_End (); @@ -373,7 +373,7 @@ static void Deg_Configuration (bool PrintView) Ctr_FreeListCentres (); } else // I can not move degree to another centre - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ctr.FullName); + HTM_Txt (Gbl.Hierarchy.Ctr.FullName); HTM_TD_End (); HTM_TR_End (); @@ -399,7 +399,7 @@ static void Deg_Configuration (bool PrintView) Frm_EndForm (); } else // I can not edit degree full name - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Deg.FullName); + HTM_Txt (Gbl.Hierarchy.Deg.FullName); HTM_TD_End (); HTM_TR_End (); @@ -425,7 +425,7 @@ static void Deg_Configuration (bool PrintView) Frm_EndForm (); } else // I can not edit degree short name - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Deg.ShrtName); + HTM_Txt (Gbl.Hierarchy.Deg.ShrtName); HTM_TD_End (); HTM_TR_End (); @@ -455,7 +455,7 @@ static void Deg_Configuration (bool PrintView) HTM_DIV_Begin ("class=\"EXTERNAL_WWW_LONG\""); HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"DAT\"", Gbl.Hierarchy.Deg.WWW); - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Deg.WWW); + HTM_Txt (Gbl.Hierarchy.Deg.WWW); HTM_A_End (); HTM_DIV_End (); } @@ -741,7 +741,7 @@ static void Deg_ListDegreesForEdition (void) Frm_EndForm (); } else - fprintf (Gbl.F.Out,"%s",Deg->ShrtName); + HTM_Txt (Deg->ShrtName); HTM_TD_End (); /* Degree full name */ @@ -755,7 +755,7 @@ static void Deg_ListDegreesForEdition (void) Frm_EndForm (); } else - fprintf (Gbl.F.Out,"%s",Deg->FullName); + HTM_Txt (Deg->FullName); HTM_TD_End (); /* Degree type */ @@ -784,7 +784,7 @@ static void Deg_ListDegreesForEdition (void) NumDegTyp < Gbl.DegTypes.Num; NumDegTyp++) if (Gbl.DegTypes.Lst[NumDegTyp].DegTypCod == Deg->DegTypCod) - fprintf (Gbl.F.Out,"%s",Gbl.DegTypes.Lst[NumDegTyp].DegTypName); + HTM_Txt (Gbl.DegTypes.Lst[NumDegTyp].DegTypName); HTM_TD_End (); /* Degree WWW */ @@ -804,7 +804,7 @@ static void Deg_ListDegreesForEdition (void) HTM_DIV_Begin ("class=\"EXTERNAL_WWW_SHORT\""); HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"DAT\" title=\"%s\"", Deg->WWW,Deg->WWW); - fprintf (Gbl.F.Out,"%s",WWW); + HTM_Txt (WWW); HTM_A_End (); HTM_DIV_End (); } @@ -842,7 +842,7 @@ static void Deg_ListDegreesForEdition (void) Frm_EndForm (); } else if (StatusTxt != Deg_STATUS_ACTIVE) // If active ==> do not show anything - fprintf (Gbl.F.Out,"%s",Txt_DEGREE_STATUS[StatusTxt]); + HTM_Txt (Txt_DEGREE_STATUS[StatusTxt]); HTM_TD_End (); HTM_TR_End (); } @@ -1226,8 +1226,8 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg) TxtClassNormal,BgColor, NumCrss ? Txt_DEGREE_With_courses : Txt_DEGREE_Without_courses); - fprintf (Gbl.F.Out,"%s",NumCrss ? "✓" : - " "); + HTM_Txt (NumCrss ? "✓" : + " "); HTM_TD_End (); /***** Number of degree in this list *****/ @@ -1243,7 +1243,7 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg) /***** Type of degree *****/ HTM_TD_Begin ("class=\"%s LM %s\"",TxtClassNormal,BgColor); - fprintf (Gbl.F.Out,"%s",DegTyp.DegTypName); + HTM_Txt (DegTyp.DegTypName); HTM_TD_End (); /***** Current number of courses in this degree *****/ @@ -1255,7 +1255,7 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg) StatusTxt = Deg_GetStatusTxtFromStatusBits (Deg->Status); HTM_TD_Begin ("class=\"%s LM %s\"",TxtClassNormal,BgColor); if (StatusTxt != Deg_STATUS_ACTIVE) // If active ==> do not show anything - fprintf (Gbl.F.Out,"%s",Txt_DEGREE_STATUS[StatusTxt]); + HTM_Txt (Txt_DEGREE_STATUS[StatusTxt]); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_degree_type.c b/swad_degree_type.c index 6baef513..6af8295d 100644 --- a/swad_degree_type.c +++ b/swad_degree_type.c @@ -331,7 +331,7 @@ static void DT_ListDegreeTypesForSeeing (void) /* Name of degree type */ HTM_TD_Begin ("class=\"DAT_N LM %s\"",BgColor); - fprintf (Gbl.F.Out,"%s",Gbl.DegTypes.Lst[NumDegTyp].DegTypName); + HTM_Txt (Gbl.DegTypes.Lst[NumDegTyp].DegTypName); HTM_TD_End (); /* Number of degrees of this type */ @@ -519,7 +519,7 @@ static void DT_PutHeadDegreeTypesForSeeing (Act_Action_t NextAction,DT_Order_t S Frm_LinkFormSubmit (Txt_DEGREE_TYPES_HELP_ORDER[Order],"TIT_TBL",NULL); if (Order == SelectedOrder) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,"%s",Txt_DEGREE_TYPES_ORDER[Order]); + HTM_Txt (Txt_DEGREE_TYPES_ORDER[Order]); if (Order == SelectedOrder) fprintf (Gbl.F.Out,""); Frm_LinkFormEnd (); diff --git a/swad_department.c b/swad_department.c index 6f1a3c5a..68d57d33 100644 --- a/swad_department.c +++ b/swad_department.c @@ -132,7 +132,7 @@ void Dpt_SeeDepts (void) Frm_LinkFormSubmit (Txt_DEPARTMENTS_HELP_ORDER[Order],"TIT_TBL",NULL); if (Order == Gbl.Dpts.SelectedOrder) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,"%s",Txt_DEPARTMENTS_ORDER[Order]); + HTM_Txt (Txt_DEPARTMENTS_ORDER[Order]); if (Order == Gbl.Dpts.SelectedOrder) fprintf (Gbl.F.Out,""); Frm_LinkFormEnd (); @@ -153,7 +153,7 @@ void Dpt_SeeDepts (void) HTM_TD_Begin ("class=\"LM\""); HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"DAT\"", Gbl.Dpts.Lst[NumDpt].WWW); - fprintf (Gbl.F.Out,"%s",Gbl.Dpts.Lst[NumDpt].FullName); + HTM_Txt (Gbl.Dpts.Lst[NumDpt].FullName); HTM_A_End (); HTM_TD_End (); @@ -180,7 +180,7 @@ void Dpt_SeeDepts (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",Txt_Other_departments); + HTM_Txt (Txt_Other_departments); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); @@ -194,7 +194,7 @@ void Dpt_SeeDepts (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",Txt_Department_unspecified); + HTM_Txt (Txt_Department_unspecified); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); diff --git a/swad_enrolment.c b/swad_enrolment.c index f5c20ea3..bb18533e 100644 --- a/swad_enrolment.c +++ b/swad_enrolment.c @@ -726,7 +726,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role) /***** Step 1: List of students to be enroled / removed *****/ HTM_DIV_Begin ("class=\"%s LM\"",The_ClassTitle[Gbl.Prefs.Theme]); - fprintf (Gbl.F.Out,"%s",Txt_Step_1_Provide_a_list_of_users); + HTM_Txt (Txt_Step_1_Provide_a_list_of_users); HTM_DIV_End (); Ale_ShowAlert (Ale_INFO,Txt_Type_or_paste_a_list_of_IDs_nicks_or_emails_); @@ -734,13 +734,13 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role) /***** Step 2: Put different actions to register/remove users to/from current course *****/ HTM_DIV_Begin ("class=\"%s LM\"",The_ClassTitle[Gbl.Prefs.Theme]); - fprintf (Gbl.F.Out,"%s",Txt_Step_2_Select_the_desired_action); + HTM_Txt (Txt_Step_2_Select_the_desired_action); HTM_DIV_End (); Enr_PutActionsRegRemSeveralUsrs (); /***** Step 3: Select groups in which register / remove users *****/ HTM_DIV_Begin ("class=\"%s LM\"",The_ClassTitle[Gbl.Prefs.Theme]); - fprintf (Gbl.F.Out,"%s",Txt_Step_3_Optionally_select_groups); + HTM_Txt (Txt_Step_3_Optionally_select_groups); HTM_DIV_End (); if (Gbl.Hierarchy.Level == Hie_CRS) // Course selected { @@ -757,7 +757,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role) /***** Step 4: Confirm register / remove students *****/ HTM_DIV_Begin ("class=\"%s LM\"",The_ClassTitle[Gbl.Prefs.Theme]); - fprintf (Gbl.F.Out,"%s",Txt_Step_4_Confirm_the_enrolment_removing); + HTM_Txt (Txt_Step_4_Confirm_the_enrolment_removing); HTM_DIV_End (); Pwd_AskForConfirmationOnDangerousAction (); @@ -957,7 +957,7 @@ static void Enr_PutActionsRegRemSeveralUsrs (void) HTM_INPUT_RADIO ("RegRemAction",false, " value=\"%u\" checked=\"checked\"", (unsigned) Enr_REGISTER_SPECIFIED_USRS_IN_CRS); - fprintf (Gbl.F.Out,"%s",Txt_Register_the_users_indicated_in_step_1); + HTM_Txt (Txt_Register_the_users_indicated_in_step_1); HTM_LABEL_End (); HTM_LI_End (); @@ -966,7 +966,7 @@ static void Enr_PutActionsRegRemSeveralUsrs (void) HTM_INPUT_RADIO ("RegRemAction",false, " value=\"%u\"", (unsigned) Enr_REMOVE_SPECIFIED_USRS_FROM_CRS); - fprintf (Gbl.F.Out,"%s",Txt_Remove_the_users_indicated_in_step_1); + HTM_Txt (Txt_Remove_the_users_indicated_in_step_1); HTM_LABEL_End (); HTM_LI_End (); @@ -975,7 +975,7 @@ static void Enr_PutActionsRegRemSeveralUsrs (void) HTM_INPUT_RADIO ("RegRemAction",false, " value=\"%u\"", (unsigned) Enr_REMOVE_NOT_SPECIFIED_USRS_FROM_CRS); - fprintf (Gbl.F.Out,"%s",Txt_Remove_the_users_not_indicated_in_step_1); + HTM_Txt (Txt_Remove_the_users_not_indicated_in_step_1); HTM_LABEL_End (); HTM_LI_End (); @@ -984,8 +984,7 @@ static void Enr_PutActionsRegRemSeveralUsrs (void) HTM_INPUT_RADIO ("RegRemAction",false, " value=\"%u\"", (unsigned) Enr_UPDATE_USRS_IN_CRS); - fprintf (Gbl.F.Out,"%s", - Txt_Register_the_users_indicated_in_step_1_and_remove_the_users_not_indicated); + HTM_Txt (Txt_Register_the_users_indicated_in_step_1_and_remove_the_users_not_indicated); HTM_LABEL_End (); HTM_LI_End (); } @@ -998,8 +997,7 @@ static void Enr_PutActionsRegRemSeveralUsrs (void) HTM_INPUT_RADIO ("RegRemAction",false, " value=\"%u\"", (unsigned) Enr_ELIMINATE_USRS_FROM_PLATFORM); - fprintf (Gbl.F.Out,"%s", - Txt_Eliminate_from_the_platform_the_users_indicated_in_step_1); + HTM_Txt (Txt_Eliminate_from_the_platform_the_users_indicated_in_step_1); HTM_LABEL_End (); HTM_LI_End (); } @@ -1652,7 +1650,7 @@ static void Enr_PutActionRepUsrAsDup (bool *OptionChecked) extern const char *Txt_Report_possible_duplicate_user; Enr_StartRegRemOneUsrAction (Enr_REPORT_USR_AS_POSSIBLE_DUPLICATE,OptionChecked); - fprintf (Gbl.F.Out,"%s",Txt_Report_possible_duplicate_user); + HTM_Txt (Txt_Report_possible_duplicate_user); Enr_EndRegRemOneUsrAction (); } @@ -1734,8 +1732,7 @@ static void Enr_PutActionRemUsrAcc (bool *OptionChecked,bool ItsMe) extern const char *Txt_Eliminate_user_account; Enr_StartRegRemOneUsrAction (Enr_ELIMINATE_ONE_USR_FROM_PLATFORM,OptionChecked); - fprintf (Gbl.F.Out,"%s", - ItsMe ? Txt_Eliminate_my_user_account : + HTM_Txt (ItsMe ? Txt_Eliminate_my_user_account : Txt_Eliminate_user_account); Enr_EndRegRemOneUsrAction (); } @@ -2878,7 +2875,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) /***** Requested role (row[3]) *****/ HTM_TD_Begin ("class=\"DAT LT\""); - fprintf (Gbl.F.Out,"%s",Txt_ROLES_SINGUL_abc[DesiredRole][UsrDat.Sex]); + HTM_Txt (Txt_ROLES_SINGUL_abc[DesiredRole][UsrDat.Sex]); HTM_TD_End (); /***** Request time (row[4]) *****/ diff --git a/swad_exam.c b/swad_exam.c index 37be0b23..e5b6f565 100644 --- a/swad_exam.c +++ b/swad_exam.c @@ -1053,7 +1053,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Ins.WWW,StyleTitle); Log_DrawLogo (Hie_INS,Ins.InsCod,Ins.FullName,64,NULL,true); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Ins.FullName); + HTM_Txt (Ins.FullName); if (TypeViewExamAnnouncement == Exa_PRINT_VIEW) HTM_SPAN_End (); else @@ -1067,7 +1067,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, if (TypeViewExamAnnouncement == Exa_NORMAL_VIEW) HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"%s\"", Gbl.Hierarchy.Deg.WWW,StyleTitle); - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Deg.FullName); + HTM_Txt (Gbl.Hierarchy.Deg.FullName); if (TypeViewExamAnnouncement == Exa_NORMAL_VIEW) HTM_A_End (); HTM_TD_End (); @@ -1130,7 +1130,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, HTM_SELECT_End (); } else - fprintf (Gbl.F.Out,"%s",Txt_YEAR_OF_DEGREE[Gbl.ExamAnns.ExaDat.Year]); + HTM_Txt (Txt_YEAR_OF_DEGREE[Gbl.ExamAnns.ExaDat.Year]); HTM_TD_End (); HTM_TR_End (); @@ -1149,7 +1149,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, HTM_INPUT_TEXT ("ExamSession",Exa_MAX_CHARS_SESSION,Gbl.ExamAnns.ExaDat.Session,false, "size=\"30\""); else - fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.Session); + HTM_Txt (Gbl.ExamAnns.ExaDat.Session); HTM_TD_End (); HTM_TR_End (); @@ -1176,7 +1176,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Dat_ConvDateToDateStr (&Gbl.ExamAnns.ExaDat.ExamDate, StrExamDate); HTM_TD_Begin ("class=\"%s LT\"",StyleNormal); - fprintf (Gbl.F.Out,"%s",StrExamDate); + HTM_Txt (StrExamDate); HTM_TD_End (); } HTM_TR_End (); @@ -1297,8 +1297,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, if (TypeViewExamAnnouncement == Exa_FORM_VIEW) { HTM_TEXTAREA_Begin ("id=\"Place\" name=\"Place\" cols=\"40\" rows=\"4\""); - fprintf (Gbl.F.Out,"%s", - Gbl.ExamAnns.ExaDat.Place); + HTM_Txt (Gbl.ExamAnns.ExaDat.Place); HTM_TEXTAREA_End (); } else @@ -1306,7 +1305,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, Gbl.ExamAnns.ExaDat.Place, Cns_MAX_BYTES_TEXT,false); - fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.Place); + HTM_Txt (Gbl.ExamAnns.ExaDat.Place); } HTM_TD_End (); @@ -1325,7 +1324,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, if (TypeViewExamAnnouncement == Exa_FORM_VIEW) { HTM_TEXTAREA_Begin ("id=\"ExamMode\" name=\"ExamMode\" cols=\"40\" rows=\"2\""); - fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.Mode); + HTM_Txt (Gbl.ExamAnns.ExaDat.Mode); HTM_TEXTAREA_End (); } else @@ -1333,7 +1332,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, Gbl.ExamAnns.ExaDat.Mode, Cns_MAX_BYTES_TEXT,false); - fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.Mode); + HTM_Txt (Gbl.ExamAnns.ExaDat.Mode); } HTM_TD_End (); @@ -1352,7 +1351,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, if (TypeViewExamAnnouncement == Exa_FORM_VIEW) { HTM_TEXTAREA_Begin ("id=\"Structure\" name=\"Structure\" cols=\"40\" rows=\"8\""); - fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.Structure); + HTM_Txt (Gbl.ExamAnns.ExaDat.Structure); HTM_TEXTAREA_End (); } else @@ -1360,7 +1359,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, Gbl.ExamAnns.ExaDat.Structure, Cns_MAX_BYTES_TEXT,false); - fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.Structure); + HTM_Txt (Gbl.ExamAnns.ExaDat.Structure); } HTM_TD_End (); @@ -1379,7 +1378,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, if (TypeViewExamAnnouncement == Exa_FORM_VIEW) { HTM_TEXTAREA_Begin ("id=\"DocRequired\" name=\"DocRequired\" cols=\"40\" rows=\"2\""); - fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.DocRequired); + HTM_Txt (Gbl.ExamAnns.ExaDat.DocRequired); HTM_TEXTAREA_End (); } else @@ -1387,7 +1386,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, Gbl.ExamAnns.ExaDat.DocRequired, Cns_MAX_BYTES_TEXT,false); - fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.DocRequired); + HTM_Txt (Gbl.ExamAnns.ExaDat.DocRequired); } HTM_TD_End (); @@ -1406,7 +1405,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, if (TypeViewExamAnnouncement == Exa_FORM_VIEW) { HTM_TEXTAREA_Begin ("id=\"MatRequired\" name=\"MatRequired\" cols=\"40\" rows=\"4\""); - fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.MatRequired); + HTM_Txt (Gbl.ExamAnns.ExaDat.MatRequired); HTM_TEXTAREA_End (); } else @@ -1414,7 +1413,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, Gbl.ExamAnns.ExaDat.MatRequired, Cns_MAX_BYTES_TEXT,false); - fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.MatRequired); + HTM_Txt (Gbl.ExamAnns.ExaDat.MatRequired); } HTM_TD_End (); @@ -1433,7 +1432,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, if (TypeViewExamAnnouncement == Exa_FORM_VIEW) { HTM_TEXTAREA_Begin ("id=\"MatAllowed\" name=\"MatAllowed\" cols=\"40\" rows=\"4\""); - fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.MatAllowed); + HTM_Txt (Gbl.ExamAnns.ExaDat.MatAllowed); HTM_TEXTAREA_End (); } else @@ -1441,7 +1440,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, Gbl.ExamAnns.ExaDat.MatAllowed, Cns_MAX_BYTES_TEXT,false); - fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.MatAllowed); + HTM_Txt (Gbl.ExamAnns.ExaDat.MatAllowed); } HTM_TD_End (); @@ -1460,7 +1459,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, if (TypeViewExamAnnouncement == Exa_FORM_VIEW) { HTM_TEXTAREA_Begin ("id=\"OtherInfo\" name=\"OtherInfo\" cols=\"40\" rows=\"5\""); - fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.OtherInfo); + HTM_Txt (Gbl.ExamAnns.ExaDat.OtherInfo); HTM_TEXTAREA_End (); } else @@ -1468,7 +1467,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod, Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, Gbl.ExamAnns.ExaDat.OtherInfo, Cns_MAX_BYTES_TEXT,false); - fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.OtherInfo); + HTM_Txt (Gbl.ExamAnns.ExaDat.OtherInfo); } HTM_TD_End (); diff --git a/swad_figure.c b/swad_figure.c index b629cee5..33db1e5d 100644 --- a/swad_figure.c +++ b/swad_figure.c @@ -427,8 +427,7 @@ static void Fig_GetAndShowNumUsrsInCrss (Rol_Role_t Role) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"%s\"",Class); - fprintf (Gbl.F.Out,"%s", - (Role == Rol_UNK) ? Txt_Total : + HTM_Txt ((Role == Rol_UNK) ? Txt_Total : Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN]); HTM_TD_End (); @@ -460,7 +459,7 @@ static void Fig_GetAndShowNumUsrsNotBelongingToAnyCrs (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"%s\"",Class); - fprintf (Gbl.F.Out,"%s",Txt_ROLES_PLURAL_Abc[Rol_GST][Usr_SEX_UNKNOWN]); + HTM_Txt (Txt_ROLES_PLURAL_Abc[Rol_GST][Usr_SEX_UNKNOWN]); HTM_TD_End (); HTM_TD_Begin ("class=\"%s\"",Class); @@ -597,31 +596,31 @@ static void Fig_WriteHeadHierarchy (void) HTM_TH_Begin (1,1,"RM"); Ico_PutIcon ("globe.svg",Txt_Countries,"CONTEXT_ICO_x16"); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Txt_Countries); + HTM_Txt (Txt_Countries); HTM_TH_End (); HTM_TH_Begin (1,1,"RM"); Ico_PutIcon ("university.svg",Txt_Institutions,"CONTEXT_ICO_x16"); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Txt_Institutions); + HTM_Txt (Txt_Institutions); HTM_TH_End (); HTM_TH_Begin (1,1,"RM"); Ico_PutIcon ("building.svg",Txt_Centres,"CONTEXT_ICO_x16"); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Txt_Centres); + HTM_Txt (Txt_Centres); HTM_TH_End (); HTM_TH_Begin (1,1,"RM"); Ico_PutIcon ("graduation-cap.svg",Txt_Degrees,"CONTEXT_ICO_x16"); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Txt_Degrees); + HTM_Txt (Txt_Degrees); HTM_TH_End (); HTM_TH_Begin (1,1,"RM"); Ico_PutIcon ("list-ol.svg",Txt_Courses,"CONTEXT_ICO_x16"); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Txt_Courses); + HTM_Txt (Txt_Courses); HTM_TH_End (); HTM_TR_End (); @@ -1482,7 +1481,7 @@ static void Fig_ShowInss (MYSQL_RES **mysql_res,unsigned NumInss, 40,NULL,true); fprintf (Gbl.F.Out," "); } - fprintf (Gbl.F.Out,"%s",Ins.FullName); + HTM_Txt (Ins.FullName); Frm_LinkFormEnd (); Frm_EndForm (); HTM_TD_End (); @@ -2500,19 +2499,19 @@ static void Fig_WriteStatsExpTreesTableHead2 (void) HTM_TH_Begin (1,1,"RM"); fprintf (Gbl.F.Out,"%s/",Txt_Folders); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Txt_course); + HTM_Txt (Txt_course); HTM_TH_End (); HTM_TH_Begin (1,1,"RM"); fprintf (Gbl.F.Out,"%s/",Txt_Files); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Txt_course); + HTM_Txt (Txt_course); HTM_TH_End (); HTM_TH_Begin (1,1,"RM"); fprintf (Gbl.F.Out,"%s/",Txt_Size); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Txt_course); + HTM_Txt (Txt_course); HTM_TH_End (); HTM_TR_End (); @@ -2533,19 +2532,19 @@ static void Fig_WriteStatsExpTreesTableHead3 (void) HTM_TH_Begin (1,1,"RM"); fprintf (Gbl.F.Out,"%s/",Txt_Folders); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Txt_user[Usr_SEX_UNKNOWN]); + HTM_Txt (Txt_user[Usr_SEX_UNKNOWN]); HTM_TH_End (); HTM_TH_Begin (1,1,"RM"); fprintf (Gbl.F.Out,"%s/",Txt_Files); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Txt_user[Usr_SEX_UNKNOWN]); + HTM_Txt (Txt_user[Usr_SEX_UNKNOWN]); HTM_TH_End (); HTM_TH_Begin (1,1,"RM"); fprintf (Gbl.F.Out,"%s/",Txt_Size); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Txt_user[Usr_SEX_UNKNOWN]); + HTM_Txt (Txt_user[Usr_SEX_UNKNOWN]); HTM_TH_End (); HTM_TR_End (); @@ -2595,19 +2594,19 @@ static void Fig_WriteRowStatsFileBrowsers1 (const char *NameOfFileZones, HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"%s LM\"",Class); - fprintf (Gbl.F.Out,"%s",NameOfFileZones); + HTM_Txt (NameOfFileZones); HTM_TD_End (); HTM_TD_Begin ("class=\"%s RM\"",Class); - fprintf (Gbl.F.Out,"%s",StrNumCrss); + HTM_Txt (StrNumCrss); HTM_TD_End (); HTM_TD_Begin ("class=\"%s RM\"",Class); - fprintf (Gbl.F.Out,"%s",StrNumGrps); + HTM_Txt (StrNumGrps); HTM_TD_End (); HTM_TD_Begin ("class=\"%s RM\"",Class); - fprintf (Gbl.F.Out,"%s",StrNumUsrs); + HTM_Txt (StrNumUsrs); HTM_TD_End (); HTM_TD_Begin ("class=\"%s RM\"",Class); @@ -2623,7 +2622,7 @@ static void Fig_WriteRowStatsFileBrowsers1 (const char *NameOfFileZones, HTM_TD_End (); HTM_TD_Begin ("class=\"%s RM\"",Class); - fprintf (Gbl.F.Out,"%s",FileSizeStr); + HTM_Txt (FileSizeStr); HTM_TD_End (); HTM_TR_End (); @@ -2669,19 +2668,19 @@ static void Fig_WriteRowStatsFileBrowsers2 (const char *NameOfFileZones, HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"%s LM\"",Class); - fprintf (Gbl.F.Out,"%s",NameOfFileZones); + HTM_Txt (NameOfFileZones); HTM_TD_End (); HTM_TD_Begin ("class=\"%s RM\"",Class); - fprintf (Gbl.F.Out,"%s",StrNumFoldersPerCrs); + HTM_Txt (StrNumFoldersPerCrs); HTM_TD_End (); HTM_TD_Begin ("class=\"%s RM\"",Class); - fprintf (Gbl.F.Out,"%s",StrNumFilesPerCrs); + HTM_Txt (StrNumFilesPerCrs); HTM_TD_End (); HTM_TD_Begin ("class=\"%s RM\"",Class); - fprintf (Gbl.F.Out,"%s",FileSizePerCrsStr); + HTM_Txt (FileSizePerCrsStr); HTM_TD_End (); HTM_TR_End (); @@ -2727,19 +2726,19 @@ static void Fig_WriteRowStatsFileBrowsers3 (const char *NameOfFileZones, HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"%s LM\"",Class); - fprintf (Gbl.F.Out,"%s",NameOfFileZones); + HTM_Txt (NameOfFileZones); HTM_TD_End (); HTM_TD_Begin ("class=\"%s RM\"",Class); - fprintf (Gbl.F.Out,"%s",StrNumFoldersPerUsr); + HTM_Txt (StrNumFoldersPerUsr); HTM_TD_End (); HTM_TD_Begin ("class=\"%s RM\"",Class); - fprintf (Gbl.F.Out,"%s",StrNumFilesPerUsr); + HTM_Txt (StrNumFilesPerUsr); HTM_TD_End (); HTM_TD_Begin ("class=\"%s RM\"",Class); - fprintf (Gbl.F.Out,"%s",FileSizePerUsrStr); + HTM_Txt (FileSizePerUsrStr); HTM_TD_End (); HTM_TR_End (); @@ -2782,7 +2781,7 @@ static void Fig_GetAndShowOERsStats (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",Txt_LICENSES[License]); + HTM_Txt (Txt_LICENSES[License]); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); @@ -3099,7 +3098,7 @@ static void Fig_GetAndShowTestsStats (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",Txt_TST_STR_ANSWER_TYPES[AnsType]); + HTM_Txt (Txt_TST_STR_ANSWER_TYPES[AnsType]); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); @@ -3148,7 +3147,7 @@ static void Fig_GetAndShowTestsStats (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT_N_LINE_TOP LM\""); - fprintf (Gbl.F.Out,"%s",Txt_Total); + HTM_Txt (Txt_Total); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_N_LINE_TOP RM\""); @@ -3402,7 +3401,7 @@ static void Fig_GetAndShowSocialActivityStats (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",Txt_TIMELINE_NOTE[NoteType]); + HTM_Txt (Txt_TIMELINE_NOTE[NoteType]); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); @@ -3523,7 +3522,7 @@ static void Fig_GetAndShowSocialActivityStats (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT_N_LINE_TOP LM\""); - fprintf (Gbl.F.Out,"%s",Txt_Total); + HTM_Txt (Txt_Total); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_N_LINE_TOP RM\""); @@ -3692,8 +3691,8 @@ static void Fig_GetAndShowFollowStats (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",Fol == 0 ? Txt_Followed : - Txt_Followers); + HTM_Txt (Fol == 0 ? Txt_Followed : + Txt_Followers); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); @@ -3823,7 +3822,7 @@ static void Fig_GetAndShowFollowStats (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",Txt_FollowPerFollow[Fol]); + HTM_Txt (Txt_FollowPerFollow[Fol]); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); @@ -4142,7 +4141,7 @@ static void Fig_WriteForumTotalStats (struct Fig_FiguresForum *FiguresForum) HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_N_LINE_TOP LM\""); - fprintf (Gbl.F.Out,"%s",Txt_Total); + HTM_Txt (Txt_Total); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_N_LINE_TOP RM\""); @@ -4345,7 +4344,7 @@ static void Fig_GetAndShowNumUsrsPerNotifyEvent (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",Txt_NOTIFY_EVENTS_PLURAL[NotifyEvent]); + HTM_Txt (Txt_NOTIFY_EVENTS_PLURAL[NotifyEvent]); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); @@ -4374,7 +4373,7 @@ static void Fig_GetAndShowNumUsrsPerNotifyEvent (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT_N_LINE_TOP LM\""); - fprintf (Gbl.F.Out,"%s",Txt_Total); + HTM_Txt (Txt_Total); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_N_LINE_TOP RM\""); @@ -4525,7 +4524,7 @@ static void Fig_GetAndShowMsgsStats (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",Txt_MSGS_Sent); + HTM_Txt (Txt_MSGS_Sent); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); @@ -4549,7 +4548,7 @@ static void Fig_GetAndShowMsgsStats (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",Txt_MSGS_Received); + HTM_Txt (Txt_MSGS_Received); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); @@ -4730,7 +4729,7 @@ static void Fig_GetAndShowNumUsrsPerPrivacyForAnObject (const char *TxtObject, HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",Txt_PRIVACY_OPTIONS[Visibility]); + HTM_Txt (Txt_PRIVACY_OPTIONS[Visibility]); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); @@ -4817,7 +4816,7 @@ static void Fig_GetAndShowNumUsrsPerCookies (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"%s CM\"",AcceptedClass[i]); - fprintf (Gbl.F.Out,"%s",AcceptedSymbol[i]); + HTM_Txt (AcceptedSymbol[i]); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); @@ -4893,7 +4892,7 @@ static void Fig_GetAndShowNumUsrsPerLanguage (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",Txt_STR_LANG_NAME[Lan]); + HTM_Txt (Txt_STR_LANG_NAME[Lan]); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); diff --git a/swad_file_browser.c b/swad_file_browser.c index f9eea188..9cfe5648 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -3269,7 +3269,7 @@ static void Brw_FormToChangeCrsGrpZone (void) HTM_INPUT_RADIO ("GrpCod",true, "value=\"-1\"%s", IsCourseZone ? " checked=\"checked\"" : ""); - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Crs.FullName); + HTM_Txt (Gbl.Hierarchy.Crs.FullName); HTM_LABEL_End (); HTM_LI_End (); @@ -3390,7 +3390,7 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat) HTM_BR (); Frm_LinkFormSubmit (Txt_View_record_for_this_course,"AUTHOR_TXT",NULL); - fprintf (Gbl.F.Out,"%s",UsrDat->Surname1); + HTM_Txt (UsrDat->Surname1); if (UsrDat->Surname2[0]) fprintf (Gbl.F.Out," %s",UsrDat->Surname2); if (UsrDat->FirstName[0]) @@ -3403,7 +3403,7 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat) HTM_BR (); HTM_A_Begin ("href=\"mailto:%s\" target=\"_blank\" class=\"AUTHOR_TXT\"", UsrDat->Email); - fprintf (Gbl.F.Out,"%s",UsrDat->Email); + HTM_Txt (UsrDat->Email); HTM_A_End (); } Frm_EndForm (); @@ -4061,7 +4061,7 @@ static void Brw_WriteSubtitleOfFileBrowser (void) if (Subtitle[0]) { HTM_DIV_Begin ("class=\"BROWSER_SUBTITLE\""); - fprintf (Gbl.F.Out,"%s",Subtitle); + HTM_Txt (Subtitle); HTM_DIV_End (); } } @@ -6304,7 +6304,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic) Gbl.FileBrowser.Type == Brw_SHOW_MRK_GRP) ? Txt_Check_marks_in_the_file : Txt_Download, Gbl.FileBrowser.TxtStyle,NULL); - fprintf (Gbl.F.Out,"%s",FileNameToShow); + HTM_Txt (FileNameToShow); Frm_LinkFormEnd (); Frm_EndForm (); @@ -8387,7 +8387,7 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow) HTM_DIV_Begin ("class=\"dz-message\""); HTM_SPAN_Begin ("class=\"DAT_LIGHT\""); - fprintf (Gbl.F.Out,"%s",Txt_Select_one_or_more_files_from_your_computer_or_drag_and_drop_here); + HTM_Txt (Txt_Select_one_or_more_files_from_your_computer_or_drag_and_drop_here); HTM_SPAN_End (); HTM_DIV_End (); @@ -9522,12 +9522,11 @@ void Brw_ShowFileMetadata (void) "PHOTO15x20",Pho_ZOOM,false); /* Write name */ - fprintf (Gbl.F.Out,"%s", - PublisherUsrDat.FullName); + HTM_Txt (PublisherUsrDat.FullName); } else /* Unknown publisher */ - fprintf (Gbl.F.Out,"%s",Txt_ROLES_SINGUL_Abc[Rol_UNK][Usr_SEX_UNKNOWN]); + HTM_Txt (Txt_ROLES_SINGUL_Abc[Rol_UNK][Usr_SEX_UNKNOWN]); HTM_TD_End (); HTM_TR_End (); @@ -9545,7 +9544,7 @@ void Brw_ShowFileMetadata (void) HTM_TD_End (); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",FileSizeStr); + HTM_Txt (FileSizeStr); HTM_TD_End (); HTM_TR_End (); @@ -9589,8 +9588,7 @@ void Brw_ShowFileMetadata (void) HTM_SELECT_End (); } else // I can not edit file properties - fprintf (Gbl.F.Out,"%s", - FileMetadata.IsPublic ? Txt_Public_open_educational_resource_OER_for_everyone : + HTM_Txt (FileMetadata.IsPublic ? Txt_Public_open_educational_resource_OER_for_everyone : Txt_Private_available_to_certain_users_identified); HTM_TD_End (); @@ -9623,7 +9621,7 @@ void Brw_ShowFileMetadata (void) HTM_SELECT_End (); } else // I can not edit file properties - fprintf (Gbl.F.Out,"%s",Txt_LICENSES[FileMetadata.License]); + HTM_Txt (Txt_LICENSES[FileMetadata.License]); HTM_TD_End (); HTM_TR_End (); @@ -10066,7 +10064,7 @@ static void Brw_WriteSmallLinkToDownloadFile (const char *URL, Frm_LinkFormSubmit (Txt_Check_marks_in_the_file,"DAT",NULL); /* Name of the file of marks */ - fprintf (Gbl.F.Out,"%s",FileNameToShow); + HTM_Txt (FileNameToShow); /* Link end and form end */ Frm_LinkFormEnd (); @@ -10077,7 +10075,7 @@ static void Brw_WriteSmallLinkToDownloadFile (const char *URL, /* Put anchor and filename */ HTM_A_Begin ("href=\"%s\" class=\"DAT\" title=\"%s\" target=\"_blank\"", URL,FileNameToShow); - fprintf (Gbl.F.Out,"%s",FileNameToShow); + HTM_Txt (FileNameToShow); HTM_A_End (); } } @@ -11972,7 +11970,7 @@ static void Brw_WriteRowDocData (unsigned long *NumDocsNotHidden,MYSQL_ROW row) Txt_Go_to_X, CrsShortName); Frm_LinkFormSubmit (Gbl.Title,"DAT",NULL); - fprintf (Gbl.F.Out,"%s",CrsShortName); + HTM_Txt (CrsShortName); Frm_LinkFormEnd (); Frm_EndForm (); } @@ -12024,7 +12022,7 @@ static void Brw_WriteRowDocData (unsigned long *NumDocsNotHidden,MYSQL_ROW row) } HTM_TD_Begin ("class=\"DAT LT %s\"",BgColor); - fprintf (Gbl.F.Out,"%s",Title); + HTM_Txt (Title); HTM_TD_End (); /***** Get the name of the file to show *****/ diff --git a/swad_follow.c b/swad_follow.c index 2818f95c..e5575922 100644 --- a/swad_follow.c +++ b/swad_follow.c @@ -213,7 +213,7 @@ void Fol_SuggestUsrsToFollowMainZoneOnRightColumn (void) /***** Title with link to suggest more users to follow *****/ Frm_StartForm (ActSeeSocPrf); Frm_LinkFormSubmit (Txt_Who_to_follow,"CONNECTED_TXT",NULL); - fprintf (Gbl.F.Out,"%s",Txt_Who_to_follow); + HTM_Txt (Txt_Who_to_follow); Frm_LinkFormEnd (); Frm_EndForm (); @@ -525,7 +525,7 @@ void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat, /* User follows me? */ HTM_DIV_Begin ("id=\"follows_me\" class=\"DAT_LIGHT\""); if (UsrFollowsMe) - fprintf (Gbl.F.Out,"%s",Txt_FOLLOWS_YOU); + HTM_Txt (Txt_FOLLOWS_YOU); HTM_DIV_End (); /* Number of followed */ @@ -635,7 +635,7 @@ static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat, The_ClassFormOutBox [Gbl.Prefs.Theme], NULL); } - fprintf (Gbl.F.Out,"%s",Title); + HTM_Txt (Title); if (NumUsrs) { Frm_LinkFormEnd (); diff --git a/swad_form.c b/swad_form.c index 48653713..64545116 100644 --- a/swad_form.c +++ b/swad_form.c @@ -31,6 +31,7 @@ #include "swad_form.h" #include "swad_global.h" +#include "swad_HTML.h" /*****************************************************************************/ /************** External global variables from others modules ****************/ @@ -150,7 +151,7 @@ static void Frm_StartFormInternal (Act_Action_t NextAction,bool PutParameterLoca /* Put basic form parameters */ Frm_SetParamsForm (ParamsStr,NextAction,PutParameterLocationIfNoSesion); - fprintf (Gbl.F.Out,"%s",ParamsStr); + HTM_Txt (ParamsStr); Gbl.Form.Inside = true; } diff --git a/swad_forum.c b/swad_forum.c index e052cef3..23830d04 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -1200,7 +1200,7 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod, if (Enabled) { if (Subject[0]) - fprintf (Gbl.F.Out,"%s",Subject); + HTM_Txt (Subject); else fprintf (Gbl.F.Out,"[%s]",Txt_no_subject); } @@ -1294,7 +1294,7 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod, Med_ShowMedia (&Media,"FOR_IMG_CONTAINER","FOR_IMG"); } else - fprintf (Gbl.F.Out,"%s",Txt_This_post_has_been_banned_probably_for_not_satisfy_the_rules_of_the_forums); + HTM_Txt (Txt_This_post_has_been_banned_probably_for_not_satisfy_the_rules_of_the_forums); HTM_TD_End (); HTM_TR_End (); @@ -1759,7 +1759,7 @@ static void For_PutFormWhichForums (void) "value=\"%u\"%s", (unsigned) ForumSet, (ForumSet == Gbl.Forum.ForumSet) ? " checked=\"checked\"" : ""); - fprintf (Gbl.F.Out,"%s",Txt_FORUM_WHICH_FORUM[ForumSet]); + HTM_Txt (Txt_FORUM_WHICH_FORUM[ForumSet]); HTM_LABEL_End (); HTM_LI_End (); } @@ -2554,7 +2554,7 @@ static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted, Frm_LinkFormSubmit (Txt_FORUM_THREAD_HELP_ORDER[Order],"TIT_TBL",NULL); if (Order == Gbl.Forum.ThreadsOrder) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,"%s",Txt_FORUM_THREAD_ORDER[Order]); + HTM_Txt (Txt_FORUM_THREAD_ORDER[Order]); if (Order == Gbl.Forum.ThreadsOrder) fprintf (Gbl.F.Out,""); Frm_LinkFormEnd (); diff --git a/swad_game.c b/swad_game.c index f7f60339..440adf79 100644 --- a/swad_game.c +++ b/swad_game.c @@ -227,7 +227,7 @@ static void Gam_ListAllGames (void) Frm_LinkFormSubmit (Txt_GAMES_ORDER_HELP[Order],"TIT_TBL",NULL); if (Order == Gbl.Games.SelectedOrder) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,"%s",Txt_GAMES_ORDER[Order]); + HTM_Txt (Txt_GAMES_ORDER[Order]); if (Order == Gbl.Games.SelectedOrder) fprintf (Gbl.F.Out,""); Frm_LinkFormEnd (); @@ -452,7 +452,7 @@ void Gam_ShowOneGame (long GamCod, Frm_LinkFormSubmit (Txt_View_game, Game.Hidden ? "ASG_TITLE_LIGHT": "ASG_TITLE",NULL); - fprintf (Gbl.F.Out,"%s",Game.Title); + HTM_Txt (Game.Title); Frm_LinkFormEnd (); Frm_EndForm (); HTM_ARTICLE_End (); @@ -510,7 +510,7 @@ void Gam_ShowOneGame (long GamCod, Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links HTM_DIV_Begin ("class=\"PAR %s\"",Game.Hidden ? "DAT_LIGHT" : "DAT"); - fprintf (Gbl.F.Out,"%s",Txt); + HTM_Txt (Txt); HTM_DIV_End (); HTM_TD_End (); @@ -1163,7 +1163,7 @@ static void Gam_PutFormsEditionGame (struct Game *Game,bool ItsANewGame) HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" cols=\"60\" rows=\"10\""); if (!ItsANewGame) - fprintf (Gbl.F.Out,"%s",Txt); + HTM_Txt (Txt); HTM_TEXTAREA_End (); HTM_TD_End (); @@ -1732,13 +1732,13 @@ static void Gam_ListOneOrMoreQuestionsForEdition (long GamCod,unsigned NumQsts, /* Write number of question */ HTM_DIV_Begin ("class=\"BIG_INDEX\""); - fprintf (Gbl.F.Out,"%s",StrQstInd); + HTM_Txt (StrQstInd); HTM_DIV_End (); /* Write answer type (row[2]) */ Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]); HTM_DIV_Begin ("class=\"DAT_SMALL\""); - fprintf (Gbl.F.Out,"%s",Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]); + HTM_Txt (Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]); HTM_DIV_End (); HTM_TD_End (); diff --git a/swad_group.c b/swad_group.c index d211c1b9..a24fec65 100644 --- a/swad_group.c +++ b/swad_group.c @@ -1443,7 +1443,7 @@ static void Grp_WriteHeadingGroupTypes (void) HTM_TH (1,1,"BM",NULL); HTM_TH_Begin (1,1,"CM"); - fprintf (Gbl.F.Out,"%s",Txt_Type_of_group); + HTM_Txt (Txt_Type_of_group); HTM_BR (); fprintf (Gbl.F.Out,"(%s)",Txt_eg_Lectures_Practicals); HTM_TH_End (); @@ -1648,7 +1648,7 @@ static void Grp_WriteHeadingGroups (void) HTM_TH (1,1,"BM",NULL); HTM_TH (1,1,"CM",Txt_Type_BR_of_group); HTM_TH_Begin (1,1,"CM"); - fprintf (Gbl.F.Out,"%s",Txt_Group_name); + HTM_Txt (Txt_Group_name); HTM_BR (); fprintf (Gbl.F.Out,"(%s)",Txt_eg_A_B); HTM_TH_End (); @@ -2288,7 +2288,7 @@ static void Grp_ListGrpsForMultipleSelection (struct GroupType *GrpTyp, /* Group name = students with no group */ HTM_TD_Begin ("class=\"DAT LM\""); HTM_LABEL_Begin ("for=\"Grp%ld\"",-GrpTyp->GrpTypCod); - fprintf (Gbl.F.Out,"%s",Txt_users_with_no_group); + HTM_Txt (Txt_users_with_no_group); HTM_LABEL_End (); HTM_TD_End (); @@ -2332,7 +2332,7 @@ static void Grp_WriteGrpHead (struct GroupType *GrpTyp) HTM_TR_Begin (NULL); HTM_TD_Begin ("colspan=\"9\" class=\"GRP_TITLE LM\""); HTM_BR (); - fprintf (Gbl.F.Out,"%s",GrpTyp->GrpTypName); + HTM_Txt (GrpTyp->GrpTypName); if (GrpTyp->MustBeOpened) { UniqueId++; @@ -2398,7 +2398,7 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight) else HTM_TD_Begin ("class=\"LM\""); HTM_LABEL_Begin ("for=\"Grp%ld\" class=\"DAT\"",Grp->GrpCod); - fprintf (Gbl.F.Out,"%s",Grp->GrpName); + HTM_Txt (Grp->GrpName); HTM_LABEL_End (); HTM_TD_End (); @@ -2407,7 +2407,7 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight) HTM_TD_Begin ("class=\"DAT LM LIGHT_BLUE\""); else HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",Grp->Classroom.ShrtName); + HTM_Txt (Grp->Classroom.ShrtName); HTM_TD_End (); /***** Current number of users in this group *****/ diff --git a/swad_hierarchy.c b/swad_hierarchy.c index 417b869b..24fb5319 100644 --- a/swad_hierarchy.c +++ b/swad_hierarchy.c @@ -217,7 +217,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) Frm_StartFormGoTo (ActMnu); Par_PutHiddenParamUnsigned (NULL,"NxtTab",(unsigned) TabSys); Frm_LinkFormSubmit (Txt_System,ClassTxt,NULL); - fprintf (Gbl.F.Out,"%s",Txt_System); + HTM_Txt (Txt_System); Frm_LinkFormEnd (); Frm_EndForm (); @@ -234,7 +234,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) Frm_StartFormGoTo (ActSeeIns); Cty_PutParamCtyCod (Gbl.Hierarchy.Cty.CtyCod); Frm_LinkFormSubmit (Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language],ClassTxt,NULL); - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]); + HTM_Txt (Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]); Frm_LinkFormEnd (); Frm_EndForm (); @@ -250,7 +250,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) /***** Form to go to select countries *****/ Frm_StartFormGoTo (ActSeeCty); Frm_LinkFormSubmit (Txt_Country,ClassTxt,NULL); - fprintf (Gbl.F.Out,"%s",Txt_Country); + HTM_Txt (Txt_Country); Frm_LinkFormEnd (); Frm_EndForm (); @@ -268,7 +268,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) Frm_StartFormGoTo (ActSeeCtr); Ins_PutParamInsCod (Gbl.Hierarchy.Ins.InsCod); Frm_LinkFormSubmit (Gbl.Hierarchy.Ins.FullName,ClassTxt,NULL); - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ins.ShrtName); + HTM_Txt (Gbl.Hierarchy.Ins.ShrtName); Frm_LinkFormEnd (); Frm_EndForm (); @@ -284,7 +284,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) /***** Form to go to select institutions *****/ Frm_StartFormGoTo (ActSeeIns); Frm_LinkFormSubmit (Txt_Institution,ClassTxt,NULL); - fprintf (Gbl.F.Out,"%s",Txt_Institution); + HTM_Txt (Txt_Institution); Frm_LinkFormEnd (); Frm_EndForm (); @@ -298,7 +298,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) fprintf (Gbl.F.Out," > "); /***** Hidden institution *****/ - fprintf (Gbl.F.Out,"%s",Txt_Institution); + HTM_Txt (Txt_Institution); HTM_DIV_End (); } @@ -314,7 +314,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) Frm_StartFormGoTo (ActSeeDeg); Ctr_PutParamCtrCod (Gbl.Hierarchy.Ctr.CtrCod); Frm_LinkFormSubmit (Gbl.Hierarchy.Ctr.FullName,ClassTxt,NULL); - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ctr.ShrtName); + HTM_Txt (Gbl.Hierarchy.Ctr.ShrtName); Frm_LinkFormEnd (); Frm_EndForm (); @@ -330,7 +330,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) /***** Form to go to select centres *****/ Frm_StartFormGoTo (ActSeeCtr); Frm_LinkFormSubmit (Txt_Centre,ClassTxt,NULL); - fprintf (Gbl.F.Out,"%s",Txt_Centre); + HTM_Txt (Txt_Centre); Frm_LinkFormEnd (); Frm_EndForm (); @@ -344,7 +344,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) fprintf (Gbl.F.Out," > "); /***** Hidden centre *****/ - fprintf (Gbl.F.Out,"%s",Txt_Centre); + HTM_Txt (Txt_Centre); HTM_DIV_End (); } @@ -360,7 +360,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) Frm_StartFormGoTo (ActSeeCrs); Deg_PutParamDegCod (Gbl.Hierarchy.Deg.DegCod); Frm_LinkFormSubmit (Gbl.Hierarchy.Deg.FullName,ClassTxt,NULL); - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Deg.ShrtName); + HTM_Txt (Gbl.Hierarchy.Deg.ShrtName); Frm_LinkFormEnd (); Frm_EndForm (); @@ -376,7 +376,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) /***** Form to go to select degrees *****/ Frm_StartFormGoTo (ActSeeDeg); Frm_LinkFormSubmit (Txt_Degree,ClassTxt,NULL); - fprintf (Gbl.F.Out,"%s",Txt_Degree); + HTM_Txt (Txt_Degree); Frm_LinkFormEnd (); Frm_EndForm (); @@ -390,7 +390,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) fprintf (Gbl.F.Out," > "); /***** Hidden degree *****/ - fprintf (Gbl.F.Out,"%s",Txt_Degree); + HTM_Txt (Txt_Degree); HTM_DIV_End (); } @@ -450,8 +450,7 @@ void Hie_WriteBigNameCtyInsCtrDegCrs (void) if (Gbl.Hierarchy.Cty.CtyCod > 0) { HTM_DIV_Begin ("id=\"big_full_name\""); - fprintf (Gbl.F.Out,"%s", // Full name - (Gbl.Hierarchy.Level == Hie_CRS) ? Gbl.Hierarchy.Crs.FullName : + HTM_Txt ( (Gbl.Hierarchy.Level == Hie_CRS) ? Gbl.Hierarchy.Crs.FullName :// Full name ((Gbl.Hierarchy.Level == Hie_DEG) ? Gbl.Hierarchy.Deg.FullName : ((Gbl.Hierarchy.Level == Hie_CTR) ? Gbl.Hierarchy.Ctr.FullName : ((Gbl.Hierarchy.Level == Hie_INS) ? Gbl.Hierarchy.Ins.FullName : @@ -463,8 +462,7 @@ void Hie_WriteBigNameCtyInsCtrDegCrs (void) HTM_DIV_End (); HTM_DIV_Begin ("id=\"big_short_name\""); - fprintf (Gbl.F.Out,"%s", // Short name - (Gbl.Hierarchy.Level == Hie_CRS) ? Gbl.Hierarchy.Crs.ShrtName : + HTM_Txt ( (Gbl.Hierarchy.Level == Hie_CRS) ? Gbl.Hierarchy.Crs.ShrtName :// Short name ((Gbl.Hierarchy.Level == Hie_DEG) ? Gbl.Hierarchy.Deg.ShrtName : ((Gbl.Hierarchy.Level == Hie_CTR) ? Gbl.Hierarchy.Ctr.ShrtName : ((Gbl.Hierarchy.Level == Hie_INS) ? Gbl.Hierarchy.Ins.ShrtName : @@ -483,8 +481,7 @@ void Hie_WriteBigNameCtyInsCtrDegCrs (void) HTM_DIV_End (); HTM_DIV_Begin ("id=\"big_short_name\""); - fprintf (Gbl.F.Out,"%s", // Short name - Cfg_PLATFORM_SHORT_NAME); + HTM_Txt (Cfg_PLATFORM_SHORT_NAME);// Short name HTM_DIV_End (); } HTM_DIV_End (); diff --git a/swad_holiday.c b/swad_holiday.c index 7225bf21..8e0147a7 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -128,7 +128,7 @@ void Hld_SeeHolidays (void) Frm_LinkFormSubmit (Txt_HOLIDAYS_HELP_ORDER[Order],"TIT_TBL",NULL); if (Order == Gbl.Hlds.SelectedOrder) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,"%s",Txt_HOLIDAYS_ORDER[Order]); + HTM_Txt (Txt_HOLIDAYS_ORDER[Order]); if (Order == Gbl.Hlds.SelectedOrder) fprintf (Gbl.F.Out,""); Frm_LinkFormEnd (); @@ -154,8 +154,7 @@ void Hld_SeeHolidays (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s", - Gbl.Hlds.Lst[NumHld].PlcCod <= 0 ? Txt_All_places : + HTM_Txt (Gbl.Hlds.Lst[NumHld].PlcCod <= 0 ? Txt_All_places : Gbl.Hlds.Lst[NumHld].PlaceFullName); HTM_TD_End (); @@ -172,7 +171,7 @@ void Hld_SeeHolidays (void) break; case Hld_NON_SCHOOL_PERIOD: Dat_ConvDateToDateStr (&Gbl.Hlds.Lst[NumHld].EndDate,StrDate); - fprintf (Gbl.F.Out,"%s",StrDate); + HTM_Txt (StrDate); break; } HTM_TD_End (); diff --git a/swad_indicator.c b/swad_indicator.c index e0753ca5..9156d43c 100644 --- a/swad_indicator.c +++ b/swad_indicator.c @@ -700,7 +700,7 @@ static void Ind_ShowNumCoursesWithIndicators (unsigned NumCrssWithIndicatorYes[1 HTM_TD_Empty (1); HTM_TD_Begin ("class=\"DAT_N_LINE_TOP RM\""); - fprintf (Gbl.F.Out,"%s",Txt_Total); + HTM_Txt (Txt_Total); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_N_LINE_TOP RM\""); @@ -910,7 +910,7 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat (Indicators.CoursePartiallyOK ? "DAT_SMALL" : "DAT_SMALL_RED"), Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",row[0]); + HTM_Txt (row[0]); HTM_TD_End (); HTM_TD_Begin ("class=\"%s LM COLOR%u\"", @@ -918,7 +918,7 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat (Indicators.CoursePartiallyOK ? "DAT_SMALL" : "DAT_SMALL_RED"), Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",row[1]); + HTM_Txt (row[1]); HTM_TD_End (); HTM_TD_Begin ("class=\"%s LM COLOR%u\"", @@ -926,7 +926,7 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat (Indicators.CoursePartiallyOK ? "DAT_SMALL" : "DAT_SMALL_RED"), Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",row[3]); + HTM_Txt (row[3]); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_SMALL LM COLOR%u\"",Gbl.RowEvenOdd); @@ -948,61 +948,61 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat HTM_TD_Begin ("class=\"DAT_SMALL_GREEN CM COLOR%u\"", Gbl.RowEvenOdd); if (Indicators.ThereIsSyllabus) - fprintf (Gbl.F.Out,"%s",Txt_YES); + HTM_Txt (Txt_YES); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_SMALL_RED CM COLOR%u\"", Gbl.RowEvenOdd); if (!Indicators.ThereIsSyllabus) - fprintf (Gbl.F.Out,"%s",Txt_NO); + HTM_Txt (Txt_NO); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_SMALL_GREEN CM COLOR%u\"", Gbl.RowEvenOdd); if (Indicators.ThereAreAssignments) - fprintf (Gbl.F.Out,"%s",Txt_YES); + HTM_Txt (Txt_YES); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_SMALL_RED CM COLOR%u\"", Gbl.RowEvenOdd); if (!Indicators.ThereAreAssignments) - fprintf (Gbl.F.Out,"%s",Txt_NO); + HTM_Txt (Txt_NO); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_SMALL_GREEN CM COLOR%u\"", Gbl.RowEvenOdd); if (Indicators.ThereIsOnlineTutoring) - fprintf (Gbl.F.Out,"%s",Txt_YES); + HTM_Txt (Txt_YES); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_SMALL_RED CM COLOR%u\"", Gbl.RowEvenOdd); if (!Indicators.ThereIsOnlineTutoring) - fprintf (Gbl.F.Out,"%s",Txt_NO); + HTM_Txt (Txt_NO); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_SMALL_GREEN CM COLOR%u\"", Gbl.RowEvenOdd); if (Indicators.ThereAreMaterials) - fprintf (Gbl.F.Out,"%s",Txt_YES); + HTM_Txt (Txt_YES); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_SMALL_RED CM COLOR%u\"", Gbl.RowEvenOdd); if (!Indicators.ThereAreMaterials) - fprintf (Gbl.F.Out,"%s",Txt_NO); + HTM_Txt (Txt_NO); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_SMALL_GREEN CM COLOR%u\"", Gbl.RowEvenOdd); if (Indicators.ThereIsAssessment) - fprintf (Gbl.F.Out,"%s",Txt_YES); + HTM_Txt (Txt_YES); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_SMALL_RED CM COLOR%u\"", Gbl.RowEvenOdd); if (!Indicators.ThereIsAssessment) - fprintf (Gbl.F.Out,"%s",Txt_NO); + HTM_Txt (Txt_NO); HTM_TD_End (); HTM_TR_End (); @@ -1020,7 +1020,7 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat (Indicators.CoursePartiallyOK ? "DAT_SMALL" : "DAT_SMALL_RED"), Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",row[0]); + HTM_Txt (row[0]); HTM_TD_End (); HTM_TD_Begin ("class=\"%s LM COLOR%u\"", @@ -1028,7 +1028,7 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat (Indicators.CoursePartiallyOK ? "DAT_SMALL" : "DAT_SMALL_RED"), Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",row[1]); + HTM_Txt (row[1]); HTM_TD_End (); HTM_TD_Begin ("class=\"%s LM COLOR%u\"", @@ -1036,7 +1036,7 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat (Indicators.CoursePartiallyOK ? "DAT_SMALL" : "DAT_SMALL_RED"), Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",row[3]); + HTM_Txt (row[3]); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_SMALL LM COLOR%u\"",Gbl.RowEvenOdd); @@ -1072,46 +1072,46 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat HTM_TD_Begin ("class=\"DAT_SMALL_GREEN CM COLOR%u\"", Gbl.RowEvenOdd); if (Indicators.ThereIsSyllabus) - fprintf (Gbl.F.Out,"%s",Txt_YES); + HTM_Txt (Txt_YES); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_SMALL_RED CM COLOR%u\"", Gbl.RowEvenOdd); if (!Indicators.ThereIsSyllabus) - fprintf (Gbl.F.Out,"%s",Txt_NO); + HTM_Txt (Txt_NO); HTM_TD_End (); HTM_TD_Begin ("class=\"%s LM COLOR%u\"", (Indicators.SyllabusLecSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",Txt_INFO_SRC_SHORT_TEXT[Indicators.SyllabusLecSrc]); + HTM_Txt (Txt_INFO_SRC_SHORT_TEXT[Indicators.SyllabusLecSrc]); HTM_TD_End (); HTM_TD_Begin ("class=\"%s LM COLOR%u\"", (Indicators.SyllabusPraSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",Txt_INFO_SRC_SHORT_TEXT[Indicators.SyllabusPraSrc]); + HTM_Txt (Txt_INFO_SRC_SHORT_TEXT[Indicators.SyllabusPraSrc]); HTM_TD_End (); HTM_TD_Begin ("class=\"%s LM COLOR%u\">", (Indicators.TeachingGuideSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",Txt_INFO_SRC_SHORT_TEXT[Indicators.TeachingGuideSrc]); + HTM_Txt (Txt_INFO_SRC_SHORT_TEXT[Indicators.TeachingGuideSrc]); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_SMALL_GREEN CM COLOR%u\"", Gbl.RowEvenOdd); if (Indicators.ThereAreAssignments) - fprintf (Gbl.F.Out,"%s",Txt_YES); + HTM_Txt (Txt_YES); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_SMALL_RED CM COLOR%u\"", Gbl.RowEvenOdd); if (!Indicators.ThereAreAssignments) - fprintf (Gbl.F.Out,"%s",Txt_NO); + HTM_Txt (Txt_NO); HTM_TD_End (); HTM_TD_Begin ("class=\"%s RM COLOR%u\"", @@ -1138,13 +1138,13 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat HTM_TD_Begin ("class=\"DAT_SMALL_GREEN CM COLOR%u\"", Gbl.RowEvenOdd); if (Indicators.ThereIsOnlineTutoring) - fprintf (Gbl.F.Out,"%s",Txt_YES); + HTM_Txt (Txt_YES); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_SMALL_RED CM COLOR%u\"", Gbl.RowEvenOdd); if (!Indicators.ThereIsOnlineTutoring) - fprintf (Gbl.F.Out,"%s",Txt_NO); + HTM_Txt (Txt_NO); HTM_TD_End (); HTM_TD_Begin ("class=\"%s RM COLOR%u\"", @@ -1171,13 +1171,13 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat HTM_TD_Begin ("class=\"DAT_SMALL_GREEN CM COLOR%u\"", Gbl.RowEvenOdd); if (Indicators.ThereAreMaterials) - fprintf (Gbl.F.Out,"%s",Txt_YES); + HTM_Txt (Txt_YES); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_SMALL_RED CM COLOR%u\"", Gbl.RowEvenOdd); if (!Indicators.ThereAreMaterials) - fprintf (Gbl.F.Out,"%s",Txt_NO); + HTM_Txt (Txt_NO); HTM_TD_End (); HTM_TD_Begin ("class=\"%s RM COLOR%u\"", @@ -1197,27 +1197,27 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat HTM_TD_Begin ("class=\"DAT_SMALL_GREEN CM COLOR%u\"", Gbl.RowEvenOdd); if (Indicators.ThereIsAssessment) - fprintf (Gbl.F.Out,"%s",Txt_YES); + HTM_Txt (Txt_YES); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_SMALL_RED CM COLOR%u\"", Gbl.RowEvenOdd); if (!Indicators.ThereIsAssessment) - fprintf (Gbl.F.Out,"%s",Txt_NO); + HTM_Txt (Txt_NO); HTM_TD_End (); HTM_TD_Begin ("class=\"%s LM COLOR%u\"", (Indicators.AssessmentSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",Txt_INFO_SRC_SHORT_TEXT[Indicators.AssessmentSrc]); + HTM_Txt (Txt_INFO_SRC_SHORT_TEXT[Indicators.AssessmentSrc]); HTM_TD_End (); HTM_TD_Begin ("class=\"%s LM COLOR%u\"", (Indicators.TeachingGuideSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",Txt_INFO_SRC_SHORT_TEXT[Indicators.TeachingGuideSrc]); + HTM_Txt (Txt_INFO_SRC_SHORT_TEXT[Indicators.TeachingGuideSrc]); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_info.c b/swad_info.c index 0c9df21b..43c5cc06 100644 --- a/swad_info.c +++ b/swad_info.c @@ -613,7 +613,7 @@ void Inf_WriteMsgYouMustReadInfo (void) Frm_StartForm (Inf_ActionsSeeInfo[InfoType]); Frm_LinkFormSubmit (Act_GetTitleAction (Inf_ActionsSeeInfo[InfoType]), The_ClassFormInBox[Gbl.Prefs.Theme],NULL); - fprintf (Gbl.F.Out,"%s",Act_GetTitleAction (Inf_ActionsSeeInfo[InfoType])); + HTM_Txt (Act_GetTitleAction (Inf_ActionsSeeInfo[InfoType])); Frm_LinkFormEnd (); Frm_EndForm (); HTM_LI_End (); @@ -1163,7 +1163,7 @@ void Inf_FormsToSelSendInfo (void) HTM_TD_Begin ("class=\"LT\""); HTM_LABEL_Begin ("for=\"InfoSrc%u\" class=\"%s\"", (unsigned) InfoSrc,The_ClassFormInBox[Gbl.Prefs.Theme]); - fprintf (Gbl.F.Out,"%s",Txt_INFO_SRC_FULL_TEXT[InfoSrc]); + HTM_Txt (Txt_INFO_SRC_FULL_TEXT[InfoSrc]); HTM_LABEL_End (); if (Txt_INFO_SRC_HELP[InfoSrc]) { @@ -1803,7 +1803,7 @@ static bool Inf_CheckAndShowPlainTxt (void) Str_InsertLinks (TxtHTML,Cns_MAX_BYTES_LONG_TEXT,60); // Insert links /***** Write text *****/ - fprintf (Gbl.F.Out,"%s",TxtHTML); + HTM_Txt (TxtHTML); /***** End box *****/ HTM_DIV_End (); @@ -2078,7 +2078,7 @@ void Inf_EditPlainTxtInfo (void) HTM_DIV_Begin ("class=\"CM\""); Lay_HelpPlainEditor (); HTM_TEXTAREA_Begin ("name=\"Txt\" cols=\"80\" rows=\"20\""); - fprintf (Gbl.F.Out,"%s",TxtHTML); + HTM_Txt (TxtHTML); HTM_TEXTAREA_End (); HTM_DIV_End (); @@ -2128,7 +2128,7 @@ void Inf_EditRichTxtInfo (void) HTM_DIV_Begin ("class=\"CM\""); Lay_HelpRichEditor (); HTM_TEXTAREA_Begin ("name=\"Txt\" cols=\"80\" rows=\"20\""); - fprintf (Gbl.F.Out,"%s",TxtHTML); + HTM_Txt (TxtHTML); HTM_TEXTAREA_End (); HTM_DIV_End (); diff --git a/swad_institution.c b/swad_institution.c index b58a4914..75064e2a 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -205,7 +205,7 @@ void Ins_SeeInsWithPendingCtrs (void) /* Number of pending centres (row[1]) */ HTM_TD_Begin ("class=\"DAT RM %s\"",BgColor); - fprintf (Gbl.F.Out,"%s",row[1]); + HTM_Txt (row[1]); HTM_TD_End (); HTM_TR_End (); @@ -343,7 +343,7 @@ static void Ins_Configuration (bool PrintView) Log_DrawLogo (Hie_INS,Gbl.Hierarchy.Ins.InsCod, Gbl.Hierarchy.Ins.ShrtName,64,NULL,true); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ins.FullName); + HTM_Txt (Gbl.Hierarchy.Ins.FullName); if (PutLink) HTM_A_End (); HTM_DIV_End (); @@ -386,7 +386,7 @@ static void Ins_Configuration (bool PrintView) Cty_FreeListCountries (); } else // I can not move institution to another country - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]); + HTM_Txt (Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]); HTM_TD_End (); HTM_TR_End (); @@ -412,7 +412,7 @@ static void Ins_Configuration (bool PrintView) Frm_EndForm (); } else // I can not edit institution full name - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ins.FullName); + HTM_Txt (Gbl.Hierarchy.Ins.FullName); HTM_TD_End (); HTM_TR_End (); @@ -438,7 +438,7 @@ static void Ins_Configuration (bool PrintView) Frm_EndForm (); } else // I can not edit institution short name - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ins.ShrtName); + HTM_Txt (Gbl.Hierarchy.Ins.ShrtName); HTM_TD_End (); HTM_TR_End (); @@ -469,7 +469,7 @@ static void Ins_Configuration (bool PrintView) HTM_DIV_Begin ("class=\"EXTERNAL_WWW_LONG\""); HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"DAT\">", Gbl.Hierarchy.Ins.WWW); - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Ins.WWW); + HTM_Txt (Gbl.Hierarchy.Ins.WWW); HTM_A_End (); HTM_DIV_End (); } @@ -825,7 +825,7 @@ static void Ins_ListOneInstitutionForSeeing (struct Instit *Ins,unsigned NumIns) StatusTxt = Ins_GetStatusTxtFromStatusBits (Ins->Status); HTM_TD_Begin ("class=\"%s LM %s\"",TxtClassNormal,BgColor); if (StatusTxt != Ins_STATUS_ACTIVE) // If active ==> do not show anything - fprintf (Gbl.F.Out,"%s",Txt_INSTITUTION_STATUS[StatusTxt]); + HTM_Txt (Txt_INSTITUTION_STATUS[StatusTxt]); HTM_TD_End (); HTM_TR_End (); @@ -864,7 +864,7 @@ static void Ins_PutHeadInstitutionsForSeeing (bool OrderSelectable) if (Order == Gbl.Hierarchy.Cty.Inss.SelectedOrder) fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,"%s",Txt_INSTITUTIONS_ORDER[Order]); + HTM_Txt (Txt_INSTITUTIONS_ORDER[Order]); if (OrderSelectable) { if (Order == Gbl.Hierarchy.Cty.Inss.SelectedOrder) @@ -882,7 +882,7 @@ static void Ins_PutHeadInstitutionsForSeeing (bool OrderSelectable) HTM_TH_Begin (1,1,"RM"); fprintf (Gbl.F.Out,"%s+",Txt_ROLES_PLURAL_BRIEF_Abc[Rol_TCH]); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD]); + HTM_Txt (Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD]); HTM_TH_End (); HTM_TH_Empty (1); @@ -1490,7 +1490,7 @@ static void Ins_ListInstitutionsForEdition (void) Frm_EndForm (); } else - fprintf (Gbl.F.Out,"%s",Ins->ShrtName); + HTM_Txt (Ins->ShrtName); HTM_TD_End (); /* Institution full name */ @@ -1504,7 +1504,7 @@ static void Ins_ListInstitutionsForEdition (void) Frm_EndForm (); } else - fprintf (Gbl.F.Out,"%s",Ins->FullName); + HTM_Txt (Ins->FullName); HTM_TD_End (); /* Institution WWW */ @@ -1525,7 +1525,7 @@ static void Ins_ListInstitutionsForEdition (void) HTM_DIV_Begin ("class=\"EXTERNAL_WWW_SHORT\""); HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"DAT\" title=\"%s\"", Ins->WWW,Ins->WWW); - fprintf (Gbl.F.Out,"%s",WWW); + HTM_Txt (WWW); HTM_A_End (); HTM_DIV_End (); } @@ -1573,7 +1573,7 @@ static void Ins_ListInstitutionsForEdition (void) Frm_EndForm (); } else if (StatusTxt != Ins_STATUS_ACTIVE) // If active ==> do not show anything - fprintf (Gbl.F.Out,"%s",Txt_INSTITUTION_STATUS[StatusTxt]); + HTM_Txt (Txt_INSTITUTION_STATUS[StatusTxt]); HTM_TD_End (); HTM_TR_End (); } @@ -2281,7 +2281,7 @@ static void Ins_PutHeadInstitutionsForEdition (void) HTM_TH_Begin (1,1,"RM"); fprintf (Gbl.F.Out,"%s+",Txt_ROLES_PLURAL_BRIEF_Abc[Rol_TCH]); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD]); + HTM_Txt (Txt_ROLES_PLURAL_BRIEF_Abc[Rol_STD]); HTM_TH_End (); HTM_TH (1,1,"LM",Txt_Requester); HTM_TH_Empty (1); diff --git a/swad_layout.c b/swad_layout.c index 7003869e..fdcf6838 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -621,7 +621,7 @@ static void Lay_WriteScripts (void) } /***** Script for Google Analytics *****/ - fprintf (Gbl.F.Out,"%s",Cfg_GOOGLE_ANALYTICS); + HTM_Txt (Cfg_GOOGLE_ANALYTICS); } // Change page title @@ -939,7 +939,7 @@ static void Lay_WritePageTopHeading (void) HTM_DIV_Begin ("id=\"head_row_1_tagline\""); Frm_LinkFormSubmit (Txt_TAGLINE,The_ClassTagline[Gbl.Prefs.Theme],NULL); - fprintf (Gbl.F.Out,"%s",Txt_TAGLINE_BR); + HTM_Txt (Txt_TAGLINE_BR); Frm_LinkFormEnd (); HTM_DIV_End (); // head_row_1_tagline @@ -1036,7 +1036,7 @@ static void Lay_WriteTitleAction (void) /***** Subtitle *****/ HTM_DIV_Begin ("class=\"%s\"",The_ClassSubtitleAction[Gbl.Prefs.Theme]); - fprintf (Gbl.F.Out,"%s",Act_GetSubtitleAction (Gbl.Action.Act)); + HTM_Txt (Act_GetSubtitleAction (Gbl.Action.Act)); HTM_DIV_End (); /***** Container end *****/ @@ -1417,7 +1417,7 @@ static void Lay_WriteAboutZone (void) "style=\"width:%upx; height:%upx;\"", Cfg_ABOUT_LOGO_WIDTH,Cfg_ABOUT_LOGO_HEIGHT); HTM_DIV_Begin (NULL); - fprintf (Gbl.F.Out,"%s",Cfg_ABOUT_NAME); + HTM_Txt (Cfg_ABOUT_NAME); HTM_DIV_End (); HTM_A_End (); @@ -1426,7 +1426,7 @@ static void Lay_WriteAboutZone (void) fprintf (Gbl.F.Out,"%s: ",Txt_Questions_and_problems); HTM_A_Begin ("href=\"mailto:%s\" class=\"ABOUT\" target=\"_blank\"", Cfg_PLATFORM_RESPONSIBLE_EMAIL); - fprintf (Gbl.F.Out,"%s",Cfg_PLATFORM_RESPONSIBLE_EMAIL); + HTM_Txt (Cfg_PLATFORM_RESPONSIBLE_EMAIL); HTM_A_End (); HTM_DIV_End (); @@ -1594,7 +1594,7 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto, if (!PrintView) HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"CLASSPHOTO_TITLE\"", Ins.WWW); - fprintf (Gbl.F.Out,"%s",Ins.FullName); + HTM_Txt (Ins.FullName); if (!PrintView) HTM_A_End (); } @@ -1605,14 +1605,14 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto, if (!PrintView) HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"CLASSPHOTO_TITLE\"", Deg.WWW); - fprintf (Gbl.F.Out,"%s",Deg.FullName); + HTM_Txt (Deg.FullName); if (!PrintView) HTM_A_End (); } HTM_BR (); if (CrsCod > 0) { - fprintf (Gbl.F.Out,"%s",Crs.FullName); + HTM_Txt (Crs.FullName); if (DrawingClassPhoto && !Gbl.Usrs.ClassPhoto.AllGroups) { HTM_BR (); @@ -1662,7 +1662,7 @@ void Lay_AdvertisementMobile (void) HTM_TD_Begin ("class=\"DAT CM\""); HTM_A_Begin ("href=\"https://play.google.com/store/apps/details?id=es.ugr.swad.swadroid\"" " class=\"DAT\""); - fprintf (Gbl.F.Out,"%s",Txt_Stay_connected_with_SWADroid); + HTM_Txt (Txt_Stay_connected_with_SWADroid); HTM_BR (); HTM_BR (); HTM_IMG (Cfg_URL_ICON_PUBLIC,"SWADroid200x300.png",Txt_Stay_connected_with_SWADroid, diff --git a/swad_link.c b/swad_link.c index 739d5a18..a530b8d8 100644 --- a/swad_link.c +++ b/swad_link.c @@ -199,7 +199,7 @@ static void Lnk_WriteListOfLinks (void) HTM_A_Begin ("href=\"%s\" title=\"%s\" class=\"INS_LNK\" target=\"_blank\"", Gbl.Links.Lst[NumLnk].WWW, Gbl.Links.Lst[NumLnk].FullName); - fprintf (Gbl.F.Out,"%s",Gbl.Links.Lst[NumLnk].ShrtName); + HTM_Txt (Gbl.Links.Lst[NumLnk].ShrtName); HTM_A_End (); HTM_LI_End (); } diff --git a/swad_mail.c b/swad_mail.c index 53adabb5..51f90338 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -140,7 +140,7 @@ void Mai_SeeMailDomains (void) Frm_LinkFormSubmit (Txt_EMAIL_DOMAIN_HELP_ORDER[Order],"TIT_TBL",NULL); if (Order == Gbl.Mails.SelectedOrder) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,"%s",Txt_EMAIL_DOMAIN_ORDER[Order]); + HTM_Txt (Txt_EMAIL_DOMAIN_ORDER[Order]); if (Order == Gbl.Mails.SelectedOrder) fprintf (Gbl.F.Out,""); Frm_LinkFormEnd (); @@ -159,11 +159,11 @@ void Mai_SeeMailDomains (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT LT\""); - fprintf (Gbl.F.Out,"%s",Gbl.Mails.Lst[NumMai].Domain); + HTM_Txt (Gbl.Mails.Lst[NumMai].Domain); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT LT\""); - fprintf (Gbl.F.Out,"%s",Gbl.Mails.Lst[NumMai].Info); + HTM_Txt (Gbl.Mails.Lst[NumMai].Info); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RT\""); @@ -955,7 +955,7 @@ static void Mai_ListEmails (void) Mai_MAX_BYTES_STR_ADDR); HTM_A_Begin ("href=\"mailto:%s?subject=%s\"", UsrDat.Email,Gbl.Hierarchy.Crs.FullName); - fprintf (Gbl.F.Out,"%s",UsrDat.Email); + HTM_Txt (UsrDat.Email); HTM_A_End (); NumAcceptedUsrsWithEmail++; @@ -1312,7 +1312,7 @@ static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe, Frm_EndForm (); /* Email */ - fprintf (Gbl.F.Out,"%s",row[0]); + HTM_Txt (row[0]); /* Email confirmed? */ if (Confirmed) diff --git a/swad_match.c b/swad_match.c index a94c1ad3..5ad7e340 100644 --- a/swad_match.c +++ b/swad_match.c @@ -574,7 +574,7 @@ static void Mch_ListOneOrMoreMatchesTitleGrps (const struct Match *Match) /***** Title *****/ HTM_SPAN_Begin ("class=\"ASG_TITLE\""); - fprintf (Gbl.F.Out,"%s",Match->Title); + HTM_Txt (Match->Title); HTM_SPAN_End (); /***** Groups whose students can answer this match *****/ @@ -2160,7 +2160,7 @@ static void Mch_ShowRefreshablePartTch (struct Match *Match) NumAnswerersQst = Mch_GetNumUsrsWhoHaveAnswerQst (Match->MchCod, Match->Status.QstInd); HTM_DIV_Begin ("class=\"MCH_NUM_ANSWERERS\""); - fprintf (Gbl.F.Out,"%s",Txt_MATCH_respond); + HTM_Txt (Txt_MATCH_respond); HTM_BR (); fprintf (Gbl.F.Out,""); if (Match->Status.QstInd > 0 && @@ -2272,9 +2272,9 @@ static void Mch_ShowNumQstInMatch (struct Match *Match) HTM_DIV_Begin ("class=\"MCH_NUM_QST\""); if (Match->Status.QstInd == 0) // Not started - fprintf (Gbl.F.Out,"%s",Txt_MATCH_Start); + HTM_Txt (Txt_MATCH_Start); else if (Match->Status.QstInd >= Mch_AFTER_LAST_QUESTION) // Finished - fprintf (Gbl.F.Out,"%s",Txt_MATCH_End); + HTM_Txt (Txt_MATCH_End); else fprintf (Gbl.F.Out,"%u/%u",Match->Status.QstInd,NumQsts); HTM_DIV_End (); @@ -2443,7 +2443,7 @@ static void Mch_ShowMatchTitle (struct Match *Match) { /***** Match title *****/ HTM_DIV_Begin ("class=\"MCH_TOP\""); - fprintf (Gbl.F.Out,"%s",Match->Title); + HTM_Txt (Match->Title); HTM_DIV_End (); } @@ -3371,7 +3371,7 @@ static void Mch_DrawBarNumUsrs (unsigned NumAnswerersAns,unsigned NumAnswerersQs HTM_TABLE_End (); /***** Write the number of users *****/ - fprintf (Gbl.F.Out,"%s",Gbl.Title); + HTM_Txt (Gbl.Title); /***** End container *****/ HTM_DIV_End (); diff --git a/swad_match_result.c b/swad_match_result.c index 6dbb7f10..596e5db8 100644 --- a/swad_match_result.c +++ b/swad_match_result.c @@ -339,7 +339,7 @@ static void McR_ShowHeaderMchResults (Usr_MeOrOther_t MeOrOther) HTM_TH (1,1,"RT",Txt_Total_BR_score); HTM_TH (1,1,"RT",Txt_Average_BR_score_BR_per_question_BR_from_0_to_1); HTM_TH_Begin (1,1,"RT"); - fprintf (Gbl.F.Out,"%s",Txt_Score); + HTM_Txt (Txt_Score); HTM_BR (); fprintf (Gbl.F.Out,"%s
",Txt_out_of_PART_OF_A_SCORE); HTM_BR (); @@ -448,7 +448,7 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther) /* Write match title */ HTM_TD_Begin ("class=\"DAT LT COLOR%u\"",Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",Match.Title); + HTM_Txt (Match.Title); HTM_TD_End (); /* Get number of questions (row[3]) */ diff --git a/swad_media.c b/swad_media.c index ecffe679..2a7e0e69 100644 --- a/swad_media.c +++ b/swad_media.c @@ -1560,7 +1560,7 @@ static void Med_ShowJPG (struct Media *Media, free (URL); } else - fprintf (Gbl.F.Out,"%s",Txt_File_not_found); + HTM_Txt (Txt_File_not_found); } /*****************************************************************************/ @@ -1638,7 +1638,7 @@ static void Med_ShowGIF (struct Media *Media, HTM_DIV_End (); } else - fprintf (Gbl.F.Out,"%s",Txt_File_not_found); + HTM_Txt (Txt_File_not_found); /***** Free URLs *****/ free (URL_PNG); @@ -1646,7 +1646,7 @@ static void Med_ShowGIF (struct Media *Media, free (URL); } else - fprintf (Gbl.F.Out,"%s",Txt_File_not_found); + HTM_Txt (Txt_File_not_found); } /*****************************************************************************/ @@ -1698,7 +1698,7 @@ static void Med_ShowVideo (struct Media *Media, ""); } else - fprintf (Gbl.F.Out,"%s",Txt_File_not_found); + HTM_Txt (Txt_File_not_found); } /*****************************************************************************/ diff --git a/swad_menu.c b/swad_menu.c index c5d1d08e..5329adc0 100644 --- a/swad_menu.c +++ b/swad_menu.c @@ -373,7 +373,7 @@ void Mnu_WriteMenuThisTab (void) Gbl.Prefs.URLIconSet, Act_GetIcon (NumAct)); HTM_DIV_Begin ("class=\"MENU_TEXT %s\"",The_ClassTxtMenu[Gbl.Prefs.Theme]); - fprintf (Gbl.F.Out,"%s",Txt_MENU_TITLE[Gbl.Action.Tab][NumOptInMenu]); + HTM_Txt (Txt_MENU_TITLE[Gbl.Action.Tab][NumOptInMenu]); HTM_DIV_End (); HTM_DIV_End (); diff --git a/swad_message.c b/swad_message.c index 5767c2d4..823246c6 100644 --- a/swad_message.c +++ b/swad_message.c @@ -453,7 +453,7 @@ static void Msg_ShowOneUniqueRecipient (void) HTM_DIV_Begin ("class=\"MSG_TO_ONE_RCP %s\"", Gbl.Usrs.Other.UsrDat.Accepted ? "DAT_SMALL_NOBR_N" : "DAT_SMALL_NOBR"); - fprintf (Gbl.F.Out,"%s",Gbl.Usrs.Other.UsrDat.FullName); + HTM_Txt (Gbl.Usrs.Other.UsrDat.FullName); HTM_DIV_End (); /***** Hidden parameter with user's nickname *****/ @@ -501,7 +501,7 @@ static void Msg_WriteFormUsrsIDsOrNicksOtherRecipients (void) " class=\"MSG_RECIPIENTS\" rows=\"2\" placeholder=\"%s\"", Txt_nicks_emails_or_IDs_separated_by_commas); if (Gbl.Usrs.ListOtherRecipients[0]) - fprintf (Gbl.F.Out,"%s",Gbl.Usrs.ListOtherRecipients); + HTM_Txt (Gbl.Usrs.ListOtherRecipients); else if (Gbl.Usrs.Other.UsrDat.UsrCod > 0) // If there is a recipient // and there's no list of explicit recipients, // write @nickname of original sender @@ -577,7 +577,7 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (char Content[Cns_MAX_BYTES_ /* Write subject */ if (!SubjectAndContentComeFromForm) fprintf (Gbl.F.Out,"Re: "); - fprintf (Gbl.F.Out,"%s",Gbl.Msg.Subject); + HTM_Txt (Gbl.Msg.Subject); HTM_TEXTAREA_End (); HTM_TD_End (); @@ -613,7 +613,7 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (char Content[Cns_MAX_BYTES_ else // It's not a reply { /* End message subject */ - fprintf (Gbl.F.Out,"%s",Gbl.Msg.Subject); + HTM_Txt (Gbl.Msg.Subject); HTM_TEXTAREA_End (); HTM_TD_End (); @@ -2694,7 +2694,7 @@ static void Msg_ShowFormToShowOnlyUnreadMessages (void) HTM_INPUT_CHECKBOX ("OnlyUnreadMsgs",false, "value=\"Y\"%s", Gbl.Msg.ShowOnlyUnreadMsgs ? " checked=\"checked\"" : ""); - fprintf (Gbl.F.Out,"%s",Txt_only_unread_messages); + HTM_Txt (Txt_only_unread_messages); HTM_LABEL_End (); } @@ -3165,7 +3165,7 @@ static void Msg_WriteSentOrReceivedMsgSubject (long MsgCod,const char *Subject,b /***** Write subject *****/ if (Subject[0]) - fprintf (Gbl.F.Out,"%s",Subject); + HTM_Txt (Subject); else fprintf (Gbl.F.Out,"[%s]",Txt_no_subject); @@ -3280,14 +3280,14 @@ bool Msg_WriteCrsOrgMsg (long CrsCod) Frm_StartFormGoTo (ActSeeCrsInf); Crs_PutParamCrsCod (Crs.CrsCod); HTM_DIV_Begin ("class=\"AUTHOR_TXT\""); - fprintf (Gbl.F.Out,"("); + HTM_Txt ("("); snprintf (Gbl.Title,sizeof (Gbl.Title), Txt_Go_to_X, Crs.FullName); Frm_LinkFormSubmit (Gbl.Title,"AUTHOR_TXT",NULL); - fprintf (Gbl.F.Out,"%s",Crs.ShrtName); + HTM_Txt (Crs.ShrtName); Frm_LinkFormEnd (); - fprintf (Gbl.F.Out,")"); + HTM_Txt (")"); HTM_DIV_End (); Frm_EndForm (); } @@ -3375,7 +3375,7 @@ static void Msg_WriteMsgFrom (struct UsrData *UsrDat,bool Deleted) HTM_TD_Begin ("class=\"AUTHOR_TXT LM\""); if (UsrDat->UsrCod > 0) { - fprintf (Gbl.F.Out,"%s",UsrDat->FullName); + HTM_Txt (UsrDat->FullName); if (Act_GetSuperAction (Gbl.Action.Act) == ActSeeRcvMsg) { fprintf (Gbl.F.Out," "); @@ -3534,7 +3534,7 @@ static void Msg_WriteMsgTo (long MsgCod) HTM_TD_Begin ("class=\"%s LM\"",OpenByDst ? "AUTHOR_TXT" : "AUTHOR_TXT_NEW"); if (UsrValid) - fprintf (Gbl.F.Out,"%s",UsrDat.FullName); + HTM_Txt (UsrDat.FullName); else fprintf (Gbl.F.Out,"[%s]",Txt_unknown_recipient); // User not found, likely a user who has been removed HTM_TD_End (); @@ -3633,7 +3633,7 @@ void Msg_WriteMsgContent (char *Content,unsigned long MaxLength,bool InsertLinks if (ChangeBRToRet) Str_FilePrintStrChangingBRToRetAndNBSPToSpace (Gbl.F.Out,Content); else - fprintf (Gbl.F.Out,"%s",Content); + HTM_Txt (Content); } /*****************************************************************************/ @@ -3870,7 +3870,7 @@ void Msg_ListBannedUsrs (void) /* Write user's full name */ HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",UsrDat.FullName); + HTM_Txt (UsrDat.FullName); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_network.c b/swad_network.c index 1a0bcd1a..ea457002 100644 --- a/swad_network.c +++ b/swad_network.c @@ -580,7 +580,7 @@ void Net_ShowWebAndSocialNetworksStats (void) HTM_TD_Begin ("class=\"DAT LM\""); HTM_IMG (Cfg_URL_ICON_PUBLIC,Net_WebsAndSocialNetworksIcons[Web],Net_WebsAndSocialNetworksTitle[Web], "class=\"CONTEXT_ICO_16x16\" style=\"margin-right:6px;\""); - fprintf (Gbl.F.Out,"%s",Net_WebsAndSocialNetworksTitle[Web]); + HTM_Txt (Net_WebsAndSocialNetworksTitle[Web]); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); diff --git a/swad_notice.c b/swad_notice.c index 7caa4cf5..cf005a86 100644 --- a/swad_notice.c +++ b/swad_notice.c @@ -710,7 +710,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing, if (TypeNoticesListing == Not_LIST_BRIEF_NOTICES) { HTM_DIV_Begin ("class=\"NOTICE_TEXT_BRIEF\""); - fprintf (Gbl.F.Out,"%s",Content); + HTM_Txt (Content); HTM_DIV_End (); /* Put form to view full notice */ @@ -724,7 +724,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing, else { HTM_DIV_Begin ("class=\"%s\"",TextClass[Status]); - fprintf (Gbl.F.Out,"%s",Content); + HTM_Txt (Content); HTM_DIV_End (); } diff --git a/swad_notification.c b/swad_notification.c index 5ceeadb9..97fbfb3b 100644 --- a/swad_notification.c +++ b/swad_notification.c @@ -495,14 +495,14 @@ void Ntf_ShowMyNotifications (void) if (PutLink) { Frm_LinkFormSubmit (Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent],ClassAnchor,NULL); - fprintf (Gbl.F.Out,"%s",Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent]); + HTM_Txt (Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent]); Frm_LinkFormEnd (); Frm_EndForm (); } else { HTM_SPAN_Begin ("class=\"%s\"",ClassAnchor); - fprintf (Gbl.F.Out,"%s",Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent]); + HTM_Txt (Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent]); HTM_SPAN_End (); } HTM_TD_End (); @@ -569,7 +569,7 @@ void Ntf_ShowMyNotifications (void) /* Write status (sent by email / pending to be sent by email) */ HTM_TD_Begin ("class=\"%s LT\"",ClassBackground); - fprintf (Gbl.F.Out,"%s",Txt_NOTIFICATION_STATUS[StatusTxt]); + HTM_Txt (Txt_NOTIFICATION_STATUS[StatusTxt]); HTM_TD_End (); HTM_TR_End (); @@ -588,7 +588,7 @@ void Ntf_ShowMyNotifications (void) HTM_TD_End (); HTM_TD_Begin ("colspan=\"4\" class=\"DAT LT\" style=\"padding-bottom:12px;\""); - fprintf (Gbl.F.Out,"%s",SummaryStr); + HTM_Txt (SummaryStr); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_pagination.c b/swad_pagination.c index 13bb5a8e..f68631bc 100644 --- a/swad_pagination.c +++ b/swad_pagination.c @@ -244,7 +244,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate, else HTM_SPAN_Begin ("class=\"%s\"",Font); if (FirstMsgEnabled) - fprintf (Gbl.F.Out,"%s",Subject); + HTM_Txt (Subject); else fprintf (Gbl.F.Out,"[%s]",Txt_FORUM_Post_banned); if (LinkToPagCurrent) diff --git a/swad_password.c b/swad_password.c index 62dc76c6..4f31cf5a 100644 --- a/swad_password.c +++ b/swad_password.c @@ -865,7 +865,7 @@ void Pwd_AskForConfirmationOnDangerousAction (void) HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_INPUT_CHECKBOX ("Consent",false, "value=\"Y\""); - fprintf (Gbl.F.Out,"%s",Txt_I_understand_that_this_action_can_not_be_undone); + HTM_Txt (Txt_I_understand_that_this_action_can_not_be_undone); HTM_LABEL_End (); HTM_BR (); diff --git a/swad_photo.c b/swad_photo.c index 68d5207f..d2b844ca 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -904,7 +904,7 @@ static void Pho_UpdatePhoto2 (void) Pho_PHOTO_REAL_WIDTH,Pho_PHOTO_REAL_HEIGHT); free (Img); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Txt_PHOTO_PROCESSING_CAPTIONS[NumPhoto]); + HTM_Txt (Txt_PHOTO_PROCESSING_CAPTIONS[NumPhoto]); HTM_TD_End (); } HTM_TR_End (); @@ -1242,8 +1242,7 @@ void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL, HTM_DIV_Begin ("class=\"ZOOM_TXT_LINE DAT_SMALL\""); HTM_DIV_Begin ("class=\"ZOOM_DEG\" style=\"background-image:url('%s/%s');\"", Cfg_URL_ICON_PUBLIC,Rol_Icons[MaxRole]); - fprintf (Gbl.F.Out,"%s", - MainDegreeShrtName); + HTM_Txt (MainDegreeShrtName); HTM_DIV_End (); HTM_DIV_End (); } @@ -2512,7 +2511,7 @@ static void Pho_ShowDegreeAvgPhotoAndStat (struct Degree *Deg, Frm_SetUniqueId (IdCaption); HTM_DIV_Begin ("id=\"%s\" class=\"NOT_SHOWN\"",IdCaption); HTM_DIV_Begin ("class=\"ZOOM_TXT_LINE DAT_N\""); - fprintf (Gbl.F.Out,"%s",PhotoCaption); + HTM_Txt (PhotoCaption); HTM_DIV_End (); HTM_DIV_End (); } @@ -2541,7 +2540,7 @@ static void Pho_ShowDegreeAvgPhotoAndStat (struct Degree *Deg, /***** Caption *****/ HTM_DIV_Begin ("class=\"CLASSPHOTO_CAPTION\""); - fprintf (Gbl.F.Out,"%s",Deg->ShrtName); + HTM_Txt (Deg->ShrtName); HTM_BR (); fprintf (Gbl.F.Out,"%d %s",NumStds,Txt_students_ABBREVIATION); HTM_BR (); diff --git a/swad_place.c b/swad_place.c index 9713384e..a7d6af2b 100644 --- a/swad_place.c +++ b/swad_place.c @@ -126,7 +126,7 @@ void Plc_SeePlaces (void) Frm_LinkFormSubmit (Txt_PLACES_HELP_ORDER[Order],"TIT_TBL",NULL); if (Order == Gbl.Plcs.SelectedOrder) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,"%s",Txt_PLACES_ORDER[Order]); + HTM_Txt (Txt_PLACES_ORDER[Order]); if (Order == Gbl.Plcs.SelectedOrder) fprintf (Gbl.F.Out,""); Frm_LinkFormEnd (); @@ -145,7 +145,7 @@ void Plc_SeePlaces (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",Gbl.Plcs.Lst[NumPlc].FullName); + HTM_Txt (Gbl.Plcs.Lst[NumPlc].FullName); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); @@ -168,7 +168,7 @@ void Plc_SeePlaces (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",Txt_Other_places); + HTM_Txt (Txt_Other_places); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); @@ -182,7 +182,7 @@ void Plc_SeePlaces (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",Txt_Place_unspecified); + HTM_Txt (Txt_Place_unspecified); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT RM\""); diff --git a/swad_plugin.c b/swad_plugin.c index d89ee7e0..d3c92c6c 100644 --- a/swad_plugin.c +++ b/swad_plugin.c @@ -153,7 +153,7 @@ void Plg_ListPlugins (void) HTM_TD_Begin ("class=\"DAT LM\""); HTM_A_Begin ("href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\"", URL,Plg->Name); - fprintf (Gbl.F.Out,"%s",Plg->Name); + HTM_Txt (Plg->Name); HTM_A_End (); HTM_TD_End (); diff --git a/swad_privacy.c b/swad_privacy.c index 25aed3d3..8353d5a8 100644 --- a/swad_privacy.c +++ b/swad_privacy.c @@ -181,7 +181,7 @@ static void Pri_PutFormVisibility (const char *TxtLabel, (unsigned) Visibility, Visibility == CurrentVisibilityInDB ? " checked=\"checked\"" : "", Action == ActUnk ? " disabled=\"disabled\"" : ""); - fprintf (Gbl.F.Out,"%s",Txt_PRIVACY_OPTIONS[Visibility]); + HTM_Txt (Txt_PRIVACY_OPTIONS[Visibility]); HTM_LABEL_End (); HTM_LI_End (); } diff --git a/swad_project.c b/swad_project.c index 564934a7..d14ec869 100644 --- a/swad_project.c +++ b/swad_project.c @@ -815,14 +815,14 @@ static void Prj_ShowProjectsHead (Prj_ProjectView_t ProjectView) Frm_LinkFormSubmit (Txt_PROJECT_ORDER_HELP[Order],"TIT_TBL",NULL); if (Order == Gbl.Prjs.SelectedOrder) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,"%s",Txt_PROJECT_ORDER[Order]); + HTM_Txt (Txt_PROJECT_ORDER[Order]); if (Order == Gbl.Prjs.SelectedOrder) fprintf (Gbl.F.Out,""); Frm_LinkFormEnd (); Frm_EndForm (); break; default: - fprintf (Gbl.F.Out,"%s",Txt_PROJECT_ORDER[Order]); + HTM_Txt (Txt_PROJECT_ORDER[Order]); break; } @@ -1163,12 +1163,12 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj, Frm_StartForm (ActAdmDocPrj); Prj_PutCurrentParams (); Frm_LinkFormSubmit (Txt_Project_files,ClassTitle,NULL); - fprintf (Gbl.F.Out,"%s",Prj->Title); + HTM_Txt (Prj->Title); Frm_LinkFormEnd (); Frm_EndForm (); } else - fprintf (Gbl.F.Out,"%s",Prj->Title); + HTM_Txt (Prj->Title); } if (Faults.WrongTitle) Prj_PutWarningIcon (); @@ -1321,7 +1321,7 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj, ClassData); break; } - fprintf (Gbl.F.Out,"%s",Txt_PROJECT_STATUS[Prj->Proposal]); + HTM_Txt (Txt_PROJECT_STATUS[Prj->Proposal]); HTM_TD_End (); HTM_TR_End (); @@ -1519,7 +1519,7 @@ static void Prj_ShowTableAllProjectsOneRow (struct Project *Prj) HTM_TD_Begin ("class=\"LT %s COLOR%u\"", ClassData, Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",Prj->Title); + HTM_Txt (Prj->Title); HTM_TD_End (); /***** Department *****/ @@ -1527,8 +1527,8 @@ static void Prj_ShowTableAllProjectsOneRow (struct Project *Prj) /***** Assigned? *****/ HTM_TD_Begin ("class=\"LT %s COLOR%u\"",ClassData,Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",(Prj->Assigned == Prj_ASSIGNED) ? Txt_Yes : - Txt_No); + HTM_Txt ((Prj->Assigned == Prj_ASSIGNED) ? Txt_Yes : + Txt_No); HTM_TD_End (); /***** Number of students *****/ @@ -1544,7 +1544,7 @@ static void Prj_ShowTableAllProjectsOneRow (struct Project *Prj) /***** Proposal *****/ HTM_TD_Begin ("class=\"LT %s COLOR%u\"",ClassData,Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",Txt_PROJECT_STATUS[Prj->Proposal]); + HTM_Txt (Txt_PROJECT_STATUS[Prj->Proposal]); HTM_TD_End (); /***** Write rows of data of this project *****/ @@ -1602,7 +1602,7 @@ static void Prj_ShowOneProjectDepartment (const struct Project *Prj, if (PutLink) HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"%s\"", Dpt.WWW,ClassData); - fprintf (Gbl.F.Out,"%s",Dpt.FullName); + HTM_Txt (Dpt.FullName); if (PutLink) HTM_A_End (); HTM_TD_End (); @@ -1624,7 +1624,7 @@ static void Prj_ShowTableAllProjectsDepartment (const struct Project *Prj) /***** Show department *****/ HTM_TD_Begin ("class=\"LT %s COLOR%u\"",ClassData,Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",Dpt.FullName); + HTM_Txt (Dpt.FullName); HTM_TD_End (); } @@ -1694,7 +1694,7 @@ static void Prj_ShowOneProjectTxtField (struct Project *Prj, ClassData); break; } - fprintf (Gbl.F.Out,"%s",TxtField); + HTM_Txt (TxtField); if (Warning) Prj_PutWarningIcon (); HTM_TD_End (); @@ -1717,7 +1717,7 @@ static void Prj_ShowTableAllProjectsTxtField (struct Project *Prj, /***** Write text *****/ HTM_TD_Begin ("class=\"LT %s COLOR%u\"",ClassData,Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",TxtField); + HTM_Txt (TxtField); HTM_TD_End (); } @@ -1777,7 +1777,7 @@ static void Prj_ShowOneProjectURL (const struct Project *Prj, } if (PutLink) HTM_A_Begin ("href=\"%s\" target=\"_blank\"",Prj->URL); - fprintf (Gbl.F.Out,"%s",Prj->URL); + HTM_Txt (Prj->URL); if (PutLink) HTM_A_End (); HTM_TD_End (); @@ -1795,7 +1795,7 @@ static void Prj_ShowTableAllProjectsURL (const struct Project *Prj) /***** Show URL *****/ HTM_TD_Begin ("class=\"LT %s COLOR%u\"",ClassData,Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",Prj->URL); + HTM_Txt (Prj->URL); HTM_TD_End (); } @@ -1953,7 +1953,7 @@ static void Prj_ShowOneProjectMembersWithARole (const struct Project *Prj, /* Write user's name */ HTM_TD_Begin ("class=\"PRJ_MEMBER_NAM\""); - fprintf (Gbl.F.Out,"%s",Gbl.Usrs.Other.UsrDat.FullName); + HTM_Txt (Gbl.Usrs.Other.UsrDat.FullName); HTM_TD_End (); /* End row for this user */ @@ -2037,7 +2037,7 @@ static void Prj_ShowTableAllProjectsMembersWithARole (const struct Project *Prj, { /* Write user's name in "Surname1 Surname2, FirstName" format */ HTM_LI_Begin (NULL); - fprintf (Gbl.F.Out,"%s",Gbl.Usrs.Other.UsrDat.Surname1); + HTM_Txt (Gbl.Usrs.Other.UsrDat.Surname1); if (Gbl.Usrs.Other.UsrDat.Surname2[0]) fprintf (Gbl.F.Out," %s",Gbl.Usrs.Other.UsrDat.Surname2); fprintf (Gbl.F.Out,", %s",Gbl.Usrs.Other.UsrDat.FirstName); @@ -3456,7 +3456,7 @@ static void Prj_EditOneProjectTxtArea (const char *Id, HTM_TEXTAREA_Begin ("id=\"%s\" name=\"%s\" cols=\"60\" rows=\"%u\"%s", Id,Id,NumRows,Required ? " required=\"required\"" : ""); - fprintf (Gbl.F.Out,"%s",TxtField); + HTM_Txt (TxtField); HTM_TEXTAREA_End (); HTM_TD_End (); @@ -3756,7 +3756,7 @@ void Prj_ShowFormConfig (void) HTM_INPUT_CHECKBOX ("Editable",false, "id=\"Editable\" value=\"Y\"%s", Gbl.Prjs.Config.Editable ? " checked=\"checked\"" : ""); - fprintf (Gbl.F.Out,"%s",Txt_Editable_by_non_editing_teachers); + HTM_Txt (Txt_Editable_by_non_editing_teachers); HTM_LABEL_End (); HTM_TD_End (); diff --git a/swad_record.c b/swad_record.c index 6123768b..ae97711a 100644 --- a/swad_record.c +++ b/swad_record.c @@ -1756,11 +1756,11 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView, HTM_TD_End (); HTM_TD_Begin ("class=\"REC_HEAD CM\""); - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Deg.FullName); + HTM_Txt (Gbl.Hierarchy.Deg.FullName); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Crs.FullName); + HTM_Txt (Gbl.Hierarchy.Crs.FullName); HTM_BR (); - fprintf (Gbl.F.Out,"%s",UsrDat->FullName); + HTM_Txt (UsrDat->FullName); HTM_TD_End (); HTM_TR_End (); @@ -1833,7 +1833,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView, Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod, Gbl.Crs.Records.LstFields.Lst[NumField].NumLines); if (ThisFieldHasText) - fprintf (Gbl.F.Out,"%s",row[0]); + HTM_Txt (row[0]); HTM_TEXTAREA_End (); } else // Show without form @@ -1844,7 +1844,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView, Cns_MAX_BYTES_TEXT); Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, Text,Cns_MAX_BYTES_TEXT,false); - fprintf (Gbl.F.Out,"%s",Text); + HTM_Txt (Text); } else fprintf (Gbl.F.Out,"-"); @@ -2721,7 +2721,7 @@ static void Rec_ShowInstitutionInHead (struct Instit *Ins,bool PutFormLinks) Ins_PutParamInsCod (Ins->InsCod); Frm_LinkFormSubmit (Ins->FullName,"REC_HEAD",NULL); } - fprintf (Gbl.F.Out,"%s",Ins->FullName); + HTM_Txt (Ins->FullName); if (PutFormLinks) { Frm_LinkFormEnd (); @@ -2758,15 +2758,15 @@ static void Rec_ShowFullName (struct UsrData *UsrDat) HTM_DIV_Begin ("class=\"REC_NAME\""); /***** First name *****/ - fprintf (Gbl.F.Out,"%s",UsrDat->FirstName); + HTM_Txt (UsrDat->FirstName); HTM_BR (); /***** Surname 1 *****/ - fprintf (Gbl.F.Out,"%s",UsrDat->Surname1); + HTM_Txt (UsrDat->Surname1); HTM_BR (); /***** Surname 2 *****/ - fprintf (Gbl.F.Out,"%s",UsrDat->Surname2); + HTM_Txt (UsrDat->Surname2); HTM_DIV_End (); HTM_TD_End (); @@ -2855,11 +2855,11 @@ static void Rec_ShowEmail (struct UsrData *UsrDat,const char *ClassForm) if (Mai_ICanSeeOtherUsrEmail (UsrDat)) { HTM_A_Begin ("href=\"mailto:%s\" class=\"REC_DAT_BOLD\"",UsrDat->Email); - fprintf (Gbl.F.Out,"%s",UsrDat->Email); + HTM_Txt (UsrDat->Email); HTM_A_End (); } else - fprintf (Gbl.F.Out,"********"); + HTM_Txt ("********"); HTM_DIV_End (); } HTM_TD_End (); @@ -3144,8 +3144,7 @@ static void Rec_ShowRole (struct UsrData *UsrDat, HTM_TD_End (); HTM_TD_Begin ("class=\"REC_C2_BOT REC_DAT_BOLD LM\""); - fprintf (Gbl.F.Out,"%s", - Txt_ROLES_SINGUL_Abc[UsrDat->Roles.InCurrentCrs.Role][UsrDat->Sex]); + HTM_Txt (Txt_ROLES_SINGUL_Abc[UsrDat->Roles.InCurrentCrs.Role][UsrDat->Sex]); HTM_TD_End (); } @@ -3167,7 +3166,7 @@ static void Rec_ShowSurname1 (struct UsrData *UsrDat, HTM_TD_Begin ("class=\"REC_C1_BOT RM\""); HTM_LABEL_Begin ("for=\"Surname1\" class=\"%s\"",ClassForm); - fprintf (Gbl.F.Out,"%s",Txt_Surname_1); + HTM_Txt (Txt_Surname_1); if (TypeOfView == Rec_SHA_MY_RECORD_FORM) fprintf (Gbl.F.Out,"*"); fprintf (Gbl.F.Out,":"); @@ -3232,7 +3231,7 @@ static void Rec_ShowFirstName (struct UsrData *UsrDat, HTM_TD_Begin ("class=\"REC_C1_BOT RM\""); HTM_LABEL_Begin ("for=\"FirstName\" class=\"%s\"",ClassForm); - fprintf (Gbl.F.Out,"%s",Txt_First_name); + HTM_Txt (Txt_First_name); if (TypeOfView == Rec_SHA_MY_RECORD_FORM) fprintf (Gbl.F.Out,"*"); fprintf (Gbl.F.Out,":"); @@ -3276,7 +3275,7 @@ static void Rec_ShowCountry (struct UsrData *UsrDat, HTM_TD_Begin ("class=\"REC_C1_BOT RM\""); HTM_LABEL_Begin ("for=\"OthCtyCod\" class=\"%s\"",ClassForm); - fprintf (Gbl.F.Out,"%s",Txt_Country); + HTM_Txt (Txt_Country); if (TypeOfView == Rec_SHA_MY_RECORD_FORM) fprintf (Gbl.F.Out,"*"); fprintf (Gbl.F.Out,":"); @@ -3331,7 +3330,7 @@ static void Rec_ShowOriginPlace (struct UsrData *UsrDat, UsrDat->OriginPlace,false, "class=\"REC_C2_BOT_INPUT\""); else if (UsrDat->OriginPlace[0]) - fprintf (Gbl.F.Out,"%s",UsrDat->OriginPlace); + HTM_Txt (UsrDat->OriginPlace); } HTM_TD_End (); @@ -3364,7 +3363,7 @@ static void Rec_ShowDateOfBirth (struct UsrData *UsrDat, &(UsrDat->Birthday), false,false); else if (UsrDat->StrBirthday[0]) - fprintf (Gbl.F.Out,"%s",UsrDat->StrBirthday); + HTM_Txt (UsrDat->StrBirthday); } HTM_TD_End (); @@ -3397,7 +3396,7 @@ static void Rec_ShowLocalAddress (struct UsrData *UsrDat, UsrDat->LocalAddress,false, "class=\"REC_C2_BOT_INPUT\""); else if (UsrDat->LocalAddress[0]) - fprintf (Gbl.F.Out,"%s",UsrDat->LocalAddress); + HTM_Txt (UsrDat->LocalAddress); } HTM_TD_End (); @@ -3431,7 +3430,7 @@ static void Rec_ShowLocalPhone (struct UsrData *UsrDat, else if (UsrDat->LocalPhone[0]) { HTM_A_Begin ("href=\"tel:%s\" class=\"REC_DAT_BOLD\"",UsrDat->LocalPhone); - fprintf (Gbl.F.Out,"%s",UsrDat->LocalPhone); + HTM_Txt (UsrDat->LocalPhone); HTM_A_End (); } } @@ -3466,7 +3465,7 @@ static void Rec_ShowFamilyAddress (struct UsrData *UsrDat, UsrDat->FamilyAddress,false, "class=\"REC_C2_BOT_INPUT\""); else if (UsrDat->FamilyAddress[0]) - fprintf (Gbl.F.Out,"%s",UsrDat->FamilyAddress); + HTM_Txt (UsrDat->FamilyAddress); } HTM_TD_End (); @@ -3500,7 +3499,7 @@ static void Rec_ShowFamilyPhone (struct UsrData *UsrDat, else if (UsrDat->FamilyPhone[0]) { HTM_A_Begin ("href=\"tel:%s\" class=\"REC_DAT_BOLD\"",UsrDat->FamilyPhone); - fprintf (Gbl.F.Out,"%s",UsrDat->FamilyPhone); + HTM_Txt (UsrDat->FamilyPhone); HTM_A_End (); } } @@ -3534,14 +3533,14 @@ static void Rec_ShowComments (struct UsrData *UsrDat, { HTM_TEXTAREA_Begin ("id=\"Comments\" name=\"Comments\"" " rows=\"4\" class=\"REC_C2_BOT_INPUT\""); - fprintf (Gbl.F.Out,"%s",UsrDat->Comments); + HTM_Txt (UsrDat->Comments); HTM_TEXTAREA_End (); } else if (UsrDat->Comments[0]) { Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, // Convert from HTML to rigorous HTML UsrDat->Comments,Cns_MAX_BYTES_TEXT,false); - fprintf (Gbl.F.Out,"%s",UsrDat->Comments); + HTM_Txt (UsrDat->Comments); } } HTM_TD_End (); @@ -3595,7 +3594,7 @@ static void Rec_ShowInstitution (struct Instit *Ins, if (Ins->WWW[0]) HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"REC_DAT_BOLD\"", Ins->WWW); - fprintf (Gbl.F.Out,"%s",Ins->FullName); + HTM_Txt (Ins->FullName); if (Ins->WWW[0]) HTM_A_End (); } @@ -3630,7 +3629,7 @@ static void Rec_ShowCentre (struct UsrData *UsrDat, if (Ctr.WWW[0]) HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"REC_DAT_BOLD\"", Ctr.WWW); - fprintf (Gbl.F.Out,"%s",Ctr.FullName); + HTM_Txt (Ctr.FullName); if (Ctr.WWW[0]) HTM_A_End (); } @@ -3666,7 +3665,7 @@ static void Rec_ShowDepartment (struct UsrData *UsrDat, if (Dpt.WWW[0]) HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"REC_DAT_BOLD\"", Dpt.WWW); - fprintf (Gbl.F.Out,"%s",Dpt.FullName); + HTM_Txt (Dpt.FullName); if (Dpt.WWW[0]) HTM_A_End (); } @@ -3693,7 +3692,7 @@ static void Rec_ShowOffice (struct UsrData *UsrDat, HTM_TD_Begin ("class=\"REC_C2_BOT REC_DAT_BOLD LM\""); if (ShowData) - fprintf (Gbl.F.Out,"%s",UsrDat->Tch.Office); + HTM_Txt (UsrDat->Tch.Office); HTM_TD_End (); HTM_TR_End (); @@ -3719,7 +3718,7 @@ static void Rec_ShowOfficePhone (struct UsrData *UsrDat, { HTM_A_Begin ("href=\"tel:%s\" class=\"REC_DAT_BOLD\"", UsrDat->Tch.OfficePhone); - fprintf (Gbl.F.Out,"%s",UsrDat->Tch.OfficePhone); + HTM_Txt (UsrDat->Tch.OfficePhone); HTM_A_End (); } HTM_TD_End (); @@ -3738,7 +3737,7 @@ static void Rec_WriteLinkToDataProtectionClause (void) HTM_DIV_Begin ("class=\"CM\""); HTM_A_Begin ("class=\"TIT\" href=\"%s/\" target=\"_blank\"", Cfg_URL_DATA_PROTECTION_PUBLIC); - fprintf (Gbl.F.Out,"%s",Txt_DATA_PROTECTION_CLAUSE); + HTM_Txt (Txt_DATA_PROTECTION_CLAUSE); HTM_A_End (); HTM_DIV_End (); } diff --git a/swad_report.c b/swad_report.c index 150e996f..918b7ca5 100644 --- a/swad_report.c +++ b/swad_report.c @@ -280,13 +280,12 @@ static void Rep_PutLinkToMyUsageReport (struct Rep_Report *Report) Txt_Report); Ico_PutIcon ("file-alt.svg",Txt_Report,"ICO64x64"); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Report->FilenameReport); + HTM_Txt (Report->FilenameReport); HTM_A_End (); HTM_DIV_End (); HTM_DIV_Begin ("class=\"DAT_LIGHT\""); - fprintf (Gbl.F.Out,"%s", - Txt_This_link_will_remain_active_as_long_as_your_user_s_account_exists); + HTM_Txt (Txt_This_link_will_remain_active_as_long_as_your_user_s_account_exists); HTM_DIV_End (); /***** End box *****/ @@ -308,7 +307,7 @@ static void Rep_TitleReport (struct Rep_CurrentTimeUTC *CurrentTimeUTC) /***** User *****/ fprintf (Gbl.F.Out,"%s: ",Txt_User[Gbl.Usrs.Me.UsrDat.Sex]); HTM_SPAN_Begin ("class=\"DAT_N_BOLD\""); - fprintf (Gbl.F.Out,"%s",Gbl.Usrs.Me.UsrDat.FullName); + HTM_Txt (Gbl.Usrs.Me.UsrDat.FullName); HTM_SPAN_End (); /***** Report date *****/ diff --git a/swad_role.c b/swad_role.c index 126a868c..cb5f70c3 100644 --- a/swad_role.c +++ b/swad_role.c @@ -557,7 +557,7 @@ void Rol_WriteSelectorRoles (unsigned RolesAllowed,unsigned RolesSelected, (unsigned) Role, (RolesSelected & (1 << Role)) ? " checked=\"checked\"" : "", Disabled ? " disabled=\"disabled\"" : ""); - fprintf (Gbl.F.Out,"%s",Txt_ROLES_PLURAL_abc[Role][Usr_SEX_UNKNOWN]); + HTM_Txt (Txt_ROLES_PLURAL_abc[Role][Usr_SEX_UNKNOWN]); HTM_LABEL_End (); HTM_BR (); } diff --git a/swad_statistic.c b/swad_statistic.c index 7a46229f..2d6497bc 100644 --- a/swad_statistic.c +++ b/swad_statistic.c @@ -443,8 +443,7 @@ void Sta_AskShowCrsHits (void) "value=\"%u\"%s onclick=\"enableDetailedClicks();\"", (unsigned) Sta_CLICKS_DETAILED, Gbl.Stat.ClicksGroupedBy == Sta_CLICKS_CRS_DETAILED_LIST ? " checked=\"checked\"" : ""); - fprintf (Gbl.F.Out,"%s", - Txt_STAT_CLICKS_GROUPED_BY[Sta_CLICKS_CRS_DETAILED_LIST]); + HTM_Txt (Txt_STAT_CLICKS_GROUPED_BY[Sta_CLICKS_CRS_DETAILED_LIST]); HTM_LABEL_End (); /* Separator */ @@ -1777,7 +1776,7 @@ static void Sta_WriteLogComments (long LogCod) { /***** Get and write comments *****/ row = mysql_fetch_row (mysql_res); - fprintf (Gbl.F.Out,"%s",row[0]); + HTM_Txt (row[0]); } /***** Free structure that stores the query result *****/ @@ -3196,7 +3195,7 @@ static void Sta_ShowNumHitsPerPlugin (unsigned long NumRows, Lay_ShowErrorAndExit ("Wrong plugin code."); HTM_TD_Begin ("class=\"LOG RT\""); if (Plg_GetDataOfPluginByCod (&Plg)) - fprintf (Gbl.F.Out,"%s",Plg.Name); + HTM_Txt (Plg.Name); else fprintf (Gbl.F.Out,"?"); fprintf (Gbl.F.Out," "); @@ -3777,7 +3776,7 @@ static void Sta_ShowNumHitsPerCourse (unsigned long NumRows, Txt_Go_to_X, Crs.FullName); Frm_LinkFormSubmit (Gbl.Title,"LOG",NULL); - fprintf (Gbl.F.Out,"%s",Crs.ShrtName); + HTM_Txt (Crs.ShrtName); Frm_LinkFormEnd (); } else @@ -4100,7 +4099,7 @@ void Sta_GetAndShowLastClicks (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("class=\"LC_CLK %s\"",ClassRow); - fprintf (Gbl.F.Out,"%s",row[0]); // Click + HTM_Txt (row[0]); // Click HTM_TD_End (); HTM_TD_Begin ("class=\"LC_TIM %s\"",ClassRow); // Elapsed time @@ -4108,30 +4107,30 @@ void Sta_GetAndShowLastClicks (void) HTM_TD_End (); HTM_TD_Begin ("class=\"LC_ROL %s\"",ClassRow); - fprintf (Gbl.F.Out,"%s", // Role + HTM_Txt ( // Role Txt_ROLES_SINGUL_Abc[Rol_ConvertUnsignedStrToRole (row[3])][Usr_SEX_UNKNOWN]); HTM_TD_End (); HTM_TD_Begin ("class=\"LC_CTY %s\"",ClassRow); - fprintf (Gbl.F.Out,"%s",Cty.Name[Gbl.Prefs.Language]); // Country + HTM_Txt (Cty.Name[Gbl.Prefs.Language]); // Country HTM_TD_End (); HTM_TD_Begin ("class=\"LC_INS %s\"",ClassRow); - fprintf (Gbl.F.Out,"%s",Ins.ShrtName); // Institution + HTM_Txt (Ins.ShrtName); // Institution HTM_TD_End (); HTM_TD_Begin ("class=\"LC_CTR %s\"",ClassRow); - fprintf (Gbl.F.Out,"%s",Ctr.ShrtName); // Centre + HTM_Txt (Ctr.ShrtName); // Centre HTM_TD_End (); HTM_TD_Begin ("class=\"LC_DEG %s\"",ClassRow); - fprintf (Gbl.F.Out,"%s",Deg.ShrtName); // Degree + HTM_Txt (Deg.ShrtName); // Degree HTM_TD_End (); HTM_TD_Begin ("class=\"LC_ACT %s\"",ClassRow); if (row[8]) if (row[8][0]) - fprintf (Gbl.F.Out,"%s",row[8]); // Action + HTM_Txt (row[8]); // Action HTM_TD_End (); HTM_TR_End (); diff --git a/swad_survey.c b/swad_survey.c index 5ca9d004..32dd8a2e 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -263,7 +263,7 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst) Frm_LinkFormSubmit (Txt_START_END_TIME_HELP[Order],"TIT_TBL",NULL); if (Order == Gbl.Svys.SelectedOrder) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,"%s",Txt_START_END_TIME[Order]); + HTM_Txt (Txt_START_END_TIME[Order]); if (Order == Gbl.Svys.SelectedOrder) fprintf (Gbl.F.Out,""); Frm_LinkFormEnd (); @@ -531,7 +531,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, Frm_LinkFormSubmit (Txt_View_survey, Svy.Status.Visible ? "ASG_TITLE" : "ASG_TITLE_LIGHT",NULL); - fprintf (Gbl.F.Out,"%s",Svy.Title); + HTM_Txt (Svy.Title); Frm_LinkFormEnd (); Frm_EndForm (); HTM_ARTICLE_End (); @@ -620,7 +620,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, Lay_ShowErrorAndExit ("Wrong survey scope."); break; case Hie_SYS: // System - fprintf (Gbl.F.Out,"%s",Cfg_PLATFORM_SHORT_NAME); + HTM_Txt (Cfg_PLATFORM_SHORT_NAME); break; case Hie_CTY: // Country fprintf (Gbl.F.Out,"%s %s",Txt_Country,Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]); @@ -664,7 +664,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links HTM_DIV_Begin ("class=\"PAR %s\"",Svy.Status.Visible ? "DAT" : "DAT_LIGHT"); - fprintf (Gbl.F.Out,"%s",Txt); + HTM_Txt (Txt); HTM_DIV_End (); HTM_TD_End (); @@ -734,12 +734,12 @@ static void Svy_WriteStatus (struct Survey *Svy) if (Svy->Status.Visible) { HTM_LI_Begin ("class=\"STATUS_GREEN\""); - fprintf (Gbl.F.Out,"%s",Txt_Visible_survey); + HTM_Txt (Txt_Visible_survey); } else { HTM_LI_Begin ("class=\"STATUS_RED_LIGHT\""); - fprintf (Gbl.F.Out,"%s",Txt_Hidden_survey); + HTM_Txt (Txt_Hidden_survey); } HTM_LI_End (); @@ -749,14 +749,14 @@ static void Svy_WriteStatus (struct Survey *Svy) HTM_LI_Begin ("class=\"%s\"", Svy->Status.Visible ? "STATUS_GREEN" : "STATUS_GREEN_LIGHT"); - fprintf (Gbl.F.Out,"%s",Txt_Open_survey); + HTM_Txt (Txt_Open_survey); } else { HTM_LI_Begin ("class=\"%s\"", Svy->Status.Visible ? "STATUS_RED" : "STATUS_RED_LIGHT"); - fprintf (Gbl.F.Out,"%s",Txt_Closed_survey); + HTM_Txt (Txt_Closed_survey); } HTM_LI_End (); @@ -766,14 +766,14 @@ static void Svy_WriteStatus (struct Survey *Svy) HTM_LI_Begin ("class=\"%s\"", Svy->Status.Visible ? "STATUS_GREEN" : "STATUS_GREEN_LIGHT"); - fprintf (Gbl.F.Out,"%s",Txt_SURVEY_Type_of_user_allowed); + HTM_Txt (Txt_SURVEY_Type_of_user_allowed); } else { HTM_LI_Begin ("class=\"%s\"", Svy->Status.Visible ? "STATUS_RED" : "STATUS_RED_LIGHT"); - fprintf (Gbl.F.Out,"%s",Txt_SURVEY_Type_of_user_not_allowed); + HTM_Txt (Txt_SURVEY_Type_of_user_not_allowed); } HTM_LI_End (); @@ -783,14 +783,14 @@ static void Svy_WriteStatus (struct Survey *Svy) HTM_LI_Begin ("class=\"%s\"", Svy->Status.Visible ? "STATUS_GREEN" : "STATUS_GREEN_LIGHT"); - fprintf (Gbl.F.Out,"%s",Txt_SURVEY_You_belong_to_the_scope_of_the_survey); + HTM_Txt (Txt_SURVEY_You_belong_to_the_scope_of_the_survey); } else { HTM_LI_Begin ("class=\"%s\"", Svy->Status.Visible ? "STATUS_RED" : "STATUS_RED_LIGHT"); - fprintf (Gbl.F.Out,"%s",Txt_SURVEY_You_dont_belong_to_the_scope_of_the_survey); + HTM_Txt (Txt_SURVEY_You_dont_belong_to_the_scope_of_the_survey); } HTM_LI_End (); @@ -800,14 +800,14 @@ static void Svy_WriteStatus (struct Survey *Svy) HTM_LI_Begin ("class=\"%s\"", Svy->Status.Visible ? "STATUS_GREEN" : "STATUS_GREEN_LIGHT"); - fprintf (Gbl.F.Out,"%s",Txt_SURVEY_You_have_already_answered); + HTM_Txt (Txt_SURVEY_You_have_already_answered); } else { HTM_LI_Begin ("class=\"%s\"", Svy->Status.Visible ? "STATUS_RED" : "STATUS_RED_LIGHT"); - fprintf (Gbl.F.Out,"%s",Txt_SURVEY_You_have_not_answered); + HTM_Txt (Txt_SURVEY_You_have_not_answered); } HTM_LI_End (); @@ -1938,7 +1938,7 @@ void Svy_RequestCreatOrEditSvy (void) HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" cols=\"60\" rows=\"10\""); if (!ItsANewSurvey) - fprintf (Gbl.F.Out,"%s",Txt); + HTM_Txt (Txt); HTM_TEXTAREA_End (); HTM_TD_End (); @@ -2728,7 +2728,7 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst, HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" cols=\"60\" rows=\"4\""); - fprintf (Gbl.F.Out,"%s",Txt); + HTM_Txt (Txt); HTM_TEXTAREA_End (); HTM_TD_End (); @@ -2751,7 +2751,7 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst, "value=\"%u\"%s", (unsigned) AnsType, AnsType == SvyQst->AnswerType ? " checked=\"checked\"" : ""); - fprintf (Gbl.F.Out,"%s",Txt_SURVEY_STR_ANSWER_TYPES[AnsType]); + HTM_Txt (Txt_SURVEY_STR_ANSWER_TYPES[AnsType]); HTM_LABEL_End (); HTM_BR (); } @@ -2786,7 +2786,7 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst, HTM_TEXTAREA_Begin ("id=\"AnsStr%u\" name=\"AnsStr%u\" cols=\"50\" rows=\"1\"", NumAns,NumAns); if (SvyQst->AnsChoice[NumAns].Text) - fprintf (Gbl.F.Out,"%s",SvyQst->AnsChoice[NumAns].Text); + HTM_Txt (SvyQst->AnsChoice[NumAns].Text); HTM_TEXTAREA_End (); HTM_TD_End (); @@ -3289,7 +3289,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy, /* Write the question type (row[2]) */ SvyQst->AnswerType = Svy_ConvertFromStrAnsTypDBToAnsTyp (row[2]); HTM_TD_Begin ("class=\"DAT_SMALL CT COLOR%u\"",Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",Txt_SURVEY_STR_ANSWER_TYPES[SvyQst->AnswerType]); + HTM_Txt (Txt_SURVEY_STR_ANSWER_TYPES[SvyQst->AnswerType]); HTM_TD_End (); /* Write the stem (row[3]) and the answers of this question */ @@ -3384,7 +3384,7 @@ static void Svy_WriteQstStem (const char *Stem) HeadingRigorousHTML,Length,false); /* Write the stem */ - fprintf (Gbl.F.Out,"%s",HeadingRigorousHTML); + HTM_Txt (HeadingRigorousHTML); /* Free memory allocated for the stem */ free (HeadingRigorousHTML); @@ -3475,7 +3475,7 @@ static void Svy_WriteAnswersOfAQst (struct Survey *Svy, HTM_TD_Begin ("class=\"LT\""); HTM_LABEL_Begin ("for=\"Ans%010u_%010u\" class=\"DAT\"", (unsigned) SvyQst->QstCod,NumAns); - fprintf (Gbl.F.Out,"%s",SvyQst->AnsChoice[NumAns].Text); + HTM_Txt (SvyQst->AnsChoice[NumAns].Text); HTM_LABEL_End (); HTM_TD_End (); diff --git a/swad_syllabus.c b/swad_syllabus.c index 314a05a2..919843a4 100644 --- a/swad_syllabus.c +++ b/swad_syllabus.c @@ -154,7 +154,7 @@ void Syl_PutFormWhichSyllabus (void) "value=\"%u\"%s", (unsigned) WhichSyllabus, WhichSyllabus == Gbl.Syllabus.WhichSyllabus ? " checked=\"checked\"" : ""); - fprintf (Gbl.F.Out,"%s",Txt_SYLLABUS_WHICH_SYLLABUS[WhichSyllabus]); + HTM_Txt (Txt_SYLLABUS_WHICH_SYLLABUS[WhichSyllabus]); HTM_LABEL_End (); HTM_LI_End (); } @@ -718,7 +718,7 @@ static void Syl_ShowRowSyllabus (unsigned NumItem, LstItemsSyllabus.NumLevels - Level + 1, StyleSyllabus[Level], Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",Text); + HTM_Txt (Text); HTM_TD_End (); } diff --git a/swad_tab.c b/swad_tab.c index 1446e2ea..50bc6aef 100644 --- a/swad_tab.c +++ b/swad_tab.c @@ -141,7 +141,7 @@ void Tab_DrawTabs (void) HTM_DIV_Begin ("class=\"TAB_TXT %s\"", NumTab == Gbl.Action.Tab ? The_ClassTxtTabOn[Gbl.Prefs.Theme] : The_ClassTxtTabOff[Gbl.Prefs.Theme]); - fprintf (Gbl.F.Out,"%s",Txt_TABS_TXT[NumTab]); + HTM_Txt (Txt_TABS_TXT[NumTab]); HTM_DIV_End (); Frm_LinkFormEnd (); Frm_EndForm (); diff --git a/swad_test.c b/swad_test.c index 031d3cc5..572af0eb 100644 --- a/swad_test.c +++ b/swad_test.c @@ -908,14 +908,13 @@ void Tst_ShowTagList (unsigned NumTags,MYSQL_RES *mysql_res) { row = mysql_fetch_row (mysql_res); HTM_LI_Begin (NULL); - fprintf (Gbl.F.Out,"%s",row[0]); + HTM_Txt (row[0]); HTM_LI_End (); } HTM_UL_End (); } else - fprintf (Gbl.F.Out,"%s", - Txt_no_tags); + HTM_Txt (Txt_no_tags); } /*****************************************************************************/ @@ -994,7 +993,7 @@ static void Tst_ShowTestResultAfterAssess (long TstCod,unsigned *NumQstsNotBlank HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_LIGHT LT COLOR%u\"",Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",Txt_Question_removed); + HTM_Txt (Txt_Question_removed); HTM_TD_End (); HTM_TR_End (); @@ -1043,7 +1042,7 @@ static void Tst_WriteQstAndAnsTest (Tst_ActionToDoWithQuestions_t ActionToDoWith /***** Write answer type (row[2]) *****/ Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]); HTM_DIV_Begin ("class=\"DAT_SMALL\""); - fprintf (Gbl.F.Out,"%s",Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]); + HTM_Txt (Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]); HTM_DIV_End (); HTM_TD_End (); @@ -1103,7 +1102,7 @@ void Tst_WriteQstStem (const char *Stem,const char *ClassStem) /***** Write the stem *****/ HTM_DIV_Begin ("class=\"%s\"",ClassStem); - fprintf (Gbl.F.Out,"%s",StemRigorousHTML); + HTM_Txt (StemRigorousHTML); HTM_DIV_End (); /***** Free memory allocated for the stem *****/ @@ -1138,7 +1137,7 @@ static void Tst_PutFormToEditQstMedia (struct Media *Media,int NumMediaInForm, "value=\"%u\"%s", (unsigned) Med_ACTION_NO_MEDIA, OptionsDisabled ? " disabled=\"disabled\"" : ""); - fprintf (Gbl.F.Out,"%s",Txt_No_image_video); + HTM_Txt (Txt_No_image_video); HTM_LABEL_End (); HTM_BR (); @@ -1148,7 +1147,7 @@ static void Tst_PutFormToEditQstMedia (struct Media *Media,int NumMediaInForm, "value=\"%u\"%s checked=\"checked\"", (unsigned) Med_ACTION_KEEP_MEDIA, OptionsDisabled ? " disabled=\"disabled\"" : ""); - fprintf (Gbl.F.Out,"%s",Txt_Current_image_video); + HTM_Txt (Txt_Current_image_video); HTM_LABEL_End (); Med_ShowMedia (Media, "TEST_MED_EDIT_ONE_CONTAINER", @@ -1197,7 +1196,7 @@ void Tst_WriteQstFeedback (const char *Feedback,const char *ClassFeedback) /***** Write the feedback *****/ HTM_DIV_Begin ("class=\"%s\"",ClassFeedback); - fprintf (Gbl.F.Out,"%s",FeedbackRigorousHTML); + HTM_Txt (FeedbackRigorousHTML); HTM_DIV_End (); /***** Free memory allocated for the feedback *****/ @@ -1915,7 +1914,7 @@ static void Tst_ShowFormConfigTst (void) "value=\"%u\"%s", (unsigned) Pluggable, Pluggable == Gbl.Test.Config.Pluggable ? " checked=\"checked\"" : ""); - fprintf (Gbl.F.Out,"%s",Txt_TST_PLUGGABLE[Pluggable]); + HTM_Txt (Txt_TST_PLUGGABLE[Pluggable]); HTM_LABEL_End (); HTM_BR (); } @@ -1980,7 +1979,7 @@ static void Tst_ShowFormConfigTst (void) "value=\"%u\"%s", (unsigned) Feedback, Feedback == Gbl.Test.Config.Feedback ? " checked=\"checked\"" : ""); - fprintf (Gbl.F.Out,"%s",Txt_TST_STR_FEEDBACK[Feedback]); + HTM_Txt (Txt_TST_STR_FEEDBACK[Feedback]); HTM_LABEL_End (); HTM_BR (); } @@ -2012,7 +2011,7 @@ static void Tst_PutInputFieldNumQst (const char *Field,const char *Label, HTM_TD_Begin ("class=\"RM\""); HTM_LABEL_Begin ("for=\"%s\" class=\"DAT\"",Field); - fprintf (Gbl.F.Out,"%s",Label); + HTM_Txt (Label); HTM_LABEL_End (); HTM_TD_End (); @@ -2835,7 +2834,7 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows, if (Order == Gbl.Test.SelectedOrder) fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,"%s",Txt_TST_STR_ORDER_SHORT[Order]); + HTM_Txt (Txt_TST_STR_ORDER_SHORT[Order]); if (NumRows > 1) { if (Order == Gbl.Test.SelectedOrder) @@ -2906,7 +2905,7 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows, /* Write answer type (row[2]) */ Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]); HTM_DIV_Begin ("class=\"DAT_SMALL\""); - fprintf (Gbl.F.Out,"%s",Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]); + HTM_Txt (Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]); HTM_DIV_End (); HTM_TD_End (); @@ -3389,7 +3388,7 @@ void Tst_WriteAnswersEdit (long QstCod) /* Write the text of the answer and the media */ HTM_DIV_Begin ("class=\"TEST_EDI\""); - fprintf (Gbl.F.Out,"%s",Answer); + HTM_Txt (Answer); Med_ShowMedia (&Gbl.Test.Answer.Options[NumOpt].Media, "TEST_MED_EDIT_LIST_CONTAINER", "TEST_MED_EDIT_LIST"); @@ -3398,7 +3397,7 @@ void Tst_WriteAnswersEdit (long QstCod) /* Write the text of the feedback */ HTM_DIV_Begin ("class=\"TEST_EDI_LIGHT\""); if (LengthFeedback) - fprintf (Gbl.F.Out,"%s",Feedback); + HTM_Txt (Feedback); HTM_DIV_End (); HTM_TD_End (); @@ -3542,10 +3541,10 @@ void Tst_WriteAnsTF (char AnsTF) switch (AnsTF) { case 'T': // true - fprintf (Gbl.F.Out,"%s",Txt_TF_QST[0]); + HTM_Txt (Txt_TF_QST[0]); break; case 'F': // false - fprintf (Gbl.F.Out,"%s",Txt_TF_QST[1]); + HTM_Txt (Txt_TF_QST[1]); break; default: // no answer fprintf (Gbl.F.Out," "); @@ -3746,7 +3745,7 @@ static void Tst_WriteChoiceAnsViewTest (unsigned NumQst,long QstCod,bool Shuffle /***** Write the option text *****/ HTM_TD_Begin ("class=\"LT\""); HTM_LABEL_Begin ("for=\"Ans%06u_%u\" class=\"ANS_TXT\"",NumQst,NumOpt); - fprintf (Gbl.F.Out,"%s",Gbl.Test.Answer.Options[NumOpt].Text); + HTM_Txt (Gbl.Test.Answer.Options[NumOpt].Text); HTM_LABEL_End (); Med_ShowMedia (&Gbl.Test.Answer.Options[NumOpt].Media, "TEST_MED_SHOW_CONTAINER", @@ -3834,7 +3833,7 @@ static void Tst_WriteChoiceAnsAssessTest (struct UsrData *UsrDat, HTM_TD_Begin ("class=\"%s CT\" title=\"%s\"", Ans.Class,Txt_TST_Answer_given_by_the_user); - fprintf (Gbl.F.Out,"%s",Ans.Str); + HTM_Txt (Ans.Str); HTM_TD_End (); } else // This answer has NOT been selected by the user @@ -3870,7 +3869,7 @@ static void Tst_WriteChoiceAnsAssessTest (struct UsrData *UsrDat, HTM_TD_Begin ("class=\"LT\""); HTM_DIV_Begin ("class=\"ANS_TXT\""); - fprintf (Gbl.F.Out,"%s",Gbl.Test.Answer.Options[Indexes[NumOpt]].Text); + HTM_Txt (Gbl.Test.Answer.Options[Indexes[NumOpt]].Text); Med_ShowMedia (&Gbl.Test.Answer.Options[Indexes[NumOpt]].Media, "TEST_MED_SHOW_CONTAINER", "TEST_MED_SHOW"); @@ -3881,7 +3880,7 @@ static void Tst_WriteChoiceAnsAssessTest (struct UsrData *UsrDat, if (Gbl.Test.Answer.Options[Indexes[NumOpt]].Feedback[0]) { HTM_DIV_Begin ("class=\"TEST_EXA_LIGHT\""); - fprintf (Gbl.F.Out,"%s",Gbl.Test.Answer.Options[Indexes[NumOpt]].Feedback); + HTM_Txt (Gbl.Test.Answer.Options[Indexes[NumOpt]].Feedback); HTM_DIV_End (); } @@ -4191,7 +4190,7 @@ void Tst_WriteChoiceAnsViewMatch (long MchCod,unsigned QstInd,long QstCod, /***** Write the option text and the result *****/ HTM_TD_Begin ("class=\"LT\""); HTM_LABEL_Begin ("for=\"Ans%06u_%u\" class=\"%s\"",QstInd,NumOpt,Class); - fprintf (Gbl.F.Out,"%s",Gbl.Test.Answer.Options[Indexes[NumOpt]].Text); + HTM_Txt (Gbl.Test.Answer.Options[Indexes[NumOpt]].Text); HTM_LABEL_End (); Med_ShowMedia (&Gbl.Test.Answer.Options[Indexes[NumOpt]].Media, "TEST_MED_SHOW_CONTAINER", @@ -4338,7 +4337,7 @@ static void Tst_WriteTextAnsAssessTest (struct UsrData *UsrDat, (Correct ? "ANS_OK" : "ANS_BAD") : "ANS_0"); - fprintf (Gbl.F.Out,"%s",Gbl.Test.StrAnswersOneQst[NumQst]); + HTM_Txt (Gbl.Test.StrAnswersOneQst[NumQst]); } else // If user has omitted the answer HTM_TD_Begin (NULL); @@ -4366,7 +4365,7 @@ static void Tst_WriteTextAnsAssessTest (struct UsrData *UsrDat, HTM_TD_Begin ("class=\"LT\""); HTM_DIV_Begin ("class=\"ANS_0\""); - fprintf (Gbl.F.Out,"%s",Gbl.Test.Answer.Options[NumOpt].Text); + HTM_Txt (Gbl.Test.Answer.Options[NumOpt].Text); HTM_DIV_End (); if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) @@ -4374,7 +4373,7 @@ static void Tst_WriteTextAnsAssessTest (struct UsrData *UsrDat, if (Gbl.Test.Answer.Options[NumOpt].Feedback[0]) { HTM_DIV_Begin ("class=\"TEST_EXA_LIGHT\""); - fprintf (Gbl.F.Out,"%s",Gbl.Test.Answer.Options[NumOpt].Feedback); + HTM_Txt (Gbl.Test.Answer.Options[NumOpt].Feedback); HTM_DIV_End (); } @@ -4721,11 +4720,11 @@ static void Tst_WriteHeadUserCorrect (struct UsrData *UsrDat) extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; HTM_TD_Begin ("class=\"DAT_SMALL CM\""); - fprintf (Gbl.F.Out,"%s",Txt_User[UsrDat->Sex]); + HTM_Txt (Txt_User[UsrDat->Sex]); HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_SMALL CM\""); - fprintf (Gbl.F.Out,"%s",Txt_ROLES_PLURAL_Abc[Rol_TCH][Usr_SEX_UNKNOWN]); + HTM_Txt (Txt_ROLES_PLURAL_Abc[Rol_TCH][Usr_SEX_UNKNOWN]); HTM_TD_End (); } @@ -4810,7 +4809,7 @@ void Tst_GetAndWriteTagsQst (long QstCod) { row = mysql_fetch_row (mysql_res); HTM_LI_Begin (NULL); - fprintf (Gbl.F.Out,"%s",row[0]); + HTM_Txt (row[0]); HTM_LI_End (); } HTM_UL_End (); @@ -5211,7 +5210,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1], HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"Stem\" name=\"Stem\" class=\"STEM_TEXTAREA\"" " rows=\"5\" required=\"required\""); - fprintf (Gbl.F.Out,"%s",Stem); + HTM_Txt (Stem); HTM_TEXTAREA_End (); HTM_BR (); Tst_PutFormToEditQstMedia (&Gbl.Test.Media,-1, @@ -5224,7 +5223,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1], HTM_TEXTAREA_Begin ("name=\"Feedback\" class=\"STEM_TEXTAREA\" rows=\"2\""); if (Feedback) if (Feedback[0]) - fprintf (Gbl.F.Out,"%s",Feedback); + HTM_Txt (Feedback); HTM_TEXTAREA_End (); HTM_LABEL_End (); HTM_TD_End (); @@ -5311,7 +5310,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1], Gbl.Test.Shuffle ? " checked=\"checked\"" : "", Gbl.Test.AnswerType != Tst_ANS_UNIQUE_CHOICE && Gbl.Test.AnswerType != Tst_ANS_MULTIPLE_CHOICE ? " disabled=\"disabled\"" : ""); - fprintf (Gbl.F.Out,"%s",Txt_Shuffle); + HTM_Txt (Txt_Shuffle); HTM_LABEL_End (); HTM_TD_End (); @@ -5407,7 +5406,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1], NumOpt,OptionsDisabled ? " disabled=\"disabled\"" : ""); if (AnswerHasContent) - fprintf (Gbl.F.Out,"%s",Gbl.Test.Answer.Options[NumOpt].Text); + HTM_Txt (Gbl.Test.Answer.Options[NumOpt].Text); HTM_TEXTAREA_End (); /* Media */ @@ -5424,7 +5423,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1], ""); if (Gbl.Test.Answer.Options[NumOpt].Feedback) if (Gbl.Test.Answer.Options[NumOpt].Feedback[0]) - fprintf (Gbl.F.Out,"%s",Gbl.Test.Answer.Options[NumOpt].Feedback); + HTM_Txt (Gbl.Test.Answer.Options[NumOpt].Feedback); HTM_TEXTAREA_End (); HTM_LABEL_End (); @@ -5490,7 +5489,7 @@ static void Tst_PutTFInputField (const char *Label,char Value) Value, Gbl.Test.Answer.TF == Value ? " checked=\"checked\"" : "", Gbl.Test.AnswerType == Tst_ANS_TRUE_FALSE ? "" : " disabled=\"disabled\""); - fprintf (Gbl.F.Out,"%s",Label); + HTM_Txt (Label); HTM_LABEL_End (); } @@ -7708,9 +7707,9 @@ static void Tst_ShowHeaderTestResults (void) HTM_TH (1,1,"RT",Txt_Total_BR_score); HTM_TH (1,1,"RT",Txt_Average_BR_score_BR_per_question_BR_from_0_to_1); HTM_TH_Begin (1,1,"RT"); - fprintf (Gbl.F.Out,"%s",Txt_Score); + HTM_Txt (Txt_Score); HTM_BR (); - fprintf (Gbl.F.Out,"%s",Txt_out_of_PART_OF_A_SCORE); + HTM_Txt (Txt_out_of_PART_OF_A_SCORE); HTM_BR (); fprintf (Gbl.F.Out,"%u",Tst_SCORE_MAX); HTM_TH_End (); @@ -8291,7 +8290,7 @@ void Tst_ShowTestResult (struct UsrData *UsrDat, HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_LIGHT LT COLOR%u\"",Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",Txt_Question_modified); + HTM_Txt (Txt_Question_modified); HTM_TD_End (); HTM_TR_End (); @@ -8320,7 +8319,7 @@ void Tst_ShowTestResult (struct UsrData *UsrDat, HTM_TD_End (); HTM_TD_Begin ("class=\"DAT_LIGHT LT COLOR%u\"",Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"%s",Txt_Question_removed); + HTM_Txt (Txt_Question_removed); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_test_import.c b/swad_test_import.c index 0a2dea8b..3e4d9226 100644 --- a/swad_test_import.c +++ b/swad_test_import.c @@ -1031,7 +1031,7 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem, HTM_TD_End (); HTM_TD_Begin ("class=\"%s LT\"",ClassData); - fprintf (Gbl.F.Out,"%s",Gbl.Test.Tags.Txt[NumTag]); + HTM_Txt (Gbl.Test.Tags.Txt[NumTag]); HTM_TD_End (); HTM_TR_End (); @@ -1142,13 +1142,13 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem, HTM_TD_Begin ("class=\"LT\""); HTM_DIV_Begin ("class=\"%s\"",ClassStem); - fprintf (Gbl.F.Out,"%s",AnswerText); + HTM_Txt (AnswerText); HTM_DIV_End (); if (AnswerFeedbackLength) { HTM_DIV_Begin ("class=\"TEST_EDI_LIGHT\""); - fprintf (Gbl.F.Out,"%s",AnswerFeedback); + HTM_Txt (AnswerFeedback); HTM_DIV_End (); } diff --git a/swad_timeline.c b/swad_timeline.c index 6f0bbdcd..91fd40d1 100644 --- a/swad_timeline.c +++ b/swad_timeline.c @@ -1620,7 +1620,7 @@ static void TL_WriteNote (const struct TL_Note *SocNot, /* Write note summary */ TL_GetNoteSummary (SocNot,SummaryStr); HTM_DIV_Begin ("class=\"TL_TXT\""); - fprintf (Gbl.F.Out,"%s",SummaryStr); + HTM_Txt (SummaryStr); HTM_DIV_End (); } @@ -1722,7 +1722,7 @@ static void TL_WriteTopMessage (TL_TopMessage_t TopMessage,long UsrCod) Frm_LinkFormSubmitUnique (ItsMe ? Txt_My_public_profile : Txt_Another_user_s_profile, "TL_TOP_PUBLISHER"); - fprintf (Gbl.F.Out,"%s",UsrDat.FullName); + HTM_Txt (UsrDat.FullName); Frm_LinkFormEnd (); Frm_EndForm (); @@ -1755,7 +1755,7 @@ static void TL_WriteAuthorNote (const struct UsrData *UsrDat) Frm_LinkFormSubmitUnique (ItsMe ? Txt_My_public_profile : Txt_Another_user_s_profile, "DAT_N_BOLD"); - fprintf (Gbl.F.Out,"%s",UsrDat->FullName); + HTM_Txt (UsrDat->FullName); Frm_LinkFormEnd (); Frm_EndForm (); @@ -1947,7 +1947,7 @@ static void TL_PutFormGoToAction (const struct TL_Note *SocNot) { /***** Do not put form *****/ HTM_DIV_Begin ("class=\"TL_FORM_OFF\""); - fprintf (Gbl.F.Out,"%s",Txt_TIMELINE_NOTE[SocNot->NoteType]); + HTM_Txt (Txt_TIMELINE_NOTE[SocNot->NoteType]); if (SocNot->Unavailable) fprintf (Gbl.F.Out," (%s)",Txt_not_available); HTM_DIV_End (); @@ -2327,7 +2327,7 @@ static void TL_PutFormToWriteNewPost (void) HTM_DIV_Begin ("class=\"TL_RIGHT_AUTHOR TL_RIGHT_AUTHOR_WIDTH\""); HTM_SPAN_Begin ("class=\"DAT_N_BOLD\""); - fprintf (Gbl.F.Out,"%s",Gbl.Usrs.Me.UsrDat.FullName); + HTM_Txt (Gbl.Usrs.Me.UsrDat.FullName); HTM_SPAN_End (); HTM_SPAN_Begin ("class=\"DAT_LIGHT\""); @@ -2833,7 +2833,7 @@ static void TL_WriteAuthorComment (struct UsrData *UsrDat) Frm_LinkFormSubmitUnique (ItsMe ? Txt_My_public_profile : Txt_Another_user_s_profile, "DAT_BOLD"); - fprintf (Gbl.F.Out,"%s",UsrDat->FullName); + HTM_Txt (UsrDat->FullName); Frm_LinkFormEnd (); Frm_EndForm (); diff --git a/swad_timetable.c b/swad_timetable.c index b672f995..6ab043c4 100644 --- a/swad_timetable.c +++ b/swad_timetable.c @@ -240,7 +240,7 @@ static void TT_ShowTimeTableGrpsSelected (void) Gbl.Usrs.Me.UsrDat.FullName); break; case Grp_ALL_GROUPS: - fprintf (Gbl.F.Out,"%s",Txt_All_groups); + HTM_Txt (Txt_All_groups); break; } HTM_DIV_End (); @@ -1316,7 +1316,7 @@ static void TT_TimeTableDrawDaysCells (void) Weekday == 6 ? "TT_SUNDAY" : // Sunday drawn in red "TT_DAY", // Monday to Saturday TT_PERCENT_WIDTH_OF_A_DAY); - fprintf (Gbl.F.Out,"%s",Txt_DAYS_CAPS[Weekday]); + HTM_Txt (Txt_DAYS_CAPS[Weekday]); HTM_TD_End (); } } @@ -1552,8 +1552,7 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co if (ClassType == TT_LECTURE || ClassType == TT_PRACTICAL) { - fprintf (Gbl.F.Out,"%s", - Crs.ShrtName[0] ? Crs.ShrtName : + HTM_Txt (Crs.ShrtName[0] ? Crs.ShrtName : Txt_unknown_removed_course); HTM_BR (); } @@ -1571,9 +1570,9 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co GrpCod > 0) { HTM_BR (); - fprintf (Gbl.F.Out,"%s",GrpDat.GrpTypName); + HTM_Txt (GrpDat.GrpTypName); HTM_BR (); - fprintf (Gbl.F.Out,"%s",GrpDat.GrpName); + HTM_Txt (GrpDat.GrpName); if (GrpDat.Classroom.ClaCod > 0) { HTM_BR (); @@ -1666,7 +1665,7 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co /***** Group *****/ HTM_BR (); HTM_LABEL_Begin ("for=\"TTGrp%s\"",CellStr); - fprintf (Gbl.F.Out,"%s",Txt_Group); + HTM_Txt (Txt_Group); HTM_LABEL_End (); HTM_SELECT_Begin (true, "id=\"TTGrp%s\" name=\"TTGrp\"" @@ -1707,7 +1706,7 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co /***** Info *****/ HTM_BR (); HTM_LABEL_Begin ("for=\"TTInf%s\"",CellStr); - fprintf (Gbl.F.Out,"%s",Txt_Info); + HTM_Txt (Txt_Info); HTM_LABEL_End (); fprintf (Gbl.F.Out,"FirstName); + HTM_Txt (UsrDat->FirstName); HTM_BR (); - fprintf (Gbl.F.Out,"%s",UsrDat->Surname1); + HTM_Txt (UsrDat->Surname1); /***** Write surname2 if exists *****/ if (UsrDat->Surname2[0]) @@ -2804,7 +2804,7 @@ void Usr_WriteLoggedUsrHead (void) { Frm_StartForm (ActFrmRolSes); Frm_LinkFormSubmit (Txt_Role,The_ClassUsr[Gbl.Prefs.Theme],NULL); - fprintf (Gbl.F.Out,"%s",Txt_ROLES_SINGUL_Abc[Gbl.Usrs.Me.Role.Logged][Gbl.Usrs.Me.UsrDat.Sex]); + HTM_Txt (Txt_ROLES_SINGUL_Abc[Gbl.Usrs.Me.Role.Logged][Gbl.Usrs.Me.UsrDat.Sex]); Frm_LinkFormEnd (); Frm_EndForm (); fprintf (Gbl.F.Out,": "); @@ -3503,8 +3503,7 @@ void Usr_ShowFormsLogoutAndRole (void) HTM_SPAN_End (); HTM_SPAN_Begin ("class=\"DAT_N_BOLD\""); - fprintf (Gbl.F.Out,"%s", - Txt_ROLES_SINGUL_Abc[Gbl.Usrs.Me.Role.Logged][Gbl.Usrs.Me.UsrDat.Sex]); + HTM_Txt (Txt_ROLES_SINGUL_Abc[Gbl.Usrs.Me.Role.Logged][Gbl.Usrs.Me.UsrDat.Sex]); HTM_SPAN_End (); } else @@ -3654,8 +3653,8 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat, "USR_LIST_NUM", UsrDat->Accepted ? Txt_Enrolment_confirmed : Txt_Enrolment_not_confirmed); - fprintf (Gbl.F.Out,"%s",UsrDat->Accepted ? "✓" : - "✗"); + HTM_Txt (UsrDat->Accepted ? "✓" : + "✗"); HTM_TD_End (); /***** Write number of user in the list *****/ @@ -4121,7 +4120,7 @@ static void Usr_WriteUsrData (const char *BgColor, "DAT_SMALL_NOBR"); /***** Write data *****/ - fprintf (Gbl.F.Out,"%s",Data); + HTM_Txt (Data); if (NonBreak) fprintf (Gbl.F.Out," "); @@ -6401,7 +6400,7 @@ static void Usr_PutCheckboxListWithPhotos (void) HTM_INPUT_CHECKBOX ("WithPhotos",true, "value=\"Y\"%s", Gbl.Usrs.Listing.WithPhotos ? " checked=\"checked\"" : ""); - fprintf (Gbl.F.Out,"%s",Txt_Display_photos); + HTM_Txt (Txt_Display_photos); HTM_LABEL_End (); } @@ -8348,7 +8347,7 @@ static void Usr_ShowOneListUsrsOption (Usr_ListUsrsOption_t ListUsrsAction, "value=\"%u\"%s", (unsigned) ListUsrsAction, ListUsrsAction == Gbl.Usrs.Selected.Option ? " checked=\"checked\"" : ""); - fprintf (Gbl.F.Out,"%s",Label); + HTM_Txt (Label); HTM_LABEL_End (); HTM_LI_End (); } @@ -8901,17 +8900,17 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType, /* Name */ if (UsrDat.FirstName[0]) - fprintf (Gbl.F.Out,"%s",UsrDat.FirstName); + HTM_Txt (UsrDat.FirstName); else fprintf (Gbl.F.Out," "); HTM_BR (); if (UsrDat.Surname1[0]) - fprintf (Gbl.F.Out,"%s",UsrDat.Surname1); + HTM_Txt (UsrDat.Surname1); else fprintf (Gbl.F.Out," "); HTM_BR (); if (UsrDat.Surname2[0]) - fprintf (Gbl.F.Out,"%s",UsrDat.Surname2); + HTM_Txt (UsrDat.Surname2); else fprintf (Gbl.F.Out," "); @@ -8959,7 +8958,7 @@ void Usr_PutSelectorNumColsClassPhoto (void) /***** End selector *****/ HTM_SELECT_End (); - fprintf (Gbl.F.Out,"%s",Txt_columns); + HTM_Txt (Txt_columns); HTM_LABEL_End (); } @@ -9655,7 +9654,7 @@ void Usr_WriteAuthor1Line (long UsrCod,bool Hidden) /***** Write name *****/ HTM_DIV_Begin ("class=\"AUTHOR_1_LINE %s\"",Hidden ? "AUTHOR_TXT_LIGHT" : "AUTHOR_TXT"); - fprintf (Gbl.F.Out,"%s",UsrDat.FullName); + HTM_Txt (UsrDat.FullName); HTM_DIV_End (); /***** Free memory used for user's data *****/ @@ -9713,14 +9712,14 @@ void Usr_ShowTableCellWithUsrData (struct UsrData *UsrDat,unsigned NumRows) /***** Show user's name *****/ HTM_BR (); - fprintf (Gbl.F.Out,"%s",UsrDat->Surname1); + HTM_Txt (UsrDat->Surname1); if (UsrDat->Surname2[0]) fprintf (Gbl.F.Out," %s",UsrDat->Surname2); if (UsrDat->FirstName[0]) { fprintf (Gbl.F.Out,","); HTM_BR (); - fprintf (Gbl.F.Out,"%s",UsrDat->FirstName); + HTM_Txt (UsrDat->FirstName); } /***** End form *****/ diff --git a/swad_zip.c b/swad_zip.c index 12ab4259..9b992c57 100644 --- a/swad_zip.c +++ b/swad_zip.c @@ -589,7 +589,7 @@ static void ZIP_ShowLinkToDownloadZIP (const char *FileName,const char *URL, HTM_TD_Begin ("class=\"DAT LM\""); HTM_A_Begin ("href=\"%s\" class=\"DAT\" title=\"%s\" target=\"_blank\"", URL,FileName); - fprintf (Gbl.F.Out,"%s",FileName); + HTM_Txt (FileName); HTM_A_End (); HTM_TD_End (); @@ -604,7 +604,7 @@ static void ZIP_ShowLinkToDownloadZIP (const char *FileName,const char *URL, HTM_TD_End (); HTM_TD_Begin ("class=\"DAT LM\""); - fprintf (Gbl.F.Out,"%s",FileSizeStr); + HTM_Txt (FileSizeStr); if (UncompressedSize) { Fil_WriteFileSizeFull ((double) UncompressedSize,FileSizeStr);