Version19.42.1

This commit is contained in:
Antonio Cañas Vargas 2019-10-23 20:07:56 +02:00
parent a1feb04c56
commit d3ab3b9297
64 changed files with 769 additions and 628 deletions

View File

@ -442,3 +442,12 @@ void HTM_TD_ColouredEmpty (unsigned NumColumns)
HTM_TD_End ();
}
}
/*****************************************************************************/
/************************************ Divs ***********************************/
/*****************************************************************************/
void HTM_DIV_End (void)
{
fprintf (Gbl.F.Out,"</div>");
}

View File

@ -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

View File

@ -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,"</div>");
HTM_DIV_End ();
Box_EndBox ();
}
@ -319,7 +320,7 @@ void MFU_WriteSmallMFUActions (struct MFU_ListMFUActions *ListMFUActions)
fprintf (Gbl.F.Out,"</ul>");
/***** End div *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/

View File

@ -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)
"<img src=\"https://chart.googleapis.com/chart?cht=qr&amp;chs=%ux%u&amp;chl=%s\""
" alt=\"%s\" title=\"%s\""
" style=\"width:%upx; height:%upx;"
" border:1px dashed silver;\" />"
"</div>",
" 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,"<div class=\"CM\">"
"<img src=\"https://chart.googleapis.com/chart?cht=qr&amp;chs=%ux%u&amp;chl=%s/?crs=%ld%%26act=%ld\""
" alt=\"%s\" title=\"%s\""
" style=\"width:250px; height:250px;\" />"
"</div>",
" 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 ();
}

View File

@ -120,7 +120,7 @@ void Acc_ShowFormMyAccount (void)
Usr_PutLinkToLogin ();
Pwd_PutLinkToSendNewPasswd ();
Lan_PutLinkToChangeLanguage ();
fprintf (Gbl.F.Out,"</div>");
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,"</div>");
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,"</div>");
HTM_DIV_End ();
/**** Show form to create a new account *****/
Acc_ShowFormRequestNewAccountWithParams ("","");
@ -492,16 +492,16 @@ void Acc_ShowFormChgMyAccount (void)
fprintf (Gbl.F.Out,"<div class=\"REC_LEFT\">");
Pwd_ShowFormChgMyPwd ();
Nck_ShowFormChangeMyNickname (IMustCreateMyNicknameNow);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Show form to change my email and my ID *****/
fprintf (Gbl.F.Out,"<div class=\"REC_RIGHT\">");
Mai_ShowFormChangeMyEmail (IMustFillInMyEmailNow,IShouldConfirmMyEmailNow);
ID_ShowFormChangeMyID (IShouldFillInMyIDNow);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Start container for this user *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -531,16 +531,16 @@ void Acc_ShowFormChgOtherUsrAccount (void)
fprintf (Gbl.F.Out,"<div class=\"REC_LEFT\">");
Pwd_ShowFormChgOtherUsrPwd ();
Nck_ShowFormChangeOtherUsrNickname ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Show form to change email and ID *****/
fprintf (Gbl.F.Out,"<div class=\"REC_RIGHT\">");
Mai_ShowFormChangeOtherUsrEmail ();
ID_ShowFormChangeOtherUsrID ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Start container for this user *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
else
Ale_ShowAlertUserNotFoundOrYouDoNotHavePermission ();

View File

@ -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,"</div>");
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,"</div>");
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,"</div>");
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,"<div class=\"%s\">%s</div>",
fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%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,"<div class=\"PAR %s\">%s</div>",
fprintf (Gbl.F.Out,"<div class=\"PAR %s\">"
"%s",
AgdEvent.Hidden ? "DAT_LIGHT" :
"DAT",
Txt);
HTM_DIV_End ();
HTM_TD_End ();
HTM_TR_End ();

View File

@ -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,"<div class=\"ALERT_CLOSE\">"
"<a href=\"\""
" onclick=\"toggleDisplay('%s');return false;\" />"
"<img src=\"%s/close.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />"
"</a>"
"</div>",
"</a>",
IdAlert,
Cfg_URL_ICON_PUBLIC,
Txt_Close,Txt_Close);
HTM_DIV_End ();
}
/***** Write message *****/
fprintf (Gbl.F.Out,"<div class=\"ALERT_TXT\"");
if (AlertType != Ale_NONE)
fprintf (Gbl.F.Out," style=\"background-image:url('%s/%s');\"",
Cfg_URL_ICON_PUBLIC,Ale_AlertIcons[AlertType]);
fprintf (Gbl.F.Out,">%s"
"</div>",
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,"</div>"
"</div>");
HTM_DIV_End ();
HTM_DIV_End ();
}
/*****************************************************************************/

View File

@ -260,7 +260,7 @@ void Ann_ShowMyAnnouncementsNotMarkedAsSeen (void)
0,false,false);
}
fprintf (Gbl.F.Out,"</div>");
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,"<div class=\"%s\">%s</div>",
fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s",
SubjectClass[Status],Subject);
HTM_DIV_End ();
/***** Write the content of the announcement *****/
fprintf (Gbl.F.Out,"<div class=\"%s\">%s</div>",
fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s",
ContentClass[Status],Content);
HTM_DIV_End ();
/***** Write form *****/
fprintf (Gbl.F.Out,"<div class=\"NOTICE_USERS %s\">",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,"</div>");
HTM_DIV_End ();
/***** End yellow note *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/

View File

@ -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,"<div class=\"PAR %s\">%s</div>",
fprintf (Gbl.F.Out,"<div class=\"PAR %s\">"
"%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,"</div>");
HTM_DIV_End ();
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);

View File

@ -174,14 +174,14 @@ void Att_SeeAttEvents (void)
case Rol_STD:
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Att_PutFormToListMyAttendance ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
break;
case Rol_NET:
case Rol_TCH:
case Rol_SYS_ADM:
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Att_PutFormToListStdsAttendance ();
fprintf (Gbl.F.Out,"</div>");
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,"<div class=\"%s\">%s</div>",
fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%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,"</div>");
HTM_DIV_End ();
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
@ -3431,7 +3433,7 @@ static void Att_PutCheckOrCross (bool Present)
"&cross;",
Txt_Absent);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/

View File

@ -1059,7 +1059,7 @@ void Ban_WriteMenuWithBanners (void)
Gbl.Banners.Lst[NumBan].ShrtName,
Gbl.Banners.Lst[NumBan].FullName);
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/***** Free list of banners *****/

View File

@ -162,7 +162,7 @@ static void Box_StartBoxInternal (const char *Width,const char *Title,
{
fprintf (Gbl.F.Out,"<div class=\"FRAME_ICO_LEFT\">");
FunctionToDrawContextualIcons ();
fprintf (Gbl.F.Out,"</div>");
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,"</a>");
}
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** End row for left and right icons *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Frame title *****/
if (Title)
{
fprintf (Gbl.F.Out,"<div class=\"FRAME_TITLE %s\">"
"%s"
"</div>",
"%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,"</div>"
"</div>");
HTM_DIV_End ();
HTM_DIV_End ();
/***** Decrease level of nesting *****/
Gbl.Box.Nested--;

View File

@ -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,"<div class=\"CM\">"
"<button type=\"submit\" class=\"BT_SUBMIT BT_CREATE\">"
"%s"
"</button>"
"</div>",
"</button>",
TxtButton);
HTM_DIV_End ();
}
void Btn_PutCreateButtonInline (const char *TxtButton)
@ -119,9 +120,9 @@ void Btn_PutConfirmButton (const char *TxtButton)
fprintf (Gbl.F.Out,"<div class=\"CM\">"
"<button type=\"submit\" class=\"BT_SUBMIT BT_CONFIRM\">"
"%s"
"</button>"
"</div>",
"</button>",
TxtButton);
HTM_DIV_End ();
}
void Btn_PutConfirmButtonInline (const char *TxtButton)
@ -137,9 +138,9 @@ void Btn_PutRemoveButton (const char *TxtButton)
fprintf (Gbl.F.Out,"<div class=\"CM\">"
"<button type=\"submit\" class=\"BT_SUBMIT BT_REMOVE\">"
"%s"
"</button>"
"</div>",
"</button>",
TxtButton);
HTM_DIV_End ();
}
void Btn_PutRemoveButtonInline (const char *TxtButton)
@ -149,15 +150,3 @@ void Btn_PutRemoveButtonInline (const char *TxtButton)
"</button>",
TxtButton);
}
/*
void Btn_PutCloseTabButton (const char *TxtButton)
{
fprintf (Gbl.F.Out,"<div class=\"CM\">"
"<button type=\"submit\" class=\"BT_SUBMIT BT_REMOVE\""
" onclick=\"window.close();\">"
"%s"
"</button>"
"</div>",
TxtButton);
}
*/

View File

@ -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,"</div>");
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,"<div id=\"CurrentMonth\">"
"</div>");
fprintf (Gbl.F.Out,"<div id=\"CurrentMonth\">");
HTM_DIV_End ();
/* Write script to draw the month */
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
@ -277,8 +278,8 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
/***** Draw several months *****/
/* JavaScript will write HTML here */
fprintf (Gbl.F.Out,"<div id=\"calendar\">"
"</div>");
fprintf (Gbl.F.Out,"<div id=\"calendar\">");
HTM_DIV_End ();
/* Write script to draw the month */
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"

View File

@ -343,7 +343,7 @@ static void Ctr_Configuration (bool PrintView)
fprintf (Gbl.F.Out,"<br />%s",Gbl.Hierarchy.Ctr.FullName);
if (PutLink)
fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Centre photo *****/
if (PhotoExists)
@ -369,7 +369,7 @@ static void Ctr_Configuration (bool PrintView)
"CENTRE_PHOTO_SHOW");
if (PutLink)
fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/* Photo attribution */
if (!PrintView &&
@ -387,13 +387,15 @@ static void Ctr_Configuration (bool PrintView)
fprintf (Gbl.F.Out,"%s",PhotoAttribution);
fprintf (Gbl.F.Out,"</textarea>");
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
else if (PhotoAttribution)
{
fprintf (Gbl.F.Out,"<div class=\"ATTRIBUTION\">"
"%s"
"</div>",
"%s",
PhotoAttribution);
HTM_DIV_End ();
}
/* Free memory used for photo attribution */
Ctr_FreePhotoAttribution (&PhotoAttribution);
@ -584,13 +586,15 @@ static void Ctr_Configuration (bool PrintView)
Frm_EndForm ();
}
else // I can not change centre WWW
{
fprintf (Gbl.F.Out,"<div class=\"EXTERNAL_WWW_LONG\">"
"<a href=\"%s\" target=\"_blank\" class=\"DAT\">"
"%s"
"</a>"
"</div>",
"</a>",
Gbl.Hierarchy.Ctr.WWW,
Gbl.Hierarchy.Ctr.WWW);
HTM_DIV_End ();
}
HTM_TD_End ();
HTM_TR_End ();
@ -1606,9 +1610,9 @@ static void Ctr_ListCentresForEdition (void)
"<a href=\"%s\" target=\"_blank\""
" class=\"DAT\" title=\"%s\">"
"%s"
"</a>"
"</div>",
"</a>",
Ctr->WWW,Ctr->WWW,WWW);
HTM_DIV_End ();
}
HTM_TD_End ();

View File

@ -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 (2019-10-23)"
#define Log_PLATFORM_VERSION "SWAD 19.42.1 (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.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)
Version 19.41.3: Oct 23, 2019 Changes in layout of matches. (245952 lines)

View File

@ -28,8 +28,8 @@
/** Uncomment one of the following installations of SWAD or create your own **/
/*****************************************************************************/
//#define LOCALHOST_UBUNTU // Comment this line if not applicable
#define OPENSWAD_ORG // Comment this line if not applicable
#define LOCALHOST_UBUNTU // Comment this line if not applicable
//#define OPENSWAD_ORG // Comment this line if not applicable
//#define SWAD_UGR_ES // Comment this line if not applicable
//#define SWADBERRY_UGR_ES // Comment this line if not applicable

View File

@ -88,7 +88,7 @@ void Con_ShowConnectedUsrs (void)
{
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Sta_PutLinkToLastClicks ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/***** Get scope *****/
@ -195,11 +195,11 @@ void Con_ShowGlobalConnectedUsrs (void)
Role++)
Con_ShowGlobalConnectedUsrsRole (Role,NumUsrs[Role]);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/***** Container end *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
static void Con_ShowGlobalConnectedUsrsRole (Rol_Role_t Role,unsigned UsrsTotal)
@ -277,7 +277,7 @@ static void Con_ShowConnectedUsrsBelongingToLocation (void)
Sco_PutSelectorScope ("ScopeCon",true);
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Number of teachers and students *****/
HTM_TABLE_Begin ("CONNECTED_LIST");
@ -292,7 +292,7 @@ static void Con_ShowConnectedUsrsBelongingToLocation (void)
Enr_CheckStdsAndPutButtonToRegisterStdsInCurrentCrs ();
/***** End container *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -338,7 +338,7 @@ void Con_ShowConnectedUsrsBelongingToCurrentCrs (void)
HTM_TABLE_End ();
/***** End container *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -851,8 +851,8 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
fprintf (Gbl.F.Out,"<div class=\"CON_NAME_NARROW\">"); // Limited width
Frm_LinkFormSubmitUnique (Txt_View_record_for_this_course,Font);
Usr_WriteFirstNameBRSurnames (UsrDat);
fprintf (Gbl.F.Out,"</a>"
"</div>");
fprintf (Gbl.F.Out,"</a>");
HTM_DIV_End ();
Frm_EndForm ();
HTM_TD_End ();
@ -863,7 +863,7 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
fprintf (Gbl.F.Out,"<div id=\"hm%u\">",
Gbl.Usrs.Connected.NumUsr); // Used for automatic update, only when displayed on right column
Dat_WriteHoursMinutesSecondsFromSeconds (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].TimeDiff);
fprintf (Gbl.F.Out,"</div>"); // Used for automatic update, only when displayed on right column
HTM_DIV_End (); // Used for automatic update, only when displayed on right column
HTM_TD_End ();
HTM_TR_End ();
@ -1069,7 +1069,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
Usr_WriteFirstNameBRSurnames (&UsrDat);
if (PutLinkToRecord)
fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
if (PutLinkToRecord)
Frm_EndForm ();
HTM_TD_End ();

View File

@ -30,6 +30,7 @@
#include "swad_database.h"
#include "swad_form.h"
#include "swad_global.h"
#include "swad_HTML.h"
#include "swad_layout.h"
#include "swad_setting.h"
@ -91,7 +92,7 @@ void Coo_EditMyPrefsOnCookies (void)
Txt_Accept_third_party_cookies_to_view_multimedia_content_from_other_websites);
/* End container */
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** End table and box *****/
Box_EndBoxTable ();

