From d3ab3b92971644cf1de2a8910ed11b26bfbc37fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Wed, 23 Oct 2019 20:07:56 +0200 Subject: [PATCH] Version19.42.1 --- swad_HTML.c | 9 +++ swad_HTML.h | 2 + swad_MFU.c | 5 +- swad_QR.c | 9 +-- swad_account.c | 18 +++--- swad_agenda.c | 14 +++-- swad_alert.c | 15 +++-- swad_announcement.c | 14 +++-- swad_assignment.c | 6 +- swad_attendance.c | 12 ++-- swad_banner.c | 2 +- swad_box.c | 16 ++--- swad_button.c | 25 +++----- swad_calendar.c | 11 ++-- swad_centre.c | 22 ++++--- swad_changelog.h | 3 +- swad_config.h | 4 +- swad_connected.c | 20 +++---- swad_cookie.c | 3 +- swad_country.c | 21 ++++--- swad_course.c | 8 +-- swad_date.c | 10 ++-- swad_degree.c | 12 ++-- swad_enrolment.c | 22 +++---- swad_file_browser.c | 34 ++++++----- swad_follow.c | 56 +++++++++--------- swad_forum.c | 6 +- swad_game.c | 20 +++++-- swad_group.c | 8 +-- swad_hierarchy.c | 72 ++++++++++++----------- swad_icon.c | 27 +++++---- swad_info.c | 28 ++++----- swad_institution.c | 12 ++-- swad_layout.c | 98 +++++++++++++++++-------------- swad_link.c | 2 +- swad_logo.c | 3 +- swad_mail.c | 10 ++-- swad_match.c | 88 +++++++++++++++------------- swad_match_result.c | 2 +- swad_media.c | 43 +++++++------- swad_menu.c | 13 ++-- swad_message.c | 36 +++++++----- swad_network.c | 6 +- swad_notice.c | 28 +++++---- swad_notification.c | 2 +- swad_pagination.c | 5 +- swad_password.c | 4 +- swad_photo.c | 43 +++++++------- swad_profile.c | 14 ++--- swad_project.c | 12 ++-- swad_record.c | 60 +++++++++---------- swad_report.c | 11 ++-- swad_search.c | 9 +-- swad_setting.c | 31 +++++----- swad_statistic.c | 8 +-- swad_survey.c | 18 +++--- swad_syllabus.c | 4 +- swad_tab.c | 15 +++-- swad_test.c | 79 +++++++++++++++---------- swad_test_import.c | 14 +++-- swad_theme.c | 3 +- swad_timeline.c | 140 ++++++++++++++++++++++++-------------------- swad_timetable.c | 4 +- swad_user.c | 46 ++++++++------- 64 files changed, 769 insertions(+), 628 deletions(-) diff --git a/swad_HTML.c b/swad_HTML.c index 7407fa02..17bfb8d3 100644 --- a/swad_HTML.c +++ b/swad_HTML.c @@ -442,3 +442,12 @@ void HTM_TD_ColouredEmpty (unsigned NumColumns) HTM_TD_End (); } } + +/*****************************************************************************/ +/************************************ Divs ***********************************/ +/*****************************************************************************/ + +void HTM_DIV_End (void) + { + fprintf (Gbl.F.Out,""); + } diff --git a/swad_HTML.h b/swad_HTML.h index 11ef96ab..3bd47395 100644 --- a/swad_HTML.h +++ b/swad_HTML.h @@ -62,4 +62,6 @@ void HTM_TD_End (void); void HTM_TD_Empty (unsigned NumColumns); void HTM_TD_ColouredEmpty (unsigned NumColumns); +void HTM_DIV_End (void); + #endif diff --git a/swad_MFU.c b/swad_MFU.c index ed63ce81..051c9ecf 100644 --- a/swad_MFU.c +++ b/swad_MFU.c @@ -35,6 +35,7 @@ #include "swad_database.h" #include "swad_form.h" #include "swad_global.h" +#include "swad_HTML.h" #include "swad_MFU.h" #include "swad_tab.h" #include "swad_theme.h" @@ -255,7 +256,7 @@ void MFU_WriteBigMFUActions (struct MFU_ListMFUActions *ListMFUActions) } /***** End box *****/ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); Box_EndBox (); } @@ -319,7 +320,7 @@ void MFU_WriteSmallMFUActions (struct MFU_ListMFUActions *ListMFUActions) fprintf (Gbl.F.Out,""); /***** End div *****/ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /*****************************************************************************/ diff --git a/swad_QR.c b/swad_QR.c index c5e574d4..802ecfbc 100644 --- a/swad_QR.c +++ b/swad_QR.c @@ -27,6 +27,7 @@ #include "swad_action.h" #include "swad_global.h" +#include "swad_HTML.h" #include "swad_ID.h" #include "swad_parameter.h" #include "swad_QR.h" @@ -109,14 +110,14 @@ void QR_ImageQRCode (const char *QRString) "\"%s\"" - "", + " border:1px dashed silver;\" />", QR_CODE_SIZE, QR_CODE_SIZE,QR_CODE_SIZE, QRString, QRString, QRString, QR_CODE_SIZE,QR_CODE_SIZE); + HTM_DIV_End (); } /*****************************************************************************/ @@ -152,10 +153,10 @@ void QR_ExamAnnnouncement (void) fprintf (Gbl.F.Out,"
" "\"%s\"" - "
", + " style=\"width:250px; height:250px;\" />", 300,300, Cfg_URL_SWAD_CGI,Gbl.Hierarchy.Crs.CrsCod,Act_GetActCod (ActSeeAllExaAnn), Txt_Link_to_announcement_of_exam, Txt_Link_to_announcement_of_exam); + HTM_DIV_End (); } diff --git a/swad_account.c b/swad_account.c index ae2aba81..b6d6fc06 100644 --- a/swad_account.c +++ b/swad_account.c @@ -120,7 +120,7 @@ void Acc_ShowFormMyAccount (void) Usr_PutLinkToLogin (); Pwd_PutLinkToSendNewPasswd (); Lan_PutLinkToChangeLanguage (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /**** Show form to check if I have an account *****/ Acc_ShowFormCheckIfIHaveAccount (Txt_Before_creating_a_new_account_check_if_you_have_been_already_registered); @@ -193,7 +193,7 @@ void Acc_CheckIfEmptyAccountExists (void) Usr_PutLinkToLogin (); Pwd_PutLinkToSendNewPasswd (); Lan_PutLinkToChangeLanguage (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Get new user's ID from form *****/ Par_GetParToText ("ID",ID,ID_MAX_BYTES_USR_ID); @@ -329,7 +329,7 @@ void Acc_ShowFormCreateMyAccount (void) Usr_PutLinkToLogin (); Pwd_PutLinkToSendNewPasswd (); Lan_PutLinkToChangeLanguage (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /**** Show form to create a new account *****/ Acc_ShowFormRequestNewAccountWithParams ("",""); @@ -492,16 +492,16 @@ void Acc_ShowFormChgMyAccount (void) fprintf (Gbl.F.Out,"
"); Pwd_ShowFormChgMyPwd (); Nck_ShowFormChangeMyNickname (IMustCreateMyNicknameNow); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** Show form to change my email and my ID *****/ fprintf (Gbl.F.Out,"
"); Mai_ShowFormChangeMyEmail (IMustFillInMyEmailNow,IShouldConfirmMyEmailNow); ID_ShowFormChangeMyID (IShouldFillInMyIDNow); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** Start container for this user *****/ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /*****************************************************************************/ @@ -531,16 +531,16 @@ void Acc_ShowFormChgOtherUsrAccount (void) fprintf (Gbl.F.Out,"
"); Pwd_ShowFormChgOtherUsrPwd (); Nck_ShowFormChangeOtherUsrNickname (); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** Show form to change email and ID *****/ fprintf (Gbl.F.Out,"
"); Mai_ShowFormChangeOtherUsrEmail (); ID_ShowFormChangeOtherUsrID (); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** Start container for this user *****/ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } else Ale_ShowAlertUserNotFoundOrYouDoNotHavePermission (); diff --git a/swad_agenda.c b/swad_agenda.c index 7f9f0f24..19a52499 100644 --- a/swad_agenda.c +++ b/swad_agenda.c @@ -205,7 +205,7 @@ static void Agd_ShowFormToSelPast__FutureEvents (void) Ico_PutSettingIconLink (Icon[PstFut], Txt_AGENDA_PAST___FUTURE_EVENTS[PstFut]); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } Set_EndOneSettingSelector (); } @@ -241,7 +241,7 @@ static void Agd_ShowFormToSelPrivatPublicEvents (void) Ico_PutSettingIconLink (Icon[PrvPub], Txt_AGENDA_PRIVAT_PUBLIC_EVENTS[PrvPub]); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } Set_EndOneSettingSelector (); } @@ -277,7 +277,7 @@ static void Agd_ShowFormToSelHiddenVisiblEvents (void) Ico_PutSettingIconLink (Icon[HidVis], Txt_AGENDA_HIDDEN_VISIBL_EVENTS[HidVis]); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } Set_EndOneSettingSelector (); } @@ -772,10 +772,12 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod) /* Location */ HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"
%s
", + fprintf (Gbl.F.Out,"
" + "%s", AgdEvent.Hidden ? "ASG_TITLE_LIGHT" : "ASG_TITLE", AgdEvent.Location); + HTM_DIV_End (); HTM_TD_End (); HTM_TR_End (); @@ -803,10 +805,12 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod) Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links HTM_TD_Begin ("colspan=\"2\" class=\"LT COLOR%u\"",Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"
%s
", + fprintf (Gbl.F.Out,"
" + "%s", AgdEvent.Hidden ? "DAT_LIGHT" : "DAT", Txt); + HTM_DIV_End (); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_alert.c b/swad_alert.c index 7575f3af..b7e56282 100644 --- a/swad_alert.c +++ b/swad_alert.c @@ -35,6 +35,7 @@ #include "swad_alert.h" #include "swad_form.h" #include "swad_global.h" +#include "swad_HTML.h" /*****************************************************************************/ /************** External global variables from others modules ****************/ @@ -416,26 +417,28 @@ static void Ale_ShowFixAlertAndButton1 (Ale_AlertType_t AlertType,const char *Tx /***** Icon to close the alert *****/ if (AlertClosable[AlertType]) + { fprintf (Gbl.F.Out,"
" "" "\"%s\"" - "" - "
", + "", IdAlert, Cfg_URL_ICON_PUBLIC, Txt_Close,Txt_Close); + HTM_DIV_End (); + } /***** Write message *****/ fprintf (Gbl.F.Out,"
%s" - "
", + fprintf (Gbl.F.Out,">%s", Txt); + HTM_DIV_End (); } /*****************************************************************************/ @@ -465,8 +468,8 @@ void Ale_ShowAlertAndButton2 (Act_Action_t NextAction,const char *Anchor,const c } /***** End box *****/ - fprintf (Gbl.F.Out,"
" - "
"); + HTM_DIV_End (); + HTM_DIV_End (); } /*****************************************************************************/ diff --git a/swad_announcement.c b/swad_announcement.c index a0ab8205..f68d112f 100644 --- a/swad_announcement.c +++ b/swad_announcement.c @@ -260,7 +260,7 @@ void Ann_ShowMyAnnouncementsNotMarkedAsSeen (void) 0,false,false); } - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } } @@ -324,12 +324,16 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status, } /***** Write the subject of the announcement *****/ - fprintf (Gbl.F.Out,"
%s
", + fprintf (Gbl.F.Out,"
" + "%s", SubjectClass[Status],Subject); + HTM_DIV_End (); /***** Write the content of the announcement *****/ - fprintf (Gbl.F.Out,"
%s
", + fprintf (Gbl.F.Out,"
" + "%s", ContentClass[Status],Content); + HTM_DIV_End (); /***** Write form *****/ fprintf (Gbl.F.Out,"
",UsersClass[Status]); @@ -356,10 +360,10 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status, "close.svg", Txt_Do_not_show_again); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** End yellow note *****/ - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } /*****************************************************************************/ diff --git a/swad_assignment.c b/swad_assignment.c index 5715b9f0..faff91c3 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -443,10 +443,12 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView) HTM_TD_Begin ("colspan=\"2\" class=\"LT COLOR%u\"",Gbl.RowEvenOdd); if (Gbl.Crs.Grps.NumGrps) Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (&Asg); - fprintf (Gbl.F.Out,"
%s
", + fprintf (Gbl.F.Out,"
" + "%s", Asg.Hidden ? "DAT_LIGHT" : "DAT", Txt); + HTM_DIV_End (); HTM_TD_End (); HTM_TR_End (); @@ -1665,7 +1667,7 @@ static void Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (struct Assignment *Asg) fprintf (Gbl.F.Out,"%s %s", Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** Free structure that stores the query result *****/ DB_FreeMySQLResult (&mysql_res); diff --git a/swad_attendance.c b/swad_attendance.c index 6ff8b806..cb608ef8 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -174,14 +174,14 @@ void Att_SeeAttEvents (void) case Rol_STD: fprintf (Gbl.F.Out,"
"); Att_PutFormToListMyAttendance (); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); break; case Rol_NET: case Rol_TCH: case Rol_SYS_ADM: fprintf (Gbl.F.Out,"
"); Att_PutFormToListStdsAttendance (); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); break; default: break; @@ -481,10 +481,12 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt HTM_TD_Begin ("colspan=\"2\" class=\"LT COLOR%u\"",Gbl.RowEvenOdd); if (Gbl.Crs.Grps.NumGrps) Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (Att); - fprintf (Gbl.F.Out,"
%s
", + fprintf (Gbl.F.Out,"
" + "%s", Att->Hidden ? "DAT_LIGHT" : "DAT", Description); + HTM_DIV_End (); HTM_TD_End (); HTM_TR_End (); @@ -1562,7 +1564,7 @@ static void Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (struct AttendanceEve fprintf (Gbl.F.Out,"%s %s", Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** Free structure that stores the query result *****/ DB_FreeMySQLResult (&mysql_res); @@ -3431,7 +3433,7 @@ static void Att_PutCheckOrCross (bool Present) "✗", Txt_Absent); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } /*****************************************************************************/ diff --git a/swad_banner.c b/swad_banner.c index 7fb37aca..5be9da01 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -1059,7 +1059,7 @@ void Ban_WriteMenuWithBanners (void) Gbl.Banners.Lst[NumBan].ShrtName, Gbl.Banners.Lst[NumBan].FullName); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /***** Free list of banners *****/ diff --git a/swad_box.c b/swad_box.c index b68c9b4a..ca388863 100644 --- a/swad_box.c +++ b/swad_box.c @@ -162,7 +162,7 @@ static void Box_StartBoxInternal (const char *Width,const char *Title, { fprintf (Gbl.F.Out,"
"); FunctionToDrawContextualIcons (); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } /* Icons at right: help and close */ @@ -187,19 +187,21 @@ static void Box_StartBoxInternal (const char *Width,const char *Title, fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** End row for left and right icons *****/ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Frame title *****/ if (Title) + { fprintf (Gbl.F.Out,"
" - "%s" - "
", + "%s", Gbl.Box.Nested ? "FRAME_TITLE_SMALL" : "FRAME_TITLE_BIG", Title); + HTM_DIV_End (); + } } void Box_EndBoxTable (void) @@ -231,8 +233,8 @@ void Box_EndBox (void) free (Gbl.Box.Ids[Gbl.Box.Nested]); /***** End box and box container *****/ - fprintf (Gbl.F.Out,"" - ""); + HTM_DIV_End (); + HTM_DIV_End (); /***** Decrease level of nesting *****/ Gbl.Box.Nested--; diff --git a/swad_button.c b/swad_button.c index 93dd57fe..3033c6f1 100644 --- a/swad_button.c +++ b/swad_button.c @@ -29,6 +29,7 @@ #include "swad_button.h" #include "swad_global.h" +#include "swad_HTML.h" /*****************************************************************************/ /************** External global variables from others modules ****************/ @@ -101,9 +102,9 @@ void Btn_PutCreateButton (const char *TxtButton) fprintf (Gbl.F.Out,"
" "" - "
", + "", TxtButton); + HTM_DIV_End (); } void Btn_PutCreateButtonInline (const char *TxtButton) @@ -119,9 +120,9 @@ void Btn_PutConfirmButton (const char *TxtButton) fprintf (Gbl.F.Out,"
" "" - "
", + "", TxtButton); + HTM_DIV_End (); } void Btn_PutConfirmButtonInline (const char *TxtButton) @@ -137,9 +138,9 @@ void Btn_PutRemoveButton (const char *TxtButton) fprintf (Gbl.F.Out,"
" "" - "
", + "", TxtButton); + HTM_DIV_End (); } void Btn_PutRemoveButtonInline (const char *TxtButton) @@ -149,15 +150,3 @@ void Btn_PutRemoveButtonInline (const char *TxtButton) "", TxtButton); } -/* -void Btn_PutCloseTabButton (const char *TxtButton) - { - fprintf (Gbl.F.Out,"
" - "" - "
", - TxtButton); - } -*/ diff --git a/swad_calendar.c b/swad_calendar.c index 503eeef5..d3fe48c1 100644 --- a/swad_calendar.c +++ b/swad_calendar.c @@ -33,6 +33,7 @@ #include "swad_exam.h" #include "swad_form.h" #include "swad_global.h" +#include "swad_HTML.h" #include "swad_parameter.h" #include "swad_setting.h" @@ -131,7 +132,7 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,void (*FuncParams) (vo FirstDayOfWeek); Ico_PutSettingIconLink (Icon,Gbl.Title); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } Set_EndOneSettingSelector (); } @@ -209,8 +210,8 @@ void Cal_DrawCurrentMonth (void) /***** Draw the month in JavaScript *****/ /* JavaScript will write HTML here */ - fprintf (Gbl.F.Out,"
" - "
"); + fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /* Write script to draw the month */ fprintf (Gbl.F.Out,"" - "
", + "", UniqueId,(long) TimeUTC, (unsigned) Gbl.Prefs.DateFormat,Txt_Today); + HTM_DIV_End (); /***** Write the content of the notice *****/ if (TypeNoticesListing == Not_LIST_BRIEF_NOTICES) { - fprintf (Gbl.F.Out,"
%s
",Content); + fprintf (Gbl.F.Out,"
" + "%s", + Content); + HTM_DIV_End (); /* Put form to view full notice */ fprintf (Gbl.F.Out,"
"); @@ -719,11 +723,15 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing, Lay_PutContextualLinkOnlyIcon (ActSeeOneNot,Anchor,Not_PutParams, "ellipsis-h.svg", Txt_See_full_notice); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } else - fprintf (Gbl.F.Out,"
%s
", + { + fprintf (Gbl.F.Out,"
" + "%s", TextClass[Status],Content); + HTM_DIV_End (); + } /***** Write the author *****/ fprintf (Gbl.F.Out,"
", // Limited width @@ -733,16 +741,16 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing, if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS)) // Get from the database the data of the autor Usr_WriteFirstNameBRSurnames (&UsrDat); Usr_UsrDataDestructor (&UsrDat); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** End yellow note *****/ - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** End article for this notice *****/ if (TypeNoticesListing == Not_LIST_FULL_NOTICES) { if (Highlight) - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); Lay_EndArticle (); } diff --git a/swad_notification.c b/swad_notification.c index 791aefc4..8582df36 100644 --- a/swad_notification.c +++ b/swad_notification.c @@ -380,7 +380,7 @@ void Ntf_ShowMyNotifications (void) "envelope.svg", Txt_Domains); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Start box *****/ Box_StartBox (NULL,Txt_Notifications,Ntf_PutIconsNotif, diff --git a/swad_pagination.c b/swad_pagination.c index 926e5cd0..02a75c46 100644 --- a/swad_pagination.c +++ b/swad_pagination.c @@ -32,6 +32,7 @@ #include "swad_form.h" #include "swad_forum.h" #include "swad_global.h" +#include "swad_HTML.h" #include "swad_parameter.h" #include "swad_project.h" @@ -131,7 +132,7 @@ void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate, Pag_WriteLinksToPages (WhatPaginate, ThrCod, Pagination,true,NULL,"PAG_TXT",false); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /*****************************************************************************/ @@ -253,7 +254,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate, } else fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /***** Links to several pages start here *****/ diff --git a/swad_password.c b/swad_password.c index 2b34318d..cf3f8f7a 100644 --- a/swad_password.c +++ b/swad_password.c @@ -899,13 +899,13 @@ void Pwd_AskForConfirmationOnDangerousAction (void) "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_I_understand_that_this_action_can_not_be_undone, The_ClassFormInBox[Gbl.Prefs.Theme], Txt_For_security_enter_your_password, Pwd_MAX_CHARS_PLAIN_PASSWORD); + HTM_DIV_End (); } /*****************************************************************************/ diff --git a/swad_photo.c b/swad_photo.c index 7d779e78..f4342d45 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -787,11 +787,11 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr fprintf (Gbl.F.Out,"
" "\"%s\"" - "
", + " alt=\"%s\" title=\"%s\" />", Cfg_URL_PHOTO_TMP_PUBLIC, Gbl.UniqueNameEncrypted, Txt_Faces_detected,Txt_Faces_detected); + HTM_DIV_End (); /***** End alert *****/ Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL); @@ -1213,22 +1213,23 @@ void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL, /* First name and surnames */ fprintf (Gbl.F.Out,"
"); // Limited width Usr_WriteFirstNameBRSurnames (UsrDat); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /* Nickname */ if (UsrDat->Nickname[0]) + { fprintf (Gbl.F.Out,"
" - "@%s" - "
", + "@%s", UsrDat->Nickname); - + HTM_DIV_End (); + } /* Institution full name and institution country */ if (UsrDat->InsCod > 0) { fprintf (Gbl.F.Out,"
"); Ins_WriteInstitutionNameAndCty (UsrDat->InsCod); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } /* User's country */ else if (UsrDat->CtyCod > 0) @@ -1236,20 +1237,22 @@ void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL, fprintf (Gbl.F.Out,"
"); Cty_WriteCountryName (UsrDat->CtyCod, NULL); // Don't put link to country - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } /* Main degree (in which the user has more courses) short name */ Usr_GetMainDeg (UsrDat->UsrCod,MainDegreeShrtName,&MaxRole); if (MainDegreeShrtName[0]) + { fprintf (Gbl.F.Out,"
" "
" - "%s" - "
" - "
", + "%s", Cfg_URL_ICON_PUBLIC,Rol_Icons[MaxRole], MainDegreeShrtName); + HTM_DIV_End (); + HTM_DIV_End (); + } /* Following and followers */ if (UsrDat->Nickname[0]) // Get social data only if nickname is retrieved (in some actions) @@ -1259,13 +1262,13 @@ void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL, "%u" " %s " "%u" - " %s" - "", + " %s", NumFollowing,Txt_Following, NumFollowers,Txt_Followers); + HTM_DIV_End (); } - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /***** Start image *****/ @@ -2053,7 +2056,7 @@ static void Pho_PutLinkToCalculateDegreeStats (void) /***** End selector, form and div *****/ fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Free list of all the degrees with students *****/ Deg_FreeListDegs (&Degs); @@ -2490,10 +2493,10 @@ static void Pho_ShowDegreeAvgPhotoAndStat (struct Degree *Deg, Frm_SetUniqueId (IdCaption); fprintf (Gbl.F.Out,"
" "
" - "%s" - "
" - "
", + "%s", IdCaption,PhotoCaption); + HTM_DIV_End (); + HTM_DIV_End (); } } } @@ -2520,13 +2523,13 @@ static void Pho_ShowDegreeAvgPhotoAndStat (struct Degree *Deg, "%s
" "%d %s
" "%d %s
" - "(%d%%)" - "", + "(%d%%)", Deg->ShrtName, NumStds,Txt_students_ABBREVIATION, NumStdsWithPhoto,Txt_photos, NumStds > 0 ? (int) (((NumStdsWithPhoto * 100.0) / NumStds) + 0.5) : 0); + HTM_DIV_End (); if (SeeOrPrint == Pho_DEGREES_SEE) { fprintf (Gbl.F.Out,""); diff --git a/swad_profile.c b/swad_profile.c index e6a6e4e6..df51201f 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -191,7 +191,7 @@ void Prf_RequestUserProfile (void) fprintf (Gbl.F.Out,"
"); Prf_PutLinkMyPublicProfile (); Fol_PutLinkWhoToFollow (); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } /***** Begin form *****/ @@ -300,7 +300,7 @@ bool Prf_ShowUserProfile (struct UsrData *UsrDat) /* Put link to show users to follow */ Fol_PutLinkWhoToFollow (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /***** Shared record card *****/ @@ -420,8 +420,8 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat) Prf_ShowNumFilesCurrentlyPublished (UsrDat); /* End left list */ - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Right list *****/ fprintf (Gbl.F.Out,"
"); @@ -451,7 +451,7 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat) fprintf (Gbl.F.Out,""); } - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } /*****************************************************************************/ @@ -1783,8 +1783,8 @@ static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank) fprintf (Gbl.F.Out,"
"); // Limited width Frm_LinkFormSubmit (Txt_Another_user_s_profile,"DAT_SMALL",NULL); Usr_WriteFirstNameBRSurnames (UsrDat); - fprintf (Gbl.F.Out,"" - "
"); + fprintf (Gbl.F.Out,""); + HTM_DIV_End (); Frm_EndForm (); } HTM_TD_End (); diff --git a/swad_project.c b/swad_project.c index b851f8e0..46011c14 100644 --- a/swad_project.c +++ b/swad_project.c @@ -434,7 +434,7 @@ static void Prj_ShowFormToFilterByMy_All (void) Ico_PutSettingIconLink (WhoseProjectsIcon[My_All], Txt_PROJECT_MY_ALL_PROJECTS[My_All]); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } Set_EndOneSettingSelector (); } @@ -470,7 +470,7 @@ static void Prj_ShowFormToFilterByPreassignedNonPreassig (void) Ico_PutSettingIconLink (PreassignedNonpreassigImage[PreNon], Txt_PROJECT_PREASSIGNED_NONPREASSIGNED_PLURAL[PreNon]); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } Set_EndOneSettingSelector (); } @@ -511,7 +511,7 @@ static void Prj_ShowFormToFilterByHidden (void) Ico_PutSettingIconLink (HiddenVisiblIcon[HidVis], Txt_PROJECT_HIDDEN_VISIBL_PROJECTS[HidVis]); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } Set_EndOneSettingSelector (); } @@ -552,7 +552,7 @@ static void Prj_ShowFormToFilterByWarning (void) Ico_PutSettingIconLink (FaultinessIcon[Faultiness], Txt_PROJECT_FAULTY_FAULTLESS_PROJECTS[Faultiness]); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } Set_EndOneSettingSelector (); } @@ -589,7 +589,7 @@ static void Prj_ShowFormToFilterByDpt (void) /***** End form *****/ Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /*****************************************************************************/ @@ -2516,7 +2516,7 @@ static void Prj_PutFormsToRemEditOnePrj (const struct Project *Prj, /* Put form to lock/unlock project edition */ fprintf (Gbl.F.Out,"
",Prj->PrjCod); Prj_FormLockUnlock (Prj); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } else /* Put icon toinform about locked/unlocked project edition */ diff --git a/swad_record.c b/swad_record.c index 390e543c..e7d032d7 100644 --- a/swad_record.c +++ b/swad_record.c @@ -983,7 +983,7 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView) Usr_PutHiddenParSelectedUsrsCods (); Rec_ShowLinkToPrintPreviewOfRecords (); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /***** Initialize structure with user's data *****/ @@ -1020,10 +1020,10 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView) /* Shared record */ fprintf (Gbl.F.Out,"
"); Rec_ShowSharedUsrRecord (TypeOfView,&UsrDat,RecordSectionId); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /* End container for this user */ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); Lay_EndSection (); NumUsr++; @@ -1083,7 +1083,7 @@ static void Rec_ShowRecordOneStdCrs (void) Rec_ShowLinkToPrintPreviewOfRecords (); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Show optional alert (result of editing data in course record) *****/ Ale_ShowAlerts (NULL); @@ -1094,7 +1094,7 @@ static void Rec_ShowRecordOneStdCrs (void) /***** Shared record *****/ fprintf (Gbl.F.Out,"
"); Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Other.UsrDat,NULL); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** Record of the student in the course *****/ if (Gbl.Crs.Records.LstFields.Num) // There are fields in the record @@ -1107,7 +1107,7 @@ static void Rec_ShowRecordOneStdCrs (void) { fprintf (Gbl.F.Out,"
"); Rec_ShowCrsRecord (Rec_CRS_MY_RECORD_AS_STUDENT_FORM,&Gbl.Usrs.Other.UsrDat,NULL); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } break; case Rol_NET: @@ -1115,7 +1115,7 @@ static void Rec_ShowRecordOneStdCrs (void) case Rol_SYS_ADM: fprintf (Gbl.F.Out,"
"); Rec_ShowCrsRecord (Rec_CRS_LIST_ONE_RECORD,&Gbl.Usrs.Other.UsrDat,NULL); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); break; default: break; @@ -1123,7 +1123,7 @@ static void Rec_ShowRecordOneStdCrs (void) } /***** End container for this user *****/ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Free list of fields of records *****/ Rec_FreeListFields (); @@ -1183,7 +1183,7 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView, Usr_PutHiddenParSelectedUsrsCods (); Rec_ShowLinkToPrintPreviewOfRecords (); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /***** Initialize structure with user's data *****/ @@ -1222,7 +1222,7 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView, /* Shared record */ fprintf (Gbl.F.Out,"
"); Rec_ShowSharedUsrRecord (ShaTypeOfView,&UsrDat,RecordSectionId); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /* Record of the student in the course */ if (Gbl.Crs.Records.LstFields.Num) // There are fields in the record @@ -1236,12 +1236,12 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView, { fprintf (Gbl.F.Out,"
"); Rec_ShowCrsRecord (CrsTypeOfView,&UsrDat,RecordSectionId); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } } /* End container for this user */ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); Lay_EndSection (); NumUsr++; @@ -1315,7 +1315,7 @@ static void Rec_ShowRecordOneTchCrs (void) Rec_ShowLinkToPrintPreviewOfRecords (); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Start container for this user *****/ fprintf (Gbl.F.Out,"
"); @@ -1323,7 +1323,7 @@ static void Rec_ShowRecordOneTchCrs (void) /***** Shared record *****/ fprintf (Gbl.F.Out,"
"); Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Other.UsrDat,NULL); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** Office hours *****/ if (ShowOfficeHours) @@ -1334,11 +1334,11 @@ static void Rec_ShowRecordOneTchCrs (void) Hlp_USERS_Teachers_timetable,Box_NOT_CLOSABLE); TT_ShowTimeTable (Gbl.Usrs.Other.UsrDat.UsrCod); Box_EndBox (); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } /***** Start container for this user *****/ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /*****************************************************************************/ @@ -1404,7 +1404,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView) Rec_ShowLinkToPrintPreviewOfRecords (); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /***** Initialize structure with user's data *****/ @@ -1443,7 +1443,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView) /* Shared record */ fprintf (Gbl.F.Out,"
"); Rec_ShowSharedUsrRecord (TypeOfView,&UsrDat,RecordSectionId); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /* Office hours */ if (ShowOfficeHours) @@ -1454,11 +1454,11 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView) Hlp_USERS_Teachers_timetable,Box_NOT_CLOSABLE); TT_ShowTimeTable (UsrDat.UsrCod); Box_EndBox (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /* End container for this user */ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); Lay_EndSection (); NumUsr++; @@ -2106,7 +2106,7 @@ void Rec_ShowSharedRecordUnmodifiable (struct UsrData *UsrDat) /***** Show user's record *****/ fprintf (Gbl.F.Out,"
"); Rec_ShowSharedUsrRecord (Rec_SHA_OTHER_USR_CHECK,UsrDat,NULL); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } /*****************************************************************************/ @@ -2631,7 +2631,7 @@ static void Rec_PutIconsCommands (void) Acc_PutIconToChangeUsrAccount (); /***** End container *****/ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } } @@ -2757,7 +2757,7 @@ static void Rec_ShowFullName (struct UsrData *UsrDat) /***** Surname 2 *****/ fprintf (Gbl.F.Out,"%s",UsrDat->Surname2); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); HTM_TD_End (); } @@ -2792,7 +2792,7 @@ static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks) Frm_EndForm (); } } - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); HTM_TD_End (); } @@ -2849,7 +2849,7 @@ static void Rec_ShowEmail (struct UsrData *UsrDat,const char *ClassForm) UsrDat->Email); else fprintf (Gbl.F.Out,"********"); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } HTM_TD_End (); @@ -3766,10 +3766,10 @@ static void Rec_WriteLinkToDataProtectionClause (void) extern const char *Txt_DATA_PROTECTION_CLAUSE; fprintf (Gbl.F.Out,"
" - "%s" - "
", + "%s", Cfg_URL_DATA_PROTECTION_PUBLIC, Txt_DATA_PROTECTION_CLAUSE); + HTM_DIV_End (); } /*****************************************************************************/ @@ -3971,7 +3971,7 @@ void Rec_ShowMySharedRecordAndMore (void) /* My shared record card */ Rec_ShowSharedUsrRecord (Rec_SHA_MY_RECORD_FORM,&Gbl.Usrs.Me.UsrDat,NULL); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Right part *****/ /* Start container for right part */ @@ -3984,10 +3984,10 @@ void Rec_ShowMySharedRecordAndMore (void) Net_ShowFormMyWebsAndSocialNets (); /* End container for right part */ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** End container *****/ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Data protection clause *****/ Rec_WriteLinkToDataProtectionClause (); diff --git a/swad_report.c b/swad_report.c index 641a9cd8..7b0feecc 100644 --- a/swad_report.c +++ b/swad_report.c @@ -32,6 +32,7 @@ #include "swad_database.h" #include "swad_form.h" #include "swad_global.h" +#include "swad_HTML.h" #include "swad_ID.h" #include "swad_profile.h" #include "swad_tab.h" @@ -279,15 +280,17 @@ static void Rep_PutLinkToMyUsageReport (struct Rep_Report *Report) "\"%s\""
" "%s" - "" - "", + "", Report->Permalink, Txt_Report, Cfg_URL_ICON_PUBLIC, Txt_Report, Report->FilenameReport); - fprintf (Gbl.F.Out,"
%s
", + HTM_DIV_End (); + fprintf (Gbl.F.Out,"
" + "%s", Txt_This_link_will_remain_active_as_long_as_your_user_s_account_exists); + HTM_DIV_End (); /***** End box *****/ Box_EndBox (); @@ -318,7 +321,7 @@ static void Rep_TitleReport (struct Rep_CurrentTimeUTC *CurrentTimeUTC) CurrentTimeUTC->StrDate, CurrentTimeUTC->StrTime); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } /*****************************************************************************/ diff --git a/swad_search.c b/swad_search.c index 428b3842..6dcadd3b 100644 --- a/swad_search.c +++ b/swad_search.c @@ -32,6 +32,7 @@ #include "swad_database.h" #include "swad_form.h" #include "swad_global.h" +#include "swad_HTML.h" #include "swad_layout.h" #include "swad_parameter.h" @@ -154,8 +155,8 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Hie Gbl.Scope.Default = DefaultScope; Sco_GetScope ("ScopeSch"); Sco_PutSelectorScope ("ScopeSch",false); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** String to find *****/ Sch_PutInputStringToSearch (NULL); @@ -191,7 +192,7 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Hie /***** End box *****/ Box_EndBox (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /*****************************************************************************/ @@ -234,7 +235,7 @@ void Sch_PutFormToSearchInPageTopHeading (void) Sch_PutInputStringToSearch ("head_search_text"); Sch_PutMagnifyingGlassButton ("search-white.svg"); Frm_EndForm (); - fprintf (Gbl.F.Out,""); // head_row_1_search + HTM_DIV_End (); // head_row_1_search } /*****************************************************************************/ diff --git a/swad_setting.c b/swad_setting.c index d0141afd..08a17de9 100644 --- a/swad_setting.c +++ b/swad_setting.c @@ -38,6 +38,7 @@ #include "swad_date.h" #include "swad_form.h" #include "swad_global.h" +#include "swad_HTML.h" #include "swad_language.h" #include "swad_layout.h" #include "swad_notification.h" @@ -80,13 +81,13 @@ void Set_EditSettings (void) Hlp_PROFILE_Settings_internationalization,Box_NOT_CLOSABLE); fprintf (Gbl.F.Out,"
"); Lan_PutBoxToSelectLanguage (); // 1. Language - fprintf (Gbl.F.Out,"
" - "
"); + HTM_DIV_End (); + fprintf (Gbl.F.Out,"
"); Cal_PutIconsToSelectFirstDayOfWeek (); // 2. First day of week - fprintf (Gbl.F.Out,"
" - "
"); + HTM_DIV_End (); + fprintf (Gbl.F.Out,"
"); Dat_PutBoxToSelectDateFormat (); // 3. Date format - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); Box_EndBox (); /***** Design: icon set, menu, theme, side columns *****/ @@ -94,16 +95,16 @@ void Set_EditSettings (void) Hlp_PROFILE_Settings_design,Box_NOT_CLOSABLE); fprintf (Gbl.F.Out,"
"); Ico_PutIconsToSelectIconSet (); // 4. Icon set - fprintf (Gbl.F.Out,"
" - "
"); + HTM_DIV_End (); + fprintf (Gbl.F.Out,"
"); Mnu_PutIconsToSelectMenu (); // 5. Menu - fprintf (Gbl.F.Out,"
" - "
"); + HTM_DIV_End (); + fprintf (Gbl.F.Out,"
"); The_PutIconsToSelectTheme (); // 6. Theme - fprintf (Gbl.F.Out,"
" - "
"); + HTM_DIV_End (); + fprintf (Gbl.F.Out,"
"); Set_PutIconsToSelectSideCols (); // 7. Side columns - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); Box_EndBox (); if (Gbl.Usrs.Me.Logged) @@ -255,7 +256,7 @@ static void Set_PutIconsToSelectSideCols (void) SideCols >> 1,SideCols & 1); Ico_PutSettingIconLink (Icon,Txt_LAYOUT_SIDE_COLUMNS[SideCols]); Frm_EndForm (); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } Set_EndOneSettingSelector (); Set_EndSettingsHead (); @@ -390,7 +391,7 @@ void Set_StartSettingsHead (void) void Set_EndSettingsHead (void) { - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } void Set_StartOneSettingSelector (void) @@ -400,5 +401,5 @@ void Set_StartOneSettingSelector (void) void Set_EndOneSettingSelector (void) { - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } diff --git a/swad_statistic.c b/swad_statistic.c index de2a1b42..6118cef2 100644 --- a/swad_statistic.c +++ b/swad_statistic.c @@ -324,7 +324,7 @@ void Sta_AskShowCrsHits (void) /* Link to show last clicks in real time */ Sta_PutLinkToLastClicks (); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** Get and update type of list, number of columns in class photo @@ -531,7 +531,7 @@ void Sta_AskShowGblHits (void) /* Link to show last clicks in real time */ Sta_PutLinkToLastClicks (); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** Begin form *****/ Frm_StartFormAnchor (ActSeeAccGbl,Sta_STAT_RESULTS_SECTION_ID); @@ -4003,7 +4003,7 @@ void Sta_ShowLastClicks (void) /* Put form to go to test edition and configuration */ Sta_PutLinkToCourseHits (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Start box *****/ Box_StartBox (NULL,Txt_Last_clicks_in_real_time,NULL, @@ -4013,7 +4013,7 @@ void Sta_ShowLastClicks (void) fprintf (Gbl.F.Out,"
"); Sta_GetAndShowLastClicks (); - fprintf (Gbl.F.Out,"
"); // Used for AJAX based refresh + HTM_DIV_End (); // Used for AJAX based refresh /***** End box *****/ Box_EndBox (); diff --git a/swad_survey.c b/swad_survey.c index 4c96a161..f2c02b9a 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -537,13 +537,15 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, Lay_EndArticle (); /* Number of questions and number of distinct users who have already answered this survey */ - fprintf (Gbl.F.Out,"
%s: %u; %s: %u
", + fprintf (Gbl.F.Out,"
" + "%s: %u; %s: %u", Svy.Status.Visible ? "ASG_GRP" : "ASG_GRP_LIGHT", Txt_No_of_questions, Svy.NumQsts, Txt_No_of_users, Svy.NumUsrs); + HTM_DIV_End (); HTM_TD_End (); /* Status of the survey */ @@ -568,7 +570,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, Btn_PutCreateButtonInline (Txt_Answer_survey); Frm_EndForm (); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } /* Possible button to see the result of the survey */ else if (Svy.Status.ICanViewResults) @@ -583,7 +585,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, Btn_PutConfirmButtonInline (Txt_View_survey_results); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } } @@ -636,7 +638,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, fprintf (Gbl.F.Out,"%s %s",Txt_Course,Gbl.Hierarchy.Crs.ShrtName); break; } - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /* Users' roles who can answer the survey */ fprintf (Gbl.F.Out,"
%s:
", @@ -648,7 +650,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, 1 << Rol_TCH, Svy.Roles, true,false); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /* Groups whose users can answer this survey */ if (Svy.Scope == Hie_CRS) @@ -660,10 +662,12 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to rigorous HTML Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links - fprintf (Gbl.F.Out,"
%s
", + fprintf (Gbl.F.Out,"
" + "%s", Svy.Status.Visible ? "DAT" : "DAT_LIGHT", Txt); + HTM_DIV_End (); HTM_TD_End (); HTM_TR_End (); @@ -2476,7 +2480,7 @@ static void Svy_GetAndWriteNamesOfGrpsAssociatedToSvy (struct Survey *Svy) fprintf (Gbl.F.Out,"%s %s", Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** Free structure that stores the query result *****/ DB_FreeMySQLResult (&mysql_res); diff --git a/swad_syllabus.c b/swad_syllabus.c index f9468cea..02a29517 100644 --- a/swad_syllabus.c +++ b/swad_syllabus.c @@ -160,8 +160,8 @@ void Syl_PutFormWhichSyllabus (void) "", Gbl.Form.Id,Txt_SYLLABUS_WHICH_SYLLABUS[WhichSyllabus]); } - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + HTM_DIV_End (); Frm_EndForm (); } diff --git a/swad_tab.c b/swad_tab.c index 6f77149f..9409cd45 100644 --- a/swad_tab.c +++ b/swad_tab.c @@ -27,6 +27,7 @@ #include "swad_form.h" #include "swad_global.h" +#include "swad_HTML.h" #include "swad_parameter.h" #include "swad_tab.h" @@ -138,8 +139,8 @@ void Tab_DrawTabs (void) The_ClassTxtTabOff[Gbl.Prefs.Theme],NULL); fprintf (Gbl.F.Out,"\"%s\"" - "
%s
" - "", + "
" + "%s", Gbl.Prefs.URLIconSet, Tab_GetIcon (NumTab), Txt_TABS_TXT[NumTab], @@ -147,17 +148,19 @@ void Tab_DrawTabs (void) NumTab == Gbl.Action.Tab ? The_ClassTxtTabOn[Gbl.Prefs.Theme] : The_ClassTxtTabOff[Gbl.Prefs.Theme], Txt_TABS_TXT[NumTab]); + HTM_DIV_End (); + fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,"
" - ""); + HTM_DIV_End (); + fprintf (Gbl.F.Out,""); } } /***** End tabs container *****/ fprintf (Gbl.F.Out,"" - "" - ""); + ""); + HTM_DIV_End (); } /*****************************************************************************/ diff --git a/swad_test.c b/swad_test.c index 9f352caf..7757e886 100644 --- a/swad_test.c +++ b/swad_test.c @@ -409,7 +409,7 @@ static void Tst_PutFormToViewTstResults (Act_Action_t Action) Lay_PutContextualLinkIconText (Action,NULL,NULL, "tasks.svg", Txt_Results); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /*****************************************************************************/ @@ -478,9 +478,9 @@ void Tst_ShowNewTest (void) fprintf (Gbl.F.Out," checked=\"checked\""); fprintf (Gbl.F.Out," />" " %s" - "" - "", + "", Txt_Allow_teachers_to_consult_this_test); + HTM_DIV_End (); /***** End form *****/ Btn_PutConfirmButton (Txt_Done_assess_test); @@ -560,7 +560,7 @@ void Tst_AssessTest (void) { fprintf (Gbl.F.Out,"
"); fprintf (Gbl.F.Out,Txt_Test_No_X_that_you_make_in_this_course,NumTst); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } /***** Write answers and solutions *****/ @@ -642,13 +642,13 @@ void Tst_ShowTstTotalMark (unsigned NumQsts,double TotalScore) /***** Write total mark ****/ fprintf (Gbl.F.Out,"
" - "%s: %.2lf (%.2lf %s %u)" - "
", + "%s: %.2lf (%.2lf %s %u)", Txt_Score, (TotalScoreOverSCORE_MAX >= (double) TotalScoreOverSCORE_MAX / 2.0) ? "ANS_OK" : "ANS_BAD", TotalScore, TotalScoreOverSCORE_MAX,Txt_out_of_PART_OF_A_SCORE,Tst_SCORE_MAX); + HTM_DIV_End (); } /*****************************************************************************/ @@ -1036,15 +1036,21 @@ static void Tst_WriteQstAndAnsTest (Tst_ActionToDoWithQuestions_t ActionToDoWith Gbl.Test.QstCod = QstCod; HTM_TR_Begin (NULL); + HTM_TD_Begin ("class=\"RT COLOR%u\"",Gbl.RowEvenOdd); /***** Write number of question *****/ - HTM_TD_Begin ("class=\"RT COLOR%u\"",Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"
%u
",NumQst + 1); + fprintf (Gbl.F.Out,"
" + "%u", + NumQst + 1); + HTM_DIV_End (); /***** Write answer type (row[2]) *****/ Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]); - fprintf (Gbl.F.Out,"
%s
", + fprintf (Gbl.F.Out,"
" + "%s", Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]); + HTM_DIV_End (); + HTM_TD_End (); /***** Write stem (row[4]) *****/ @@ -1102,9 +1108,9 @@ void Tst_WriteQstStem (const char *Stem,const char *ClassStem) /***** Write the stem *****/ fprintf (Gbl.F.Out,"
" - "%s" - "
", + "%s", ClassStem,StemRigorousHTML); + HTM_DIV_End (); /***** Free memory allocated for the stem *****/ free ((void *) StemRigorousHTML); @@ -1177,7 +1183,7 @@ static void Tst_PutFormToEditQstMedia (struct Media *Media,int NumMediaInForm, Med_PutMediaUploader (NumMediaInForm,"TEST_MED_INPUT"); /***** End container *****/ - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } else // No current image /***** Attached media *****/ @@ -1207,9 +1213,9 @@ void Tst_WriteQstFeedback (const char *Feedback,const char *ClassFeedback) /***** Write the feedback *****/ fprintf (Gbl.F.Out,"
" - "%s" - "
", + "%s", ClassFeedback,FeedbackRigorousHTML); + HTM_DIV_End (); /***** Free memory allocated for the feedback *****/ free ((void *) FeedbackRigorousHTML); @@ -1285,7 +1291,7 @@ void Tst_ShowFormAskEditTsts (void) /***** Contextual menu *****/ fprintf (Gbl.F.Out,"
"); TsI_PutFormToImportQuestions (); // Put link (form) to import questions from XML file - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** Start box *****/ Box_StartBox (NULL,Txt_List_edit_questions,Tst_PutIconsTests, @@ -2410,7 +2416,7 @@ void Tst_ListQuestionsToEdit (void) else /* Button to export questions */ TsI_PutFormToExportQuestions (); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /* Show the table with the questions */ Tst_ListOneOrMoreQuestionsForEdition (NumRows,mysql_res); @@ -2912,14 +2918,21 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows, HTM_TD_End (); - /* Write number of question */ HTM_TD_Begin ("class=\"RT COLOR%u\"",Gbl.RowEvenOdd); - fprintf (Gbl.F.Out,"
%lu
",NumRow + 1); + + /* Write number of question */ + fprintf (Gbl.F.Out,"
" + "%lu", + NumRow + 1); + HTM_DIV_End (); /* Write answer type (row[2]) */ Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]); - fprintf (Gbl.F.Out,"
%s
", + fprintf (Gbl.F.Out,"
" + "%s", Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]); + HTM_DIV_End (); + HTM_TD_End (); /* Write question code */ @@ -3411,13 +3424,13 @@ void Tst_WriteAnswersEdit (long QstCod) Med_ShowMedia (&Gbl.Test.Answer.Options[NumOpt].Media, "TEST_MED_EDIT_LIST_CONTAINER", "TEST_MED_EDIT_LIST"); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /* Write the text of the feedback */ fprintf (Gbl.F.Out,"
"); if (LengthFeedback) fprintf (Gbl.F.Out,"%s",Feedback); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); HTM_TD_End (); HTM_TR_End (); @@ -3881,14 +3894,16 @@ static void Tst_WriteChoiceAnsAssessTest (struct UsrData *UsrDat, Med_ShowMedia (&Gbl.Test.Answer.Options[Indexes[NumOpt]].Media, "TEST_MED_SHOW_CONTAINER", "TEST_MED_SHOW"); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) if (Gbl.Test.Answer.Options[Indexes[NumOpt]].Feedback) if (Gbl.Test.Answer.Options[Indexes[NumOpt]].Feedback[0]) + { fprintf (Gbl.F.Out,"
" - "%s" - "
", + "%s", Gbl.Test.Answer.Options[Indexes[NumOpt]].Feedback); + HTM_DIV_End (); + } HTM_TD_End (); HTM_TR_End (); @@ -4187,10 +4202,10 @@ void Tst_WriteChoiceAnsViewMatch (long MchCod,unsigned QstInd,long QstCod, /***** Write letter for this option *****/ HTM_TD_Begin ("class=\"MCH_TCH_BUTTON_TD\""); fprintf (Gbl.F.Out,"
" - "%c" - "
", + "%c", 'A' + (char) NumOpt, 'a' + (char) NumOpt); + HTM_DIV_End (); HTM_TD_End (); /***** Write the option text and the result *****/ @@ -4369,16 +4384,18 @@ static void Tst_WriteTextAnsAssessTest (struct UsrData *UsrDat, /* Answer text and feedback */ HTM_TD_Begin ("class=\"LT\""); fprintf (Gbl.F.Out,"
" - "%s" - "
", + "%s", Gbl.Test.Answer.Options[NumOpt].Text); + HTM_DIV_End (); if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) if (Gbl.Test.Answer.Options[NumOpt].Feedback) if (Gbl.Test.Answer.Options[NumOpt].Feedback[0]) + { fprintf (Gbl.F.Out,"
" - "%s" - "
", + "%s", Gbl.Test.Answer.Options[NumOpt].Feedback); + HTM_DIV_End (); + } HTM_TD_End (); HTM_TR_End (); @@ -5395,7 +5412,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1], ""); /* End of right column */ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_test_import.c b/swad_test_import.c index a9ff1a65..b93dbc19 100644 --- a/swad_test_import.c +++ b/swad_test_import.c @@ -514,8 +514,8 @@ static void TsI_ImportQuestionsFromXMLBuffer (const char *XMLBuffer) " spellcheck=\"false\" readonly>", Txt_XML_file_content); XML_PrintTree (RootElem); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Get questions from XML tree and print them *****/ /* Go to element */ @@ -1153,14 +1153,16 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem, /* Write the text and the feedback of the answer */ HTM_TD_Begin ("class=\"LT\""); fprintf (Gbl.F.Out,"
" - "%s" - "
", + "%s", ClassStem,AnswerText); + HTM_DIV_End (); if (AnswerFeedbackLength) + { fprintf (Gbl.F.Out,"
" - "%s" - "
", + "%s", AnswerFeedback); + HTM_DIV_End (); + } HTM_TD_End (); HTM_TR_End (); diff --git a/swad_theme.c b/swad_theme.c index 26d84d86..2efe8ddb 100644 --- a/swad_theme.c +++ b/swad_theme.c @@ -33,6 +33,7 @@ #include "swad_database.h" #include "swad_form.h" #include "swad_global.h" +#include "swad_HTML.h" #include "swad_layout.h" #include "swad_parameter.h" #include "swad_setting.h" @@ -285,7 +286,7 @@ void The_PutIconsToSelectTheme (void) The_ThemeId[Theme]); Ico_PutSettingIconLink (Icon,The_ThemeNames[Theme]); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } Set_EndOneSettingSelector (); Set_EndSettingsHead (); diff --git a/swad_timeline.c b/swad_timeline.c index a2ba6b6f..72a0171e 100644 --- a/swad_timeline.c +++ b/swad_timeline.c @@ -40,6 +40,7 @@ #include "swad_follow.h" #include "swad_form.h" #include "swad_global.h" +#include "swad_HTML.h" #include "swad_layout.h" #include "swad_media.h" #include "swad_notice.h" @@ -1176,7 +1177,7 @@ static void TL_PutFormWhichUsrs (void) Par_PutHiddenParamUnsigned ("WhichUsrs",WhichUsrs); Ico_PutSettingIconLink (Icon[WhichUsrs],Txt_TIMELINE_WHICH_USERS[WhichUsrs]); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } Set_EndOneSettingSelector (); Set_EndSettingsHead (); @@ -1289,7 +1290,7 @@ static void TL_ShowWarningYouDontFollowAnyUser (void) /***** Put link to show users to follow *****/ fprintf (Gbl.F.Out,"
"); Fol_PutLinkWhoToFollow (); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } } @@ -1397,10 +1398,10 @@ static void TL_PutLinkToViewNewPublications (void) "" "%s (0)" - "" - "", + "", The_ClassFormInBoxBold[Gbl.Prefs.Theme], Txt_See_new_activity); + HTM_DIV_End (); } /*****************************************************************************/ @@ -1427,12 +1428,12 @@ static void TL_PutLinkToViewOldPublications (void) " src=\"%s/working16x16.gif\" alt=\"%s\" title=\"%s\"" " class=\"ICO20x20\" style=\"display:none;\" />" // Animated icon hidden " %s" - "" - "", + "", The_ClassFormInBoxBold[Gbl.Prefs.Theme], Cfg_URL_ICON_PUBLIC,Txt_See_more,Txt_See_more, Cfg_URL_ICON_PUBLIC,Txt_See_more,Txt_See_more, Txt_See_more); + HTM_DIV_End (); } /*****************************************************************************/ @@ -1510,7 +1511,7 @@ static void TL_WriteNote (const struct TL_Note *SocNot, Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO45x60",Pho_ZOOM,true); // Use unique id - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Right: author's name, time, summary and buttons *****/ fprintf (Gbl.F.Out,"
"); @@ -1577,33 +1578,43 @@ static void TL_WriteNote (const struct TL_Note *SocNot, case TL_NOTE_INS_DOC_PUB_FILE: case TL_NOTE_INS_SHA_PUB_FILE: /* Write location (institution) in hierarchy */ - fprintf (Gbl.F.Out,"
%s: %s
", + fprintf (Gbl.F.Out,"
" + "%s: %s", Txt_Institution,Ins.ShrtName); + HTM_DIV_End (); break; case TL_NOTE_CTR_DOC_PUB_FILE: case TL_NOTE_CTR_SHA_PUB_FILE: /* Write location (centre) in hierarchy */ - fprintf (Gbl.F.Out,"
%s: %s
", + fprintf (Gbl.F.Out,"
" + "%s: %s", Txt_Centre,Ctr.ShrtName); + HTM_DIV_End (); break; case TL_NOTE_DEG_DOC_PUB_FILE: case TL_NOTE_DEG_SHA_PUB_FILE: /* Write location (degree) in hierarchy */ - fprintf (Gbl.F.Out,"
%s: %s
", + fprintf (Gbl.F.Out,"
" + "%s: %s", Txt_Degree,Deg.ShrtName); + HTM_DIV_End (); break; case TL_NOTE_CRS_DOC_PUB_FILE: case TL_NOTE_CRS_SHA_PUB_FILE: case TL_NOTE_EXAM_ANNOUNCEMENT: case TL_NOTE_NOTICE: /* Write location (course) in hierarchy */ - fprintf (Gbl.F.Out,"
%s: %s
", + fprintf (Gbl.F.Out,"
" + "%s: %s", Txt_Course,Crs.ShrtName); + HTM_DIV_End (); break; case TL_NOTE_FORUM_POST: /* Write forum name */ - fprintf (Gbl.F.Out,"
%s: %s
", + fprintf (Gbl.F.Out,"
" + "%s: %s", Txt_Forum,ForumName); + HTM_DIV_End (); break; default: break; @@ -1611,11 +1622,14 @@ static void TL_WriteNote (const struct TL_Note *SocNot, /* Write note summary */ TL_GetNoteSummary (SocNot,SummaryStr); - fprintf (Gbl.F.Out,"
%s
",SummaryStr); + fprintf (Gbl.F.Out,"
" + "%s", + SummaryStr); + HTM_DIV_End (); } /* End of right part */ - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /* Create unique id for new comment */ Frm_SetUniqueId (IdNewComment); @@ -1629,7 +1643,7 @@ static void TL_WriteNote (const struct TL_Note *SocNot, TL_PutIconCommentDisabled (); else TL_PutIconToToggleCommentNote (IdNewComment); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /* Start container for buttons and comments */ fprintf (Gbl.F.Out,"
"); @@ -1642,30 +1656,30 @@ static void TL_WriteNote (const struct TL_Note *SocNot, " class=\"TL_FAV_NOT TL_FAV_NOT_WIDTH\">", Gbl.UniqueNameEncrypted,NumDiv); TL_PutFormToFavUnfNote (SocNot,TL_SHOW_A_FEW_USRS); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /* Foot column 2: Share zone */ fprintf (Gbl.F.Out,"
", Gbl.UniqueNameEncrypted,NumDiv); TL_PutFormToShaUnsNote (SocNot,TL_SHOW_A_FEW_USRS); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /* Foot column 3: Icon to remove this note */ fprintf (Gbl.F.Out,"
"); if (IAmTheAuthor) TL_PutFormToRemovePublication (SocNot->NotCod); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /* End foot container */ - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /* Show comments */ if (NumComments) TL_WriteCommentsInNote (SocNot); /* End container for buttons and comments */ - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /* Put hidden form to write a new comment */ TL_PutHiddenFormToWriteNewCommentToNote (SocNot->NotCod,IdNewComment); @@ -1719,8 +1733,8 @@ static void TL_WriteTopMessage (TL_TopMessage_t TopMessage,long UsrCod) Frm_EndForm (); /***** Show action made *****/ - fprintf (Gbl.F.Out," %s:
", - Txt_TIMELINE_NOTE_TOP_MESSAGES[TopMessage]); + fprintf (Gbl.F.Out," %s:",Txt_TIMELINE_NOTE_TOP_MESSAGES[TopMessage]); + HTM_DIV_End (); } /***** Free memory used for user's data *****/ @@ -1758,7 +1772,7 @@ static void TL_WriteAuthorNote (const struct UsrData *UsrDat) fprintf (Gbl.F.Out," @%s",UsrDat->Nickname); Frm_EndForm (); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } /*****************************************************************************/ @@ -1775,9 +1789,9 @@ static void TL_WriteDateTime (time_t TimeUTC) Frm_SetUniqueId (IdDateTime); /***** Container where the date-time is written *****/ - fprintf (Gbl.F.Out,"
" - "
", + fprintf (Gbl.F.Out,"
", IdDateTime); + HTM_DIV_End (); /***** Script to write date and time in browser local time *****/ // This must be out of the div where the output is written @@ -1838,7 +1852,7 @@ static void TL_GetAndWritePost (long PstCod) { fprintf (Gbl.F.Out,"
"); Msg_WriteMsgContent (Content,Cns_MAX_BYTES_LONG_TEXT,true,false); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } /***** Show image *****/ @@ -1945,7 +1959,7 @@ static void TL_PutFormGoToAction (const struct TL_Note *SocNot) Txt_TIMELINE_NOTE[SocNot->NoteType]); if (SocNot->Unavailable) fprintf (Gbl.F.Out," (%s)",Txt_not_available); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } else // Not inside another form { @@ -2034,7 +2048,7 @@ static void TL_PutFormGoToAction (const struct TL_Note *SocNot) Txt_TIMELINE_NOTE[SocNot->NoteType]); Frm_EndForm (); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); } } @@ -2319,7 +2333,7 @@ static void TL_PutFormToWriteNewPost (void) Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO45x60",Pho_ZOOM,false); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Right: author's name, time, summary and buttons *****/ fprintf (Gbl.F.Out,"
"); @@ -2327,9 +2341,9 @@ static void TL_PutFormToWriteNewPost (void) /* Write author's full name and nickname */ fprintf (Gbl.F.Out,"
" "%s" - " @%s" - "
", + " @%s", Gbl.Usrs.Me.UsrDat.FullName,Gbl.Usrs.Me.UsrDat.Nickname); + HTM_DIV_End (); /***** Form to write the post *****/ /* Start container */ @@ -2346,7 +2360,7 @@ static void TL_PutFormToWriteNewPost (void) Frm_EndForm (); /* End container */ - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** End list *****/ fprintf (Gbl.F.Out,"" @@ -2393,7 +2407,7 @@ static void TL_PutTextarea (const char *Placeholder,const char *ClassTextArea) Txt_Post); /***** End hidden div *****/ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /*****************************************************************************/ @@ -2498,11 +2512,11 @@ static void TL_PutIconToToggleCommentNote (const char UniqueId[Frm_MAX_BYTES_ID " onclick=\"toggleNewComment ('%s');return false;\">" "\"%s\"" - "" - "", + "", UniqueId,UniqueId, Cfg_URL_ICON_PUBLIC, Txt_Comment,Txt_Comment); + HTM_DIV_End (); } /*****************************************************************************/ @@ -2517,10 +2531,10 @@ static void TL_PutIconCommentDisabled (void) fprintf (Gbl.F.Out,"
" "\"%s\"" - "
", + " class=\"ICO16x16\" />", Cfg_URL_ICON_PUBLIC, Txt_Comment,Txt_Comment); + HTM_DIV_End (); } /*****************************************************************************/ @@ -2546,7 +2560,7 @@ static void TL_PutHiddenFormToWriteNewCommentToNote (long NotCod, Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO30x40",Pho_ZOOM,true); // Use unique id - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Right: form to write the comment *****/ /* Start right container */ @@ -2564,10 +2578,10 @@ static void TL_PutHiddenFormToWriteNewCommentToNote (long NotCod, Frm_EndForm (); /* End right container */ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** End container *****/ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /*****************************************************************************/ @@ -2631,7 +2645,7 @@ static void TL_WriteCommentsInNote (const struct TL_Note *SocNot) IdComments); TL_PutIconToToggleComments (IdComments,"angle-down.svg", Txt_See_only_the_latest_COMMENTS); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** First list with comments initially hidden *****/ fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + HTM_DIV_End (); Box_EndBox (); } } @@ -2855,7 +2869,7 @@ static void TL_WriteAuthorComment (struct UsrData *UsrDat) Frm_EndForm (); /***** End container *****/ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /*****************************************************************************/ @@ -3277,7 +3291,7 @@ static void TL_PutFormToShaUnsNote (const struct TL_Note *SocNot, else // I have not shared this note TL_PutFormToShaNote (SocNot); } - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Show who have shared this note *****/ TL_ShowUsrsWhoHaveSharedNote (SocNot,HowMany); @@ -3407,7 +3421,7 @@ static void TL_PutFormToFavUnfNote (const struct TL_Note *SocNot, else // I am not a faver of this note TL_PutFormToFavNote (SocNot); } - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Show who have marked this note as favourite *****/ TL_ShowUsrsWhoHaveMarkedNoteAsFav (SocNot,HowMany); @@ -3576,7 +3590,7 @@ static void TL_PutFormToFavUnfComment (const struct TL_Comment *SocCom, /* Put icon to fav this publication and list of users */ TL_PutFormToFavComment (SocCom); } - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Show who have marked this comment as favourite *****/ TL_ShowUsrsWhoHaveMarkedCommAsFav (SocCom,HowMany); @@ -4515,13 +4529,13 @@ static void TL_ShowUsrsWhoHaveSharedNote (const struct TL_Note *SocNot, /***** Show users *****/ fprintf (Gbl.F.Out,"
"); TL_ShowNumSharersOrFavers (SocNot->NumShared); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); fprintf (Gbl.F.Out,"
"); TL_ShowSharersOrFavers (&mysql_res,SocNot->NumShared,NumFirstUsrs); if (NumFirstUsrs < SocNot->NumShared) TL_PutFormToSeeAllSharersNote (SocNot,HowMany); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** Free structure that stores the query result *****/ if (SocNot->NumShared) @@ -4557,13 +4571,13 @@ static void TL_ShowUsrsWhoHaveMarkedNoteAsFav (const struct TL_Note *SocNot, /***** Show users *****/ fprintf (Gbl.F.Out,"
"); TL_ShowNumSharersOrFavers (SocNot->NumFavs); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); fprintf (Gbl.F.Out,"
"); TL_ShowSharersOrFavers (&mysql_res,SocNot->NumFavs,NumFirstUsrs); if (NumFirstUsrs < SocNot->NumFavs) // Not all are shown TL_PutFormToSeeAllFaversNote (SocNot,HowMany); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** Free structure that stores the query result *****/ if (SocNot->NumFavs) @@ -4597,13 +4611,13 @@ static void TL_ShowUsrsWhoHaveMarkedCommAsFav (const struct TL_Comment *SocCom, /***** Show users *****/ fprintf (Gbl.F.Out,"
"); TL_ShowNumSharersOrFavers (SocCom->NumFavs); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); fprintf (Gbl.F.Out,"
"); TL_ShowSharersOrFavers (&mysql_res,SocCom->NumFavs,NumFirstUsrs); if (NumFirstUsrs < SocCom->NumFavs) TL_PutFormToSeeAllFaversComment (SocCom,HowMany); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); /***** Free structure that stores the query result *****/ if (SocCom->NumFavs) @@ -4657,7 +4671,7 @@ static void TL_ShowSharersOrFavers (MYSQL_RES **mysql_res, Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : NULL, "PHOTO12x16",Pho_ZOOM,true); // Use unique id - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); NumUsrsShown++; } diff --git a/swad_timetable.c b/swad_timetable.c index 8cba1a74..ca162e07 100644 --- a/swad_timetable.c +++ b/swad_timetable.c @@ -243,7 +243,7 @@ static void TT_ShowTimeTableGrpsSelected (void) fprintf (Gbl.F.Out,"%s",Txt_All_groups); break; } - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /*****************************************************************************/ @@ -1579,7 +1579,7 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co fprintf (Gbl.F.Out,"
%s",Info); /***** End cell *****/ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } break; case TT_CRS_EDIT: diff --git a/swad_user.c b/swad_user.c index 4d4c2a06..1207967b 100644 --- a/swad_user.c +++ b/swad_user.c @@ -2594,7 +2594,7 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void)) Pwd_PutLinkToSendNewPasswd (); Lan_PutLinkToChangeLanguage (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); fprintf (Gbl.F.Out,"
"); @@ -2616,14 +2616,14 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void)) "" - "
", + " autofocus=\"autofocus\" required=\"required\" />", Cfg_URL_ICON_PUBLIC, Txt_User[Usr_SEX_UNKNOWN], Txt_User[Usr_SEX_UNKNOWN], Cns_MAX_CHARS_EMAIL_ADDRESS, Txt_nick_email_or_ID, Gbl.Usrs.Me.UsrIdLogin); + HTM_DIV_End (); /***** User's password *****/ fprintf (Gbl.F.Out,"
" @@ -2632,13 +2632,13 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void)) " class=\"CONTEXT_ICO_16x16\" />" "" "" - "
", + " size=\"18\" maxlength=\"%u\" placeholder=\"%s\" />", Cfg_URL_ICON_PUBLIC, Txt_Password, Txt_Password, Pwd_MAX_CHARS_PLAIN_PASSWORD, Txt_password); + HTM_DIV_End (); /***** End table, send button and end box *****/ Box_EndBoxTableWithButton (Btn_CONFIRM_BUTTON,Txt_Log_in); @@ -2646,7 +2646,7 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void)) /***** End form *****/ Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /*****************************************************************************/ @@ -2841,7 +2841,7 @@ void Usr_WriteLoggedUsrHead (void) if (Gbl.Usrs.Me.UsrDat.FirstName[0]) fprintf (Gbl.F.Out," %s",Gbl.Usrs.Me.UsrDat.FirstName); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /*****************************************************************************/ @@ -4141,7 +4141,7 @@ static void Usr_WriteUsrData (const char *BgColor, fprintf (Gbl.F.Out,""); /***** End container and table cell *****/ - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); HTM_TD_End (); } @@ -6097,7 +6097,7 @@ void Usr_ShowFormsToSelectUsrListType (void (*FuncParams) (void)) if (FuncParams) FuncParams (); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Select Usr_LIST_AS_LISTING *****/ fprintf (Gbl.F.Out,"
", @@ -6114,7 +6114,7 @@ void Usr_ShowFormsToSelectUsrListType (void (*FuncParams) (void)) FuncParams (); Usr_PutCheckboxListWithPhotos (); Frm_EndForm (); - fprintf (Gbl.F.Out,"
"); + HTM_DIV_End (); Set_EndOneSettingSelector (); Set_EndSettingsHead (); @@ -7315,7 +7315,7 @@ void Usr_ListDataAdms (void) /* Put link to remove old users */ Enr_PutLinkToRemOldUsrs (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); break; default: break; @@ -7360,7 +7360,7 @@ void Usr_ListDataAdms (void) Sco_PutSelectorScope ("ScopeUsr",true); fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); if (Gbl.Usrs.LstUsrs[Rol_DEG_ADM].NumUsrs) { @@ -7371,8 +7371,8 @@ void Usr_ListDataAdms (void) Sco_PutParamCurrentScope (); Usr_PutCheckboxListWithPhotos (); Frm_EndForm (); - fprintf (Gbl.F.Out,"" - ""); + HTM_DIV_End (); + HTM_DIV_End (); /***** Heading row with column names *****/ HTM_TABLE_Begin (NULL); @@ -7805,7 +7805,7 @@ void Usr_SeeGuests (void) /* Put link to remove old users */ Enr_PutLinkToRemOldUsrs (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Get and update type of list, number of columns in class photo @@ -7834,7 +7834,7 @@ void Usr_SeeGuests (void) Sco_PutSelectorScope ("ScopeUsr",true); fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); } /***** Start section with user list *****/ @@ -7944,7 +7944,7 @@ void Usr_SeeStudents (void) Rec_PutLinkToEditRecordFields (); } - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); break; default: break; @@ -7985,7 +7985,7 @@ void Usr_SeeStudents (void) Sco_PutSelectorScope ("ScopeUsr",true); fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); break; default: break; @@ -8113,7 +8113,7 @@ void Usr_SeeTeachers (void) Enr_PutLinkToAdminSeveralUsrs (Rol_TCH); } - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); break; default: @@ -8163,7 +8163,7 @@ void Usr_SeeTeachers (void) Sco_PutSelectorScope ("ScopeUsr",true); fprintf (Gbl.F.Out,""); Frm_EndForm (); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** Form to select groups *****/ if (Gbl.Scope.Current == Hie_CRS) @@ -8971,7 +8971,7 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType, else fprintf (Gbl.F.Out," "); - fprintf (Gbl.F.Out,""); + HTM_DIV_End (); /***** End user's cell *****/ HTM_TD_End (); @@ -9713,10 +9713,12 @@ void Usr_WriteAuthor1Line (long UsrCod,bool Hidden) "PHOTO15x20",Pho_ZOOM,false); /***** Write name *****/ - fprintf (Gbl.F.Out,"
%s
", + fprintf (Gbl.F.Out,"
" + "%s", Hidden ? "AUTHOR_TXT_LIGHT" : "AUTHOR_TXT", UsrDat.FullName); + HTM_DIV_End (); /***** Free memory used for user's data *****/ Usr_UsrDataDestructor (&UsrDat);