diff --git a/swad_QR.c b/swad_QR.c index 802ecfbcb..67a126c05 100644 --- a/swad_QR.c +++ b/swad_QR.c @@ -105,13 +105,12 @@ void QR_PrintQRCode (void) void QR_ImageQRCode (const char *QRString) { - fprintf (Gbl.F.Out,"
" - "", + QR_CODE_SIZE); + fprintf (Gbl.F.Out,"\"%s\"", - QR_CODE_SIZE, QR_CODE_SIZE,QR_CODE_SIZE, QRString, QRString, @@ -150,8 +149,8 @@ void QR_ExamAnnnouncement (void) extern const char *Txt_Link_to_announcement_of_exam; /***** Show QR code with direct link to the exam announcement *****/ - fprintf (Gbl.F.Out,"
" - ""); + fprintf (Gbl.F.Out,"\"%s\"", 300,300, diff --git a/swad_alert.c b/swad_alert.c index b7e562829..72c722ffb 100644 --- a/swad_alert.c +++ b/swad_alert.c @@ -412,14 +412,14 @@ static void Ale_ShowFixAlertAndButton1 (Ale_AlertType_t AlertType,const char *Tx Frm_SetUniqueId (IdAlert); fprintf (Gbl.F.Out," id=\"%s\"",IdAlert); } - fprintf (Gbl.F.Out," class=\"CM\">" - "
"); + fprintf (Gbl.F.Out," class=\"CM\">"); + fprintf (Gbl.F.Out,"
"); /***** Icon to close the alert *****/ if (AlertClosable[AlertType]) { - fprintf (Gbl.F.Out,"
" - ""); + fprintf (Gbl.F.Out,"" "\"%s\"%s", - Txt); + fprintf (Gbl.F.Out,">"); + fprintf (Gbl.F.Out,"%s",Txt); HTM_DIV_End (); } diff --git a/swad_announcement.c b/swad_announcement.c index f68d112f6..65ef00b62 100644 --- a/swad_announcement.c +++ b/swad_announcement.c @@ -324,15 +324,13 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status, } /***** Write the subject of the announcement *****/ - fprintf (Gbl.F.Out,"
" - "%s", - SubjectClass[Status],Subject); + fprintf (Gbl.F.Out,"
",SubjectClass[Status]); + fprintf (Gbl.F.Out,"%s",Subject); HTM_DIV_End (); /***** Write the content of the announcement *****/ - fprintf (Gbl.F.Out,"
" - "%s", - ContentClass[Status],Content); + fprintf (Gbl.F.Out,"
",ContentClass[Status]); + fprintf (Gbl.F.Out,"%s",Content); HTM_DIV_End (); /***** Write form *****/ diff --git a/swad_assignment.c b/swad_assignment.c index faff91c3f..af3fc8559 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -443,11 +443,10 @@ 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,"
", Asg.Hidden ? "DAT_LIGHT" : - "DAT", - Txt); + "DAT"); + fprintf (Gbl.F.Out,"%s",Txt); HTM_DIV_End (); HTM_TD_End (); @@ -1633,9 +1632,10 @@ static void Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (struct Assignment *Asg) Asg->AsgCod); /***** Write heading *****/ - fprintf (Gbl.F.Out,"
%s: ", + fprintf (Gbl.F.Out,"
", Asg->Hidden ? "ASG_GRP_LIGHT" : - "ASG_GRP", + "ASG_GRP"); + fprintf (Gbl.F.Out,"%s: ", (NumRows == 1) ? Txt_Group : Txt_Groups); diff --git a/swad_attendance.c b/swad_attendance.c index cb608ef82..1641cb06a 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -481,11 +481,10 @@ 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,"
", Att->Hidden ? "DAT_LIGHT" : - "DAT", - Description); + "DAT"); + fprintf (Gbl.F.Out,"%s",Description); HTM_DIV_End (); HTM_TD_End (); @@ -1524,9 +1523,10 @@ static void Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (struct AttendanceEve Att->AttCod); /***** Write heading *****/ - fprintf (Gbl.F.Out,"
%s: ", + fprintf (Gbl.F.Out,"
", Att->Hidden ? "ASG_GRP_LIGHT" : - "ASG_GRP", + "ASG_GRP"); + fprintf (Gbl.F.Out,"%s: ", (NumGrps == 1) ? Txt_Group : Txt_Groups); diff --git a/swad_box.c b/swad_box.c index ca388863f..a94145b9e 100644 --- a/swad_box.c +++ b/swad_box.c @@ -195,11 +195,10 @@ static void Box_StartBoxInternal (const char *Width,const char *Title, /***** Frame title *****/ if (Title) { - fprintf (Gbl.F.Out,"
" - "%s", + fprintf (Gbl.F.Out,"
", Gbl.Box.Nested ? "FRAME_TITLE_SMALL" : - "FRAME_TITLE_BIG", - Title); + "FRAME_TITLE_BIG"); + fprintf (Gbl.F.Out,"%s",Title); HTM_DIV_End (); } } diff --git a/swad_button.c b/swad_button.c index 3033c6f1a..ad2dbd170 100644 --- a/swad_button.c +++ b/swad_button.c @@ -99,8 +99,8 @@ void Btn_PutButtonInline (Btn_Button_t Button,const char *TxtButton) void Btn_PutCreateButton (const char *TxtButton) { - fprintf (Gbl.F.Out,"
" - "", TxtButton); @@ -117,8 +117,8 @@ void Btn_PutCreateButtonInline (const char *TxtButton) void Btn_PutConfirmButton (const char *TxtButton) { - fprintf (Gbl.F.Out,"
" - "", TxtButton); @@ -135,8 +135,8 @@ void Btn_PutConfirmButtonInline (const char *TxtButton) void Btn_PutRemoveButton (const char *TxtButton) { - fprintf (Gbl.F.Out,"
" - "", TxtButton); diff --git a/swad_centre.c b/swad_centre.c index 3a723a1cd..460f5ddec 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -391,9 +391,8 @@ static void Ctr_Configuration (bool PrintView) } else if (PhotoAttribution) { - fprintf (Gbl.F.Out,"
" - "%s", - PhotoAttribution); + fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"%s",PhotoAttribution); HTM_DIV_End (); } @@ -587,8 +586,8 @@ static void Ctr_Configuration (bool PrintView) } else // I can not change centre WWW { - fprintf (Gbl.F.Out,"
" - "" + fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"" "%s" "", Gbl.Hierarchy.Ctr.WWW, @@ -1606,8 +1605,8 @@ static void Ctr_ListCentresForEdition (void) { Str_Copy (WWW,Ctr->WWW, Cns_MAX_BYTES_WWW); - fprintf (Gbl.F.Out,"
" - ""); + fprintf (Gbl.F.Out,"" "%s" "", diff --git a/swad_changelog.h b/swad_changelog.h index 0286179bb..94c715215 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.42.1 (2019-10-23)" +#define Log_PLATFORM_VERSION "SWAD 19.42.2 (2019-10-23)" #define CSS_FILE "swad19.41.3.css" #define JS_FILE "swad19.39.js" /* @@ -495,6 +495,7 @@ ps2pdf source.ps destination.pdf // TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.) // TODO: Change icon to upload file in timeline to photo-video.svg + Version 19.42.2: Oct 23, 2019 Code refactoring in HTML divs. (246025 lines) Version 19.42.1: Oct 23, 2019 Code refactoring in HTML divs. (246088 lines) Version 19.42: Oct 23, 2019 Module swad_table is renamed as swad_HTML. (245956 lines) Version 19.41.4: Oct 23, 2019 Number of cols in match in range [1...4]. (245955 lines) diff --git a/swad_connected.c b/swad_connected.c index 4eb7ec6c5..c6cf96e43 100644 --- a/swad_connected.c +++ b/swad_connected.c @@ -268,9 +268,8 @@ static void Con_ShowConnectedUsrsBelongingToLocation (void) /***** Number of connected users who belong to scope *****/ Con_GetNumConnectedUsrsWithARoleBelongingCurrentLocation (Rol_UNK,&Usrs); - fprintf (Gbl.F.Out,"
%u %s ", - Usrs.NumUsrs, - Txt_from); + fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"%u %s ",Usrs.NumUsrs,Txt_from); /* Put form to change scope */ Frm_StartForm (ActLstCon); diff --git a/swad_country.c b/swad_country.c index f995504a9..851f0b956 100644 --- a/swad_country.c +++ b/swad_country.c @@ -308,9 +308,8 @@ static void Cty_Configuration (bool PrintView) } else if (MapAttribution) { - fprintf (Gbl.F.Out,"
" - "%s", - MapAttribution); + fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"%s",MapAttribution); HTM_DIV_End (); } diff --git a/swad_degree.c b/swad_degree.c index 6f38f1308..1c52abd2a 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -471,8 +471,8 @@ static void Deg_Configuration (bool PrintView) } else // I can not change degree WWW { - fprintf (Gbl.F.Out,"
" - "" + fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"" "%s" "", Gbl.Hierarchy.Deg.WWW, @@ -835,8 +835,8 @@ static void Deg_ListDegreesForEdition (void) { Str_Copy (WWW,Deg->WWW, Cns_MAX_BYTES_WWW); - fprintf (Gbl.F.Out,"
" - ""); + fprintf (Gbl.F.Out,"" "%s" "", diff --git a/swad_enrolment.c b/swad_enrolment.c index 93f4de56c..d2097a20c 100644 --- a/swad_enrolment.c +++ b/swad_enrolment.c @@ -728,28 +728,22 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role) Hlp_USERS_Administration_administer_multiple_users,Box_NOT_CLOSABLE); /***** Step 1: List of students to be enroled / removed *****/ - fprintf (Gbl.F.Out,"
" - "%s", - The_ClassTitle[Gbl.Prefs.Theme], - Txt_Step_1_Provide_a_list_of_users); + fprintf (Gbl.F.Out,"
",The_ClassTitle[Gbl.Prefs.Theme]); + fprintf (Gbl.F.Out,"%s",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_); Enr_PutAreaToEnterUsrsIDs (); /***** Step 2: Put different actions to register/remove users to/from current course *****/ - fprintf (Gbl.F.Out,"
" - "%s", - The_ClassTitle[Gbl.Prefs.Theme], - Txt_Step_2_Select_the_desired_action); + fprintf (Gbl.F.Out,"
",The_ClassTitle[Gbl.Prefs.Theme]); + fprintf (Gbl.F.Out,"%s",Txt_Step_2_Select_the_desired_action); HTM_DIV_End (); Enr_PutActionsRegRemSeveralUsrs (); /***** Step 3: Select groups in which register / remove users *****/ - fprintf (Gbl.F.Out,"
" - "%s", - The_ClassTitle[Gbl.Prefs.Theme], - Txt_Step_3_Optionally_select_groups); + fprintf (Gbl.F.Out,"
",The_ClassTitle[Gbl.Prefs.Theme]); + fprintf (Gbl.F.Out,"%s",Txt_Step_3_Optionally_select_groups); HTM_DIV_End (); if (Gbl.Hierarchy.Level == Hie_CRS) // Course selected { @@ -765,10 +759,8 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role) } /***** Step 4: Confirm register / remove students *****/ - fprintf (Gbl.F.Out,"
" - "%s", - The_ClassTitle[Gbl.Prefs.Theme], - Txt_Step_4_Confirm_the_enrolment_removing); + fprintf (Gbl.F.Out,"
",The_ClassTitle[Gbl.Prefs.Theme]); + fprintf (Gbl.F.Out,"%s",Txt_Step_4_Confirm_the_enrolment_removing); HTM_DIV_End (); Pwd_AskForConfirmationOnDangerousAction (); diff --git a/swad_file_browser.c b/swad_file_browser.c index 4621e2f7a..c3a41aa7f 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -3372,7 +3372,7 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat) /***** Begin form to send a message to this user *****/ HTM_TD_Begin ("class=\"LT\""); - fprintf (Gbl.F.Out,"
"); switch (UsrDat->Roles.InCurrentCrs.Role) { @@ -4069,9 +4069,8 @@ static void Brw_WriteSubtitleOfFileBrowser (void) } if (Subtitle[0]) { - fprintf (Gbl.F.Out,"
" - "%s", - Subtitle); + fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"%s",Subtitle); HTM_DIV_End (); } } @@ -6306,8 +6305,8 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic) HTM_TD_Begin ("class=\"%s LM\" style=\"width:99%%;\"", Gbl.FileBrowser.TxtStyle); - fprintf (Gbl.F.Out," " - "
"); + fprintf (Gbl.F.Out," "); + fprintf (Gbl.F.Out,"
"); Frm_StartForm (Brw_ActDowFile[Gbl.FileBrowser.Type]); Brw_PutImplicitParamsFileBrowser (); @@ -8405,8 +8404,8 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow) Par_PutHiddenParamString ("ses",Gbl.Session.Id); Brw_PutImplicitParamsFileBrowser (); - fprintf (Gbl.F.Out,"
" - "%s", + fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"%s", Txt_Select_one_or_more_files_from_your_computer_or_drag_and_drop_here); HTM_DIV_End (); Frm_EndForm (); diff --git a/swad_follow.c b/swad_follow.c index 1e912d62e..d17b057d0 100644 --- a/swad_follow.c +++ b/swad_follow.c @@ -518,8 +518,8 @@ void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat, Lay_StartSection (Fol_FOLLOW_SECTION_ID); /***** Followed users *****/ - fprintf (Gbl.F.Out,"
" - "
"); + fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"
"); /* User follows me? */ fprintf (Gbl.F.Out,"
"); @@ -537,8 +537,8 @@ void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat, HTM_DIV_End (); /***** Followers *****/ - fprintf (Gbl.F.Out,"
" - "
"); + fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"
"); /* Number of followers */ Fol_ShowNumberOfFollowingOrFollowers (UsrDat, @@ -556,8 +556,8 @@ void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat, Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Frm_LinkFormSubmit (Txt_Following_unfollow,"REC_DAT_BOLD",NULL); fprintf (Gbl.F.Out,"
" - ""); + fprintf (Gbl.F.Out,"\"%s\"", Cfg_URL_ICON_PUBLIC, @@ -572,8 +572,8 @@ void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat, Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Frm_LinkFormSubmit (Txt_Follow,"REC_DAT_BOLD",NULL); fprintf (Gbl.F.Out,"
" - ""); + fprintf (Gbl.F.Out,"\"%s\"", Cfg_URL_ICON_PUBLIC, @@ -954,10 +954,8 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat) static void Fol_PutInactiveIconToFollowUnfollow (void) { /***** Inactive icon to follow/unfollow *****/ - fprintf (Gbl.F.Out,"
" - "\"\""", + fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"\"\"", Cfg_URL_ICON_PUBLIC); HTM_DIV_End (); } @@ -974,10 +972,9 @@ static void Fol_PutIconToFollow (struct UsrData *UsrDat) Frm_StartForm (ActFolUsr); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Frm_LinkFormSubmit (Txt_Follow,NULL,NULL); - fprintf (Gbl.F.Out,"
" - "\"%s\"", + fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"\"%s\"", Cfg_URL_ICON_PUBLIC, Txt_Follow,Txt_Follow); HTM_DIV_End (); @@ -997,10 +994,9 @@ static void Fol_PutIconToUnfollow (struct UsrData *UsrDat) Frm_StartForm (ActUnfUsr); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Frm_LinkFormSubmit (Txt_Unfollow,NULL,NULL); - fprintf (Gbl.F.Out,"
" - "\"%s\"", + fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"\"%s\"", Cfg_URL_ICON_PUBLIC, Txt_Unfollow,Txt_Unfollow); HTM_DIV_End (); diff --git a/swad_forum.c b/swad_forum.c index 7699f84d0..45e48a77c 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -1757,8 +1757,8 @@ static void For_PutFormWhichForums (void) - only the forums of current institution/degree/course *****/ Frm_StartForm (ActSeeFor); For_PutParamForumOrder (Gbl.Forum.ThreadsOrder); - fprintf (Gbl.F.Out,"
" - "