View File

@ -272,7 +272,7 @@ static void Cty_Configuration (bool PrintView)
fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]);
if (PutLink)
fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Country map (and link to WWW if exists) *****/
if (Cty_CheckIfCountryMapExists (&Gbl.Hierarchy.Cty))
@ -289,7 +289,7 @@ static void Cty_Configuration (bool PrintView)
"COUNTRY_MAP_SHOW");
if (PutLink)
fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/* Map attribution */
if (!PrintView && Cty_CheckIfICanEditCountries ())
@ -304,13 +304,15 @@ static void Cty_Configuration (bool PrintView)
fprintf (Gbl.F.Out,"%s",MapAttribution);
fprintf (Gbl.F.Out,"</textarea>");
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
else if (MapAttribution)
{
fprintf (Gbl.F.Out,"<div class=\"ATTRIBUTION\">"
"%s"
"</div>",
"%s",
MapAttribution);
HTM_DIV_End ();
}
/* Free memory used for map attribution */
Cty_FreeMapAttribution (&MapAttribution);
@ -630,7 +632,10 @@ void Cty_ListCountries2 (void)
/***** Div for Google Geochart *****/
if (Gbl.Action.Act == ActSeeCty)
fprintf (Gbl.F.Out,"<div id=\"chart_div\"></div>");
{
fprintf (Gbl.F.Out,"<div id=\"chart_div\">");
HTM_DIV_End ();
}
/***** Free list of countries *****/
Cty_FreeListCountries ();
@ -826,10 +831,10 @@ void Cty_DrawCountryMapAndNameWithLink (struct Country *Cty,Act_Action_t Action,
Str_Copy (CountryName,Cty->Name[Gbl.Prefs.Language],
Cty_MAX_BYTES_NAME);
fprintf (Gbl.F.Out,"&nbsp;%s&nbsp;(%s)"
"</a>"
"</div>",
"</a>",
CountryName,
Cty->Alpha2);
HTM_DIV_End ();
/***** End form *****/
Frm_EndForm ();

View File

@ -147,7 +147,7 @@ void Crs_ShowIntroduction (void)
/***** Course configuration *****/
fprintf (Gbl.F.Out,"<div class=\"CM\">");
Crs_Configuration (false);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Course introduction *****/
Inf_ShowInfo ();
@ -206,7 +206,7 @@ static void Crs_Configuration (bool PrintView)
{
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Enr_PutLinkToRequestSignUp ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
}
@ -230,9 +230,9 @@ static void Crs_Configuration (bool PrintView)
Gbl.Hierarchy.Deg.ShrtName,64,NULL,true);
if (PutLink)
fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"<br />%s"
"</div>",
fprintf (Gbl.F.Out,"<br />%s",
Gbl.Hierarchy.Crs.FullName);
HTM_DIV_End ();
/***** Begin table *****/
HTM_TABLE_BeginWidePadding (2);

View File

@ -320,7 +320,7 @@ void Dat_ShowClientLocalTime (void)
"</span>"
"</a>");
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/* Day with link to agenda (if I am logged) */
fprintf (Gbl.F.Out,"<div id=\"current_day\">");
@ -336,14 +336,14 @@ void Dat_ShowClientLocalTime (void)
fprintf (Gbl.F.Out,"</a>");
Frm_EndForm ();
}
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/* Time */
fprintf (Gbl.F.Out,"<div id=\"current_time\">" // JavaScript will write HTML here
"</div>");
fprintf (Gbl.F.Out,"<div id=\"current_time\">"); // JavaScript will write HTML here
HTM_DIV_End ();
/* End container */
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/* Write script to draw the month */
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">\n"

View File

@ -332,7 +332,7 @@ static void Deg_Configuration (bool PrintView)
Gbl.Hierarchy.Deg.FullName);
if (PutLink)
fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Begin table *****/
HTM_TABLE_BeginWidePadding (2);
@ -470,13 +470,15 @@ static void Deg_Configuration (bool PrintView)
Frm_EndForm ();
}
else // I can not change degree WWW
{
fprintf (Gbl.F.Out,"<div class=\"EXTERNAL_WWW_LONG\">"
"<a href=\"%s\" target=\"_blank\" class=\"DAT\">"
"%s"
"</a>"
"</div>",
"</a>",
Gbl.Hierarchy.Deg.WWW,
Gbl.Hierarchy.Deg.WWW);
HTM_DIV_End ();
}
HTM_TD_End ();
HTM_TR_End ();
@ -837,9 +839,9 @@ static void Deg_ListDegreesForEdition (void)
"<a href=\"%s\" target=\"_blank\""
" class=\"DAT\" title=\"%s\">"
"%s"
"</a>"
"</div>",
"</a>",
Deg->WWW,Deg->WWW,WWW);
HTM_DIV_End ();
}
HTM_TD_End ();

View File

@ -697,7 +697,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
break;
}
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/***** Form to send students to be enroled / removed *****/
@ -729,28 +729,28 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
/***** Step 1: List of students to be enroled / removed *****/
fprintf (Gbl.F.Out,"<div class=\"%s LM\">"
"%s"
"</div>",
"%s",
The_ClassTitle[Gbl.Prefs.Theme],
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,"<div class=\"%s LM\">"
"%s"
"</div>",
"%s",
The_ClassTitle[Gbl.Prefs.Theme],
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,"<div class=\"%s LM\">"
"%s"
"</div>",
"%s",
The_ClassTitle[Gbl.Prefs.Theme],
Txt_Step_3_Optionally_select_groups);
HTM_DIV_End ();
if (Gbl.Hierarchy.Level == Hie_CRS) // Course selected
{
if (Gbl.Crs.Grps.NumGrps) // This course has groups?
@ -766,10 +766,10 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
/***** Step 4: Confirm register / remove students *****/
fprintf (Gbl.F.Out,"<div class=\"%s LM\">"
"%s"
"</div>",
"%s",
The_ClassTitle[Gbl.Prefs.Theme],
Txt_Step_4_Confirm_the_enrolment_removing);
HTM_DIV_End ();
Pwd_AskForConfirmationOnDangerousAction ();
/***** Send button and end box *****/
@ -2898,7 +2898,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
HTM_TD_Begin ("class=\"DAT LT\"");
fprintf (Gbl.F.Out,"<div class=\"REQUESTER_NAME\">"); // Limited width
Usr_WriteFirstNameBRSurnames (&UsrDat);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
HTM_TD_End ();
/***** Requested role (row[3]) *****/
@ -3099,7 +3099,7 @@ void Enr_ReqRegRemStd (void)
/* Put link to go to admin several students */
Enr_PutLinkToAdminSeveralUsrs (Rol_STD);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/***** Form to request user to be administered *****/

View File

@ -3412,7 +3412,7 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat)
UsrDat->Email,UsrDat->Email);
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
HTM_TD_End ();
@ -3786,7 +3786,7 @@ static void Brw_WriteTopBeforeShowingFileBrowser (void)
ZIP_PutLinkToCreateZIPAsgWrk ();
}
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Initialize hidden levels *****/
switch (Gbl.FileBrowser.Type)
@ -4068,8 +4068,12 @@ static void Brw_WriteSubtitleOfFileBrowser (void)
return;
}
if (Subtitle[0])
fprintf (Gbl.F.Out,"<div class=\"BROWSER_SUBTITLE\">%s</div>",
{
fprintf (Gbl.F.Out,"<div class=\"BROWSER_SUBTITLE\">"
"%s",
Subtitle);
HTM_DIV_End ();
}
}
/*****************************************************************************/
@ -4133,7 +4137,7 @@ static void Brw_ShowAndStoreSizeOfFileTree (void)
else
fprintf (Gbl.F.Out,"&nbsp;"); // Blank to occupy the same space as the text for the browser size
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -5914,7 +5918,7 @@ static void Brw_PutIconToExpandFolder (const char *FileBrowserId,const char *Row
Frm_EndForm ();
/***** End container *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -5946,7 +5950,7 @@ static void Brw_PutIconToContractFolder (const char *FileBrowserId,const char *R
Frm_EndForm ();
/***** End container *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -6092,7 +6096,7 @@ static void Brw_PutIconFolderWithoutPlus (const char *FileBrowserId,const char *
Txt_Folder);
/***** End container *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -6117,7 +6121,7 @@ static void Brw_PutIconFolderWithPlus (const char *FileBrowserId,const char *Row
Open);
/***** End container *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -6289,7 +6293,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic)
}
/***** End cell *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
HTM_TD_End ();
}
@ -6322,7 +6326,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic)
Ico_PutIconOff ("unlock.svg",
Txt_Public_open_educational_resource_OER_for_everyone);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
HTM_TD_End ();
}
}
@ -8402,10 +8406,10 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow)
Brw_PutImplicitParamsFileBrowser ();
fprintf (Gbl.F.Out,"<div class=\"dz-message\">"
"<span class=\"DAT_LIGHT\">%s</span>"
"</div>"
"</form>",
"<span class=\"DAT_LIGHT\">%s</span>",
Txt_Select_one_or_more_files_from_your_computer_or_drag_and_drop_here);
HTM_DIV_End ();
Frm_EndForm ();
/***** Put button to refresh file browser after upload *****/
Frm_StartForm (Brw_ActRefreshAfterUploadFiles[Gbl.FileBrowser.Type]);
@ -8422,7 +8426,7 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow)
/***** End box *****/
Box_EndBox ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -8455,7 +8459,7 @@ static void Brw_PutFormToUploadOneFileClassic (const char *FileNameToShow)
/***** End box *****/
Box_EndBox ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/

View File

@ -138,7 +138,7 @@ void Fol_SuggestUsrsToFollowMainZone (void)
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Prf_PutLinkMyPublicProfile ();
Prf_PutLinkRequestAnotherUserProfile ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Get users *****/
if ((NumUsrs = Fol_GetUsrsToFollow (Fol_MAX_USRS_TO_FOLLOW_MAIN_ZONE,
@ -245,7 +245,7 @@ void Fol_SuggestUsrsToFollowMainZoneOnRightColumn (void)
HTM_TABLE_End ();
/***** End container *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/***** Free structure that stores the query result *****/
@ -525,7 +525,7 @@ void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat,
fprintf (Gbl.F.Out,"<div id=\"follows_me\" class=\"DAT_LIGHT\">");
if (UsrFollowsMe)
fprintf (Gbl.F.Out,"%s",Txt_FOLLOWS_YOU);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/* Number of followed */
Fol_ShowNumberOfFollowingOrFollowers (UsrDat,
@ -533,8 +533,8 @@ void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat,
ActSeeFlg,Txt_Following);
/* End following side */
fprintf (Gbl.F.Out,"</div>"
"</div>");
HTM_DIV_End ();
HTM_DIV_End ();
/***** Followers *****/
fprintf (Gbl.F.Out,"<div id=\"followers_side\">"
@ -559,11 +559,11 @@ void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat,
" style=\"display:inline;\" >"
"<img src=\"%s/user-check.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO40x40\" />"
"</div>"
"</a>",
" class=\"ICO40x40\" />",
Cfg_URL_ICON_PUBLIC,
Txt_Unfollow,Txt_Following_unfollow);
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</a>");
Frm_EndForm ();
}
else // I do not follow this user
@ -575,19 +575,19 @@ void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat,
" style=\"display:inline;\" >"
"<img src=\"%s/user-plus.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO40x40\" />"
"</div>"
"</a>",
" class=\"ICO40x40\" />",
Cfg_URL_ICON_PUBLIC,
Txt_Follow,Txt_Follow);
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</a>");
Frm_EndForm ();
}
}
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/* End followers side */
fprintf (Gbl.F.Out,"</div>"
"</div>");
HTM_DIV_End ();
HTM_DIV_End ();
/***** End section *****/
Lay_EndSection ();
@ -651,10 +651,10 @@ static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat,
fprintf (Gbl.F.Out,"</a>");
Frm_EndForm ();
}
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** End container *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -862,8 +862,8 @@ static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat)
fprintf (Gbl.F.Out,"<div class=\"FOLLOW_USR_NAME\">"); // Limited width
Frm_LinkFormSubmit (Txt_Another_user_s_profile,"DAT",NULL);
Usr_WriteFirstNameBRSurnames (UsrDat);
fprintf (Gbl.F.Out,"</a>"
"</div>");
fprintf (Gbl.F.Out,"</a>");
HTM_DIV_End ();
Frm_EndForm ();
}
@ -919,8 +919,8 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat)
fprintf (Gbl.F.Out,"<div class=\"CON_NAME_FOLLOW\">"); // Limited width
Frm_LinkFormSubmit (Txt_Another_user_s_profile,"CON_CRS",NULL);
Usr_WriteFirstNameBRSurnames (UsrDat);
fprintf (Gbl.F.Out,"</a>"
"</div>");
fprintf (Gbl.F.Out,"</a>");
HTM_DIV_End ();
Frm_EndForm ();
}
HTM_TD_End ();
@ -957,9 +957,9 @@ static void Fol_PutInactiveIconToFollowUnfollow (void)
fprintf (Gbl.F.Out,"<div class=\"FOLLOW_USR_ICO ICO_HIDDEN\">"
"<img src=\"%s/user.svg\""
" alt=\"\""
" class=\"ICO16x16\" />"
"</div>",
" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC);
HTM_DIV_End ();
}
/*****************************************************************************/
@ -977,11 +977,11 @@ static void Fol_PutIconToFollow (struct UsrData *UsrDat)
fprintf (Gbl.F.Out,"<div class=\"FOLLOW_USR_ICO ICO_HIGHLIGHT\">"
"<img src=\"%s/user-plus.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />"
"</div>"
"</a>",
" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,
Txt_Follow,Txt_Follow);
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</a>");
Frm_EndForm ();
}
@ -1000,11 +1000,11 @@ static void Fol_PutIconToUnfollow (struct UsrData *UsrDat)
fprintf (Gbl.F.Out,"<div class=\"FOLLOW_USR_ICO ICO_HIGHLIGHT\">"
"<img src=\"%s/user-check.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />"
"</div>"
"</a>",
" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,
Txt_Unfollow,Txt_Unfollow);
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</a>");
Frm_EndForm ();
}

View File

@ -1465,7 +1465,7 @@ static void For_WriteNumberOfPosts (long UsrCod)
fprintf (Gbl.F.Out,"[%u %s]",NumPsts,Txt_FORUM_posts);
/***** End table cell *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -1777,8 +1777,8 @@ static void For_PutFormWhichForums (void)
"</li>",
Gbl.Form.Id,Txt_FORUM_WHICH_FORUM[ForumSet]);
}
fprintf (Gbl.F.Out,"</ul>"
"</div>");
fprintf (Gbl.F.Out,"</ul>");
HTM_DIV_End ();
Frm_EndForm ();
}

View File

@ -461,11 +461,13 @@ void Gam_ShowOneGame (long GamCod,
Lay_EndArticle ();
/* Number of questions */
fprintf (Gbl.F.Out,"<div class=\"%s\">%s: %u</div>",
fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s: %u",
Game.Hidden ? "ASG_GRP_LIGHT" :
"ASG_GRP",
Txt_No_of_questions,
Game.NumQsts);
HTM_DIV_End ();
HTM_TD_End ();
@ -511,10 +513,12 @@ void Gam_ShowOneGame (long GamCod,
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,"<div class=\"PAR %s\">%s</div>",
fprintf (Gbl.F.Out,"<div class=\"PAR %s\">"
"%s",
Game.Hidden ? "DAT_LIGHT" :
"DAT",
Txt);
HTM_DIV_End ();
HTM_TD_End ();
/***** End 2nd row of this game *****/
@ -1734,14 +1738,20 @@ static void Gam_ListOneOrMoreQuestionsForEdition (long GamCod,unsigned NumQsts,
HTM_TD_End ();
/* Write number of question */
HTM_TD_Begin ("class=\"RT COLOR%u\"",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<div class=\"BIG_INDEX\">%s</div>",StrQstInd);
/* Write number of question */
fprintf (Gbl.F.Out,"<div class=\"BIG_INDEX\">"
"%s",
StrQstInd);
HTM_DIV_End ();
/* Write answer type (row[2]) */
Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]);
fprintf (Gbl.F.Out,"<div class=\"DAT_SMALL\">%s</div>",
fprintf (Gbl.F.Out,"<div class=\"DAT_SMALL\">%s",
Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]);
HTM_DIV_End ();
HTM_TD_End ();
/* Write question code */

View File

@ -416,7 +416,7 @@ void Grp_ShowFormToSelectSeveralGroups (void (*FuncParams) (void),
The_ClassFormInBoxBold[Gbl.Prefs.Theme],
"CopyMessageToHiddenFields();");
Ico_PutCalculateIconWithText (Txt_Update_users);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** End form *****/
Frm_EndForm ();
@ -467,10 +467,10 @@ static void Grp_PutCheckboxAllGrps (Grp_WhichGroups_t GroupsSelectableByStdsOrNE
fprintf (Gbl.F.Out," />"
"<label for=\"AllGroups\" class=\"%s\">"
"&nbsp;%s"
"</label>"
"</div>",
"</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_All_groups);
HTM_DIV_End ();
}
/*****************************************************************************/
@ -5019,7 +5019,7 @@ void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,void (*FuncParams) (void))
"sitemap.svg",
Txt_GROUP_WHICH_GROUPS[WhichGrps]);
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/***** End setting selector *****/

View File

@ -70,7 +70,7 @@ void Hie_SeePending (void)
/* Put link to remove old courses */
Crs_PutLinkToRemoveOldCrss ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** List countries with pending institutions *****/
Cty_SeeCtyWithPendingInss ();
@ -215,7 +215,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
fprintf (Gbl.F.Out,"%s</a>",Txt_System);
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
if (Gbl.Hierarchy.Cty.CtyCod > 0) // Country selected...
{
@ -231,7 +231,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
fprintf (Gbl.F.Out,"%s</a>",Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]);
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
else
{
@ -246,7 +246,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
fprintf (Gbl.F.Out,"%s</a>",Txt_Country);
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
if (Gbl.Hierarchy.Ins.InsCod > 0) // Institution selected...
@ -263,7 +263,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
fprintf (Gbl.F.Out,"%s</a>",Gbl.Hierarchy.Ins.ShrtName);
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
else if (Gbl.Hierarchy.Cty.CtyCod > 0)
{
@ -278,7 +278,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
fprintf (Gbl.F.Out,"%s</a>",Txt_Institution);
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
else
{
@ -290,7 +290,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
/***** Hidden institution *****/
fprintf (Gbl.F.Out,"%s",Txt_Institution);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
if (Gbl.Hierarchy.Ctr.CtrCod > 0) // Centre selected...
@ -307,7 +307,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
fprintf (Gbl.F.Out,"%s</a>",Gbl.Hierarchy.Ctr.ShrtName);
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
else if (Gbl.Hierarchy.Ins.InsCod > 0)
{
@ -322,7 +322,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
fprintf (Gbl.F.Out,"%s</a>",Txt_Centre);
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
else
{
@ -334,7 +334,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
/***** Hidden centre *****/
fprintf (Gbl.F.Out,"%s",Txt_Centre);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
if (Gbl.Hierarchy.Deg.DegCod > 0) // Degree selected...
@ -351,7 +351,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
fprintf (Gbl.F.Out,"%s</a>",Gbl.Hierarchy.Deg.ShrtName);
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
else if (Gbl.Hierarchy.Ctr.CtrCod > 0)
{
@ -366,7 +366,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
fprintf (Gbl.F.Out,"%s</a>",Txt_Degree);
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
else
{
@ -378,7 +378,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
/***** Hidden degree *****/
fprintf (Gbl.F.Out,"%s",Txt_Degree);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
fprintf (Gbl.F.Out,"<div class=\"BC%s %s\">",
@ -390,7 +390,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
/***** Separator *****/
fprintf (Gbl.F.Out,"&nbsp;&gt;&nbsp;");
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -438,39 +438,43 @@ void Hie_WriteBigNameCtyInsCtrDegCrs (void)
/***** Text *****/
fprintf (Gbl.F.Out,"<div id=\"big_name_container\">");
if (Gbl.Hierarchy.Cty.CtyCod > 0)
{
fprintf (Gbl.F.Out,"<div id=\"big_full_name\">"
"%s" // Full name
"</div>"
"<div class=\"NOT_SHOWN\">"
" / " // To separate
"</div>"
"<div id=\"big_short_name\">"
"%s" // Short name
"</div>",
"%s", // Full name
(Gbl.Hierarchy.Level == Hie_CRS) ? Gbl.Hierarchy.Crs.FullName :
((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 :
Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]))),
Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]))));
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"NOT_SHOWN\">"
" / "); // To separate
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div id=\"big_short_name\">"
"%s", // Short name
(Gbl.Hierarchy.Level == Hie_CRS) ? Gbl.Hierarchy.Crs.ShrtName :
((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 :
Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]))));
HTM_DIV_End ();
}
else // No country specified ==> home page
{
fprintf (Gbl.F.Out,"<div id=\"big_full_name\">"
"%s: %s" // Full name
"</div>"
"<div class=\"NOT_SHOWN\">"
" / " // To separate
"</div>"
"<div id=\"big_short_name\">"
"%s" // Short name
"</div>",
Cfg_PLATFORM_SHORT_NAME,Txt_TAGLINE,
"%s: %s", // Full name
Cfg_PLATFORM_SHORT_NAME,Txt_TAGLINE);
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"NOT_SHOWN\">"
" / "); // To separate
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div id=\"big_short_name\">"
"%s", // Short name
Cfg_PLATFORM_SHORT_NAME);
fprintf (Gbl.F.Out,"</div>"
"</h1>");
HTM_DIV_End ();
}
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</h1>");
}
/*****************************************************************************/

View File

@ -32,6 +32,7 @@
#include "swad_database.h"
#include "swad_form.h"
#include "swad_global.h"
#include "swad_HTML.h"
#include "swad_icon.h"
#include "swad_layout.h"
#include "swad_parameter.h"
@ -134,7 +135,7 @@ void Ico_PutIconsToSelectIconSet (void)
Ico_IconSetId[IconSet]);
Ico_PutSettingIconLink (Icon,Ico_IconSetNames[IconSet]);
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
Set_EndOneSettingSelector ();
Set_EndSettingsHead ();
@ -334,11 +335,11 @@ void Ico_PutDivIcon (const char *DivClass,const char *Icon,const char *Title)
fprintf (Gbl.F.Out,"<div class=\"%s\">"
"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO_16x16\" />"
"</div>",
" class=\"CONTEXT_ICO_16x16\" />",
DivClass,
Cfg_URL_ICON_PUBLIC,Icon,
Title,Title);
HTM_DIV_End ();
}
/*****************************************************************************/
@ -349,7 +350,7 @@ void Ico_PutDivIconLink (const char *DivClass,const char *Icon,const char *Title
{
fprintf (Gbl.F.Out,"<div class=\"%s\">",DivClass);
Ico_PutIconLink (Icon,Title);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -375,10 +376,10 @@ void Ico_PutIconTextLink (const char *Icon,const char *Text)
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT ICO_HIGHLIGHT\">"
"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO_x16\" />"
"&nbsp;%s"
"</div>",
"&nbsp;%s",
Cfg_URL_ICON_PUBLIC,Icon,Text,Text,
Text);
HTM_DIV_End ();
}
/*****************************************************************************/
@ -418,11 +419,12 @@ void Ico_PutCalculateIcon (const char *Title)
" class=\"CONTEXT_ICO_16x16\" />"
"<img id=\"updating_%d\" src=\"%s/working16x16.gif\"" // TODO: change name and resolution to refreshing64x64.gif
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO_16x16\" style=\"display:none;\" />" // Animated icon hidden
"</div>"
"</a>",
" class=\"CONTEXT_ICO_16x16\" style=\"display:none;\" />", // Animated icon hidden
Gbl.Form.Num,Cfg_URL_ICON_PUBLIC,Title,Title,
Gbl.Form.Num,Cfg_URL_ICON_PUBLIC,Title,Title);
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</a>");
}
/*****************************************************************************/
@ -440,12 +442,13 @@ void Ico_PutCalculateIconWithText (const char *Text)
"<img id=\"updating_%d\" src=\"%s/working16x16.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" style=\"display:none;\" />" // Animated icon hidden
"&nbsp;%s"
"</div>"
"</a>",
"&nbsp;%s",
Gbl.Form.Num,Cfg_URL_ICON_PUBLIC,Text,Text,
Gbl.Form.Num,Cfg_URL_ICON_PUBLIC,Text,Text,
Text);
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</a>");
}
/*****************************************************************************/

View File

@ -386,7 +386,7 @@ void Inf_ShowInfo (void)
{
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Inf_PutCheckboxConfirmIHaveReadInfo ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
break;
case Rol_NET:
@ -398,7 +398,7 @@ void Inf_ShowInfo (void)
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Disabled = (Gbl.Usrs.Me.Role.Logged == Rol_NET); // Non-editing teachers can not change the status of checkbox
Inf_PutCheckboxForceStdsToReadInfo (MustBeRead,Disabled);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
break;
default:
@ -617,8 +617,8 @@ void Inf_WriteMsgYouMustReadInfo (void)
Frm_EndForm ();
fprintf (Gbl.F.Out,"</li>");
}
fprintf (Gbl.F.Out,"</ul>"
"</div>");
fprintf (Gbl.F.Out,"</ul>");
HTM_DIV_End ();
/***** End box *****/
Box_EndBox ();
@ -1276,10 +1276,10 @@ void Inf_FormToSendPage (Inf_InfoSrc_t InfoSrc)
"<label class=\"%s\">"
"%s:&nbsp;"
"<input type=\"file\" name=\"%s\" />"
"</label>"
"</div>",
"</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_File,
Fil_NAME_OF_PARAM_FILENAME_ORG);
HTM_DIV_End ();
/***** Send button *****/
Btn_PutCreateButton (Txt_Upload_file);
@ -1324,8 +1324,8 @@ void Inf_FormToSendURL (Inf_InfoSrc_t InfoSrc)
fprintf (Gbl.F.Out,"%s",Gbl.Crs.Info.URL);
}
fprintf (Gbl.F.Out,"\" />"
"</label>"
"</div>");
"</label>");
HTM_DIV_End ();
/***** Send button *****/
Btn_PutCreateButton (Txt_Send_URL);
@ -1809,7 +1809,7 @@ static bool Inf_CheckAndShowPlainTxt (void)
fprintf (Gbl.F.Out,"%s",TxtHTML);
/***** End box *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
Box_EndBox ();
return true;
@ -1946,7 +1946,7 @@ static bool Inf_CheckAndShowRichTxt (void)
unlink (PathFileHTML);
/***** End box *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
Box_EndBox ();
return true;
@ -2082,9 +2082,9 @@ void Inf_EditPlainTxtInfo (void)
Lay_HelpPlainEditor ();
fprintf (Gbl.F.Out,"<textarea name=\"Txt\" cols=\"80\" rows=\"20\">"
"%s"
"</textarea>"
"</div>",
"</textarea>",
TxtHTML);
HTM_DIV_End ();
/***** Send button and end box *****/
Box_EndBoxWithButton (Btn_CONFIRM_BUTTON,Txt_Save_changes);
@ -2133,9 +2133,9 @@ void Inf_EditRichTxtInfo (void)
Lay_HelpRichEditor ();
fprintf (Gbl.F.Out,"<textarea name=\"Txt\" cols=\"80\" rows=\"20\">"
"%s"
"</textarea>"
"</div>",
"</textarea>",
TxtHTML);
HTM_DIV_End ();
/***** Send button and end box *****/
Box_EndBoxWithButton (Btn_CONFIRM_BUTTON,Txt_Save_changes);

View File

@ -345,7 +345,7 @@ static void Ins_Configuration (bool PrintView)
fprintf (Gbl.F.Out,"<br />%s",Gbl.Hierarchy.Ins.FullName);
if (PutLink)
fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Begin table *****/
HTM_TABLE_BeginWidePadding (2);
@ -484,13 +484,15 @@ static void Ins_Configuration (bool PrintView)
Frm_EndForm ();
}
else // I can not change institution WWW
{
fprintf (Gbl.F.Out,"<div class=\"EXTERNAL_WWW_LONG\">"
"<a href=\"%s\" target=\"_blank\" class=\"DAT\">"
"%s"
"</a>"
"</div>",
"</a>",
Gbl.Hierarchy.Ins.WWW,
Gbl.Hierarchy.Ins.WWW);
HTM_DIV_End ();
}
HTM_TD_End ();
HTM_TR_End ();
@ -1557,9 +1559,9 @@ static void Ins_ListInstitutionsForEdition (void)
"<a href=\"%s\" target=\"_blank\""
" class=\"DAT\" title=\"%s\">"
"%s"
"</a>"
"</div>",
"</a>",
Ins->WWW,Ins->WWW,WWW);
HTM_DIV_End ();
}
HTM_TD_End ();

View File

@ -275,10 +275,10 @@ void Lay_WriteStartOfPage (void)
"<img id=\"zoomImg\" src=\"%s/usr_bl.jpg\""
" alt=\"\" title=\"\""
" class=\"IMG_USR\" />"
"<div id=\"zoomTxt\" class=\"CM\">"
"</div>"
"</div>",
"<div id=\"zoomTxt\" class=\"CM\">",
Cfg_URL_ICON_PUBLIC);
HTM_DIV_End ();
HTM_DIV_End ();
break;
case Act_BRW_NEW_TAB:
case Act_BRW_2ND_TAB:
@ -402,18 +402,18 @@ static void Lay_WriteEndOfPage (void)
if (!Gbl.Layout.DivsEndWritten)
{
/***** End of central part of main zone *****/
fprintf (Gbl.F.Out,"</div>" // Canvas (main zone to output content of the current action)
"</div>" // Layout with horizontal or vertical menu
"</div>"); // main_zone_central_container
HTM_DIV_End (); // Canvas (main zone to output content of the current action)
HTM_DIV_End (); // Layout with horizontal or vertical menu
HTM_DIV_End (); // main_zone_central_container
/***** Write page footer *****/
if (Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB)
Lay_WriteFootFromHTMLFile ();
/***** End of main zone and page *****/
fprintf (Gbl.F.Out,"</div>" // main_zone_central
"</div>" // main_zone
"</div>\n"); // whole_page_* (box that contains the whole page except the foot)
HTM_DIV_End (); // main_zone_central
HTM_DIV_End (); // main_zone
HTM_DIV_End (); // whole_page_* (box that contains the whole page except the foot)
Gbl.Layout.DivsEndWritten = true;
}
@ -942,8 +942,8 @@ static void Lay_WritePageTopHeading (void)
Cfg_URL_ICON_PUBLIC,Cfg_PLATFORM_LOGO_SMALL_FILENAME,
Cfg_PLATFORM_SHORT_NAME,Cfg_PLATFORM_FULL_NAME,
Cfg_PLATFORM_LOGO_SMALL_WIDTH,Cfg_PLATFORM_LOGO_SMALL_HEIGHT);
fprintf (Gbl.F.Out,"</div>"
"<div id=\"head_row_1_logo_big\">");
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div id=\"head_row_1_logo_big\">");
Frm_LinkFormSubmit (Txt_System,NULL,NULL);
fprintf (Gbl.F.Out,"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\""
" class=\"CM\""
@ -952,20 +952,20 @@ static void Lay_WritePageTopHeading (void)
Cfg_URL_ICON_PUBLIC,Cfg_PLATFORM_LOGO_BIG_FILENAME,
Cfg_PLATFORM_SHORT_NAME,Cfg_PLATFORM_FULL_NAME,
Cfg_PLATFORM_LOGO_BIG_WIDTH,Cfg_PLATFORM_LOGO_BIG_HEIGHT);
fprintf (Gbl.F.Out,"</div>"
"<div id=\"head_row_1_tagline\">");
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div id=\"head_row_1_tagline\">");
Frm_LinkFormSubmit (Txt_TAGLINE,The_ClassTagline[Gbl.Prefs.Theme],NULL);
fprintf (Gbl.F.Out,"%s"
"</a>"
"</div>", // head_row_1_tagline
"</a>",
Txt_TAGLINE_BR);
HTM_DIV_End (); // head_row_1_tagline
/* End form to go to home page */
Frm_EndForm ();
Sch_PutFormToSearchInPageTopHeading ();
fprintf (Gbl.F.Out,"</div>"); // head_row_1_left
HTM_DIV_End (); // head_row_1_left
/* 1st. row, 3rd. column: logged user or language selection,
and link to open/close session */
@ -980,11 +980,11 @@ static void Lay_WritePageTopHeading (void)
Usr_PutFormLogOut ();
else
Usr_PutFormLogIn ();
fprintf (Gbl.F.Out,"</div>" // login_box
"</div>"); // head_row_1_right
HTM_DIV_End (); // login_box
HTM_DIV_End (); // head_row_1_right
/* End 1st. row */
fprintf (Gbl.F.Out,"</div>"); // head_row_1
HTM_DIV_End (); // head_row_1
/***** 2nd. row *****/
/* Start second row */
@ -995,22 +995,22 @@ static void Lay_WritePageTopHeading (void)
Clock with hour:minute (server hour is shown) */
fprintf (Gbl.F.Out,"<div id=\"head_row_2_time\">");
Dat_ShowClientLocalTime ();
fprintf (Gbl.F.Out,"</div>"); // End first column
HTM_DIV_End (); // End first column
/* 2nd. row, 2nd. column: degree and course */
fprintf (Gbl.F.Out,"<div id=\"head_row_2_hierarchy\">");
Lay_WriteBreadcrumb ();
Hie_WriteBigNameCtyInsCtrDegCrs ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/* 2nd. row, 3rd. column */
fprintf (Gbl.F.Out,"<div id=\"msg\">"); // Used for AJAX based refresh
if (Gbl.Usrs.Me.Logged)
Ntf_WriteNumberOfNewNtfs ();
fprintf (Gbl.F.Out,"</div>"); // Used for AJAX based refresh
HTM_DIV_End (); // Used for AJAX based refresh
/* End 2nd. row */
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** End header *****/
fprintf (Gbl.F.Out,"</header>");
@ -1046,18 +1046,22 @@ static void Lay_WriteTitleAction (void)
Act_GetIcon (Act_GetSuperAction (Gbl.Action.Act)));
/***** Title *****/
fprintf (Gbl.F.Out,"<div class=\"%s\">%s &gt; %s</div>",
fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s &gt; %s",
The_ClassTitleAction[Gbl.Prefs.Theme],
Txt_TABS_TXT[Act_GetTab (Gbl.Action.Act)],
Act_GetTitleAction (Gbl.Action.Act));
HTM_DIV_End ();
/***** Subtitle *****/
fprintf (Gbl.F.Out,"<div class=\"%s\">%s</div>",
fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s",
The_ClassSubtitleAction[Gbl.Prefs.Theme],
Act_GetSubtitleAction (Gbl.Action.Act));
HTM_DIV_End ();
/***** Container end *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -1082,12 +1086,12 @@ static void Lay_ShowLeftColumn (void)
else
/***** Institutional links *****/
Lnk_WriteMenuWithInstitutionalLinks ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Month *****/
fprintf (Gbl.F.Out,"<div class=\"LEFT_RIGHT_CELL\">");
Cal_DrawCurrentMonth ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Notices (yellow notes) *****/
if (Gbl.Hierarchy.Level == Hie_CRS)
@ -1095,10 +1099,10 @@ static void Lay_ShowLeftColumn (void)
fprintf (Gbl.F.Out,"<div class=\"LEFT_RIGHT_CELL\">");
Not_ShowNotices (Not_LIST_BRIEF_NOTICES,
-1L); // No notice highlighted
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -1120,7 +1124,7 @@ static void Lay_ShowRightColumn (void)
fprintf (Gbl.F.Out,"<div id=\"globalconnected\"" // Used for AJAX based refresh
" class=\"LEFT_RIGHT_CELL\">");
Con_ShowGlobalConnectedUsrs ();
fprintf (Gbl.F.Out,"</div>"); // Used for AJAX based refresh
HTM_DIV_End (); // Used for AJAX based refresh
}
/***** Number of connected users in the current course *****/
@ -1130,7 +1134,7 @@ static void Lay_ShowRightColumn (void)
" class=\"LEFT_RIGHT_CELL\">");
Gbl.Scope.Current = Hie_CRS;
Con_ShowConnectedUsrsBelongingToCurrentCrs ();
fprintf (Gbl.F.Out,"</div>"); // Used for AJAX based refresh
HTM_DIV_End (); // Used for AJAX based refresh
}
else if (Gbl.Usrs.Me.Logged) // I am logged
{
@ -1152,10 +1156,11 @@ static void Lay_ShowRightColumn (void)
" (NOW(),'Fol_SuggestUsrsToFollowMainZoneOnRightColumn: %ld us')",
tv_usecs);
*/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
if (!Gbl.Usrs.Me.Logged)
{
/***** SWADroid advertisement *****/
fprintf (Gbl.F.Out,"<div class=\"LEFT_RIGHT_CELL\">"
"<a href=\"https://play.google.com/store/apps/details?id=es.ugr.swad.swadroid\""
@ -1163,10 +1168,11 @@ static void Lay_ShowRightColumn (void)
"<img src=\"%s/SWADroid120x200.png\""
" alt=\"SWADroid\" title=\"SWADroid\""
" style=\"width:150px; height:250px;\" />"
"</a>"
"</div>",
"</a>",
Txt_If_you_have_an_Android_device_try_SWADroid,
Cfg_URL_ICON_PUBLIC);
HTM_DIV_End ();
}
}
/*****************************************************************************/
@ -1304,8 +1310,8 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction,
Text);
/***** End label and container *****/
fprintf (Gbl.F.Out,"</label>"
"</div>");
fprintf (Gbl.F.Out,"</label>");
HTM_DIV_End ();
/***** End form *****/
Frm_EndForm ();
@ -1467,21 +1473,23 @@ static void Lay_WriteAboutZone (void)
"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
" style=\"width:%upx; height:%upx;\" />"
"<div>%s</div>"
"</a>",
"<div>"
"%s",
Cfg_ABOUT_URL,
Cfg_URL_ICON_PUBLIC,Cfg_ABOUT_LOGO,
Cfg_ABOUT_NAME,Cfg_ABOUT_NAME,
Cfg_ABOUT_LOGO_WIDTH,Cfg_ABOUT_LOGO_HEIGHT,
Cfg_ABOUT_NAME);
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</a>");
/***** Questions and problems *****/
fprintf (Gbl.F.Out,"<div>"
"%s: "
"<a href=\"mailto:%s\" class=\"ABOUT\" target=\"_blank\">%s</a>"
"</div>",
"<a href=\"mailto:%s\" class=\"ABOUT\" target=\"_blank\">%s</a>",
Txt_Questions_and_problems,
Cfg_PLATFORM_RESPONSIBLE_EMAIL,Cfg_PLATFORM_RESPONSIBLE_EMAIL);
HTM_DIV_End ();
/***** About and time to generate and send page *****/
fprintf (Gbl.F.Out,"<div>");
@ -1496,7 +1504,7 @@ static void Lay_WriteAboutZone (void)
/* Time to generate and send page */
Sta_WriteTimeToGenerateAndSendPage ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** End about zone *****/
fprintf (Gbl.F.Out,"</address>"); // about_zone
@ -1733,7 +1741,7 @@ void Lay_AdvertisementMobile (void)
/***** End table and box *****/
Box_EndBoxTable ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
}
@ -1799,11 +1807,11 @@ static void Lay_HelpTextEditor (const char *Text,const char *InlineMath,const ch
" "
"%s: <code>%s</code>"
" "
"%s: <code>%s</code>"
"</div>",
"%s: <code>%s</code>",
Txt_Text,Text,
Txt_Inline_math,InlineMath,
Txt_Equation_centered,Equation);
HTM_DIV_End ();
}
/*****************************************************************************/

View File

@ -172,7 +172,7 @@ void Lnk_WriteMenuWithInstitutionalLinks (void)
Frm_EndForm ();
Lnk_WriteListOfLinks ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/***** Free list of links *****/

View File

@ -31,6 +31,7 @@
#include "swad_box.h"
#include "swad_form.h"
#include "swad_global.h"
#include "swad_HTML.h"
#include "swad_scope.h"
#include "swad_theme.h"
@ -281,7 +282,7 @@ void Log_RequestLogo (Hie_Level_t Scope)
Lay_PutContextualLinkIconText (ActionRem,NULL,NULL,
"trash.svg",
Txt_Remove_logo);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/***** Begin form to upload logo *****/

View File

@ -975,19 +975,19 @@ static void Mai_ListEmails (void)
Usr_UsrDataDestructor (&UsrDat);
/***** End list with users' email addresses *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Show a message with the number of users with email ****/
fprintf (Gbl.F.Out,"<div class=\"DAT CM\">");
fprintf (Gbl.F.Out,Txt_X_users_who_have_email,
NumUsrsWithEmail);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Show a message with the number of users who have accepted and have email ****/
fprintf (Gbl.F.Out,"<div class=\"DAT CM\">");
fprintf (Gbl.F.Out,Txt_X_users_who_have_accepted_and_who_have_email,
NumAcceptedUsrsWithEmail);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Icon to open the client email program *****/
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"
@ -1001,8 +1001,8 @@ static void Mai_ListEmails (void)
The_ClassFormOutBoxBold[Gbl.Prefs.Theme]);
Ico_PutIconTextLink ("marker.svg",
Txt_Create_email_message);
fprintf (Gbl.F.Out,"</a>"
"</div>");
fprintf (Gbl.F.Out,"</a>");
HTM_DIV_End ();
/***** End the box used to list the emails *****/
Box_EndBox ();

View File

@ -641,7 +641,7 @@ static void Mch_GetAndWriteNamesOfGrpsAssociatedToMatch (const struct Match *Mat
fprintf (Gbl.F.Out,"%s %s",
Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
@ -672,9 +672,13 @@ static void Mch_ListOneOrMoreMatchesStatus (const struct Match *Match,unsigned N
HTM_TD_Begin ("class=\"DAT CT COLOR%u\"",Gbl.RowEvenOdd);
if (Match->Status.QstInd < Mch_AFTER_LAST_QUESTION) // Unfinished match
{
/* Current question index / total of questions */
fprintf (Gbl.F.Out,"<div class=\"DAT\">%u/%u</div>",
fprintf (Gbl.F.Out,"<div class=\"DAT\">"
"%u/%u",
Match->Status.QstInd,NumQsts);
HTM_DIV_End ();
}
switch (Gbl.Usrs.Me.Role.Logged)
{
@ -1349,7 +1353,7 @@ void Mch_ResumeMatch (void)
/***** Show current match status *****/
fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">");
Mch_ShowMatchStatusForTch (&Match);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -1782,7 +1786,7 @@ void Mch_PlayPauseMatch (void)
/***** Show current match status *****/
fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">");
Mch_ShowMatchStatusForTch (&Match);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -1815,7 +1819,7 @@ void Mch_ChangeNumColsMch (void)
/***** Show current match status *****/
fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">");
Mch_ShowMatchStatusForTch (&Match);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -1847,7 +1851,7 @@ void Mch_ToggleVisibilResultsMchQst (void)
/***** Show current match status *****/
fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">");
Mch_ShowMatchStatusForTch (&Match);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -1876,7 +1880,7 @@ void Mch_BackMatch (void)
/***** Show current match status *****/
fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">");
Mch_ShowMatchStatusForTch (&Match);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -1905,7 +1909,7 @@ void Mch_ForwardMatch (void)
/***** Show current match status *****/
fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">");
Mch_ShowMatchStatusForTch (&Match);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -2112,7 +2116,7 @@ static void Mch_ShowLeftColumnTch (struct Match *Match)
fprintf (Gbl.F.Out,"<div id=\"match_left\""
" class=\"MCH_REFRESHABLE_TEACHER\">");
Mch_ShowRefreshablePartTch (Match);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Buttons *****/
Mch_PutMatchControlButtons (Match);
@ -2128,7 +2132,7 @@ static void Mch_ShowLeftColumnTch (struct Match *Match)
// Mch_PutCheckboxResult (Match);
/***** End left container *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
static void Mch_ShowRefreshablePartTch (struct Match *Match)
@ -2144,7 +2148,7 @@ static void Mch_ShowRefreshablePartTch (struct Match *Match)
Mch_GetElapsedTimeInMatch (Match,&Time);
Dat_WriteHoursMinutesSeconds (&Time);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Write number of question *****/
Mch_ShowNumQstInMatch (Match);
@ -2159,7 +2163,7 @@ static void Mch_ShowRefreshablePartTch (struct Match *Match)
}
else
fprintf (Gbl.F.Out,"-");
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Number of users who have answered this question *****/
NumAnswerersQst = Mch_GetNumUsrsWhoHaveAnswerQst (Match->MchCod,
@ -2182,8 +2186,8 @@ static void Mch_ShowRefreshablePartTch (struct Match *Match)
fprintf (Gbl.F.Out,"/%u",
Match->Status.NumPlayers);
}
fprintf (Gbl.F.Out,"</strong>"
"</div>");
fprintf (Gbl.F.Out,"</strong>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -2205,7 +2209,7 @@ static void Mch_ShowRightColumnTch (struct Match *Match)
Mch_ShowMatchScore (Match);
/***** End right container *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -2218,13 +2222,14 @@ static void Mch_ShowLeftColumnStd (struct Match *Match)
fprintf (Gbl.F.Out,"<div class=\"MCH_LEFT\">");
/***** Top *****/
fprintf (Gbl.F.Out,"<div class=\"MCH_TOP\"></div>");
fprintf (Gbl.F.Out,"<div class=\"MCH_TOP\">");
HTM_DIV_End ();
/***** Write number of question *****/
Mch_ShowNumQstInMatch (Match);
/***** End left container *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -2254,14 +2259,14 @@ static void Mch_ShowRightColumnStd (struct Match *Match)
/* Show current question and possible answers */
Mch_ShowQuestionAndAnswersStd (Match);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
}
else // Not being played
Mch_ShowWaitImage (Txt_Please_wait_);
/***** End right container *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -2281,7 +2286,7 @@ static void Mch_ShowNumQstInMatch (struct Match *Match)
fprintf (Gbl.F.Out,"%s",Txt_MATCH_End);
else
fprintf (Gbl.F.Out,"%u/%u",Match->Status.QstInd,NumQsts);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -2308,7 +2313,7 @@ static void Mch_PutMatchControlButtons (struct Match *Match)
/* Put button to go back */
Mch_PutBigButton (ActBckMch,"backward",Match->MchCod,
Mch_ICON_PREVIOUS,Txt_Go_back);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Center button *****/
fprintf (Gbl.F.Out,"<div class=\"MCH_BUTTON_CENTER_CONTAINER\">");
@ -2327,7 +2332,7 @@ static void Mch_PutMatchControlButtons (struct Match *Match)
/* Put disabled button to play match */
Mch_PutBigButtonOff (Mch_ICON_PLAY);
}
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Right button *****/
fprintf (Gbl.F.Out,"<div class=\"MCH_BUTTON_RIGHT_CONTAINER\">");
@ -2338,10 +2343,10 @@ static void Mch_PutMatchControlButtons (struct Match *Match)
/* Put button to show answers */
Mch_PutBigButton (ActFwdMch,"forward",Match->MchCod,
Mch_ICON_NEXT,Txt_Go_forward);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** End buttons container *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -2386,7 +2391,7 @@ static void Mch_ShowFormColumns (struct Match *Match)
/***** End form *****/
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/***** End selector *****/
@ -2426,7 +2431,7 @@ static void Mch_ShowFormViewResult (struct Match *Match)
Frm_EndForm ();
/***** End selector *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
Set_EndOneSettingSelector ();
}
@ -2437,7 +2442,10 @@ static void Mch_ShowFormViewResult (struct Match *Match)
static void Mch_ShowMatchTitle (struct Match *Match)
{
/***** Match title *****/
fprintf (Gbl.F.Out,"<div class=\"MCH_TOP\">%s</div>",Match->Title);
fprintf (Gbl.F.Out,"<div class=\"MCH_TOP\">"
"%s",
Match->Title);
HTM_DIV_End ();
}
/*****************************************************************************/
@ -2514,7 +2522,7 @@ static void Mch_ShowQuestionAndAnswersTch (struct Match *Match)
break;
}
fprintf (Gbl.F.Out,"</div>"); // Bottom
HTM_DIV_End (); // Bottom
}
/*****************************************************************************/
@ -2866,11 +2874,11 @@ static void Mch_PutBigButton (Act_Action_t NextAction,const char *Id,
" onclick=\"document.getElementById('%s').submit();"
" return false;\">"
"<i class=\"%s\"></i>"
"</a>"
"</div>",
"</a>",
Txt,
Id,
Icon);
HTM_DIV_End ();
/***** End form *****/
Frm_EndForm ();
@ -2881,10 +2889,10 @@ static void Mch_PutBigButtonOff (const char *Icon)
/***** Put inactive icon *****/
fprintf (Gbl.F.Out,"<div class=\"MCH_BUTTON_CONTAINER\">"
"<div class=\"MCH_BUTTON_OFF\">"
"<i class=\"%s\"></i>"
"</div>"
"</div>",
"<i class=\"%s\"></i>",
Icon);
HTM_DIV_End ();
HTM_DIV_End ();
}
static void Mch_PutBigButtonClose (void)
@ -2897,9 +2905,9 @@ static void Mch_PutBigButtonClose (void)
" onclick=\"window.close();"
" return false;\"\">"
"<i class=\"%s\"></i>"
"</a>"
"</div>",
"</a>",
Txt_Close,Mch_ICON_CLOSE);
HTM_DIV_End ();
}
/*****************************************************************************/
@ -2911,11 +2919,11 @@ static void Mch_ShowWaitImage (const char *Txt)
fprintf (Gbl.F.Out,"<div class=\"MCH_WAIT_CONTAINER\">"
"<img src=\"%s/wait.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"MCH_WAIT_IMG\" />"
"</div>",
" class=\"MCH_WAIT_IMG\" />",
Cfg_URL_ICON_PUBLIC,
Txt,
Txt);
HTM_DIV_End ();
}
/*****************************************************************************/
@ -3014,7 +3022,7 @@ void Mch_JoinMatchAsStd (void)
/***** Show current match status *****/
fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">");
Mch_ShowMatchStatusForStd (&Match);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -3219,7 +3227,7 @@ void Mch_ReceiveQuestionAnswer (void)
/***** Show current match status *****/
fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">");
Mch_ShowMatchStatusForStd (&Match);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -3372,7 +3380,7 @@ static void Mch_DrawBarNumUsrs (unsigned NumAnswerersAns,unsigned NumAnswerersQs
fprintf (Gbl.F.Out,"%s",Gbl.Title);
/***** End container *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/

View File

@ -97,7 +97,7 @@ void McR_PutFormToViewMchResults (Act_Action_t Action)
Lay_PutContextualLinkIconText (Action,NULL,NULL,
"tasks.svg",
Txt_Results);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/

View File

@ -40,10 +40,11 @@
#include "swad_config.h"
#include "swad_cookie.h"
#include "swad_database.h"
#include "swad_global.h"
#include "swad_file.h"
#include "swad_file_browser.h"
#include "swad_form.h"
#include "swad_global.h"
#include "swad_HTML.h"
#include "swad_media.h"
/*****************************************************************************/
@ -359,11 +360,11 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
"<img src=\"%s/paperclip.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO_HIGHLIGHT ICOx16\" />"
"</a>"
"</div>", // <id>_med_ico
"</a>",
Id,Id,
Cfg_URL_ICON_PUBLIC,
Txt_Multimedia,Txt_Multimedia);
HTM_DIV_End (); // <id>_med_ico
/***** Start media uploader *****/
fprintf (Gbl.F.Out,"<div id=\"%s_med_upl\"" // container <id>_med_upl
@ -401,8 +402,8 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
"Embed");
/* End icons */
fprintf (Gbl.F.Out,"</div>" // icons container
"</div>"); // icons containers
HTM_DIV_End (); // icons container
HTM_DIV_End (); // icons containers
/***** Hidden field with form type *****/
/* Upload file */
@ -423,11 +424,11 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
"<input id=\"%s_fil\" type=\"file\"" // <id>_fil
" name=\"%s\" accept=\"image/,video/\""
" class=\"%s\" disabled=\"disabled\""
" style=\"display:none;\" />"
"</div>", // <id>_fil
" style=\"display:none;\" />",
Id,
ParamUploadMedia.File,
ClassInput);
HTM_DIV_End (); // <id>_fil
/***** Media URL *****/
fprintf (Gbl.F.Out,"<div>"
@ -435,11 +436,11 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
" name=\"%s\" placeholder=\"%s\""
" class=\"%s\" maxlength=\"%u\" value=\"\""
" disabled=\"disabled\""
" style=\"display:none;\" />"
"</div>", // <id>_url
" style=\"display:none;\" />",
Id,
ParamUploadMedia.URL,Txt_Link,
ClassInput,Cns_MAX_CHARS_WWW);
HTM_DIV_End (); // <id>_url
/***** Media title *****/
fprintf (Gbl.F.Out,"<div>"
@ -447,20 +448,20 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
" name=\"%s\" placeholder=\"%s\""
" class=\"%s\" maxlength=\"%u\" value=\"\""
" disabled=\"disabled\""
" style=\"display:none;\" />"
"</div>", // <id>_tit
" style=\"display:none;\" />",
Id,
ParamUploadMedia.Title,Txt_Title_attribution,
ClassInput,Med_MAX_CHARS_TITLE);
HTM_DIV_End (); // <id>_tit
/***** End box *****/
Box_EndBox ();
/***** End media uploader *****/
fprintf (Gbl.F.Out,"</div>"); // container <id>_med_upl
HTM_DIV_End (); // container <id>_med_upl
/***** End media uploader container *****/
fprintf (Gbl.F.Out,"</div>"); // container
HTM_DIV_End (); // container
}
/*****************************************************************************/
@ -478,11 +479,11 @@ static void Med_PutIconMediaUploader (const char UniqueId[Frm_MAX_BYTES_ID + 1],
"<a href=\"\" onclick=\"%s('%s');return false;\">"
"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\""
" class=\"ICO_HIGHLIGHT ICOx16\" />"
"</a>"
"</div>", // <id>_IdSuffix
"</a>",
UniqueId,IdSuffix,
FunctionName,UniqueId,
Cfg_URL_ICON_PUBLIC,Icon,Title,Title);
HTM_DIV_End (); // <id>_IdSuffix
}
/*****************************************************************************/
@ -1510,7 +1511,7 @@ void Med_ShowMedia (struct Media *Media,
}
/***** End media container *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -1642,7 +1643,7 @@ static void Med_ShowGIF (struct Media *Media,
"GIF"
"</span>");
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
else
fprintf (Gbl.F.Out,"%s",Txt_File_not_found);
@ -1734,8 +1735,8 @@ static void Med_ShowYoutube (struct Media *Media,const char *ClassMedia)
if (Media->Title[0])
fprintf (Gbl.F.Out," title=\"%s\"",Media->Title);
fprintf (Gbl.F.Out,">"
"</iframe>"
"</div>");
"</iframe>");
HTM_DIV_End ();
}
else
/***** Alert to inform about third party cookies *****/
@ -1773,8 +1774,8 @@ static void Med_ShowEmbed (struct Media *Media,const char *ClassMedia)
if (Media->Title[0])
fprintf (Gbl.F.Out," title=\"%s\"",Media->Title);
fprintf (Gbl.F.Out,">"
"</iframe>"
"</div>");
"</iframe>");
HTM_DIV_End ();
}
else
/***** Alert to inform about third party cookies *****/

View File

@ -31,6 +31,7 @@
#include "swad_database.h"
#include "swad_form.h"
#include "swad_global.h"
#include "swad_HTML.h"
#include "swad_layout.h"
#include "swad_menu.h"
#include "swad_parameter.h"
@ -375,18 +376,18 @@ void Mnu_WriteMenuThisTab (void)
/***** Text *****/
fprintf (Gbl.F.Out,"<div class=\"MENU_TEXT %s\">"
"%s"
"</div>",
"%s",
The_ClassTxtMenu[Gbl.Prefs.Theme],
Txt_MENU_TITLE[Gbl.Action.Tab][NumOptInMenu]);
HTM_DIV_End ();
/***** End link and form *****/
fprintf (Gbl.F.Out,"</div>"
"</a>");
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</a>");
Frm_EndForm ();
/***** End container used to highlight this option *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** End element *****/
fprintf (Gbl.F.Out,"</li>");
@ -424,7 +425,7 @@ void Mnu_PutIconsToSelectMenu (void)
Par_PutHiddenParamUnsigned ("Menu",(unsigned) Menu);
Ico_PutSettingIconLink (Mnu_MenuIcons[Menu],Txt_MENU_NAMES[Menu]);
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
Set_EndOneSettingSelector ();
Set_EndSettingsHead ();

View File

@ -370,7 +370,7 @@ static void Msg_PutLinkToShowMorePotentialRecipients (void)
"users.svg",
Txt_Show_more_recipients,
"CopyMessageToHiddenFields();");
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -446,13 +446,15 @@ static void Msg_ShowOneUniqueRecipient (void)
Gbl.Usrs.Other.UsrDat.Accepted ? "DAT_SMALL_NOBR_N" :
"DAT_SMALL_NOBR");
ID_WriteUsrIDs (&Gbl.Usrs.Other.UsrDat,NULL);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Write user's name *****/
fprintf (Gbl.F.Out,"<div class=\"MSG_TO_ONE_RCP %s\">%s</div>",
fprintf (Gbl.F.Out,"<div class=\"MSG_TO_ONE_RCP %s\">"
"%s",
Gbl.Usrs.Other.UsrDat.Accepted ? "DAT_SMALL_NOBR_N" :
"DAT_SMALL_NOBR",
Gbl.Usrs.Other.UsrDat.FullName);
HTM_DIV_End ();
/***** Hidden parameter with user's nickname *****/
Msg_PutHiddenParamAnotherRecipient (&Gbl.Usrs.Other.UsrDat);
@ -1666,7 +1668,7 @@ void Msg_ShowRecMsgs (void)
{
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Msg_PutLinkToViewBannedUsers ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/***** Show the received messages *****/
@ -1762,7 +1764,7 @@ static void Msg_ShowSentOrReceivedMessages (void)
Msg_ShowFormSelectCourseSentOrRecMsgs ();
if (Gbl.Msg.TypeOfMessages == Msg_MESSAGES_RECEIVED)
Msg_ShowFormToShowOnlyUnreadMessages ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
Msg_ShowFormToFilterMsgs ();
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
@ -1770,7 +1772,7 @@ static void Msg_ShowSentOrReceivedMessages (void)
The_ClassFormInBoxBold[Gbl.Prefs.Theme],
NULL);
Ico_PutCalculateIconWithText (Txt_Update_messages);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
Frm_EndForm ();
@ -3230,7 +3232,7 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled,const char *BgColor
HTM_TD_Begin ("class=\"LT\"");
fprintf (Gbl.F.Out,"<div class=\"AUTHOR_2_LINES\">"); // Limited width
Usr_WriteFirstNameBRSurnames (UsrDat);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
else
{
@ -3280,10 +3282,12 @@ bool Msg_WriteCrsOrgMsg (long CrsCod)
{
ThereIsOrgCrs = true;
if ((FromThisCrs = (CrsCod == Gbl.Hierarchy.Crs.CrsCod))) // Message sent from current course
fprintf (Gbl.F.Out,"<div class=\"AUTHOR_TXT\">"
"(%s)"
"</div>",
Txt_from_this_course);
{
fprintf (Gbl.F.Out,"<div class=\"AUTHOR_TXT\">"
"(%s)",
Txt_from_this_course);
HTM_DIV_End ();
}
else // Message sent from another course
{
/* Write course, including link */
@ -3295,18 +3299,20 @@ bool Msg_WriteCrsOrgMsg (long CrsCod)
Txt_Go_to_X,
Crs.FullName);
Frm_LinkFormSubmit (Gbl.Title,"AUTHOR_TXT",NULL);
fprintf (Gbl.F.Out,"%s</a>)"
"</div>",
fprintf (Gbl.F.Out,"%s</a>)",
Crs.ShrtName);
HTM_DIV_End ();
Frm_EndForm ();
}
}
}
if (!ThereIsOrgCrs) // It's an old message without origin source specified, or is a message sent from none course
{
fprintf (Gbl.F.Out,"<div class=\"AUTHOR_TXT\">"
"(%s)"
"</div>",
"(%s)",
Txt_no_course_of_origin);
HTM_DIV_End ();
}
return FromThisCrs;
}

View File

@ -240,7 +240,7 @@ void Net_ShowWebsAndSocialNets (const struct UsrData *UsrDat)
}
/***** End container *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -257,11 +257,11 @@ static void Net_ShowAWebOrSocialNet (const char *URL,
"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />"
"</a>"
"</div>",
"</a>",
URL,Title,
Cfg_URL_ICON_PUBLIC,Icon,
Title,Title);
HTM_DIV_End ();
}
/*****************************************************************************/

View File

@ -36,6 +36,7 @@
#include "swad_database.h"
#include "swad_form.h"
#include "swad_global.h"
#include "swad_HTML.h"
#include "swad_notice.h"
#include "swad_notification.h"
#include "swad_parameter.h"
@ -475,9 +476,9 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing,long HighlightNotCod)
"<img src=\"%s/rss-square.svg\""
" alt=\"RSS\" title=\"RSS\""
" class=\"ICO16x16\" />"
"</a>"
"</div>",
"</a>",
Cfg_URL_ICON_PUBLIC);
HTM_DIV_End ();
break;
case Not_LIST_FULL_NOTICES:
/***** Button to add new notice *****/
@ -703,15 +704,18 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
"writeLocalDateHMSFromUTC('not_date_%u',%ld,"
"%u,'<br />','%s',true,false,0x6);"
"</script>"
"</div>",
"</script>",
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,"<div class=\"NOTICE_TEXT_BRIEF\">%s</div>",Content);
fprintf (Gbl.F.Out,"<div class=\"NOTICE_TEXT_BRIEF\">"
"%s",
Content);
HTM_DIV_End ();
/* Put form to view full notice */
fprintf (Gbl.F.Out,"<div class=\"CM\">");
@ -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,"</div>");
HTM_DIV_End ();
}
else
fprintf (Gbl.F.Out,"<div class=\"%s\">%s</div>",
{
fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s",
TextClass[Status],Content);
HTM_DIV_End ();
}
/***** Write the author *****/
fprintf (Gbl.F.Out,"<div class=\"NOTICE_AUTHOR %s\">", // 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,"</div>");
HTM_DIV_End ();
/***** End yellow note *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** End article for this notice *****/
if (TypeNoticesListing == Not_LIST_FULL_NOTICES)
{
if (Highlight)
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
Lay_EndArticle ();
}

View File

@ -380,7 +380,7 @@ void Ntf_ShowMyNotifications (void)
"envelope.svg",
Txt_Domains);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Start box *****/
Box_StartBox (NULL,Txt_Notifications,Ntf_PutIconsNotif,

View File

@ -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,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -253,7 +254,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
}
else
fprintf (Gbl.F.Out,"</span>");
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/***** Links to several pages start here *****/

View File

@ -899,13 +899,13 @@ void Pwd_AskForConfirmationOnDangerousAction (void)
"<input type=\"password\" name=\"OthUsrPwd\""
" size=\"16\" maxlength=\"%u\""
" autocomplete=\"off\" required=\"required\" />"
"</label>"
"</div>",
"</label>",
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 ();
}
/*****************************************************************************/

View File

@ -787,11 +787,11 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr
fprintf (Gbl.F.Out,"<div class=\"TIT CM\">"
"<img src=\"%s/%s_map.jpg\""
" usemap=\"#faces_map\""
" alt=\"%s\" title=\"%s\" />"
"</div>",
" 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,"<div class=\"ZOOM_TXT_LINE DAT_N_BOLD\">"); // Limited width
Usr_WriteFirstNameBRSurnames (UsrDat);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/* Nickname */
if (UsrDat->Nickname[0])
{
fprintf (Gbl.F.Out,"<div class=\"ZOOM_TXT_LINE DAT_SMALL_N\">"
"@%s"
"</div>",
"@%s",
UsrDat->Nickname);
HTM_DIV_End ();
}
/* Institution full name and institution country */
if (UsrDat->InsCod > 0)
{
fprintf (Gbl.F.Out,"<div class=\"ZOOM_TXT_LINE DAT_SMALL\">");
Ins_WriteInstitutionNameAndCty (UsrDat->InsCod);
fprintf (Gbl.F.Out,"</div>");
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,"<div class=\"ZOOM_TXT_LINE DAT_SMALL\">");
Cty_WriteCountryName (UsrDat->CtyCod,
NULL); // Don't put link to country
fprintf (Gbl.F.Out,"</div>");
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,"<div class=\"ZOOM_TXT_LINE DAT_SMALL\">"
"<div class=\"ZOOM_DEG\""
" style=\"background-image:url('%s/%s');\">"
"%s"
"</div>"
"</div>",
"%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,
"<span class=\"DAT_N_BOLD\">%u</span>"
"<span class=\"DAT_SMALL\">&nbsp;%s&nbsp;</span>"
"<span class=\"DAT_N_BOLD\">%u</span>"
"<span class=\"DAT_SMALL\">&nbsp;%s</span>"
"</div>",
"<span class=\"DAT_SMALL\">&nbsp;%s</span>",
NumFollowing,Txt_Following,
NumFollowers,Txt_Followers);
HTM_DIV_End ();
}
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/***** Start image *****/
@ -2053,7 +2056,7 @@ static void Pho_PutLinkToCalculateDegreeStats (void)
/***** End selector, form and div *****/
fprintf (Gbl.F.Out,"</select>");
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
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,"<div id=\"%s\" class=\"NOT_SHOWN\">"
"<div class=\"ZOOM_TXT_LINE DAT_N\">"
"%s"
"</div>"
"</div>",
"%s",
IdCaption,PhotoCaption);
HTM_DIV_End ();
HTM_DIV_End ();
}
}
}
@ -2520,13 +2523,13 @@ static void Pho_ShowDegreeAvgPhotoAndStat (struct Degree *Deg,
"%s<br />"
"%d&nbsp;%s<br />"
"%d&nbsp;%s<br />"
"(%d%%)"
"</div>",
"(%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,"</a>");

View File

@ -191,7 +191,7 @@ void Prf_RequestUserProfile (void)
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Prf_PutLinkMyPublicProfile ();
Fol_PutLinkWhoToFollow ();
fprintf (Gbl.F.Out,"</div>");
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,"</div>");
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,"</ul>"
"</div>");
fprintf (Gbl.F.Out,"</ul>");
HTM_DIV_End ();
/***** Right list *****/
fprintf (Gbl.F.Out,"<div class=\"PRF_FIG_RIGHT_CONTAINER\">");
@ -451,7 +451,7 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
fprintf (Gbl.F.Out,"</ul>");
}
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -1783,8 +1783,8 @@ static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank)
fprintf (Gbl.F.Out,"<div class=\"RANK_USR\">"); // Limited width
Frm_LinkFormSubmit (Txt_Another_user_s_profile,"DAT_SMALL",NULL);
Usr_WriteFirstNameBRSurnames (UsrDat);
fprintf (Gbl.F.Out,"</a>"
"</div>");
fprintf (Gbl.F.Out,"</a>");
HTM_DIV_End ();
Frm_EndForm ();
}
HTM_TD_End ();

View File

@ -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,"</div>");
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,"</div>");
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,"</div>");
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,"</div>");
HTM_DIV_End ();
}
Set_EndOneSettingSelector ();
}
@ -589,7 +589,7 @@ static void Prj_ShowFormToFilterByDpt (void)
/***** End form *****/
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
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,"<div id=\"prj_lck_%ld\">",Prj->PrjCod);
Prj_FormLockUnlock (Prj);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
else
/* Put icon toinform about locked/unlocked project edition */

View File

@ -983,7 +983,7 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView)
Usr_PutHiddenParSelectedUsrsCods ();
Rec_ShowLinkToPrintPreviewOfRecords ();
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
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,"<div class=\"REC_LEFT\">");
Rec_ShowSharedUsrRecord (TypeOfView,&UsrDat,RecordSectionId);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/* End container for this user */
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
Lay_EndSection ();
NumUsr++;
@ -1083,7 +1083,7 @@ static void Rec_ShowRecordOneStdCrs (void)
Rec_ShowLinkToPrintPreviewOfRecords ();
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
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,"<div class=\"REC_LEFT\">");
Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Other.UsrDat,NULL);
fprintf (Gbl.F.Out,"</div>");
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,"<div class=\"REC_RIGHT\">");
Rec_ShowCrsRecord (Rec_CRS_MY_RECORD_AS_STUDENT_FORM,&Gbl.Usrs.Other.UsrDat,NULL);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
break;
case Rol_NET:
@ -1115,7 +1115,7 @@ static void Rec_ShowRecordOneStdCrs (void)
case Rol_SYS_ADM:
fprintf (Gbl.F.Out,"<div class=\"REC_RIGHT\">");
Rec_ShowCrsRecord (Rec_CRS_LIST_ONE_RECORD,&Gbl.Usrs.Other.UsrDat,NULL);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
break;
default:
break;
@ -1123,7 +1123,7 @@ static void Rec_ShowRecordOneStdCrs (void)
}
/***** End container for this user *****/
fprintf (Gbl.F.Out,"</div>");
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,"</div>");
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,"<div class=\"REC_LEFT\">");
Rec_ShowSharedUsrRecord (ShaTypeOfView,&UsrDat,RecordSectionId);
fprintf (Gbl.F.Out,"</div>");
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,"<div class=\"REC_RIGHT\">");
Rec_ShowCrsRecord (CrsTypeOfView,&UsrDat,RecordSectionId);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
}
/* End container for this user */
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
Lay_EndSection ();
NumUsr++;
@ -1315,7 +1315,7 @@ static void Rec_ShowRecordOneTchCrs (void)
Rec_ShowLinkToPrintPreviewOfRecords ();
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Start container for this user *****/
fprintf (Gbl.F.Out,"<div class=\"REC_USR\">");
@ -1323,7 +1323,7 @@ static void Rec_ShowRecordOneTchCrs (void)
/***** Shared record *****/
fprintf (Gbl.F.Out,"<div class=\"REC_LEFT\">");
Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Other.UsrDat,NULL);
fprintf (Gbl.F.Out,"</div>");
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,"</div>");
HTM_DIV_End ();
}
/***** Start container for this user *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -1404,7 +1404,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
Rec_ShowLinkToPrintPreviewOfRecords ();
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
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,"<div class=\"REC_LEFT\">");
Rec_ShowSharedUsrRecord (TypeOfView,&UsrDat,RecordSectionId);
fprintf (Gbl.F.Out,"</div>");
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,"</div>");
HTM_DIV_End ();
}
/* End container for this user */
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
Lay_EndSection ();
NumUsr++;
@ -2106,7 +2106,7 @@ void Rec_ShowSharedRecordUnmodifiable (struct UsrData *UsrDat)
/***** Show user's record *****/
fprintf (Gbl.F.Out,"<div class=\"CM\">");
Rec_ShowSharedUsrRecord (Rec_SHA_OTHER_USR_CHECK,UsrDat,NULL);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -2631,7 +2631,7 @@ static void Rec_PutIconsCommands (void)
Acc_PutIconToChangeUsrAccount ();
/***** End container *****/
fprintf (Gbl.F.Out,"</div>");
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,"</div>");
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,"</div>");
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,"</div>");
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,"<div class=\"CM\">"
"<a class=\"TIT\" href=\"%s/\" target=\"_blank\">%s</a>"
"</div>",
"<a class=\"TIT\" href=\"%s/\" target=\"_blank\">%s</a>",
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,"</div>");
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,"</div>");
HTM_DIV_End ();
/***** End container *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Data protection clause *****/
Rec_WriteLinkToDataProtectionClause ();

View File

@ -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)
"<img src=\"%s/file-alt.svg\" alt=\"%s\""
" class=\"ICO64x64\" /><br />"
"%s"
"</a>"
"</div>",
"</a>",
Report->Permalink,
Txt_Report,
Cfg_URL_ICON_PUBLIC,
Txt_Report,
Report->FilenameReport);
fprintf (Gbl.F.Out,"<div class=\"DAT_LIGHT\">%s</div>",
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"DAT_LIGHT\">"
"%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,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/

View File

@ -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,"</label>"
"</div>");
fprintf (Gbl.F.Out,"</label>");
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,"</div>");
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,"</div>"); // head_row_1_search
HTM_DIV_End (); // head_row_1_search
}
/*****************************************************************************/

View File

@ -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,"<div class=\"FRAME_INLINE\">");
Lan_PutBoxToSelectLanguage (); // 1. Language
fprintf (Gbl.F.Out,"</div>"
"<div class=\"FRAME_INLINE\">");
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"FRAME_INLINE\">");
Cal_PutIconsToSelectFirstDayOfWeek (); // 2. First day of week
fprintf (Gbl.F.Out,"</div>"
"<div class=\"FRAME_INLINE\">");
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"FRAME_INLINE\">");
Dat_PutBoxToSelectDateFormat (); // 3. Date format
fprintf (Gbl.F.Out,"</div>");
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,"<div class=\"FRAME_INLINE\">");
Ico_PutIconsToSelectIconSet (); // 4. Icon set
fprintf (Gbl.F.Out,"</div>"
"<div class=\"FRAME_INLINE\">");
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"FRAME_INLINE\">");
Mnu_PutIconsToSelectMenu (); // 5. Menu
fprintf (Gbl.F.Out,"</div>"
"<div class=\"FRAME_INLINE\">");
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"FRAME_INLINE\">");
The_PutIconsToSelectTheme (); // 6. Theme
fprintf (Gbl.F.Out,"</div>"
"<div class=\"FRAME_INLINE\">");
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"FRAME_INLINE\">");
Set_PutIconsToSelectSideCols (); // 7. Side columns
fprintf (Gbl.F.Out,"</div>");
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,"</div>");
HTM_DIV_End ();
}
Set_EndOneSettingSelector ();
Set_EndSettingsHead ();
@ -390,7 +391,7 @@ void Set_StartSettingsHead (void)
void Set_EndSettingsHead (void)
{
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
void Set_StartOneSettingSelector (void)
@ -400,5 +401,5 @@ void Set_StartOneSettingSelector (void)
void Set_EndOneSettingSelector (void)
{
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}

View File

@ -324,7 +324,7 @@ void Sta_AskShowCrsHits (void)
/* Link to show last clicks in real time */
Sta_PutLinkToLastClicks ();
fprintf (Gbl.F.Out,"</div>");
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,"</div>");
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,"</div>");
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,"<div id=\"lastclicks\"" // Used for AJAX based refresh
" class=\"CM\">");
Sta_GetAndShowLastClicks ();
fprintf (Gbl.F.Out,"</div>"); // Used for AJAX based refresh
HTM_DIV_End (); // Used for AJAX based refresh
/***** End box *****/
Box_EndBox ();

View File

@ -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,"<div class=\"%s\">%s: %u; %s: %u</div>",
fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%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,"</div>");
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,"</div>");
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,"</div>");
HTM_DIV_End ();
/* Users' roles who can answer the survey */
fprintf (Gbl.F.Out,"<div class=\"%s\">%s:<br />",
@ -648,7 +650,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
1 << Rol_TCH,
Svy.Roles,
true,false);
fprintf (Gbl.F.Out,"</div>");
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,"<div class=\"PAR %s\">%s</div>",
fprintf (Gbl.F.Out,"<div class=\"PAR %s\">"
"%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,"</div>");
HTM_DIV_End ();
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);

View File

@ -160,8 +160,8 @@ void Syl_PutFormWhichSyllabus (void)
"</li>",
Gbl.Form.Id,Txt_SYLLABUS_WHICH_SYLLABUS[WhichSyllabus]);
}
fprintf (Gbl.F.Out,"</ul>"
"</div>");
fprintf (Gbl.F.Out,"</ul>");
HTM_DIV_End ();
Frm_EndForm ();
}

View File

@ -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,"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\""
" class=\"TAB_ICO\" />"
"<div class=\"TAB_TXT %s\">%s</div>"
"</a>",
"<div class=\"TAB_TXT %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,"</a>");
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"
"</li>");
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</li>");
}
}
/***** End tabs container *****/
fprintf (Gbl.F.Out,"</ul>"
"</nav>"
"</div>");
"</nav>");
HTM_DIV_End ();
}
/*****************************************************************************/

View File

@ -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,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -478,9 +478,9 @@ void Tst_ShowNewTest (void)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," />"
"&nbsp;%s"
"</label>"
"</div>",
"</label>",
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,"<div class=\"TEST_SUBTITLE\">");
fprintf (Gbl.F.Out,Txt_Test_No_X_that_you_make_in_this_course,NumTst);
fprintf (Gbl.F.Out,"</div>");
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,"<div class=\"DAT CM\">"
"%s: <span class=\"%s\">%.2lf (%.2lf %s %u)</span>"
"</div>",
"%s: <span class=\"%s\">%.2lf (%.2lf %s %u)</span>",
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,"<div class=\"BIG_INDEX\">%u</div>",NumQst + 1);
fprintf (Gbl.F.Out,"<div class=\"BIG_INDEX\">"
"%u",
NumQst + 1);
HTM_DIV_End ();
/***** Write answer type (row[2]) *****/
Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]);
fprintf (Gbl.F.Out,"<div class=\"DAT_SMALL\">%s</div>",
fprintf (Gbl.F.Out,"<div class=\"DAT_SMALL\">"
"%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,"<div class=\"%s\">"
"%s"
"</div>",
"%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,"</div>");
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,"<div class=\"%s\">"
"%s"
"</div>",
"%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,"<div class=\"CONTEXT_MENU\">");
TsI_PutFormToImportQuestions (); // Put link (form) to import questions from XML file
fprintf (Gbl.F.Out,"</div>");
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,"</div>");
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,"<div class=\"BIG_INDEX\">%lu</div>",NumRow + 1);
/* Write number of question */
fprintf (Gbl.F.Out,"<div class=\"BIG_INDEX\">"
"%lu",
NumRow + 1);
HTM_DIV_End ();
/* Write answer type (row[2]) */
Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]);
fprintf (Gbl.F.Out,"<div class=\"DAT_SMALL\">%s</div>",
fprintf (Gbl.F.Out,"<div class=\"DAT_SMALL\">"
"%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,"</div>");
HTM_DIV_End ();
/* Write the text of the feedback */
fprintf (Gbl.F.Out,"<div class=\"TEST_EDI_LIGHT\">");
if (LengthFeedback)
fprintf (Gbl.F.Out,"%s",Feedback);
fprintf (Gbl.F.Out,"</div>");
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,"</div>");
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,"<div class=\"TEST_EXA_LIGHT\">"
"%s"
"</div>",
"%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,"<div class=\"MCH_TCH_BUTTON BT_%c\">"
"%c"
"</div>",
"%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,"<div class=\"ANS_0\">"
"%s"
"</div>",
"%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,"<div class=\"TEST_EXA_LIGHT\">"
"%s"
"</div>",
"%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],
"</label>");
/* End of right column */
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
HTM_TD_End ();
HTM_TR_End ();

View File

@ -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,"</textarea>"
"</div>");
fprintf (Gbl.F.Out,"</textarea>");
HTM_DIV_End ();
/***** Get questions from XML tree and print them *****/
/* Go to <test> 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,"<div class=\"%s\">"
"%s"
"</div>",
"%s",
ClassStem,AnswerText);
HTM_DIV_End ();
if (AnswerFeedbackLength)
{
fprintf (Gbl.F.Out,"<div class=\"TEST_EDI_LIGHT\">"
"%s"
"</div>",
"%s",
AnswerFeedback);
HTM_DIV_End ();
}
HTM_TD_End ();
HTM_TR_End ();

View File

@ -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,"</div>");
HTM_DIV_End ();
}
Set_EndOneSettingSelector ();
Set_EndSettingsHead ();

View File

@ -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,"</div>");
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,"<div class=\"CONTEXT_MENU\">");
Fol_PutLinkWhoToFollow ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
}
@ -1397,10 +1398,10 @@ static void TL_PutLinkToViewNewPublications (void)
"<a href=\"\" class=\"%s\""
" onclick=\"moveNewTimelineToTimeline(); return false;\" />"
"%s (<span id=\"view_new_posts_count\">0</span>)"
"</a>"
"</div>",
"</a>",
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
"&nbsp;%s"
"</a>"
"</div>",
"</a>",
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,"</div>");
HTM_DIV_End ();
/***** Right: author's name, time, summary and buttons *****/
fprintf (Gbl.F.Out,"<div class=\"TL_RIGHT_CONT TL_RIGHT_WIDTH\">");
@ -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,"<div class=\"TL_LOC\">%s: %s</div>",
fprintf (Gbl.F.Out,"<div class=\"TL_LOC\">"
"%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,"<div class=\"TL_LOC\">%s: %s</div>",
fprintf (Gbl.F.Out,"<div class=\"TL_LOC\">"
"%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,"<div class=\"TL_LOC\">%s: %s</div>",
fprintf (Gbl.F.Out,"<div class=\"TL_LOC\">"
"%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,"<div class=\"TL_LOC\">%s: %s</div>",
fprintf (Gbl.F.Out,"<div class=\"TL_LOC\">"
"%s: %s",
Txt_Course,Crs.ShrtName);
HTM_DIV_End ();
break;
case TL_NOTE_FORUM_POST:
/* Write forum name */
fprintf (Gbl.F.Out,"<div class=\"TL_LOC\">%s: %s</div>",
fprintf (Gbl.F.Out,"<div class=\"TL_LOC\">"
"%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,"<div class=\"TL_TXT\">%s</div>",SummaryStr);
fprintf (Gbl.F.Out,"<div class=\"TL_TXT\">"
"%s",
SummaryStr);
HTM_DIV_End ();
}
/* End of right part */
fprintf (Gbl.F.Out,"</div>");
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,"</div>");
HTM_DIV_End ();
/* Start container for buttons and comments */
fprintf (Gbl.F.Out,"<div class=\"TL_BOTTOM_RIGHT TL_RIGHT_WIDTH\">");
@ -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,"</div>");
HTM_DIV_End ();
/* Foot column 2: Share zone */
fprintf (Gbl.F.Out,"<div id=\"sha_not_%s_%u\""
" class=\"TL_SHA_NOT TL_SHA_NOT_WIDTH\">",
Gbl.UniqueNameEncrypted,NumDiv);
TL_PutFormToShaUnsNote (SocNot,TL_SHOW_A_FEW_USRS);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/* Foot column 3: Icon to remove this note */
fprintf (Gbl.F.Out,"<div class=\"TL_REM\">");
if (IAmTheAuthor)
TL_PutFormToRemovePublication (SocNot->NotCod);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/* End foot container */
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/* Show comments */
if (NumComments)
TL_WriteCommentsInNote (SocNot);
/* End container for buttons and comments */
fprintf (Gbl.F.Out,"</div>");
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:</div>",
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</a>",UsrDat->Nickname);
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
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,"<div id=\"%s\" class=\"TL_RIGHT_TIME DAT_LIGHT\">"
"</div>",
fprintf (Gbl.F.Out,"<div id=\"%s\" class=\"TL_RIGHT_TIME DAT_LIGHT\">",
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,"<div class=\"TL_TXT\">");
Msg_WriteMsgContent (Content,Cns_MAX_BYTES_LONG_TEXT,true,false);
fprintf (Gbl.F.Out,"</div>");
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,"</div>");
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,"</div>");
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,"</div>");
HTM_DIV_End ();
/***** Right: author's name, time, summary and buttons *****/
fprintf (Gbl.F.Out,"<div class=\"TL_RIGHT_CONT TL_RIGHT_WIDTH\">");
@ -2327,9 +2341,9 @@ static void TL_PutFormToWriteNewPost (void)
/* Write author's full name and nickname */
fprintf (Gbl.F.Out,"<div class=\"TL_RIGHT_AUTHOR TL_RIGHT_AUTHOR_WIDTH\">"
"<span class=\"DAT_N_BOLD\">%s</span>"
"<span class=\"DAT_LIGHT\"> @%s</span>"
"</div>",
"<span class=\"DAT_LIGHT\"> @%s</span>",
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,"</div>");
HTM_DIV_End ();
/***** End list *****/
fprintf (Gbl.F.Out,"</li>"
@ -2393,7 +2407,7 @@ static void TL_PutTextarea (const char *Placeholder,const char *ClassTextArea)
Txt_Post);
/***** End hidden div *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -2498,11 +2512,11 @@ static void TL_PutIconToToggleCommentNote (const char UniqueId[Frm_MAX_BYTES_ID
" onclick=\"toggleNewComment ('%s');return false;\">"
"<img src=\"%s/edit.svg\" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO_16x16\" />"
"</a>"
"</div>",
"</a>",
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,"<div class=\"TL_ICO_COM_OFF TL_ICO_DISABLED\">"
"<img src=\"%s/edit.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />"
"</div>",
" 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,"</div>");
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,"</div>");
HTM_DIV_End ();
/***** End container *****/
fprintf (Gbl.F.Out,"</div>");
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,"</div>");
HTM_DIV_End ();
/***** First list with comments initially hidden *****/
fprintf (Gbl.F.Out,"<ul id=\"com_%s\" class=\"LIST_LEFT\""
@ -2651,7 +2665,7 @@ static void TL_WriteCommentsInNote (const struct TL_Note *SocNot)
Txt_See_the_previous_X_COMMENTS,
NumCommentsInitiallyHidden);
TL_PutIconToToggleComments (IdComments,"angle-up.svg",Gbl.Title);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/***** Second list with comments initially visible *****/
@ -2736,9 +2750,9 @@ static void TL_WriteComment (struct TL_Comment *SocCom,
/***** Write sharer/commenter if distinct to author *****/
TL_WriteTopMessage (TopMessage,UsrCod);
fprintf (Gbl.F.Out,"<div class=\"TL_LEFT_PHOTO\">"
"</div>"
"<div class=\"TL_RIGHT_CONT TL_RIGHT_WIDTH\">"
fprintf (Gbl.F.Out,"<div class=\"TL_LEFT_PHOTO\">");
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"TL_RIGHT_CONT TL_RIGHT_WIDTH\">"
"<ul class=\"LIST_LEFT\">");
}
@ -2766,7 +2780,7 @@ static void TL_WriteComment (struct TL_Comment *SocCom,
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL,
"PHOTO30x40",Pho_ZOOM,true); // Use unique id
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Right: author's name, time, content, image and buttons *****/
fprintf (Gbl.F.Out,"<div class=\"TL_COM_CONT TL_COMM_WIDTH\">");
@ -2782,7 +2796,7 @@ static void TL_WriteComment (struct TL_Comment *SocCom,
{
fprintf (Gbl.F.Out,"<div class=\"TL_TXT\">");
Msg_WriteMsgContent (SocCom->Content,Cns_MAX_BYTES_LONG_TEXT,true,false);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/* Show image */
@ -2797,16 +2811,16 @@ static void TL_WriteComment (struct TL_Comment *SocCom,
" class=\"TL_FAV_COM TL_FAV_WIDTH\">",
Gbl.UniqueNameEncrypted,NumDiv);
TL_PutFormToFavUnfComment (SocCom,TL_SHOW_A_FEW_USRS);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/* Put icon to remove this comment */
fprintf (Gbl.F.Out,"<div class=\"TL_REM\">");
if (IAmTheAuthor && !ShowCommentAlone)
TL_PutFormToRemoveComment (SocCom->PubCod);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/* End foot container */
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
/***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&UsrDat);
@ -2817,8 +2831,8 @@ static void TL_WriteComment (struct TL_Comment *SocCom,
if (ShowCommentAlone)
{
fprintf (Gbl.F.Out,"</ul>"
"</div>");
fprintf (Gbl.F.Out,"</ul>");
HTM_DIV_End ();
Box_EndBox ();
}
}
@ -2855,7 +2869,7 @@ static void TL_WriteAuthorComment (struct UsrData *UsrDat)
Frm_EndForm ();
/***** End container *****/
fprintf (Gbl.F.Out,"</div>");
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,"</div>");
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,"</div>");
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,"</div>");
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,"<div class=\"TL_NUM_USRS\">");
TL_ShowNumSharersOrFavers (SocNot->NumShared);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"TL_USRS\">");
TL_ShowSharersOrFavers (&mysql_res,SocNot->NumShared,NumFirstUsrs);
if (NumFirstUsrs < SocNot->NumShared)
TL_PutFormToSeeAllSharersNote (SocNot,HowMany);
fprintf (Gbl.F.Out,"</div>");
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,"<div class=\"TL_NUM_USRS\">");
TL_ShowNumSharersOrFavers (SocNot->NumFavs);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"TL_USRS\">");
TL_ShowSharersOrFavers (&mysql_res,SocNot->NumFavs,NumFirstUsrs);
if (NumFirstUsrs < SocNot->NumFavs) // Not all are shown
TL_PutFormToSeeAllFaversNote (SocNot,HowMany);
fprintf (Gbl.F.Out,"</div>");
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,"<div class=\"TL_NUM_USRS\">");
TL_ShowNumSharersOrFavers (SocCom->NumFavs);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"TL_USRS\">");
TL_ShowSharersOrFavers (&mysql_res,SocCom->NumFavs,NumFirstUsrs);
if (NumFirstUsrs < SocCom->NumFavs)
TL_PutFormToSeeAllFaversComment (SocCom,HowMany);
fprintf (Gbl.F.Out,"</div>");
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,"</div>");
HTM_DIV_End ();
NumUsrsShown++;
}

View File

@ -243,7 +243,7 @@ static void TT_ShowTimeTableGrpsSelected (void)
fprintf (Gbl.F.Out,"%s",Txt_All_groups);
break;
}
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -1579,7 +1579,7 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co
fprintf (Gbl.F.Out,"<br />%s",Info);
/***** End cell *****/
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
break;
case TT_CRS_EDIT:

View File

@ -2594,7 +2594,7 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void))
Pwd_PutLinkToSendNewPasswd ();
Lan_PutLinkToChangeLanguage ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"CM\">");
@ -2616,14 +2616,14 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void))
"<input type=\"text\" id=\"UsrId\" name=\"UsrId\""
" size=\"18\" maxlength=\"%u\" placeholder=\"%s\""
" value=\"%s\""
" autofocus=\"autofocus\" required=\"required\" />"
"</div>",
" 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,"<div class=\"LM\">"
@ -2632,13 +2632,13 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void))
" class=\"CONTEXT_ICO_16x16\" />"
"</label>"
"<input type=\"password\" id=\"UsrPwd\" name=\"UsrPwd\""
" size=\"18\" maxlength=\"%u\" placeholder=\"%s\" />"
"</div>",
" 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,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -2841,7 +2841,7 @@ void Usr_WriteLoggedUsrHead (void)
if (Gbl.Usrs.Me.UsrDat.FirstName[0])
fprintf (Gbl.F.Out,"&nbsp;%s",Gbl.Usrs.Me.UsrDat.FirstName);
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/*****************************************************************************/
@ -4141,7 +4141,7 @@ static void Usr_WriteUsrData (const char *BgColor,
fprintf (Gbl.F.Out,"</a>");
/***** End container and table cell *****/
fprintf (Gbl.F.Out,"</div>");
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,"</div>");
HTM_DIV_End ();
/***** Select Usr_LIST_AS_LISTING *****/
fprintf (Gbl.F.Out,"<div class=\"%s\">",
@ -6114,7 +6114,7 @@ void Usr_ShowFormsToSelectUsrListType (void (*FuncParams) (void))
FuncParams ();
Usr_PutCheckboxListWithPhotos ();
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
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,"</div>");
HTM_DIV_End ();
break;
default:
break;
@ -7360,7 +7360,7 @@ void Usr_ListDataAdms (void)
Sco_PutSelectorScope ("ScopeUsr",true);
fprintf (Gbl.F.Out,"</label>");
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
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,"</div>"
"</div>");
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,"</div>");
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,"</label>");
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
}
/***** Start section with user list *****/
@ -7944,7 +7944,7 @@ void Usr_SeeStudents (void)
Rec_PutLinkToEditRecordFields ();
}
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
break;
default:
break;
@ -7985,7 +7985,7 @@ void Usr_SeeStudents (void)
Sco_PutSelectorScope ("ScopeUsr",true);
fprintf (Gbl.F.Out,"</label>");
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
break;
default:
break;
@ -8113,7 +8113,7 @@ void Usr_SeeTeachers (void)
Enr_PutLinkToAdminSeveralUsrs (Rol_TCH);
}
fprintf (Gbl.F.Out,"</div>");
HTM_DIV_End ();
break;
default:
@ -8163,7 +8163,7 @@ void Usr_SeeTeachers (void)
Sco_PutSelectorScope ("ScopeUsr",true);
fprintf (Gbl.F.Out,"</label>");
Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>");
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,"&nbsp;");
fprintf (Gbl.F.Out,"</div>");
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,"<div class=\"AUTHOR_1_LINE %s\">%s</div>",
fprintf (Gbl.F.Out,"<div class=\"AUTHOR_1_LINE %s\">"
"%s",
Hidden ? "AUTHOR_TXT_LIGHT" :
"AUTHOR_TXT",
UsrDat.FullName);
HTM_DIV_End ();
/***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&UsrDat);