diff --git a/swad_ID.c b/swad_ID.c index 0ceb4525..6334e04c 100644 --- a/swad_ID.c +++ b/swad_ID.c @@ -450,8 +450,7 @@ void ID_ShowFormChangeMyID (bool IShouldFillInID) HTM_SECTION_Begin (ID_ID_SECTION_ID); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_ID_identity_number, - Acc_PutLinkToRemoveMyAccount,NULL, + Box_BoxBegin (Txt_ID_identity_number,Acc_PutLinkToRemoveMyAccount,NULL, Hlp_PROFILE_Account,Box_NOT_CLOSABLE); /***** Show form to change ID *****/ @@ -477,8 +476,7 @@ void ID_ShowFormChangeOtherUsrID (void) HTM_SECTION_Begin (ID_ID_SECTION_ID); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_ID_identity_number, - NULL,NULL, + Box_BoxBegin (Txt_ID_identity_number,NULL,NULL, Hlp_PROFILE_Account,Box_NOT_CLOSABLE); /***** Show form to change ID *****/ diff --git a/swad_MFU.c b/swad_MFU.c index ff59c8c4..7253a737 100644 --- a/swad_MFU.c +++ b/swad_MFU.c @@ -196,8 +196,7 @@ void MFU_WriteBigMFUActions (struct MFU_ListMFUActions *ListMFUActions) char TabMenuStr[MFU_MAX_BYTES_TAB + 6 + MFU_MAX_BYTES_MENU + 1]; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_My_frequent_actions, - NULL,NULL, + Box_BoxBegin (Txt_My_frequent_actions,NULL,NULL, Hlp_ANALYTICS_Frequent,Box_NOT_CLOSABLE); /***** Begin container *****/ diff --git a/swad_QR.c b/swad_QR.c index b64524d4..ae9dac8e 100644 --- a/swad_QR.c +++ b/swad_QR.c @@ -100,8 +100,7 @@ void QR_PrintUsrQRCode (void) if (Usr_GetParOtherUsrCodEncryptedAndGetUsrData ()) { /***** Begin box *****/ - Box_BoxBegin (NULL,Gbl.Usrs.Other.UsrDat.FullName, - NULL,NULL, + Box_BoxBegin (Gbl.Usrs.Other.UsrDat.FullName,NULL,NULL, NULL,Box_NOT_CLOSABLE); /***** Show QR code *****/ diff --git a/swad_account.c b/swad_account.c index f37175d4..0d854c50 100644 --- a/swad_account.c +++ b/swad_account.c @@ -156,9 +156,7 @@ static void Acc_ShowFormCheckIfIHaveAccount (const char *Title) extern const char *Txt_Skip_this_step; /***** Begin box *****/ - Box_BoxBegin (NULL,Title, - NULL,NULL, - Hlp_PROFILE_SignUp,Box_NOT_CLOSABLE); + Box_BoxBegin (Title, NULL,NULL,Hlp_PROFILE_SignUp,Box_NOT_CLOSABLE); /***** Help alert *****/ Ale_ShowAlert (Ale_INFO,Txt_If_you_think_you_may_have_been_registered_); @@ -450,7 +448,7 @@ void Acc_ShowFormGoToRequestNewAccount (void) /***** Begin box *****/ if (asprintf (&Title,Txt_New_on_PLATFORM_Sign_up,Cfg_PLATFORM_SHORT_NAME) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title,NULL,NULL,Hlp_PROFILE_SignUp,Box_NOT_CLOSABLE); + Box_BoxBegin (Title,NULL,NULL,Hlp_PROFILE_SignUp,Box_NOT_CLOSABLE); free (Title); /***** Button to go to request the creation of a new account *****/ diff --git a/swad_agenda.c b/swad_agenda.c index 780dd223..ecb36c95 100644 --- a/swad_agenda.c +++ b/swad_agenda.c @@ -182,8 +182,7 @@ static void Agd_ShowMyAgenda (struct Agd_Agenda *Agenda) extern const char *Txt_My_agenda; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_My_agenda, - Agd_PutIconsMyFullAgenda,Agenda, + Box_BoxBegin (Txt_My_agenda,Agd_PutIconsMyFullAgenda,Agenda, Hlp_PROFILE_Agenda,Box_NOT_CLOSABLE); /***** Put forms to choice which events to show *****/ @@ -398,7 +397,7 @@ void Agd_ShowUsrAgenda (void) MeOrOther = Usr_ItsMe (Gbl.Usrs.Other.UsrDat.UsrCod); if (asprintf (&Title,Txt_Public_agenda_USER,UsrDat[MeOrOther]->FullName) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title, + Box_BoxBegin (Title, FuncPutIcons[MeOrOther],UsrDat[MeOrOther]->EnUsrCod, Hlp_PROFILE_Agenda_public_agenda,Box_NOT_CLOSABLE); free (Title); @@ -458,7 +457,7 @@ void Agd_ShowOtherAgendaAfterLogIn (void) MeOrOther = Usr_ItsMe (Gbl.Usrs.Other.UsrDat.UsrCod); if (asprintf (&Title,Txt_Public_agenda_USER,UsrDat[MeOrOther]->FullName) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title, + Box_BoxBegin (Title, FuncPutIcons[MeOrOther],UsrDat[MeOrOther]->EnUsrCod, Hlp_PROFILE_Agenda_public_agenda,Box_NOT_CLOSABLE); free (Title); @@ -574,16 +573,12 @@ static void Agd_ShowEventsToday (struct Agd_Agenda *Agenda, switch (AgendaType) { case Agd_MY_AGENDA_TODAY: - Box_BoxTableShadowBegin (NULL,Txt_Today, - NULL,NULL, - Hlp_PROFILE_Agenda, - 2); + Box_BoxTableShadowBegin (Txt_Today,NULL,NULL, + Hlp_PROFILE_Agenda,2); break; case Agd_ANOTHER_AGENDA_TODAY: - Box_BoxTableShadowBegin (NULL,Txt_Today, - NULL,NULL, - Hlp_PROFILE_Agenda_public_agenda, - 2); + Box_BoxTableShadowBegin (Txt_Today,NULL,NULL, + Hlp_PROFILE_Agenda_public_agenda,2); break; default: break; @@ -1551,7 +1546,7 @@ void Agd_PrintAgdQRCode (void) /***** Begin box *****/ if (asprintf (&Title,Txt_Where_s_USER,Gbl.Usrs.Me.UsrDat.FullName) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title,NULL,NULL,NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (Title,NULL,NULL,NULL,Box_NOT_CLOSABLE); free (Title); /***** Print QR code ****/ diff --git a/swad_announcement.c b/swad_announcement.c index df93c67a..ad461016 100644 --- a/swad_announcement.c +++ b/swad_announcement.c @@ -107,7 +107,7 @@ void Ann_ShowAllAnnouncements (void) NumAnnouncements = Ann_DB_GetAnnouncementsForUnknownUsers (&mysql_res); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Announcements, + Box_BoxBegin (Txt_Announcements, ICanEdit ? Ann_PutIconToAddNewAnnouncement : NULL,NULL, Hlp_COMMUNICATION_Announcements,Box_NOT_CLOSABLE); diff --git a/swad_assignment.c b/swad_assignment.c index b7d33db8..d90dd09c 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -154,8 +154,7 @@ void Asg_ShowAllAssignments (struct Asg_Assignments *Assignments) Assignments->CurrentPage = (unsigned) Pagination.CurrentPage; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Assignments, - Asg_PutIconsListAssignments,Assignments, + Box_BoxBegin (Txt_Assignments,Asg_PutIconsListAssignments,Assignments, Hlp_ASSESSMENT_Assignments,Box_NOT_CLOSABLE); /***** Select whether show only my groups or all groups *****/ @@ -416,8 +415,8 @@ void Asg_ShowOneAssignmentInBox (struct Asg_Assignments *Assignments) extern const char *Txt_Assignment; /***** Begin box *****/ - Box_BoxBegin (NULL,Assignments->Asg.Title[0] ? Assignments->Asg.Title : - Txt_Assignment, + Box_BoxBegin (Assignments->Asg.Title[0] ? Assignments->Asg.Title : + Txt_Assignment, Asg_PutIconsOneAsg,Assignments, Hlp_ASSESSMENT_Assignments,Box_NOT_CLOSABLE); diff --git a/swad_attendance.c b/swad_attendance.c index 4c54bdbe..49918d61 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -230,8 +230,7 @@ static void Att_ShowAllEvents (struct Att_Events *Events) Events->CurrentPage = (unsigned) Pagination.CurrentPage; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Events, - Att_PutIconsInListOfEvents,Events, + Box_BoxBegin (Txt_Events,Att_PutIconsInListOfEvents,Events, Hlp_USERS_Attendance,Box_NOT_CLOSABLE); /***** Select whether show only my groups or all groups *****/ @@ -1484,8 +1483,7 @@ static void Att_ListEventOnlyMeAsStudent (struct Att_Event *Event) /***** List students (only me) *****/ /* Begin box */ - Box_BoxBegin (NULL,Txt_Attendance, - NULL,NULL, + Box_BoxBegin (Txt_Attendance,NULL,NULL, Hlp_USERS_Attendance,Box_NOT_CLOSABLE); /***** Begin form *****/ @@ -1551,8 +1549,7 @@ static void Att_ListEventStudents (struct Att_Events *Events) Usr_GetListUsrs (Hie_CRS,Rol_STD); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Attendance, - NULL,NULL, + Box_BoxBegin (Txt_Attendance,NULL,NULL, Hlp_USERS_Attendance,Box_NOT_CLOSABLE); /***** Form to select groups *****/ @@ -2242,14 +2239,11 @@ static void Att_ListOrPrintMyAttendanceCrs (Att_TypeOfView_t TypeOfView) switch (TypeOfView) { case Att_VIEW_ONLY_ME: - Box_BoxBegin (NULL,Txt_Attendance, - Att_PutIconsMyAttList,&Events, + Box_BoxBegin (Txt_Attendance,Att_PutIconsMyAttList,&Events, Hlp_USERS_Attendance_attendance_list,Box_NOT_CLOSABLE); break; case Att_PRNT_ONLY_ME: - Box_BoxBegin (NULL,Txt_Attendance, - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Attendance,NULL,NULL,NULL,Box_NOT_CLOSABLE); break; default: Err_WrongTypeExit (); @@ -2358,13 +2352,12 @@ static void Att_ListOrPrintUsrsAttendanceCrs (void *TypeOfView) switch (*((Att_TypeOfView_t *) TypeOfView)) { case Att_VIEW_SEL_USR: - Box_BoxBegin (NULL,Txt_Attendance_list, + Box_BoxBegin (Txt_Attendance_list, Att_PutIconsStdsAttList,&Events, Hlp_USERS_Attendance_attendance_list,Box_NOT_CLOSABLE); break; case Att_PRNT_SEL_USR: - Box_BoxBegin (NULL,Txt_Attendance_list, - NULL,NULL, + Box_BoxBegin (Txt_Attendance_list,NULL,NULL, NULL,Box_NOT_CLOSABLE); break; default: @@ -2625,8 +2618,7 @@ static void Att_ListEventsToSelect (struct Att_Events *Events, TypeOfView == Att_VIEW_SEL_USR); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Events, - FunctionToDrawContextualIcons[TypeOfView],NULL, + Box_BoxBegin (Txt_Events,FunctionToDrawContextualIcons[TypeOfView],NULL, NULL,Box_NOT_CLOSABLE); /***** Begin form to update the attendance @@ -3003,9 +2995,7 @@ static void Att_ListStdsWithAttEventsDetails (struct Att_Events *Events, HTM_SECTION_Begin (Att_ATTENDANCE_DETAILS_ID); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Details, - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Details,NULL,NULL,NULL,Box_NOT_CLOSABLE); /***** Begin table *****/ HTM_TABLE_Begin ("TBL_SCROLL"); diff --git a/swad_banner.c b/swad_banner.c index d8e2e880..4a9d5111 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -137,8 +137,7 @@ void Ban_ShowAllBanners (void) Ban_GetListBanners (&Banners,&mysql_res); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Banners, - Ban_PutIconsListingBanners,NULL, + Box_BoxBegin (Txt_Banners,Ban_PutIconsListingBanners,NULL, Hlp_SYSTEM_Banners,Box_NOT_CLOSABLE); /***** Write all banners *****/ @@ -241,8 +240,7 @@ static void Ban_EditBannersInternal (struct Ban_Banners *Banners, Ban_GetListBanners (Banners,&mysql_res); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Banners, - Ban_PutIconsEditingBanners,NULL, + Box_BoxBegin (Txt_Banners,Ban_PutIconsEditingBanners,NULL, Hlp_SYSTEM_Banners_edit,Box_NOT_CLOSABLE); /***** Put a form to create a new banner *****/ diff --git a/swad_box.c b/swad_box.c index 613da7b6..c76ef1d3 100644 --- a/swad_box.c +++ b/swad_box.c @@ -56,7 +56,7 @@ static struct /***************************** Private prototypes ****************************/ /*****************************************************************************/ -static void Box_BoxInternalBegin (const char *Width,const char *Title, +static void Box_BoxInternalBegin (const char *Title, void (*FunctionToDrawContextualIcons) (void *Args),void *Args, const char *HelpLink,Box_Closable_t Closable, const char *ClassFrame); @@ -71,24 +71,22 @@ void Box_BoxTableBegin (const char *Title, const char *HelpLink,Box_Closable_t Closable, unsigned CellPadding) // CellPadding must be 0, 1, 2, 5 or 10 { - Box_BoxBegin (NULL,Title, - FunctionToDrawContextualIcons,Args, - HelpLink,Closable); + Box_BoxBegin (Title,FunctionToDrawContextualIcons,Args,HelpLink,Closable); HTM_TABLE_BeginWidePadding (CellPadding); } -void Box_BoxTableShadowBegin (const char *Width,const char *Title, +void Box_BoxTableShadowBegin (const char *Title, void (*FunctionToDrawContextualIcons) (void *Args),void *Args, const char *HelpLink, unsigned CellPadding) // CellPadding must be 0, 1, 2, 5 or 10 { - Box_BoxShadowBegin (Width,Title, + Box_BoxShadowBegin (Title, FunctionToDrawContextualIcons,Args, HelpLink); HTM_TABLE_BeginWidePadding (CellPadding); } -void Box_BoxBegin (const char *Width,const char *Title, +void Box_BoxBegin (const char *Title, void (*FunctionToDrawContextualIcons) (void *Args),void *Args, const char *HelpLink,Box_Closable_t Closable) { @@ -97,14 +95,14 @@ void Box_BoxBegin (const char *Width,const char *Title, /***** Begin box *****/ if (asprintf (&ClassFrame,"FRAME FRAME_%s",The_GetSuffix ()) < 0) Err_NotEnoughMemoryExit (); - Box_BoxInternalBegin (Width,Title, + Box_BoxInternalBegin (Title, FunctionToDrawContextualIcons,Args, HelpLink,Closable, ClassFrame); free (ClassFrame); } -void Box_BoxShadowBegin (const char *Width,const char *Title, +void Box_BoxShadowBegin (const char *Title, void (*FunctionToDrawContextualIcons) (void *Args),void *Args, const char *HelpLink) { @@ -113,7 +111,7 @@ void Box_BoxShadowBegin (const char *Width,const char *Title, /***** Begin box *****/ if (asprintf (&ClassFrame,"FRAME_SHADOW FRAME_SHADOW_%s",The_GetSuffix ()) < 0) Err_NotEnoughMemoryExit (); - Box_BoxInternalBegin (Width,Title, + Box_BoxInternalBegin (Title, FunctionToDrawContextualIcons,Args, HelpLink,Box_NOT_CLOSABLE, ClassFrame); @@ -121,7 +119,7 @@ void Box_BoxShadowBegin (const char *Width,const char *Title, } // Return pointer to box id string -static void Box_BoxInternalBegin (const char *Width,const char *Title, +static void Box_BoxInternalBegin (const char *Title, void (*FunctionToDrawContextualIcons) (void *Args),void *Args, const char *HelpLink,Box_Closable_t Closable, const char *ClassFrame) @@ -151,20 +149,11 @@ static void Box_BoxInternalBegin (const char *Width,const char *Title, /* Create unique id for alert */ Frm_SetUniqueId (Box_Boxes.Ids[Box_Boxes.Nested]); - if (Width) - HTM_DIV_Begin ("id=\"%s\" class=\"%s\" style=\"width:%s;\"", - Box_Boxes.Ids[Box_Boxes.Nested],ClassFrame,Width); - else - HTM_DIV_Begin ("id=\"%s\" class=\"%s\"", - Box_Boxes.Ids[Box_Boxes.Nested],ClassFrame); + HTM_DIV_Begin ("id=\"%s\" class=\"%s\"", + Box_Boxes.Ids[Box_Boxes.Nested],ClassFrame); } else - { - if (Width) - HTM_DIV_Begin ("class=\"%s\" style=\"width:%s;\"",ClassFrame,Width); - else - HTM_DIV_Begin ("class=\"%s\"",ClassFrame); - } + HTM_DIV_Begin ("class=\"%s\"",ClassFrame); /***** Row for left and right icons *****/ if (FunctionToDrawContextualIcons || diff --git a/swad_box.h b/swad_box.h index 0b62637b..1e201aa7 100644 --- a/swad_box.h +++ b/swad_box.h @@ -55,13 +55,13 @@ void Box_BoxTableBegin (const char *Title, void (*FunctionToDrawContextualIcons) (void *Args),void *Args, const char *HelpLink,Box_Closable_t Closable, unsigned CellPadding); -void Box_BoxBegin (const char *Width,const char *Title, +void Box_BoxBegin (const char *Title, void (*FunctionToDrawContextualIcons) (void *Args),void *Args, const char *HelpLink,Box_Closable_t Closable); -void Box_BoxShadowBegin (const char *Width,const char *Title, +void Box_BoxShadowBegin (const char *Title, void (*FunctionToDrawContextualIcons) (void *Args),void *Args, const char *HelpLink); -void Box_BoxTableShadowBegin (const char *Width,const char *Title, +void Box_BoxTableShadowBegin (const char *Title, void (*FunctionToDrawContextualIcons) (void *Args),void *Args, const char *HelpLink, unsigned CellPadding); diff --git a/swad_browser.c b/swad_browser.c index 4b4d919a..faae999b 100644 --- a/swad_browser.c +++ b/swad_browser.c @@ -2785,8 +2785,7 @@ static void Brw_ShowFileBrowsersAsgWrkCrs (void) Brw_WriteTopBeforeShowingFileBrowser (); /***** Begin box and table *****/ - Box_BoxBegin (NULL,Txt_Assignments_and_other_works, - Brw_PutIconShowFigure,NULL, + Box_BoxBegin (Txt_Assignments_and_other_works,Brw_PutIconShowFigure,NULL, Hlp_FILES_Homework_for_teachers,Box_NOT_CLOSABLE); /***** List the assignments and works of the selected users *****/ @@ -3211,7 +3210,7 @@ static void Brw_ShowFileBrowser (void) HTM_SECTION_Begin (FileBrowserSectionId); if (Brw_TitleOfFileBrowser[Gbl.FileBrowser.Type]) - Box_BoxBegin (NULL,*Brw_TitleOfFileBrowser[Gbl.FileBrowser.Type], + Box_BoxBegin (*Brw_TitleOfFileBrowser[Gbl.FileBrowser.Type], Brw_PutIconsFileBrowser,NULL, *Brw_HelpOfFileBrowser[Gbl.FileBrowser.Type],Box_NOT_CLOSABLE); @@ -6250,9 +6249,7 @@ static void Brw_PutFormToCreateAFolder (const char FileNameToShow[NAME_MAX + 1]) Brw_PutImplicitParsFileBrowser (&Gbl.FileBrowser.FilFolLnk); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Create_folder, - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Create_folder,NULL,NULL,NULL,Box_NOT_CLOSABLE); /* Alert */ Ale_ShowAlert (Ale_INFO,Txt_You_can_create_a_new_folder_inside_the_folder_X, @@ -6289,9 +6286,7 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow) /***** Begin box *****/ HTM_DIV_Begin ("id=\"dropzone-upload\""); - Box_BoxBegin (NULL,Txt_Upload_files, - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Upload_files,NULL,NULL,NULL,Box_NOT_CLOSABLE); /***** Help message *****/ Ale_ShowAlert (Ale_INFO,Txt_or_you_can_upload_new_files_to_the_folder_X, @@ -6350,9 +6345,7 @@ static void Brw_PutFormToUploadOneFileClassic (const char *FileNameToShow) /***** Begin box *****/ HTM_DIV_Begin ("id=\"classic-upload\" style=\"display:none;\""); - Box_BoxBegin (NULL,Txt_Upload_file, - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Upload_file,NULL,NULL,NULL,Box_NOT_CLOSABLE); /***** Help message *****/ Ale_ShowAlert (Ale_INFO,Txt_or_you_can_upload_a_new_file_to_the_folder_X, @@ -6391,9 +6384,7 @@ static void Brw_PutFormToPasteAFileOrFolder (const char *FileNameToShow) Brw_PutImplicitParsFileBrowser (&Gbl.FileBrowser.FilFolLnk); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Paste, - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Paste,NULL,NULL,NULL,Box_NOT_CLOSABLE); /***** Help message *****/ Ale_ShowAlert (Ale_INFO,Txt_or_you_can_make_a_file_copy_to_the_folder_X, @@ -6425,9 +6416,7 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow) Brw_PutImplicitParsFileBrowser (&Gbl.FileBrowser.FilFolLnk); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Create_link, - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Create_link,NULL,NULL,NULL,Box_NOT_CLOSABLE); /***** Help message *****/ Ale_ShowAlert (Ale_INFO,Txt_or_you_can_create_a_new_link_inside_the_folder_X, @@ -7367,12 +7356,10 @@ void Brw_ShowFileMetadata (void) (FileMetadata.FilFolLnk.Type == Brw_IS_FILE || // Only files or links FileMetadata.FilFolLnk.Type == Brw_IS_LINK) && Rsc_CheckIfICanGetLink ()) - Box_BoxShadowBegin (NULL,NULL, - Brw_PutIconToGetLinkToFile,&FileMetadata, + Box_BoxShadowBegin (NULL,Brw_PutIconToGetLinkToFile,&FileMetadata, NULL); else - Box_BoxShadowBegin (NULL,NULL, - NULL,NULL, + Box_BoxShadowBegin (NULL,NULL,NULL, NULL); @@ -9470,9 +9457,7 @@ void Brw_AskRemoveOldFilesBriefcase (void) Brw_PutParFullTreeIfSelected (&Gbl.FileBrowser.FullTree); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Remove_old_files, - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Remove_old_files,NULL,NULL,NULL,Box_NOT_CLOSABLE); /***** Form to request number of months (to remove files older) *****/ HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ()); @@ -9772,8 +9757,7 @@ void Brw_GetAndShowFileBrowsersStats (void) &SizeOfFileZone[NumStat]); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_FIGURE_TYPES[Fig_FOLDERS_AND_FILES], - NULL,NULL, + Box_BoxBegin (Txt_FIGURE_TYPES[Fig_FOLDERS_AND_FILES],NULL,NULL, Hlp_ANALYTICS_Figures_folders_and_files,Box_NOT_CLOSABLE); /***** Write sizes of all file zones *****/ diff --git a/swad_building.c b/swad_building.c index 1f82b9b4..230e21fe 100644 --- a/swad_building.c +++ b/swad_building.c @@ -251,8 +251,7 @@ static void Bld_EditBuildingsInternal (void) Bld_GetListBuildings (&Buildings,Bld_ALL_DATA); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Buildings, - Bld_PutIconsEditingBuildings,NULL, + Box_BoxBegin (Txt_Buildings,Bld_PutIconsEditingBuildings,NULL, Hlp_CENTER_Buildings_edit,Box_NOT_CLOSABLE); /***** Put a form to create a new building *****/ diff --git a/swad_calendar.c b/swad_calendar.c index bc9a3198..9dcf1b75 100644 --- a/swad_calendar.c +++ b/swad_calendar.c @@ -90,8 +90,7 @@ void Cal_PutIconsToSelectFirstDayOfWeek (void) extern const char *Hlp_PROFILE_Settings_calendar; extern const char *Txt_Calendar; - Box_BoxBegin (NULL,Txt_Calendar, - Cal_PutIconsFirstDayOfWeek,NULL, + Box_BoxBegin (Txt_Calendar,Cal_PutIconsFirstDayOfWeek,NULL, Hlp_PROFILE_Settings_calendar,Box_NOT_CLOSABLE); Set_BeginSettingsHead (); Cal_ShowFormToSelFirstDayOfWeek (ActChg1stDay, @@ -260,8 +259,7 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar, }; /***** Begin box *****/ - Box_BoxBegin (NULL,NULL, - FunctionToDrawContextualIcons,Args, + Box_BoxBegin (NULL,FunctionToDrawContextualIcons,Args, ViewType == Vie_VIEW ? Hlp_START_Calendar : NULL, Box_NOT_CLOSABLE); diff --git a/swad_call_for_exam.c b/swad_call_for_exam.c index 3bfc27af..fd45410f 100644 --- a/swad_call_for_exam.c +++ b/swad_call_for_exam.c @@ -623,8 +623,7 @@ static void Cfe_ListCallsForExams (struct Cfe_CallsForExams *CallsForExams, NumCalls = Cfe_DB_GetCallsForExamsInCurrentCrs (&mysql_res); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Calls_for_exams, - Cfe_PutIconsCallsForExams,NULL, + Box_BoxBegin (Txt_Calls_for_exams,Cfe_PutIconsCallsForExams,NULL, Hlp_ASSESSMENT_Calls_for_exams,Box_NOT_CLOSABLE); /***** List the existing calls for exams *****/ @@ -921,14 +920,12 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams, Ale_ShowAlerts (Anchor); /* Begin highlighted box */ - Box_BoxShadowBegin (NULL,NULL, - FunctionToDrawContextualIcons,CallsForExams, + Box_BoxShadowBegin (NULL,FunctionToDrawContextualIcons,CallsForExams, HelpLink); } else // Don't highlight /* Begin normal box */ - Box_BoxBegin (NULL,NULL, - FunctionToDrawContextualIcons,CallsForExams, + Box_BoxBegin (NULL,FunctionToDrawContextualIcons,CallsForExams, HelpLink,Box_NOT_CLOSABLE); if (ViewType == Vie_EDIT) diff --git a/swad_center.c b/swad_center.c index 8257ab40..7469606a 100644 --- a/swad_center.c +++ b/swad_center.c @@ -253,7 +253,7 @@ static void Ctr_ListCenters (void) if (asprintf (&Title,Txt_Centers_of_INSTITUTION_X, Gbl.Hierarchy.Node[Hie_INS].FullName) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title,Ctr_PutIconsListingCenters,NULL, + Box_BoxBegin (Title,Ctr_PutIconsListingCenters,NULL, Hlp_INSTITUTION_Centers,Box_NOT_CLOSABLE); free (Title); @@ -432,7 +432,7 @@ static void Ctr_EditCentersInternal (void) if (asprintf (&Title,Txt_Centers_of_INSTITUTION_X, Gbl.Hierarchy.Node[Hie_INS].FullName) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title,Ctr_PutIconsEditingCenters,NULL, + Box_BoxBegin (Title,Ctr_PutIconsEditingCenters,NULL, Hlp_INSTITUTION_Centers,Box_NOT_CLOSABLE); free (Title); diff --git a/swad_center_config.c b/swad_center_config.c index 036a1022..310c69ff 100644 --- a/swad_center_config.c +++ b/swad_center_config.c @@ -163,7 +163,7 @@ static void CtrCfg_Configuration (Vie_ViewType_t ViewType) Frm_DONT_PUT_FORM; /***** Begin box *****/ - Box_BoxBegin (NULL,NULL, + Box_BoxBegin (NULL, ViewType == Vie_VIEW ? CtrCfg_PutIconsCtrConfig : NULL,NULL, ViewType == Vie_VIEW ? Hlp_CENTER_Information : @@ -868,9 +868,7 @@ void CtrCfg_ReqPhoto (void) Frm_BeginForm (ActRecCtrPho); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Photo, - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Photo,NULL,NULL,NULL,Box_NOT_CLOSABLE); /***** Write help message *****/ Ale_ShowAlert (Ale_INFO,"%s: %s
" diff --git a/swad_changelog.h b/swad_changelog.h index 080d261a..4c964fa9 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -633,10 +633,11 @@ Me sale este error, no s "can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod') */ -#define Log_PLATFORM_VERSION "SWAD 23.61.1 (2024-01-29)" +#define Log_PLATFORM_VERSION "SWAD 23.62 (2024-01-29)" #define CSS_FILE "swad23.61.css" #define JS_FILE "swad23.53.6.js" /* + Version 23.62: Jan 29, 2024 Code refactoring in boxes. (335474 lines) Version 23.61.1: Jan 29, 2024 Code refactoring in boxes. (335684 lines) Version 23.61: Jan 28, 2024 Responsive design. (335753 lines) Version 23.60.3: Jan 26, 2024 Responsive design in figures about institutions. (335720 lines) diff --git a/swad_chat.c b/swad_chat.c index 04f1daec..68f0f531 100644 --- a/swad_chat.c +++ b/swad_chat.c @@ -129,9 +129,7 @@ void Cht_ShowListOfAvailableChatRooms (void) Hie_GetMyHierarchy (Hie_DEG); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Chat_rooms, - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Chat_rooms,NULL,NULL,NULL,Box_NOT_CLOSABLE); /***** Begin list *****/ HTM_UL_Begin ("class=\"LIST_TREE\""); diff --git a/swad_connected.c b/swad_connected.c index 89bfd3be..ec09f5f3 100644 --- a/swad_connected.c +++ b/swad_connected.c @@ -103,8 +103,7 @@ void Con_ShowConnectedUsrs (void) Sco_GetScope ("ScopeCon",Hie_CRS); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Connected_users, - Con_PutIconToUpdateConnected,NULL, + Box_BoxBegin (Txt_Connected_users,Con_PutIconToUpdateConnected,NULL, Hlp_USERS_Connected,Box_NOT_CLOSABLE); /***** Current time *****/ diff --git a/swad_country.c b/swad_country.c index cf0d2986..fb124801 100644 --- a/swad_country.c +++ b/swad_country.c @@ -224,7 +224,7 @@ void Cty_ListCountries2 (void) } /***** Begin box and table *****/ - Box_BoxBegin (NULL,Txt_HIERARCHY_PLURAL_Abc[Hie_CTY], + Box_BoxBegin (Txt_HIERARCHY_PLURAL_Abc[Hie_CTY], Cty_PutIconsListingCountries,NULL, Hlp_SYSTEM_Countries,Box_NOT_CLOSABLE); HTM_TABLE_Begin ("TBL_SCROLL"); @@ -667,7 +667,7 @@ static void Cty_EditCountriesInternal (void) Hie_WriteMenuHierarchy (); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_HIERARCHY_PLURAL_Abc[Hie_CTY], + Box_BoxBegin (Txt_HIERARCHY_PLURAL_Abc[Hie_CTY], Cty_PutIconsEditingCountries,NULL, Hlp_SYSTEM_Countries,Box_NOT_CLOSABLE); diff --git a/swad_country_config.c b/swad_country_config.c index 81521f92..58704364 100644 --- a/swad_country_config.c +++ b/swad_country_config.c @@ -118,7 +118,7 @@ static void CtyCfg_Configuration (Vie_ViewType_t ViewType) Hie_DONT_PUT_LINK; /***** Begin box *****/ - Box_BoxBegin (NULL,NULL, + Box_BoxBegin (NULL, ViewType == Vie_VIEW ? CtyCfg_PutIconToPrint : NULL,NULL, ViewType == Vie_VIEW ? Hlp_COUNTRY_Information : diff --git a/swad_course.c b/swad_course.c index d99f92cc..bc8e9618 100644 --- a/swad_course.c +++ b/swad_course.c @@ -386,7 +386,7 @@ static void Crs_ListCourses (void) /***** Begin box *****/ if (asprintf (&Title,Txt_Courses_of_DEGREE_X,Gbl.Hierarchy.Node[Hie_DEG].ShrtName) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title,Crs_PutIconsListCourses,NULL, + Box_BoxBegin (Title,Crs_PutIconsListCourses,NULL, Hlp_DEGREE_Courses,Box_NOT_CLOSABLE); free (Title); @@ -585,7 +585,7 @@ static void Crs_EditCoursesInternal (void) if (asprintf (&Title,Txt_Courses_of_DEGREE_X, Gbl.Hierarchy.Node[Hie_DEG].ShrtName) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title,Crs_PutIconsEditingCourses,NULL, + Box_BoxBegin (Title,Crs_PutIconsEditingCourses,NULL, Hlp_DEGREE_Courses,Box_NOT_CLOSABLE); free (Title); @@ -1925,8 +1925,7 @@ void Crs_AskRemoveOldCrss (void) Frm_BeginForm (ActRemOldCrs); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Eliminate_old_courses, - NULL,NULL, + Box_BoxBegin (Txt_Eliminate_old_courses,NULL,NULL, Hlp_SYSTEM_Maintenance_eliminate_old_courses,Box_NOT_CLOSABLE); /***** Form to request number of months without clicks *****/ diff --git a/swad_course_config.c b/swad_course_config.c index 976b92f5..a75c4fa1 100644 --- a/swad_course_config.c +++ b/swad_course_config.c @@ -113,7 +113,7 @@ void CrsCfg_Configuration (Vie_ViewType_t ViewType) } /***** Begin box *****/ - Box_BoxBegin (NULL,NULL, + Box_BoxBegin (NULL, ViewType == Vie_VIEW ? CrsCfg_PutIconToPrint : NULL,NULL, ViewType == Vie_VIEW ? Hlp_COURSE_Information : diff --git a/swad_date.c b/swad_date.c index efbfe291..0ee65abd 100644 --- a/swad_date.c +++ b/swad_date.c @@ -291,8 +291,7 @@ void Dat_PutBoxToSelectDateFormat (void) Dat_Format_t Format; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Dates, - Dat_PutIconsDateFormat,NULL, + Box_BoxBegin (Txt_Dates,Dat_PutIconsDateFormat,NULL, Hlp_PROFILE_Settings_dates,Box_NOT_CLOSABLE); /***** Form with list of options *****/ diff --git a/swad_degree.c b/swad_degree.c index b95d6920..5dfaf5f9 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -683,7 +683,7 @@ static void Deg_ListDegrees (void) if (asprintf (&Title,Txt_Degrees_of_CENTER_X, Gbl.Hierarchy.Node[Hie_CTR].ShrtName) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title,Deg_PutIconsListingDegrees,NULL, + Box_BoxBegin (Title,Deg_PutIconsListingDegrees,NULL, Hlp_CENTER_Degrees,Box_NOT_CLOSABLE); free (Title); @@ -863,7 +863,7 @@ static void Deg_EditDegreesInternal (void) if (asprintf (&Title,Txt_Degrees_of_CENTER_X, Gbl.Hierarchy.Node[Hie_CTR].ShrtName) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title,Deg_PutIconsEditingDegrees,NULL, + Box_BoxBegin (Title,Deg_PutIconsEditingDegrees,NULL, Hlp_CENTER_Degrees,Box_NOT_CLOSABLE); free (Title); diff --git a/swad_degree_config.c b/swad_degree_config.c index c3867597..f3df13bc 100644 --- a/swad_degree_config.c +++ b/swad_degree_config.c @@ -119,7 +119,7 @@ static void DegCfg_Configuration (Vie_ViewType_t ViewType) Frm_DONT_PUT_FORM; /***** Begin box *****/ - Box_BoxBegin (NULL,NULL, + Box_BoxBegin (NULL, ViewType == Vie_VIEW ? DegCfg_PutIconsToPrintAndUpload : NULL,NULL, ViewType == Vie_VIEW ? Hlp_DEGREE_Information : diff --git a/swad_degree_type.c b/swad_degree_type.c index 83361359..d6351c08 100644 --- a/swad_degree_type.c +++ b/swad_degree_type.c @@ -206,12 +206,12 @@ static void DegTyp_ListDegreeTypes (const struct DegTyp_DegTypes *DegTypes, switch (NextAction) { case ActSeeDegTyp: - Box_BoxBegin (NULL,Txt_Types_of_degree, + Box_BoxBegin (Txt_Types_of_degree, DegTyp_PutIconsListingDegTypes,NULL, Hlp_CENTER_DegreeTypes,Box_NOT_CLOSABLE); break; case ActSeeUseGbl: - Box_BoxBegin (NULL,Txt_Types_of_degree, + Box_BoxBegin (Txt_Types_of_degree, DegTyp_PutIconToEditDegTypes,NULL, Hlp_ANALYTICS_Figures_types_of_degree,Box_NOT_CLOSABLE); break; @@ -266,8 +266,7 @@ static void DegTyp_EditDegreeTypesInternal (const struct DegTyp_DegTypes *DegTyp extern const char *Txt_Types_of_degree; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Types_of_degree, - DegTyp_PutIconsEditingDegreeTypes,NULL, + Box_BoxBegin (Txt_Types_of_degree,DegTyp_PutIconsEditingDegreeTypes,NULL, Hlp_CENTER_DegreeTypes_edit,Box_NOT_CLOSABLE); /***** Put a form to create a new degree type *****/ diff --git a/swad_department.c b/swad_department.c index 980db186..e1b4ff4e 100644 --- a/swad_department.c +++ b/swad_department.c @@ -298,8 +298,7 @@ static void Dpt_EditDepartmentsInternal (void) if (asprintf (&Title,Txt_Departments_of_INSTITUTION_X, Gbl.Hierarchy.Node[Hie_INS].FullName) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title, - Dpt_PutIconToViewDpts,NULL, + Box_BoxBegin (Title,Dpt_PutIconToViewDpts,NULL, Hlp_INSTITUTION_Departments_edit,Box_NOT_CLOSABLE); free (Title); diff --git a/swad_duplicate.c b/swad_duplicate.c index 13f96a6e..64d115ba 100644 --- a/swad_duplicate.c +++ b/swad_duplicate.c @@ -120,8 +120,7 @@ void Dup_ListDuplicateUsrs (void) unsigned NumInformants; /***** Begin box with list of possible duplicate users *****/ - Box_BoxBegin (NULL,Txt_Possibly_duplicate_users, - NULL,NULL, + Box_BoxBegin (Txt_Possibly_duplicate_users,NULL,NULL, Hlp_USERS_Duplicates_possibly_duplicate_users,Box_NOT_CLOSABLE); /***** List possible duplicated users *****/ @@ -241,8 +240,7 @@ static void Dup_ListSimilarUsrs (void) unsigned NumUsr; /***** Begin box with list of possible duplicate users *****/ - Box_BoxBegin (NULL,Txt_Similar_users, - NULL,NULL, + Box_BoxBegin (Txt_Similar_users,NULL,NULL, Hlp_USERS_Duplicates_similar_users,Box_NOT_CLOSABLE); /***** List possible similar users *****/ diff --git a/swad_enrolment.c b/swad_enrolment.c index e95cde3a..18b3da07 100644 --- a/swad_enrolment.c +++ b/swad_enrolment.c @@ -396,8 +396,7 @@ void Enr_ReqAcceptRegisterInCrs (void) }; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Enrolment, - NULL,NULL, + Box_BoxBegin (Txt_Enrolment,NULL,NULL, Hlp_USERS_SignUp_confirm_enrolment,Box_NOT_CLOSABLE); /***** Show message *****/ @@ -594,9 +593,9 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role) Frm_BeginForm (WhatToDo[Role].NextAction); /***** Begin box *****/ - Box_BoxBegin (NULL,*WhatToDo[Role].Title, - NULL,NULL, - Hlp_USERS_Administration_administer_multiple_users,Box_NOT_CLOSABLE); + Box_BoxBegin (*WhatToDo[Role].Title,NULL,NULL, + Hlp_USERS_Administration_administer_multiple_users, + Box_NOT_CLOSABLE); /***** Step 1: List of students to be enroled / removed *****/ HTM_DIV_Begin ("class=\"TITLE_%s LM\"",The_GetSuffix ()); @@ -673,9 +672,7 @@ void Enr_AskRemoveOldUsrs (void) Frm_BeginForm (ActRemOldUsr); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Eliminate_old_users, - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Eliminate_old_users,NULL,NULL,NULL,Box_NOT_CLOSABLE); /***** Form to request number of months without clicks *****/ HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ()); @@ -1721,8 +1718,7 @@ void Enr_AskRemAllStdsThisCrs (void) 1 << Rol_STD); // This course has students /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Remove_all_students, - NULL,NULL, + Box_BoxBegin (Txt_Remove_all_students,NULL,NULL, Hlp_USERS_Administration_remove_all_students,Box_NOT_CLOSABLE); if (NumStds) @@ -2145,8 +2141,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) Sco_GetScope ("ScopeEnr",Hie_CRS); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Enrolment_requests, - NULL,NULL, + Box_BoxBegin (Txt_Enrolment_requests,NULL,NULL, Hlp_USERS_Requests,Box_NOT_CLOSABLE); /***** Selection of scope and roles *****/ @@ -2475,8 +2470,7 @@ static void Enr_ReqAnotherUsrIDToRegisterRemove (Rol_Role_t Role) }; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Administer_one_user, - NULL,NULL, + Box_BoxBegin (Txt_Administer_one_user,NULL,NULL, Hlp_USERS_Administration_administer_one_user,Box_NOT_CLOSABLE); /***** Write form to request another user's ID *****/ diff --git a/swad_exam.c b/swad_exam.c index 27fffb16..ef1bf04f 100644 --- a/swad_exam.c +++ b/swad_exam.c @@ -239,8 +239,7 @@ void Exa_ListAllExams (struct Exa_Exams *Exams) Exams->CurrentPage = (unsigned) Pagination.CurrentPage; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Exams, - Exa_PutIconsListExams,Exams, + Box_BoxBegin (Txt_Exams,Exa_PutIconsListExams,Exams, Hlp_ASSESSMENT_Exams,Box_NOT_CLOSABLE); /***** Write links to pages *****/ @@ -426,8 +425,8 @@ void Exa_ShowOnlyOneExamBegin (struct Exa_Exams *Exams, extern const char *Txt_Exam; /***** Begin box *****/ - Box_BoxBegin (NULL,Exams->Exam.Title[0] ? Exams->Exam.Title : - Txt_Exam, + Box_BoxBegin (Exams->Exam.Title[0] ? Exams->Exam.Title : + Txt_Exam, Exa_PutIconsViewingOneExam,Exams, Hlp_ASSESSMENT_Exams,Box_NOT_CLOSABLE); @@ -1278,8 +1277,8 @@ void Exa_PutFormsOneExam (struct Exa_Exams *Exams, } /***** Begin box *****/ - Box_BoxBegin (NULL,Exams->Exam.Title[0] ? Exams->Exam.Title : - Txt_Exam, + Box_BoxBegin (Exams->Exam.Title[0] ? Exams->Exam.Title : + Txt_Exam, FunctionToDrawContextualIcons[ExistingNewExam],Exams, *HelpLink[ExistingNewExam],Box_NOT_CLOSABLE); diff --git a/swad_exam_print.c b/swad_exam_print.c index bd80ac70..cb726328 100644 --- a/swad_exam_print.c +++ b/swad_exam_print.c @@ -575,8 +575,7 @@ static void ExaPrn_ShowExamPrintToFillIt (struct Exa_Exams *Exams, extern const char *Hlp_ASSESSMENT_Exams_answer_exam; /***** Begin box *****/ - Box_BoxBegin (NULL,Exams->Exam.Title, - NULL,NULL, + Box_BoxBegin (Exams->Exam.Title,NULL,NULL, Hlp_ASSESSMENT_Exams_answer_exam,Box_NOT_CLOSABLE); /***** Heading *****/ diff --git a/swad_exam_result.c b/swad_exam_result.c index 3df95c03..acb0bedd 100644 --- a/swad_exam_result.c +++ b/swad_exam_result.c @@ -519,8 +519,7 @@ static void ExaRes_ShowResultsBegin (struct Exa_Exams *Exams, HTM_SECTION_Begin (ExaRes_RESULTS_BOX_ID); /***** Begin box *****/ - Box_BoxBegin (NULL,Title, - NULL,NULL, + Box_BoxBegin (Title,NULL,NULL, Hlp_ASSESSMENT_Exams_results,Box_NOT_CLOSABLE); /***** List exams to select *****/ @@ -566,9 +565,7 @@ static void ExaRes_ListExamsToSelect (struct Exa_Exams *Exams) Exa_ResetExam (&Exams->Exam); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Exams, - NULL,NULL, - NULL,Box_CLOSABLE); + Box_BoxBegin (Txt_Exams,NULL,NULL,NULL,Box_CLOSABLE); /***** Begin form to update the results depending on the exams selected *****/ @@ -1337,8 +1334,7 @@ static void ExaRes_ShowExamResult (const struct Exa_Exam *Exam, ExaRes_ComputeValidPrintScore (Print); /***** Begin box *****/ - Box_BoxBegin (NULL,Session->Title, - NULL,NULL, + Box_BoxBegin (Session->Title,NULL,NULL, Hlp_ASSESSMENT_Exams_results,Box_NOT_CLOSABLE); /***** Header *****/ diff --git a/swad_exam_session.c b/swad_exam_session.c index 663ae4c5..d1547bb2 100644 --- a/swad_exam_session.c +++ b/swad_exam_session.c @@ -147,8 +147,7 @@ void ExaSes_ListSessions (struct Exa_Exams *Exams, NumSessions = Exa_DB_GetSessions (&mysql_res,Exams->Exam.ExaCod); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Sessions, - ExaSes_PutIconsInListOfSessions,Exams, + Box_BoxBegin (Txt_Sessions,ExaSes_PutIconsInListOfSessions,Exams, Hlp_ASSESSMENT_Exams_sessions,Box_NOT_CLOSABLE); /***** Select whether show only my groups or all groups *****/ diff --git a/swad_exam_set.c b/swad_exam_set.c index 444173e1..7b32b3da 100644 --- a/swad_exam_set.c +++ b/swad_exam_set.c @@ -489,8 +489,7 @@ void ExaSet_ListExamSets (struct Exa_Exams *Exams) NumSets = Exa_DB_GetExamSets (&mysql_res,Exams->Exam.ExaCod); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Sets_of_questions, - NULL,NULL, + Box_BoxBegin (Txt_Sets_of_questions,NULL,NULL, Hlp_ASSESSMENT_Exams_question_sets,Box_NOT_CLOSABLE); /***** Show table with sets *****/ @@ -520,7 +519,7 @@ static void ExaSet_ListSetQuestions (struct Exa_Exams *Exams, bool ICanEditQuestions = Exa_CheckIfEditable (&Exams->Exam); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Questions, + Box_BoxBegin (Txt_Questions, ICanEditQuestions ? ExaSet_PutIconToAddNewQuestions : NULL, ICanEditQuestions ? Exams : diff --git a/swad_figure.c b/swad_figure.c index 8ffb518d..e1467780 100644 --- a/swad_figure.c +++ b/swad_figure.c @@ -101,8 +101,7 @@ static void Fig_ReqShowFigure (Fig_FigureType_t SelectedFigureType) Frm_BeginForm (ActSeeUseGbl); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Figures, - NULL,NULL, + Box_BoxBegin (Txt_Figures,NULL,NULL, Hlp_ANALYTICS_Figures,Box_NOT_CLOSABLE); /***** Begin table *****/ diff --git a/swad_follow.c b/swad_follow.c index 313564e2..36f08b17 100644 --- a/swad_follow.c +++ b/swad_follow.c @@ -136,8 +136,7 @@ void Fol_SuggestUsrsToFollowOnMainZone (void) &mysql_res))) { /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Who_to_follow, - Fol_PutIconsWhoToFollow,NULL, + Box_BoxBegin (Txt_Who_to_follow,Fol_PutIconsWhoToFollow,NULL, Hlp_START_Profiles_who_to_follow,Box_NOT_CLOSABLE); /***** Initialize structure with user's data *****/ @@ -455,9 +454,7 @@ static void Fol_ListFollowingUsr (struct Usr_Data *UsrDat) Usr_UsrDataConstructor (&FollowingUsrDat); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Following, - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Following,NULL,NULL,NULL,Box_NOT_CLOSABLE); for (NumUsr = 0; NumUsr < NumUsrs; @@ -527,9 +524,7 @@ static void Fol_ListFollowersUsr (struct Usr_Data *UsrDat) Usr_UsrDataConstructor (&FollowerUsrDat); /***** Begin box and table *****/ - Box_BoxBegin (NULL,Txt_Followers, - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Followers,NULL,NULL,NULL,Box_NOT_CLOSABLE); for (NumUsr = 0; NumUsr < NumUsrs; diff --git a/swad_forum.c b/swad_forum.c index cdd7fa73..f587e963 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -737,8 +737,7 @@ void For_ShowPostsOfAThread (struct For_Forums *Forums, /***** Begin box *****/ snprintf (FrameTitle,sizeof (FrameTitle),"%s: %s", Txt_Thread,Thread.Subject); - Box_BoxBegin (NULL,FrameTitle, - For_PutIconsOneThread,Forums, + Box_BoxBegin (FrameTitle,For_PutIconsOneThread,Forums, Hlp_COMMUNICATION_Forums_posts,Box_NOT_CLOSABLE); /***** Get posts of a thread from database *****/ @@ -1241,8 +1240,7 @@ void For_ShowForumList (struct For_Forums *Forums) Hie_GetMyHierarchy (Hie_INS); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Forums, - For_PutIconsForums,NULL, + Box_BoxBegin (Txt_Forums,For_PutIconsForums,NULL, Hlp_COMMUNICATION_Forums,Box_NOT_CLOSABLE); /***** Put a form to select which forums *****/ @@ -2094,8 +2092,7 @@ void For_ShowForumThreadsHighlightingOneThread (struct For_Forums *Forums, /***** Begin box for threads of this forum *****/ snprintf (FrameTitle,sizeof (FrameTitle),"%s: %s",Txt_Forum,ForumName); - Box_BoxBegin (NULL,FrameTitle, - For_PutIconsThreads,Forums, + Box_BoxBegin (FrameTitle,For_PutIconsThreads,Forums, Hlp_COMMUNICATION_Forums_threads,Box_NOT_CLOSABLE); /***** List the threads *****/ @@ -2769,8 +2766,8 @@ static void For_WriteFormForumPst (struct For_Forums *Forums, char *ClassInput; /***** Begin box *****/ - Box_BoxBegin (NULL,IsReply ? Txt_Post : - Txt_Thread, + Box_BoxBegin (IsReply ? Txt_Post : + Txt_Thread, NULL,NULL, IsReply ? Hlp_COMMUNICATION_Forums_new_post : Hlp_COMMUNICATION_Forums_new_thread, diff --git a/swad_game.c b/swad_game.c index a1f36a82..4858f4ad 100644 --- a/swad_game.c +++ b/swad_game.c @@ -252,8 +252,7 @@ void Gam_ListAllGames (struct Gam_Games *Games) Games->CurrentPage = (unsigned) Pagination.CurrentPage; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Games, - Gam_PutIconsListingGames,Games, + Box_BoxBegin (Txt_Games,Gam_PutIconsListingGames,Games, Hlp_ASSESSMENT_Games,Box_NOT_CLOSABLE); /***** Write links to pages *****/ @@ -477,8 +476,8 @@ void Gam_ShowOnlyOneGameBegin (struct Gam_Games *Games, extern const char *Txt_Game; /***** Begin box *****/ - Box_BoxBegin (NULL,Games->Game.Title[0] ? Games->Game.Title : - Txt_Game, + Box_BoxBegin (Games->Game.Title[0] ? Games->Game.Title : + Txt_Game, Gam_PutIconsViewingOneGame,Games, Hlp_ASSESSMENT_Games,Box_NOT_CLOSABLE); @@ -1283,8 +1282,7 @@ void Gam_PutFormsOneGame (struct Gam_Games *Games, } /***** Begin box *****/ - Box_BoxBegin (NULL, - Games->Game.Title[0] ? Games->Game.Title : + Box_BoxBegin (Games->Game.Title[0] ? Games->Game.Title : Txt_Game, FunctionToDrawContextualIcons[ExistingNewGame],Games, *HelpLink[ExistingNewGame],Box_NOT_CLOSABLE); @@ -1637,22 +1635,20 @@ static void Gam_ListGameQuestions (struct Gam_Games *Games) NumQsts = Gam_DB_GetGameQuestionsBasic (&mysql_res,Games->Game.GamCod); /***** Begin box *****/ - if (ICanEditQuestions) - Box_BoxBegin (NULL,Txt_Questions, - Gam_PutIconToAddNewQuestions,Games, - Hlp_ASSESSMENT_Games_questions,Box_NOT_CLOSABLE); - else - Box_BoxBegin (NULL,Txt_Questions, - NULL,NULL, - Hlp_ASSESSMENT_Games_questions,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Questions, + ICanEditQuestions ? Gam_PutIconToAddNewQuestions : + NULL, + ICanEditQuestions ? Games : + NULL, + Hlp_ASSESSMENT_Games_questions,Box_NOT_CLOSABLE); - /***** Show table with questions *****/ - if (NumQsts) - Gam_ListOneOrMoreQuestionsForEdition (Games,NumQsts,mysql_res, - ICanEditQuestions); + /***** Show table with questions *****/ + if (NumQsts) + Gam_ListOneOrMoreQuestionsForEdition (Games,NumQsts,mysql_res, + ICanEditQuestions); - /***** Free structure that stores the query result *****/ - DB_FreeMySQLResult (&mysql_res); + /***** Free structure that stores the query result *****/ + DB_FreeMySQLResult (&mysql_res); /***** End box *****/ Box_BoxEnd (); diff --git a/swad_group.c b/swad_group.c index 5c31ada8..8d76ef1d 100644 --- a/swad_group.c +++ b/swad_group.c @@ -278,8 +278,7 @@ static void Grp_EditGroupTypes (void) extern const char *Txt_There_are_no_types_of_group_in_the_course_X; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Types_of_group, - Grp_PutIconsEditingGroupTypes,NULL, + Box_BoxBegin (Txt_Types_of_group,Grp_PutIconsEditingGroupTypes,NULL, Hlp_USERS_Groups,Box_NOT_CLOSABLE); /***** Put a form to create a new group type *****/ @@ -307,8 +306,7 @@ static void Grp_EditGroups (const struct Roo_Rooms *Rooms) extern const char *Txt_No_groups_have_been_created_in_the_course_X; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Groups, - Grp_PutIconsEditingGroups,NULL, + Box_BoxBegin (Txt_Groups,Grp_PutIconsEditingGroups,NULL, Hlp_USERS_Groups,Box_NOT_CLOSABLE); /***** Put a form to create a new group *****/ @@ -356,7 +354,7 @@ void Grp_ShowFormToSelectSeveralGroups (void (*FuncPars) (void *Args),void *Args ICanEdit = !Frm_CheckIfInside () && (Gbl.Usrs.Me.Role.Logged == Rol_TCH || Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM); - Box_BoxBegin (NULL,Txt_Groups, + Box_BoxBegin (Txt_Groups, ICanEdit ? Grp_PutIconToEditGroups : NULL,NULL, Hlp_USERS_Groups,Box_CLOSABLE); @@ -1729,46 +1727,43 @@ void Grp_ShowLstGrpsToChgMyGrps (void) } /***** Begin box *****/ - if (ICanEdit) - Box_BoxBegin (NULL,Txt_My_groups, - Grp_PutIconToEditGroups,NULL, - Hlp_USERS_Groups,Box_NOT_CLOSABLE); - else - Box_BoxBegin (NULL,Txt_My_groups, - NULL,NULL, - Hlp_USERS_Groups,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_My_groups, + ICanEdit ? Grp_PutIconToEditGroups : + NULL, + NULL, + Hlp_USERS_Groups,Box_NOT_CLOSABLE); - if (Gbl.Crs.Grps.NumGrps) // This course has groups - { - /***** Begin form *****/ - if (PutFormToChangeGrps) - Frm_BeginForm (ActChgGrp); - - /***** List the groups the user belongs to for change *****/ - HTM_TABLE_BeginWidePadding (2); - for (NumGrpTyp = 0; - NumGrpTyp < Gbl.Crs.Grps.GrpTypes.NumGrpTypes; - NumGrpTyp++) - if (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps) // If there are groups of this type - { - ICanChangeMyGrps |= Grp_ListGrpsForChangeMySelection (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp], - &NumGrpsThisTypeIBelong); - NumGrpsIBelong += NumGrpsThisTypeIBelong; - } - HTM_TABLE_End (); - - /***** End form *****/ - if (PutFormToChangeGrps) + if (Gbl.Crs.Grps.NumGrps) // This course has groups { - if (ICanChangeMyGrps) - Btn_PutConfirmButton (NumGrpsIBelong ? Txt_Change_my_groups : - Txt_Enrol_in_groups); - Frm_EndForm (); + /***** Begin form *****/ + if (PutFormToChangeGrps) + Frm_BeginForm (ActChgGrp); + + /***** List the groups the user belongs to for change *****/ + HTM_TABLE_BeginWidePadding (2); + for (NumGrpTyp = 0; + NumGrpTyp < Gbl.Crs.Grps.GrpTypes.NumGrpTypes; + NumGrpTyp++) + if (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps) // If there are groups of this type + { + ICanChangeMyGrps |= Grp_ListGrpsForChangeMySelection (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp], + &NumGrpsThisTypeIBelong); + NumGrpsIBelong += NumGrpsThisTypeIBelong; + } + HTM_TABLE_End (); + + /***** End form *****/ + if (PutFormToChangeGrps) + { + if (ICanChangeMyGrps) + Btn_PutConfirmButton (NumGrpsIBelong ? Txt_Change_my_groups : + Txt_Enrol_in_groups); + Frm_EndForm (); + } } - } - else // This course has no groups - Ale_ShowAlert (Ale_INFO,Txt_No_groups_have_been_created_in_the_course_X, - Gbl.Hierarchy.Node[Hie_CRS].FullName); + else // This course has no groups + Ale_ShowAlert (Ale_INFO,Txt_No_groups_have_been_created_in_the_course_X, + Gbl.Hierarchy.Node[Hie_CRS].FullName); /***** End box *****/ Box_BoxEnd (); diff --git a/swad_hierarchy.c b/swad_hierarchy.c index 089ac7dd..4aaca91f 100644 --- a/swad_hierarchy.c +++ b/swad_hierarchy.c @@ -1535,8 +1535,7 @@ static void Hie_WriteListMyHierarchyToSelectNode (void) Lay_LastItem_t IsLastItemInLevel[1 + 6]; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_My_courses, - Hie_PutIconToSearchCourses,NULL, + Box_BoxBegin (Txt_My_courses,Hie_PutIconToSearchCourses,NULL, Hlp_PROFILE_Courses,Box_NOT_CLOSABLE); /***** Begin list *****/ diff --git a/swad_holiday.c b/swad_holiday.c index 2550d2d7..7174922e 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -136,8 +136,7 @@ void Hld_SeeAllHolidays (void) Hld_GetListHolidays (&Holidays); /***** Table head *****/ - Box_BoxBegin (NULL,Txt_Holidays, - Hld_PutIconsSeeHolidays,NULL, + Box_BoxBegin (Txt_Holidays,Hld_PutIconsSeeHolidays,NULL, Hlp_INSTITUTION_Holidays,Box_NOT_CLOSABLE); if (Holidays.Num) @@ -489,9 +488,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays, unsigned CurrentYear = Dat_GetCurrentYear (); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Holidays, - Hld_PutIconsEditHolidays,NULL, - // Cal_PutIconToSeeCalendar,NULL, + Box_BoxBegin (Txt_Holidays,Hld_PutIconsEditHolidays,NULL, Hlp_INSTITUTION_Holidays_edit,Box_NOT_CLOSABLE); /***** Put a form to create a new holiday *****/ diff --git a/swad_icon.c b/swad_icon.c index e7cfdc95..da52814b 100644 --- a/swad_icon.c +++ b/swad_icon.c @@ -157,8 +157,7 @@ void Ico_PutIconsToSelectIconSet (void) Ico_IconSet_t IconSet; char Icon[PATH_MAX + 1]; - Box_BoxBegin (NULL,Txt_Icons, - Ico_PutIconsIconSet,NULL, + Box_BoxBegin (Txt_Icons,Ico_PutIconsIconSet,NULL, Hlp_PROFILE_Settings_icons,Box_NOT_CLOSABLE); Set_BeginSettingsHead (); Set_BeginOneSettingSelector (); diff --git a/swad_indicator.c b/swad_indicator.c index 9f728c20..6729ace1 100644 --- a/swad_indicator.c +++ b/swad_indicator.c @@ -121,8 +121,7 @@ void Ind_ReqIndicatorsCourses (void) Ind_GetParsIndicators (&Indicators); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Indicators_of_courses, - NULL,NULL, + Box_BoxBegin (Txt_Indicators_of_courses,NULL,NULL, Hlp_ANALYTICS_Indicators,Box_NOT_CLOSABLE); /***** Form to update indicators *****/ diff --git a/swad_info.c b/swad_info.c index c973dc64..8bb9cf8a 100644 --- a/swad_info.c +++ b/swad_info.c @@ -299,7 +299,7 @@ void Inf_ShowInfo (void) if (ShowWarningNoInfo) { - Box_BoxBegin (NULL,Txt_INFO_TITLE[Gbl.Crs.Info.Type], + Box_BoxBegin (Txt_INFO_TITLE[Gbl.Crs.Info.Type], ICanEdit ? Inf_PutIconToEditInfo : NULL, ICanEdit ? &Gbl.Crs.Info.Type : @@ -446,9 +446,7 @@ void Inf_WriteMsgYouMustReadInfo (void) Inf_Type_t InfoType; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Required_reading, - NULL,NULL, - NULL,Box_CLOSABLE); + Box_BoxBegin (Txt_Required_reading,NULL,NULL,NULL,Box_CLOSABLE); /***** Write message *****/ Ale_ShowAlert (Ale_WARNING,Txt_You_should_read_the_following_information); @@ -765,21 +763,19 @@ static void Inf_ShowPage (const char *URL) }; /***** Begin box *****/ - if (ICanEdit) - Box_BoxBegin (NULL,Txt_INFO_TITLE[Gbl.Crs.Info.Type], - Inf_PutIconToEditInfo,&Gbl.Crs.Info.Type, - Help[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE); - else - Box_BoxBegin (NULL,Txt_INFO_TITLE[Gbl.Crs.Info.Type], - NULL,NULL, - Help[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_INFO_TITLE[Gbl.Crs.Info.Type], + ICanEdit ? Inf_PutIconToEditInfo : + NULL, + ICanEdit ? &Gbl.Crs.Info.Type : + NULL, + Help[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE); - /***** Link to view in a new window *****/ - HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"FORM_OUT_%s BOLD\"", - URL,The_GetSuffix ()); - Ico_PutIconTextLink ("expand-arrows-alt.svg",Ico_BLACK, - Txt_View_in_a_new_window); - HTM_A_End (); + /***** Link to view in a new window *****/ + HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"FORM_OUT_%s BOLD\"", + URL,The_GetSuffix ()); + Ico_PutIconTextLink ("expand-arrows-alt.svg",Ico_BLACK, + Txt_View_in_a_new_window); + HTM_A_End (); /***** End box *****/ Box_BoxEnd (); @@ -1428,32 +1424,31 @@ static bool Inf_CheckAndShowPlainTxt (void) if (TxtHTML[0]) { /***** Begin box *****/ - if (ICanEdit) - Box_BoxBegin (NULL,Txt_INFO_TITLE[Gbl.Crs.Info.Type], - Inf_PutIconToEditInfo,&Gbl.Crs.Info.Type, - Help[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE); - else - Box_BoxBegin (NULL,Txt_INFO_TITLE[Gbl.Crs.Info.Type], - NULL,NULL, - Help[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_INFO_TITLE[Gbl.Crs.Info.Type], + ICanEdit ? Inf_PutIconToEditInfo : + NULL, + ICanEdit ? &Gbl.Crs.Info.Type : + NULL, + Help[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE); - if (Gbl.Crs.Info.Type == Inf_INTRODUCTION || - Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE) - Lay_WriteHeaderClassPhoto (Vie_VIEW); + if (Gbl.Crs.Info.Type == Inf_INTRODUCTION || + Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE) + Lay_WriteHeaderClassPhoto (Vie_VIEW); - HTM_DIV_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ()); + HTM_DIV_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ()); - /***** Convert to respectful HTML and insert links *****/ - Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, - TxtHTML,Cns_MAX_BYTES_LONG_TEXT, - Str_DONT_REMOVE_SPACES); - ALn_InsertLinks (TxtHTML,Cns_MAX_BYTES_LONG_TEXT,60); // Insert links + /***** Convert to respectful HTML and insert links *****/ + Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, + TxtHTML,Cns_MAX_BYTES_LONG_TEXT, + Str_DONT_REMOVE_SPACES); + ALn_InsertLinks (TxtHTML,Cns_MAX_BYTES_LONG_TEXT,60); // Insert links - /***** Write text *****/ - HTM_Txt (TxtHTML); + /***** Write text *****/ + HTM_Txt (TxtHTML); + + HTM_DIV_End (); /***** End box *****/ - HTM_DIV_End (); Box_BoxEnd (); return true; @@ -1518,95 +1513,94 @@ static bool Inf_CheckAndShowRichTxt (void) if (TxtMD[0]) { /***** Begin box *****/ - if (ICanEdit) - Box_BoxBegin (NULL,Txt_INFO_TITLE[Gbl.Crs.Info.Type], - Inf_PutIconToEditInfo,&Gbl.Crs.Info.Type, - Help[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE); - else - Box_BoxBegin (NULL,Txt_INFO_TITLE[Gbl.Crs.Info.Type], - NULL,NULL, - Help[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_INFO_TITLE[Gbl.Crs.Info.Type], + ICanEdit ? Inf_PutIconToEditInfo : + NULL, + ICanEdit ? &Gbl.Crs.Info.Type : + NULL, + Help[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE); - if (Gbl.Crs.Info.Type == Inf_INTRODUCTION || - Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE) - Lay_WriteHeaderClassPhoto (Vie_VIEW); + if (Gbl.Crs.Info.Type == Inf_INTRODUCTION || + Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE) + Lay_WriteHeaderClassPhoto (Vie_VIEW); - HTM_DIV_Begin ("id=\"crs_info\" class=\"LM CRS_INFO_%s\"", - The_GetSuffix ()); + HTM_DIV_Begin ("id=\"crs_info\" class=\"LM CRS_INFO_%s\"", + The_GetSuffix ()); - /***** Store text into a temporary .md file in HTML output directory *****/ - // TODO: change to another directory? - /* Create a unique name for the .md file */ - UniqueNameEncrypted = Cry_GetUniqueNameEncrypted (); - snprintf (PathFileMD,sizeof (PathFileMD),"%s/%s.md", - Cfg_PATH_OUT_PRIVATE,UniqueNameEncrypted); - snprintf (PathFileHTML,sizeof (PathFileHTML),"%s/%s.md.html", // Do not use only .html because that is the output temporary file - Cfg_PATH_OUT_PRIVATE,UniqueNameEncrypted); + /***** Store text into a temporary .md file in HTML output directory *****/ + // TODO: change to another directory? + /* Create a unique name for the .md file */ + UniqueNameEncrypted = Cry_GetUniqueNameEncrypted (); + snprintf (PathFileMD,sizeof (PathFileMD),"%s/%s.md", + Cfg_PATH_OUT_PRIVATE,UniqueNameEncrypted); + snprintf (PathFileHTML,sizeof (PathFileHTML),"%s/%s.md.html", // Do not use only .html because that is the output temporary file + Cfg_PATH_OUT_PRIVATE,UniqueNameEncrypted); - /* Open Markdown file for writing */ - if ((FileMD = fopen (PathFileMD,"wb")) == NULL) - Err_ShowErrorAndExit ("Can not create temporary Markdown file."); + /* Open Markdown file for writing */ + if ((FileMD = fopen (PathFileMD,"wb")) == NULL) + Err_ShowErrorAndExit ("Can not create temporary Markdown file."); - /* Write text into Markdown file */ - fprintf (FileMD,"%s",TxtMD); + /* Write text into Markdown file */ + fprintf (FileMD,"%s",TxtMD); - /* Close Markdown file */ - fclose (FileMD); + /* Close Markdown file */ + fclose (FileMD); - /***** Convert from Markdown to HTML *****/ - /* MathJax 2.5.1 -#ifdef Cfg_MATHJAX_LOCAL - // Use the local copy of MathJax - snprintf (MathJaxURL,sizeof (MathJaxURL), - "=%s/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML", - Cfg_URL_SWAD_PUBLIC); -#else - // Use the MathJax Content Delivery Network (CDN) - MathJaxURL[0] = '\0'; -#endif - */ - /* MathJax 3.0.1 */ -#ifdef Cfg_MATHJAX_LOCAL - // Use the local copy of MathJax - snprintf (MathJaxURL,sizeof (MathJaxURL),"=%s/mathjax/tex-chtml.js", - Cfg_URL_SWAD_PUBLIC); -#else - // Use the MathJax Content Delivery Network (CDN) - MathJaxURL[0] = '\0'; -#endif - // --ascii uses only ascii characters in output - // (uses numerical entities instead of UTF-8) - // is mandatory in order to convert (with iconv) the UTF-8 output of pandoc to WINDOWS-1252 - snprintf (Command,sizeof (Command), - "iconv -f WINDOWS-1252 -t UTF-8 %s" - " | " - "pandoc --ascii --mathjax%s -f markdown_github+tex_math_dollars -t html5" - " | " - "iconv -f UTF-8 -t WINDOWS-1252 -o %s", - PathFileMD, - MathJaxURL, - PathFileHTML); - ReturnCode = system (Command); - if (ReturnCode == -1) - Err_ShowErrorAndExit ("Error when running command to convert from Markdown to HTML."); + /***** Convert from Markdown to HTML *****/ + /* MathJax 2.5.1 + #ifdef Cfg_MATHJAX_LOCAL + // Use the local copy of MathJax + snprintf (MathJaxURL,sizeof (MathJaxURL), + "=%s/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML", + Cfg_URL_SWAD_PUBLIC); + #else + // Use the MathJax Content Delivery Network (CDN) + MathJaxURL[0] = '\0'; + #endif + */ + /* MathJax 3.0.1 */ + #ifdef Cfg_MATHJAX_LOCAL + // Use the local copy of MathJax + snprintf (MathJaxURL,sizeof (MathJaxURL),"=%s/mathjax/tex-chtml.js", + Cfg_URL_SWAD_PUBLIC); + #else + // Use the MathJax Content Delivery Network (CDN) + MathJaxURL[0] = '\0'; + #endif + // --ascii uses only ascii characters in output + // (uses numerical entities instead of UTF-8) + // is mandatory in order to convert (with iconv) the UTF-8 output of pandoc to WINDOWS-1252 + snprintf (Command,sizeof (Command), + "iconv -f WINDOWS-1252 -t UTF-8 %s" + " | " + "pandoc --ascii --mathjax%s -f markdown_github+tex_math_dollars -t html5" + " | " + "iconv -f UTF-8 -t WINDOWS-1252 -o %s", + PathFileMD, + MathJaxURL, + PathFileHTML); + ReturnCode = system (Command); + if (ReturnCode == -1) + Err_ShowErrorAndExit ("Error when running command to convert from Markdown to HTML."); - /***** Remove Markdown file *****/ - unlink (PathFileMD); + /***** Remove Markdown file *****/ + unlink (PathFileMD); - /***** Copy HTML file just created to HTML output *****/ - /* Open temporary HTML file for reading */ - if ((FileHTML = fopen (PathFileHTML,"rb")) == NULL) - Err_ShowErrorAndExit ("Can not open temporary HTML file."); + /***** Copy HTML file just created to HTML output *****/ + /* Open temporary HTML file for reading */ + if ((FileHTML = fopen (PathFileHTML,"rb")) == NULL) + Err_ShowErrorAndExit ("Can not open temporary HTML file."); - /* Copy from temporary HTML file to output file */ - Fil_FastCopyOfOpenFiles (FileHTML,Fil_GetOutputFile ()); + /* Copy from temporary HTML file to output file */ + Fil_FastCopyOfOpenFiles (FileHTML,Fil_GetOutputFile ()); - /* Close and remove temporary HTML file */ - fclose (FileHTML); - unlink (PathFileHTML); + /* Close and remove temporary HTML file */ + fclose (FileHTML); + unlink (PathFileHTML); + + HTM_DIV_End (); /***** End box *****/ - HTM_DIV_End (); Box_BoxEnd (); return true; @@ -1656,8 +1650,7 @@ void Inf_EditPlainTxtInfo (void) /***** Begin form and box *****/ Frm_BeginForm (Inf_ActionsRcvPlaTxtInfo[Gbl.Crs.Info.Type]); - Box_BoxBegin (NULL,Txt_INFO_TITLE[Gbl.Crs.Info.Type], - NULL,NULL, + Box_BoxBegin (Txt_INFO_TITLE[Gbl.Crs.Info.Type],NULL,NULL, HelpEdit[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE); if (Gbl.Crs.Info.Type == Inf_INTRODUCTION || @@ -1724,8 +1717,7 @@ void Inf_EditRichTxtInfo (void) /***** Begin form and box *****/ Frm_BeginForm (Inf_ActionsRcvRchTxtInfo[Gbl.Crs.Info.Type]); - Box_BoxBegin (NULL,Txt_INFO_TITLE[Gbl.Crs.Info.Type], - NULL,NULL, + Box_BoxBegin (Txt_INFO_TITLE[Gbl.Crs.Info.Type],NULL,NULL, HelpEdit[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE); if (Gbl.Crs.Info.Type == Inf_INTRODUCTION || diff --git a/swad_institution.c b/swad_institution.c index e383e41a..a945915f 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -296,7 +296,7 @@ static void Ins_ListInstitutions (void) if (asprintf (&Title,Txt_Institutions_of_COUNTRY_X, Gbl.Hierarchy.Node[Hie_CTY].FullName) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title,Ins_PutIconsListingInstitutions,NULL, + Box_BoxBegin (Title,Ins_PutIconsListingInstitutions,NULL, Hlp_COUNTRY_Institutions,Box_NOT_CLOSABLE); free (Title); @@ -531,7 +531,7 @@ static void Ins_EditInstitutionsInternal (void) if (asprintf (&Title,Txt_Institutions_of_COUNTRY_X, Gbl.Hierarchy.Node[Hie_CTY].FullName) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title,Ins_PutIconsEditingInstitutions,NULL, + Box_BoxBegin (Title,Ins_PutIconsEditingInstitutions,NULL, Hlp_COUNTRY_Institutions,Box_NOT_CLOSABLE); free (Title); @@ -1645,8 +1645,7 @@ void Ins_GetAndShowInstitutionsStats (void) struct Fig_Figures Figures; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_HIERARCHY_PLURAL_Abc[Hie_INS], - NULL,NULL, + Box_BoxBegin (Txt_HIERARCHY_PLURAL_Abc[Hie_INS],NULL,NULL, Hlp_ANALYTICS_Figures_institutions,Box_NOT_CLOSABLE); /***** Form to select type of list used to display degree photos *****/ @@ -1689,8 +1688,7 @@ static void Ins_GetAndShowInssOrderedByNumCtrs (void) MYSQL_RES *mysql_res; unsigned NumInss; - Box_BoxBegin (NULL,Txt_Institutions_by_number_of_centers, - NULL,NULL, + Box_BoxBegin (Txt_Institutions_by_number_of_centers,NULL,NULL, NULL,Box_NOT_CLOSABLE); HTM_TABLE_Begin ("TBL_SCROLL"); @@ -1718,8 +1716,7 @@ static void Ins_GetAndShowInssOrderedByNumDegs (void) MYSQL_RES *mysql_res; unsigned NumInss; - Box_BoxBegin (NULL,Txt_Institutions_by_number_of_degrees, - NULL,NULL, + Box_BoxBegin (Txt_Institutions_by_number_of_degrees,NULL,NULL, NULL,Box_NOT_CLOSABLE); HTM_TABLE_Begin ("TBL_SCROLL"); @@ -1747,8 +1744,7 @@ static void Ins_GetAndShowInssOrderedByNumCrss (void) MYSQL_RES *mysql_res; unsigned NumInss; - Box_BoxBegin (NULL,Txt_Institutions_by_number_of_courses, - NULL,NULL, + Box_BoxBegin (Txt_Institutions_by_number_of_courses,NULL,NULL, NULL,Box_NOT_CLOSABLE); HTM_TABLE_Begin ("TBL_SCROLL"); @@ -1776,8 +1772,7 @@ static void Ins_GetAndShowInssOrderedByNumUsrsInCrss (void) MYSQL_RES *mysql_res; unsigned NumInss; - Box_BoxBegin (NULL,Txt_Institutions_by_number_of_users_in_courses, - NULL,NULL, + Box_BoxBegin (Txt_Institutions_by_number_of_users_in_courses,NULL,NULL, NULL,Box_NOT_CLOSABLE); HTM_TABLE_Begin ("TBL_SCROLL"); @@ -1806,7 +1801,7 @@ static void Ins_GetAndShowInssOrderedByNumUsrsWhoClaimToBelongToThem (void) MYSQL_RES *mysql_res; unsigned NumInss; - Box_BoxBegin (NULL,Txt_Institutions_by_number_of_users_who_claim_to_belong_to_them, + Box_BoxBegin (Txt_Institutions_by_number_of_users_who_claim_to_belong_to_them, NULL,NULL, NULL,Box_NOT_CLOSABLE); HTM_TABLE_Begin ("TBL_SCROLL"); diff --git a/swad_institution_config.c b/swad_institution_config.c index 07043d85..6144b763 100644 --- a/swad_institution_config.c +++ b/swad_institution_config.c @@ -128,7 +128,7 @@ static void InsCfg_Configuration (Vie_ViewType_t ViewType) Frm_DONT_PUT_FORM; /***** Begin box *****/ - Box_BoxBegin (NULL,NULL, + Box_BoxBegin (NULL, ViewType == Vie_VIEW ? InsCfg_PutIconsToPrintAndUpload : NULL,NULL, ViewType == Vie_VIEW ? Hlp_INSTITUTION_Information : diff --git a/swad_language.c b/swad_language.c index f1af2585..6425caf1 100644 --- a/swad_language.c +++ b/swad_language.c @@ -99,8 +99,7 @@ void Lan_PutBoxToSelectLanguage (void) extern const char *Hlp_PROFILE_Settings_language; extern const char *Txt_Language; - Box_BoxBegin (NULL,Txt_Language, - Lan_PutIconsLanguage,NULL, + Box_BoxBegin (Txt_Language,Lan_PutIconsLanguage,NULL, Hlp_PROFILE_Settings_language,Box_NOT_CLOSABLE); Lan_PutSelectorToSelectLanguage (); Box_BoxEnd (); diff --git a/swad_link.c b/swad_link.c index 64d83c06..260da034 100644 --- a/swad_link.c +++ b/swad_link.c @@ -119,8 +119,7 @@ void Lnk_SeeLinks (void) Lnk_GetListLinks (&Links); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Links, - Lnk_PutIconsListingLinks,NULL, + Box_BoxBegin (Txt_Links,Lnk_PutIconsListingLinks,NULL, Hlp_SYSTEM_Links,Box_NOT_CLOSABLE); /***** Write all links *****/ @@ -246,8 +245,7 @@ static void Lnk_EditLinksInternal (void) Lnk_GetListLinks (&Links); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Links, - Lnk_PutIconsEditingLinks,NULL, + Box_BoxBegin (Txt_Links,Lnk_PutIconsEditingLinks,NULL, Hlp_SYSTEM_Links_edit,Box_NOT_CLOSABLE); /***** Put a form to create a new link *****/ diff --git a/swad_log.c b/swad_log.c index e13bbfb7..61883661 100644 --- a/swad_log.c +++ b/swad_log.c @@ -168,8 +168,7 @@ void Log_ShowLastClicks (void) Mnu_ContextMenuEnd (); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Last_clicks_in_real_time, - NULL,NULL, + Box_BoxBegin (Txt_Last_clicks_in_real_time,NULL,NULL, Hlp_USERS_Connected_last_clicks,Box_NOT_CLOSABLE); /***** Get and show last clicks *****/ diff --git a/swad_logo.c b/swad_logo.c index c9a01bc3..bb55ddd3 100644 --- a/swad_logo.c +++ b/swad_logo.c @@ -244,7 +244,7 @@ void Lgo_RequestLogo (Hie_Level_t Level) (unsigned) Cod); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Logo, + Box_BoxBegin (Txt_Logo, Fil_CheckIfPathExists (PathLogo) ? FunctionToDrawContextualIcons[Level] : NULL,NULL, NULL,Box_NOT_CLOSABLE); diff --git a/swad_mail.c b/swad_mail.c index ca560f95..2a3c7626 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -442,8 +442,7 @@ static void Mai_ListMailDomainsForEdition (const struct Mai_Mails *Mails) struct Mail *Mai; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Email_domains_allowed_for_notifications, - NULL,NULL, + Box_BoxBegin (Txt_Email_domains_allowed_for_notifications,NULL,NULL, Hlp_START_Domains_edit,Box_NOT_CLOSABLE); /***** Put a form to create a new mail *****/ @@ -835,8 +834,7 @@ static void Mai_ListEmails (__attribute__((unused)) void *Args) const char *Ptr; /***** Begin the box used to list the emails *****/ - Box_BoxBegin (NULL,Txt_Email_addresses, - NULL,NULL, + Box_BoxBegin (Txt_Email_addresses,NULL,NULL, Hlp_COMMUNICATION_Email,Box_NOT_CLOSABLE); /***** Begin list with users' email addresses *****/ @@ -1021,8 +1019,7 @@ void Mai_ShowFormChangeMyEmail (bool IMustFillInEmail,bool IShouldConfirmEmail) HTM_SECTION_Begin (Mai_EMAIL_SECTION_ID); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Email, - Acc_PutLinkToRemoveMyAccount,NULL, + Box_BoxBegin (Txt_Email,Acc_PutLinkToRemoveMyAccount,NULL, Hlp_PROFILE_Account,Box_NOT_CLOSABLE); /***** Show form to change email *****/ @@ -1050,9 +1047,7 @@ void Mai_ShowFormChangeOtherUsrEmail (void) HTM_SECTION_Begin (Mai_EMAIL_SECTION_ID); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Email, - NULL,NULL, - Hlp_PROFILE_Account,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Email,NULL,NULL,Hlp_PROFILE_Account,Box_NOT_CLOSABLE); /***** Show form to change email *****/ Mai_ShowFormChangeUsrEmail (Usr_OTHER, diff --git a/swad_match.c b/swad_match.c index 19c90b41..f0809d0b 100644 --- a/swad_match.c +++ b/swad_match.c @@ -280,8 +280,7 @@ void Mch_ListMatches (struct Gam_Games *Games, NumMatches = Mch_DB_GetMatchesInGame (&mysql_res,Games->Game.GamCod); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Matches, - Mch_PutIconsInListOfMatches,Games, + Box_BoxBegin (Txt_Matches,Mch_PutIconsInListOfMatches,Games, Hlp_ASSESSMENT_Games_matches,Box_NOT_CLOSABLE); /***** Select whether show only my groups or all groups *****/ diff --git a/swad_match_result.c b/swad_match_result.c index 8ada7bb8..d7cc9a7f 100644 --- a/swad_match_result.c +++ b/swad_match_result.c @@ -489,8 +489,7 @@ static void MchRes_ShowResultsBegin (struct Gam_Games *Games, /***** Begin box *****/ HTM_SECTION_Begin (MchRes_RESULTS_BOX_ID); - Box_BoxBegin (NULL,Title, - NULL,NULL, + Box_BoxBegin (Title,NULL,NULL, Hlp_ASSESSMENT_Games_results,Box_NOT_CLOSABLE); /***** List games to select *****/ @@ -530,9 +529,7 @@ static void MchRes_ListGamesToSelect (struct Gam_Games *Games) Gam_ResetGame (&Games->Game); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Games, - NULL,NULL, - NULL,Box_CLOSABLE); + Box_BoxBegin (Txt_Games,NULL,NULL,NULL,Box_CLOSABLE); /***** Begin form to update the results depending on the games selected *****/ @@ -1094,8 +1091,7 @@ void MchRes_ShowOneMchResult (void) Mch_GetMatchQuestionsFromDB (&Print); /***** Begin box *****/ - Box_BoxBegin (NULL,Match.Title, - NULL,NULL, + Box_BoxBegin (Match.Title,NULL,NULL, Hlp_ASSESSMENT_Games_results,Box_NOT_CLOSABLE); Lay_WriteHeaderClassPhoto (Vie_VIEW); diff --git a/swad_media.c b/swad_media.c index 0ef6d801..8aee6271 100644 --- a/swad_media.c +++ b/swad_media.c @@ -425,8 +425,7 @@ void Med_PutMediaUploader (int NumMedia,const char *ClassInput) Id); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Multimedia, - NULL,NULL, + Box_BoxBegin (Txt_Multimedia,NULL,NULL, Hlp_Multimedia,Box_NOT_CLOSABLE); /***** Action to perform on media *****/ diff --git a/swad_menu.c b/swad_menu.c index 9fb5255d..3cdd5810 100644 --- a/swad_menu.c +++ b/swad_menu.c @@ -309,9 +309,9 @@ void Mnu_PutIconsToSelectMenu (void) extern const char *Txt_MENU_NAMES[Mnu_NUM_MENUS]; Mnu_Menu_t Menu; - Box_BoxBegin (NULL,Txt_Menu, - Mnu_PutIconsMenu,NULL, + Box_BoxBegin (Txt_Menu,Mnu_PutIconsMenu,NULL, Hlp_PROFILE_Settings_menu,Box_NOT_CLOSABLE); + Set_BeginSettingsHead (); Set_BeginOneSettingSelector (); for (Menu = (Mnu_Menu_t) 0; @@ -328,6 +328,7 @@ void Mnu_PutIconsToSelectMenu (void) } Set_EndOneSettingSelector (); Set_EndSettingsHead (); + Box_BoxEnd (); } diff --git a/swad_message.c b/swad_message.c index bdea5884..7fd57243 100644 --- a/swad_message.c +++ b/swad_message.c @@ -268,8 +268,7 @@ static void Msg_PutFormMsgUsrs (struct Msg_Messages *Messages, } /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Message, - Msg_PutIconsListMsgs,Messages, + Box_BoxBegin (Txt_Message,Msg_PutIconsListMsgs,Messages, Hlp_COMMUNICATION_Messages_write,Box_NOT_CLOSABLE); if (Messages->ShowOnlyOneRecipient) @@ -1488,15 +1487,13 @@ static void Msg_ShowSntOrRcvMessages (struct Msg_Messages *Messages) /***** Begin box with messages *****/ Msg_SetNumMsgsStr (Messages,&NumMsgsStr,NumUnreadMsgs); - Box_BoxBegin (NULL,NumMsgsStr, - Msg_PutIconsListMsgs,Messages, + Box_BoxBegin (NumMsgsStr,Msg_PutIconsListMsgs,Messages, Help[Messages->TypeOfMessages],Box_NOT_CLOSABLE); free (NumMsgsStr); /***** Filter messages *****/ /* Begin box with filter */ - Box_BoxBegin (NULL,Txt_Filter, - NULL,NULL, + Box_BoxBegin (Txt_Filter,NULL,NULL, HelpFilter[Messages->TypeOfMessages],Box_CLOSABLE); /* Form to see messages again */ diff --git a/swad_network.c b/swad_network.c index c7adc28e..61851acd 100644 --- a/swad_network.c +++ b/swad_network.c @@ -204,7 +204,7 @@ void Net_ShowFormMyWebsAndSocialNets (void) /***** Begin box *****/ HTM_DIV_Begin ("class=\"REC_CONT\""); - Box_BoxBegin (NULL,Txt_Webs_social_networks, + Box_BoxBegin (Txt_Webs_social_networks, Net_PutIconsWebsSocialNetworks,NULL, Hlp_PROFILE_Webs,Box_NOT_CLOSABLE); diff --git a/swad_nickname.c b/swad_nickname.c index 9661fd7f..85fe6fb8 100644 --- a/swad_nickname.c +++ b/swad_nickname.c @@ -211,8 +211,7 @@ static void Nck_ShowFormChangeUsrNickname (Usr_MeOrOther_t MeOrOther, NumNicks = Nck_DB_GetUsrNicknames (&mysql_res,UsrDat[MeOrOther]->UsrCod); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Nickname, - Acc_PutLinkToRemoveMyAccount,NULL, + Box_BoxBegin (Txt_Nickname,Acc_PutLinkToRemoveMyAccount,NULL, Hlp_PROFILE_Account,Box_NOT_CLOSABLE); /***** Show possible alerts *****/ diff --git a/swad_notice.c b/swad_notice.c index a66d2b36..dd041000 100644 --- a/swad_notice.c +++ b/swad_notice.c @@ -110,8 +110,7 @@ void Not_ShowFormNotice (void) Frm_BeginForm (ActNewNot); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Notice, - NULL,NULL, + Box_BoxBegin (Txt_Notice,NULL,NULL, Hlp_COMMUNICATION_Notices,Box_NOT_CLOSABLE); /***** Message body *****/ @@ -332,8 +331,7 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing,long HighlightNotCod) NumNotices = Not_DB_GetAllNotices (&mysql_res); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Notices, - Not_PutIconsListNotices,NULL, + Box_BoxBegin (Txt_Notices,Not_PutIconsListNotices,NULL, Hlp_COMMUNICATION_Notices,Box_NOT_CLOSABLE); if (!NumNotices) Ale_ShowAlert (Ale_INFO,Txt_No_notices); diff --git a/swad_notification.c b/swad_notification.c index 4805a84b..2ae44c10 100644 --- a/swad_notification.c +++ b/swad_notification.c @@ -350,8 +350,7 @@ void Ntf_ShowMyNotifications (void) Ntf_PutContextualLinks (AllNotifications,NumNotifications); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Notifications, - Ntf_PutIconsNotif,NULL, + Box_BoxBegin (Txt_Notifications,Ntf_PutIconsNotif,NULL, Hlp_START_Notifications,Box_NOT_CLOSABLE); /***** List my notifications *****/ @@ -1626,8 +1625,7 @@ void Ntf_PutFormChangeNotifSentByEMail (void) HTM_SECTION_Begin (Ntf_NOTIFICATIONS_ID); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Notifications, - Ntf_PutIconsNotif,NULL, + Box_BoxBegin (Txt_Notifications,Ntf_PutIconsNotif,NULL, Hlp_PROFILE_Settings_notifications,Box_NOT_CLOSABLE); /***** Begin form *****/ diff --git a/swad_password.c b/swad_password.c index 3cd3e1f1..d9198487 100644 --- a/swad_password.c +++ b/swad_password.c @@ -262,8 +262,7 @@ void Pwd_ShowFormSendNewPwd (void) Frm_BeginForm (ActSndNewPwd); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Forgotten_password, - NULL,NULL, + Box_BoxBegin (Txt_Forgotten_password,NULL,NULL, Hlp_PROFILE_Password,Box_NOT_CLOSABLE); /***** Help text *****/ @@ -588,8 +587,7 @@ void Pwd_ShowFormChgMyPwd (void) Frm_BeginFormAnchor (ActChgMyPwd,Pwd_PASSWORD_SECTION_ID); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Password, - NULL,NULL, + Box_BoxBegin (Txt_Password,NULL,NULL, Hlp_PROFILE_Password,Box_NOT_CLOSABLE); /***** Show possible alerts *****/ @@ -742,9 +740,7 @@ void Pwd_ShowFormChgOtherUsrPwd (void) HTM_SECTION_Begin (Pwd_PASSWORD_SECTION_ID); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Password, - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Password,NULL,NULL,NULL,Box_NOT_CLOSABLE); /***** Show possible alerts *****/ Ale_ShowAlerts (Pwd_PASSWORD_SECTION_ID); diff --git a/swad_photo.c b/swad_photo.c index 5e8c7a87..5e7fa02c 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -305,8 +305,7 @@ static void Pho_ReqPhoto (const struct Usr_Data *UsrDat) Usr_MeOrOther_t MeOrOther = Usr_ItsMe (UsrDat->UsrCod); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Photo, - FunctionToDrawContextualIcons[MeOrOther],NULL, + Box_BoxBegin (Txt_Photo,FunctionToDrawContextualIcons[MeOrOther],NULL, Hlp_PROFILE_Photo,Box_NOT_CLOSABLE); /***** Begin form *****/ @@ -1714,7 +1713,7 @@ static void Pho_ShowOrPrintPhotoDegree (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint) { case Pho_DEGREES_SEE: /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_HIERARCHY_PLURAL_Abc[Hie_DEG], + Box_BoxBegin (Txt_HIERARCHY_PLURAL_Abc[Hie_DEG], Pho_PutIconToPrintDegreeStats,&DegPhotos, Hlp_ANALYTICS_Degrees,Box_NOT_CLOSABLE); @@ -1736,8 +1735,7 @@ static void Pho_ShowOrPrintPhotoDegree (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint) break; case Pho_DEGREES_PRINT: /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_HIERARCHY_PLURAL_Abc[Hie_DEG], - NULL,NULL, + Box_BoxBegin (Txt_HIERARCHY_PLURAL_Abc[Hie_DEG],NULL,NULL, NULL,Box_NOT_CLOSABLE); break; } diff --git a/swad_photo_shape.c b/swad_photo_shape.c index 7aee2536..f6be16ed 100644 --- a/swad_photo_shape.c +++ b/swad_photo_shape.c @@ -73,9 +73,9 @@ void PhoSha_PutIconsToSelectPhotoShape (void) }; PhoSha_Shape_t Shape; - Box_BoxBegin (NULL,Txt_User_photos, - PhoSha_PutIconsPhotoShape,NULL, + Box_BoxBegin (Txt_User_photos,PhoSha_PutIconsPhotoShape,NULL, Hlp_PROFILE_Settings_user_photos,Box_NOT_CLOSABLE); + Set_BeginSettingsHead (); Set_BeginOneSettingSelector (); for (Shape = (PhoSha_Shape_t) 0; @@ -95,6 +95,7 @@ void PhoSha_PutIconsToSelectPhotoShape (void) } Set_EndOneSettingSelector (); Set_EndSettingsHead (); + Box_BoxEnd (); } diff --git a/swad_place.c b/swad_place.c index 1b9922c8..f36af18b 100644 --- a/swad_place.c +++ b/swad_place.c @@ -131,10 +131,11 @@ void Plc_SeeAllPlaces (void) /***** Get list of places *****/ Plc_GetListPlaces (&Places); - /***** Table head *****/ - Box_BoxBegin (NULL,Txt_Places, - Plc_PutIconsListingPlaces,NULL, + /***** Begin box *****/ + Box_BoxBegin (Txt_Places,Plc_PutIconsListingPlaces,NULL, Hlp_INSTITUTION_Places,Box_NOT_CLOSABLE); + + /***** Table head *****/ HTM_TABLE_BeginWideMarginPadding (2); HTM_TR_Begin (NULL); for (Order = (Plc_Order_t) 0; @@ -273,16 +274,15 @@ static void Plc_EditPlacesInternal (void) Plc_GetListPlaces (&Places); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Places, - Plc_PutIconsEditingPlaces,NULL, + Box_BoxBegin (Txt_Places,Plc_PutIconsEditingPlaces,NULL, Hlp_INSTITUTION_Places_edit,Box_NOT_CLOSABLE); - /***** Put a form to create a new place *****/ - Plc_PutFormToCreatePlace (); + /***** Put a form to create a new place *****/ + Plc_PutFormToCreatePlace (); - /***** Forms to edit current places *****/ - if (Places.Num) - Plc_ListPlacesForEdition (&Places); + /***** Forms to edit current places *****/ + if (Places.Num) + Plc_ListPlacesForEdition (&Places); /***** End box *****/ Box_BoxEnd (); diff --git a/swad_plugin.c b/swad_plugin.c index bf45d05d..0485384f 100644 --- a/swad_plugin.c +++ b/swad_plugin.c @@ -224,8 +224,7 @@ static void Plg_EditPluginsInternal (void) Plg_GetListPlugins (&Plugins); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Plugins, - Plg_PutIconToViewPlugins,NULL, + Box_BoxBegin (Txt_Plugins,Plg_PutIconToViewPlugins,NULL, Hlp_SYSTEM_Plugins_edit,Box_NOT_CLOSABLE); /***** Put a form to create a new plugin *****/ diff --git a/swad_profile.c b/swad_profile.c index 49284d8f..583f67d6 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -194,8 +194,7 @@ void Prf_ReqUserProfile (void) Frm_BeginForm (ActSeeOthPubPrf); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Another_user_s_profile, - NULL,NULL, + Box_BoxBegin (Txt_Another_user_s_profile,NULL,NULL, Hlp_START_Profiles_view_public_profile,Box_NOT_CLOSABLE); /***** Form to request user's @nickname *****/ diff --git a/swad_program.c b/swad_program.c index 8884a0bd..e9f2ae77 100644 --- a/swad_program.c +++ b/swad_program.c @@ -292,8 +292,7 @@ void Prg_ShowAllItems (Prg_ListingType_t ListingType, if (asprintf (&Title,Txt_COURSE_program, Gbl.Hierarchy.Node[Hie_CRS].ShrtName) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title, - FunctionToDrawContextualIcons[ListingType],NULL, + Box_BoxBegin (Title,FunctionToDrawContextualIcons[ListingType],NULL, Hlp_COURSE_Program,Box_NOT_CLOSABLE); free (Title); diff --git a/swad_program_resource.c b/swad_program_resource.c index 4982633e..4faa4bbe 100644 --- a/swad_program_resource.c +++ b/swad_program_resource.c @@ -226,14 +226,12 @@ void PrgRsc_ListItemResources (Prg_ListingType_t ListingType, switch (ViewingOrEditing[ListingType]) { case Vie_VIEW: - Box_BoxBegin (NULL,NULL, - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (NULL,NULL,NULL,NULL,Box_NOT_CLOSABLE); break; case Vie_EDIT: if (asprintf (&Title,Txt_Resources_of_X,Item->Title) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title, + Box_BoxBegin (Title, PrgRsc_PutIconsResources[ViewingOrEditingResourcesOfThisItem], &Item->Hierarchy.ItmCod, Hlp_COURSE_Program,Box_NOT_CLOSABLE); @@ -886,8 +884,7 @@ static void PrgRsc_ShowClipboard (void) extern const char *Hlp_COURSE_Program_resource_clipboard; extern const char *Txt_Resource_clipboard; - Box_BoxBegin (NULL,Txt_Resource_clipboard, - PrgRsc_PutIconsClipboard,NULL, + Box_BoxBegin (Txt_Resource_clipboard,PrgRsc_PutIconsClipboard,NULL, Hlp_COURSE_Program_resource_clipboard,Box_CLOSABLE); Rsc_ShowClipboard (); Box_BoxEnd (); diff --git a/swad_project.c b/swad_project.c index 01551cd5..23f71d5a 100644 --- a/swad_project.c +++ b/swad_project.c @@ -528,8 +528,7 @@ static void Prj_ShowPrjsInCurrentPage (void *Projects) ((struct Prj_Projects *) Projects)->CurrentPage = (unsigned) Pagination.CurrentPage; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Projects, - Prj_PutIconsListProjects,Projects, + Box_BoxBegin (Txt_Projects,Prj_PutIconsListProjects,Projects, Hlp_ASSESSMENT_Projects,Box_NOT_CLOSABLE); /***** Put filters to choice which projects to show *****/ @@ -1343,8 +1342,8 @@ void Prj_ShowBoxWithOneProject (struct Prj_Projects *Projects) extern const char *Txt_Project; /***** Begin box *****/ - Box_BoxBegin (NULL,Projects->Prj.Title[0] ? Projects->Prj.Title : - Txt_Project, + Box_BoxBegin (Projects->Prj.Title[0] ? Projects->Prj.Title : + Txt_Project, Prj_PutIconsOnePrj,Projects, Hlp_ASSESSMENT_Projects,Box_NOT_CLOSABLE); @@ -3722,8 +3721,8 @@ static void Prj_PutFormProject (struct Prj_Projects *Projects, ActChgPrj; /***** Begin project box *****/ - Box_BoxBegin (NULL,Projects->Prj.Title[0] ? Projects->Prj.Title : - Txt_Project, + Box_BoxBegin (Projects->Prj.Title[0] ? Projects->Prj.Title : + Txt_Project, NULL,NULL, Hlp_ASSESSMENT_Projects_edit_project,Box_NOT_CLOSABLE); diff --git a/swad_project_config.c b/swad_project_config.c index 211c9c52..d2b56d10 100644 --- a/swad_project_config.c +++ b/swad_project_config.c @@ -109,8 +109,7 @@ void PrjCfg_ShowFormConfig (void) Prj_ResetPrjsAndReadConfig (&Projects); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Configure_projects, - Prj_PutIconsListProjects,&Projects, + Box_BoxBegin (Txt_Configure_projects,Prj_PutIconsListProjects,&Projects, Hlp_ASSESSMENT_Projects,Box_NOT_CLOSABLE); /***** Projects are editable by non-editing teachers? *****/ diff --git a/swad_question.c b/swad_question.c index e06dc426..a180e47d 100644 --- a/swad_question.c +++ b/swad_question.c @@ -166,8 +166,7 @@ void Qst_ShowFormRequestEditQsts (struct Qst_Questions *Questions) }; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Question_bank, - Qst_PutIconsRequestBankQsts,NULL, + Box_BoxBegin (Txt_Question_bank,Qst_PutIconsRequestBankQsts,NULL, Hlp_ASSESSMENT_Questions,Box_NOT_CLOSABLE); /***** Get tags already present in the table of questions *****/ @@ -336,8 +335,7 @@ void Qst_ShowFormRequestSelectQstsForExamSet (struct Exa_Exams *Exams, }; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Select_questions, - NULL,NULL, + Box_BoxBegin (Txt_Select_questions,NULL,NULL, Hlp_ASSESSMENT_Exams_questions,Box_NOT_CLOSABLE); /***** Get tags already present in the table of questions *****/ @@ -394,8 +392,7 @@ void Qst_ShowFormRequestSelectQstsForGame (struct Gam_Games *Games, }; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Select_questions, - NULL,NULL, + Box_BoxBegin (Txt_Select_questions,NULL,NULL, Hlp_ASSESSMENT_Games_questions,Box_NOT_CLOSABLE); /***** Get tags already present in the table of questions *****/ @@ -1077,8 +1074,7 @@ void Qst_ListOneOrMoreQstsForSelectionForExamSet (struct Exa_Exams *Exams, MYSQL_ROW row; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Questions, - NULL,NULL, + Box_BoxBegin (Txt_Questions,NULL,NULL, Hlp_ASSESSMENT_Exams_questions,Box_NOT_CLOSABLE); /***** Begin form *****/ @@ -1159,8 +1155,7 @@ void Qst_ListOneOrMoreQstsForSelectionForGame (struct Gam_Games *Games, MYSQL_ROW row; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Questions, - NULL,NULL, + Box_BoxBegin (Txt_Questions,NULL,NULL, Hlp_ASSESSMENT_Games_questions,Box_NOT_CLOSABLE); /***** Begin form *****/ @@ -1852,13 +1847,12 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question) { if (asprintf (&Title,Txt_Question_code_X,Question->QstCod) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title,Qst_PutIconToRemoveOneQst,&Question->QstCod, + Box_BoxBegin (Title,Qst_PutIconToRemoveOneQst,&Question->QstCod, Hlp_ASSESSMENT_Questions_writing_a_question,Box_NOT_CLOSABLE); free (Title); } else - Box_BoxBegin (NULL,Txt_Question, - NULL,NULL, + Box_BoxBegin (Txt_Question,NULL,NULL, Hlp_ASSESSMENT_Questions_writing_a_question,Box_NOT_CLOSABLE); /***** Begin form *****/ diff --git a/swad_question_import.c b/swad_question_import.c index 7f466bd9..df9de451 100644 --- a/swad_question_import.c +++ b/swad_question_import.c @@ -135,8 +135,7 @@ void QstImp_ShowFormImpQstsFromXML (void) extern const char *Txt_XML_file; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Import_questions, - NULL,NULL, + Box_BoxBegin (Txt_Import_questions,NULL,NULL, Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE); /***** Write help message *****/ @@ -477,8 +476,7 @@ static void QstImp_ImportQuestionsFromXMLBuffer (const char *XMLBuffer) XML_GetTree (XMLBuffer,&RootElem); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Imported_questions, - NULL,NULL, + Box_BoxBegin (Txt_Imported_questions,NULL,NULL, Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE); /***** Print XML tree *****/ diff --git a/swad_record.c b/swad_record.c index ca6563f8..0c9a2402 100644 --- a/swad_record.c +++ b/swad_record.c @@ -190,8 +190,7 @@ void Rec_ReqEditRecordFields (void) Rec_GetListRecordFieldsInCurrentCrs (); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Record_fields, - NULL,NULL, + Box_BoxBegin (Txt_Record_fields,NULL,NULL, Hlp_USERS_Students_course_record_card,Box_NOT_CLOSABLE); /***** Put a form to create a new record field *****/ @@ -1246,8 +1245,7 @@ static void Rec_ShowRecordOneTchCrs (void) { HTM_DIV_Begin ("class=\"REC_RIGHT\""); Timetable.Type = Tmt_TUTORING_TIMETABLE; - Box_BoxBegin (NULL,Txt_TIMETABLE_TYPES[Timetable.Type], - NULL,NULL, + Box_BoxBegin (Txt_TIMETABLE_TYPES[Timetable.Type],NULL,NULL, Hlp_USERS_Teachers_timetable,Box_NOT_CLOSABLE); Tmt_ShowTimeTable (&Timetable,Gbl.Usrs.Other.UsrDat.UsrCod); Box_BoxEnd (); @@ -1362,7 +1360,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView) { HTM_DIV_Begin ("class=\"REC_RIGHT\""); Timetable.Type = Tmt_TUTORING_TIMETABLE; - Box_BoxBegin (NULL,Txt_TIMETABLE_TYPES[Timetable.Type], + Box_BoxBegin (Txt_TIMETABLE_TYPES[Timetable.Type], NULL,NULL, Gbl.Action.Act == ActSeeRecSevTch ? Hlp_USERS_Teachers_timetable : NULL, diff --git a/swad_report.c b/swad_report.c index 015d72fc..d525c73c 100644 --- a/swad_report.c +++ b/swad_report.c @@ -136,7 +136,7 @@ void Rep_ReqMyUsageReport (void) /***** Begin box *****/ if (asprintf (&Title,Txt_Report_of_use_of_PLATFORM,Cfg_PLATFORM_SHORT_NAME) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title,NULL,NULL,Hlp_ANALYTICS_Report,Box_NOT_CLOSABLE); + Box_BoxBegin (Title,NULL,NULL,Hlp_ANALYTICS_Report,Box_NOT_CLOSABLE); free (Title); /***** Header *****/ @@ -244,7 +244,7 @@ static void Rep_PutLinkToMyUsageReport (struct Rep_Report *Report) /***** Begin box *****/ if (asprintf (&Title,Txt_Report_of_use_of_PLATFORM,Cfg_PLATFORM_SHORT_NAME) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title,NULL,NULL,Hlp_ANALYTICS_Report,Box_NOT_CLOSABLE); + Box_BoxBegin (Title,NULL,NULL,Hlp_ANALYTICS_Report,Box_NOT_CLOSABLE); free (Title); /***** Header *****/ diff --git a/swad_room.c b/swad_room.c index 8d5a3646..aa12d68d 100644 --- a/swad_room.c +++ b/swad_room.c @@ -175,8 +175,7 @@ void Roo_SeeRooms (void) Roo_GetListRooms (&Rooms,Roo_ALL_DATA); /***** Table head *****/ - Box_BoxBegin (NULL,Txt_Rooms, - Roo_PutIconsListingRooms,NULL, + Box_BoxBegin (Txt_Rooms,Roo_PutIconsListingRooms,NULL, Hlp_CENTER_Rooms,Box_NOT_CLOSABLE); HTM_TABLE_BeginWideMarginPadding (2); HTM_TR_Begin (NULL); @@ -436,8 +435,7 @@ static void Roo_EditRoomsInternal (void) Roo_GetListRooms (&Rooms,Roo_ALL_DATA); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Rooms, - Roo_PutIconsEditingRooms,NULL, + Box_BoxBegin (Txt_Rooms,Roo_PutIconsEditingRooms,NULL, Hlp_CENTER_Rooms_edit,Box_NOT_CLOSABLE); /***** Put a form to create a new room *****/ diff --git a/swad_rubric.c b/swad_rubric.c index ee7b2f10..e73f1afd 100644 --- a/swad_rubric.c +++ b/swad_rubric.c @@ -167,8 +167,7 @@ void Rub_ListAllRubrics (struct Rub_Rubrics *Rubrics) Rubrics->CurrentPage = (unsigned) Pagination.CurrentPage; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Rubrics, - Rub_PutIconsListRubrics,Rubrics, + Box_BoxBegin (Txt_Rubrics,Rub_PutIconsListRubrics,Rubrics, Hlp_ASSESSMENT_Rubrics,Box_NOT_CLOSABLE); /***** Write links to pages *****/ @@ -351,8 +350,8 @@ void Rub_ShowOnlyOneRubric (struct Rub_Rubrics *Rubrics) struct Rub_Node *TOS = NULL; /***** Begin box *****/ - Box_BoxBegin (NULL,Rubrics->Rubric.Title[0] ? Rubrics->Rubric.Title : - Txt_Rubric, + Box_BoxBegin (Rubrics->Rubric.Title[0] ? Rubrics->Rubric.Title : + Txt_Rubric, Rub_PutIconsViewingOneRubric,Rubrics, Hlp_ASSESSMENT_Rubrics,Box_NOT_CLOSABLE); @@ -794,8 +793,7 @@ void Rub_PutFormsOneRubric (struct Rub_Rubrics *Rubrics, struct Rub_Node *TOS = NULL; /***** Begin box *****/ - Box_BoxBegin (NULL, - Rubrics->Rubric.Title[0] ? Rubrics->Rubric.Title : + Box_BoxBegin (Rubrics->Rubric.Title[0] ? Rubrics->Rubric.Title : Txt_Rubric, FunctionToDrawContextualIcons[ExistingNewRubric],Rubrics, *HelpLink[ExistingNewRubric],Box_NOT_CLOSABLE); diff --git a/swad_rubric_criteria.c b/swad_rubric_criteria.c index be934539..dbcdead9 100644 --- a/swad_rubric_criteria.c +++ b/swad_rubric_criteria.c @@ -502,8 +502,7 @@ void RubCri_ListCriteriaForSeeing (const struct Rub_Rubrics *Rubrics) NumCriteria = Rub_DB_GetCriteria (&mysql_res,Rubrics->Rubric.RubCod); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Criteria, - NULL,NULL, + Box_BoxBegin (Txt_Criteria,NULL,NULL, Hlp_ASSESSMENT_Rubrics_criteria,Box_NOT_CLOSABLE); /***** Show table with rubric criteria *****/ @@ -537,8 +536,7 @@ void RubCri_ListCriteriaForEdition (struct Rub_Rubrics *Rubrics) NumCriteria = Rub_DB_GetCriteria (&mysql_res,Rubrics->Rubric.RubCod); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Criteria, - NULL,NULL, + Box_BoxBegin (Txt_Criteria,NULL,NULL, Hlp_ASSESSMENT_Rubrics_criteria,Box_NOT_CLOSABLE); /***** Show table with rubric criteria *****/ diff --git a/swad_rubric_resource.c b/swad_rubric_resource.c index c7fa69a7..89c750f8 100644 --- a/swad_rubric_resource.c +++ b/swad_rubric_resource.c @@ -101,8 +101,7 @@ static void RubRsc_ShowClipboard (void) extern const char *Hlp_ASSESSMENT_Rubrics_resource_clipboard; extern const char *Txt_Resource_clipboard; - Box_BoxBegin (NULL,Txt_Resource_clipboard, - RubRsc_PutIconsClipboard,NULL, + Box_BoxBegin (Txt_Resource_clipboard,RubRsc_PutIconsClipboard,NULL, Hlp_ASSESSMENT_Rubrics_resource_clipboard,Box_CLOSABLE); Rsc_ShowClipboard (); Box_BoxEnd (); diff --git a/swad_search.c b/swad_search.c index a762e6ce..fa5ec29f 100644 --- a/swad_search.c +++ b/swad_search.c @@ -155,8 +155,7 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Hie_Level_t DefaultScop HTM_DIV_Begin ("class=\"CM\""); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Search, - Hie_PutIconToSelectMyHierarchy,NULL, + Box_BoxBegin (Txt_Search,Hie_PutIconToSelectMyHierarchy,NULL, Hlp_START_Search,Box_NOT_CLOSABLE); /***** Begin form *****/ diff --git a/swad_setting.c b/swad_setting.c index f8d73987..4c052454 100644 --- a/swad_setting.c +++ b/swad_setting.c @@ -85,8 +85,7 @@ void Set_EditSettings (void) extern const char *Txt_Design; /***** Internationalization: language, first day of week, date format *****/ - Box_BoxBegin (NULL,Txt_Internationalization, - NULL,NULL, + Box_BoxBegin (Txt_Internationalization,NULL,NULL, Hlp_PROFILE_Settings_internationalization,Box_NOT_CLOSABLE); HTM_DIV_Begin ("class=\"FRAME_INLINE\""); @@ -104,8 +103,7 @@ void Set_EditSettings (void) Box_BoxEnd (); /***** Design: icon set, menu, theme, side columns *****/ - Box_BoxBegin (NULL,Txt_Design, - NULL,NULL, + Box_BoxBegin (Txt_Design,NULL,NULL, Hlp_PROFILE_Settings_design,Box_NOT_CLOSABLE); HTM_DIV_Begin ("class=\"FRAME_INLINE\""); @@ -207,8 +205,7 @@ static void Set_PutIconsToSelectSideCols (void) unsigned SideCols; char Icon[32 + 1]; - Box_BoxBegin (NULL,Txt_Columns, - Set_PutIconsSideColumns,NULL, + Box_BoxBegin (Txt_Columns,Set_PutIconsSideColumns,NULL, Hlp_PROFILE_Settings_columns,Box_NOT_CLOSABLE); Set_BeginSettingsHead (); Set_BeginOneSettingSelector (); diff --git a/swad_statistic.c b/swad_statistic.c index 744584fc..6dcb4c5a 100644 --- a/swad_statistic.c +++ b/swad_statistic.c @@ -267,7 +267,7 @@ static void Sta_PutFormCrsHits (struct Sta_Stats *Stats) if (asprintf (&Title,Txt_Statistics_of_visits_to_the_course_X, Gbl.Hierarchy.Node[Hie_CRS].ShrtName) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title,NULL,NULL, + Box_BoxBegin (Title,NULL,NULL, Hlp_ANALYTICS_Visits_visits_to_course,Box_NOT_CLOSABLE); free (Title); @@ -931,83 +931,79 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse) NumUsrsInList,LstSelectedUsrCods))) { /***** Put the table with the clicks *****/ - if (Stats.ClicksGroupedBy == Sta_CLICKS_CRS_DETAILED_LIST) - Box_BoxBegin (NULL,Txt_List_of_detailed_clicks, - NULL,NULL, - NULL,Box_NOT_CLOSABLE); - else - Box_BoxBegin (NULL,Txt_STAT_COUNT_TYPE[Stats.CountType], - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (Stats.ClicksGroupedBy == Sta_CLICKS_CRS_DETAILED_LIST ? Txt_List_of_detailed_clicks : + Txt_STAT_COUNT_TYPE[Stats.CountType], + NULL,NULL, + NULL,Box_NOT_CLOSABLE); - HTM_TABLE_BeginWidePadding (Sta_CellPadding[Stats.ClicksGroupedBy]); - switch (Stats.ClicksGroupedBy) - { - case Sta_CLICKS_CRS_DETAILED_LIST: - Sta_ShowDetailedAccessesList (&Stats,NumHits,mysql_res); - break; - case Sta_CLICKS_CRS_PER_USR: - Sta_ShowNumHitsPerUsr (Stats.CountType,NumHits,mysql_res); - break; - case Sta_CLICKS_CRS_PER_DAY: - case Sta_CLICKS_GBL_PER_DAY: - Sta_ShowNumHitsPerDay (Stats.CountType,NumHits,mysql_res); - break; - case Sta_CLICKS_CRS_PER_DAY_AND_HOUR: - case Sta_CLICKS_GBL_PER_DAY_AND_HOUR: - Sta_ShowDistrAccessesPerDayAndHour (&Stats,NumHits,mysql_res); - break; - case Sta_CLICKS_CRS_PER_WEEK: - case Sta_CLICKS_GBL_PER_WEEK: - Sta_ShowNumHitsPerWeek (Stats.CountType,NumHits,mysql_res); - break; - case Sta_CLICKS_CRS_PER_MONTH: - case Sta_CLICKS_GBL_PER_MONTH: - Sta_ShowNumHitsPerMonth (Stats.CountType,NumHits,mysql_res); - break; - case Sta_CLICKS_CRS_PER_YEAR: - case Sta_CLICKS_GBL_PER_YEAR: - Sta_ShowNumHitsPerYear (Stats.CountType,NumHits,mysql_res); - break; - case Sta_CLICKS_CRS_PER_HOUR: - case Sta_CLICKS_GBL_PER_HOUR: - Sta_ShowNumHitsPerHour (NumHits,mysql_res); - break; - case Sta_CLICKS_CRS_PER_MINUTE: - case Sta_CLICKS_GBL_PER_MINUTE: - Sta_ShowNumHitsPerMinute (NumHits,mysql_res); - break; - case Sta_CLICKS_CRS_PER_ACTION: - case Sta_CLICKS_GBL_PER_ACTION: - Sta_ShowNumHitsPerAction (Stats.CountType,NumHits,mysql_res); - break; - case Sta_CLICKS_GBL_PER_PLUGIN: - Sta_ShowNumHitsPerPlugin (Stats.CountType,NumHits,mysql_res); - break; - case Sta_CLICKS_GBL_PER_API_FUNCTION: - Sta_ShowNumHitsPerWSFunction (Stats.CountType,NumHits,mysql_res); - break; - case Sta_CLICKS_GBL_PER_BANNER: - Sta_ShowNumHitsPerBanner (Stats.CountType,NumHits,mysql_res); - break; - case Sta_CLICKS_GBL_PER_COUNTRY: - Sta_ShowNumHitsPerCountry (Stats.CountType,NumHits,mysql_res); - break; - case Sta_CLICKS_GBL_PER_INSTITUTION: - Sta_ShowNumHitsPerInstitution (Stats.CountType,NumHits,mysql_res); - break; - case Sta_CLICKS_GBL_PER_CENTER: - Sta_ShowNumHitsPerCenter (Stats.CountType,NumHits,mysql_res); - break; - case Sta_CLICKS_GBL_PER_DEGREE: - Sta_ShowNumHitsPerDegree (Stats.CountType,NumHits,mysql_res); - break; - case Sta_CLICKS_GBL_PER_COURSE: - Sta_ShowNumHitsPerCourse (Stats.CountType,NumHits,mysql_res); - break; - } + HTM_TABLE_BeginWidePadding (Sta_CellPadding[Stats.ClicksGroupedBy]); + switch (Stats.ClicksGroupedBy) + { + case Sta_CLICKS_CRS_DETAILED_LIST: + Sta_ShowDetailedAccessesList (&Stats,NumHits,mysql_res); + break; + case Sta_CLICKS_CRS_PER_USR: + Sta_ShowNumHitsPerUsr (Stats.CountType,NumHits,mysql_res); + break; + case Sta_CLICKS_CRS_PER_DAY: + case Sta_CLICKS_GBL_PER_DAY: + Sta_ShowNumHitsPerDay (Stats.CountType,NumHits,mysql_res); + break; + case Sta_CLICKS_CRS_PER_DAY_AND_HOUR: + case Sta_CLICKS_GBL_PER_DAY_AND_HOUR: + Sta_ShowDistrAccessesPerDayAndHour (&Stats,NumHits,mysql_res); + break; + case Sta_CLICKS_CRS_PER_WEEK: + case Sta_CLICKS_GBL_PER_WEEK: + Sta_ShowNumHitsPerWeek (Stats.CountType,NumHits,mysql_res); + break; + case Sta_CLICKS_CRS_PER_MONTH: + case Sta_CLICKS_GBL_PER_MONTH: + Sta_ShowNumHitsPerMonth (Stats.CountType,NumHits,mysql_res); + break; + case Sta_CLICKS_CRS_PER_YEAR: + case Sta_CLICKS_GBL_PER_YEAR: + Sta_ShowNumHitsPerYear (Stats.CountType,NumHits,mysql_res); + break; + case Sta_CLICKS_CRS_PER_HOUR: + case Sta_CLICKS_GBL_PER_HOUR: + Sta_ShowNumHitsPerHour (NumHits,mysql_res); + break; + case Sta_CLICKS_CRS_PER_MINUTE: + case Sta_CLICKS_GBL_PER_MINUTE: + Sta_ShowNumHitsPerMinute (NumHits,mysql_res); + break; + case Sta_CLICKS_CRS_PER_ACTION: + case Sta_CLICKS_GBL_PER_ACTION: + Sta_ShowNumHitsPerAction (Stats.CountType,NumHits,mysql_res); + break; + case Sta_CLICKS_GBL_PER_PLUGIN: + Sta_ShowNumHitsPerPlugin (Stats.CountType,NumHits,mysql_res); + break; + case Sta_CLICKS_GBL_PER_API_FUNCTION: + Sta_ShowNumHitsPerWSFunction (Stats.CountType,NumHits,mysql_res); + break; + case Sta_CLICKS_GBL_PER_BANNER: + Sta_ShowNumHitsPerBanner (Stats.CountType,NumHits,mysql_res); + break; + case Sta_CLICKS_GBL_PER_COUNTRY: + Sta_ShowNumHitsPerCountry (Stats.CountType,NumHits,mysql_res); + break; + case Sta_CLICKS_GBL_PER_INSTITUTION: + Sta_ShowNumHitsPerInstitution (Stats.CountType,NumHits,mysql_res); + break; + case Sta_CLICKS_GBL_PER_CENTER: + Sta_ShowNumHitsPerCenter (Stats.CountType,NumHits,mysql_res); + break; + case Sta_CLICKS_GBL_PER_DEGREE: + Sta_ShowNumHitsPerDegree (Stats.CountType,NumHits,mysql_res); + break; + case Sta_CLICKS_GBL_PER_COURSE: + Sta_ShowNumHitsPerCourse (Stats.CountType,NumHits,mysql_res); + break; + } - HTM_TABLE_End (); + HTM_TABLE_End (); /* End box and section */ Box_BoxEnd (); diff --git a/swad_survey.c b/swad_survey.c index 721121d3..97cfbdd4 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -201,8 +201,7 @@ void Svy_ListAllSurveys (struct Svy_Surveys *Surveys) Surveys->CurrentPage = (unsigned) Pagination.CurrentPage; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Surveys, - Svy_PutIconsListSurveys,Surveys, + Box_BoxBegin (Txt_Surveys,Svy_PutIconsListSurveys,Surveys, Hlp_ANALYTICS_Surveys,Box_NOT_CLOSABLE); /***** Select whether show only my groups or all groups *****/ @@ -419,8 +418,8 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys, /***** Begin box *****/ if (ShowOnlyThisSvyComplete) - Box_BoxBegin (NULL,Surveys->Svy.Title[0] ? Surveys->Svy.Title : - Txt_Survey, + Box_BoxBegin (Surveys->Svy.Title[0] ? Surveys->Svy.Title : + Txt_Survey, Svy_PutIconsOneSvy,Surveys, Hlp_ANALYTICS_Surveys,Box_NOT_CLOSABLE); @@ -2238,8 +2237,7 @@ static void Svy_ShowFormEditOneQst (struct Svy_Surveys *Surveys, /***** Begin box *****/ if (NewQuestion) - Box_BoxBegin (NULL,Txt_Question, - NULL,NULL, + Box_BoxBegin (Txt_Question,NULL,NULL, Hlp_ANALYTICS_Surveys_questions,Box_NOT_CLOSABLE); else { @@ -2248,8 +2246,7 @@ static void Svy_ShowFormEditOneQst (struct Svy_Surveys *Surveys, if (asprintf (&Title,"%s %u",Txt_Question,SvyQst->QstInd + 1) < 0) // Question index may be 0, 1, 2, 3,... Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title, - Svy_PutIconToRemoveOneQst,Surveys, + Box_BoxBegin (Title,Svy_PutIconToRemoveOneQst,Surveys, NULL,Box_NOT_CLOSABLE); free (Title); } @@ -2615,113 +2612,111 @@ static void Svy_ListSvyQuestions (struct Svy_Surveys *Surveys) Frm_DONT_PUT_FORM; /***** Begin box *****/ - if (Surveys->Svy.Status.ICanEdit) - Box_BoxBegin (NULL,Txt_Questions, - Svy_PutIconToAddNewQuestion,Surveys, - Hlp_ANALYTICS_Surveys_questions,Box_NOT_CLOSABLE); - else - Box_BoxBegin (NULL,Txt_Questions, - NULL,NULL, - Hlp_ANALYTICS_Surveys_questions,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Questions, + Surveys->Svy.Status.ICanEdit ? Svy_PutIconToAddNewQuestion : + NULL, + Surveys->Svy.Status.ICanEdit ? Surveys : + NULL, + Hlp_ANALYTICS_Surveys_questions,Box_NOT_CLOSABLE); - /***** Get data of questions from database *****/ - if ((NumQsts = Svy_DB_GetSurveyQsts (&mysql_res,Surveys->Svy.SvyCod))) - { - if (PutFormAnswerSurvey == Frm_PUT_FORM) + /***** Get data of questions from database *****/ + if ((NumQsts = Svy_DB_GetSurveyQsts (&mysql_res,Surveys->Svy.SvyCod))) { - /***** Begin form to send answers to survey *****/ - Frm_BeginForm (ActAnsSvy); - ParCod_PutPar (ParCod_Svy,Surveys->Svy.SvyCod); - } - - /***** Write the heading *****/ - HTM_TABLE_Begin ("TBL_SCROLL"); - - HTM_TR_Begin (NULL); - if (Surveys->Svy.Status.ICanEdit) - HTM_TH_Empty (1); - HTM_TH (Txt_No_INDEX,HTM_HEAD_CENTER); - HTM_TH (Txt_Type ,HTM_HEAD_CENTER); - HTM_TH (Txt_Question,HTM_HEAD_LEFT ); - HTM_TR_End (); - - /***** Write questions one by one *****/ - for (NumQst = 0, The_ResetRowColor (); - NumQst < NumQsts; - NumQst++, The_ChangeRowColor ()) + if (PutFormAnswerSurvey == Frm_PUT_FORM) { - /* Initialize question to zero */ - Svy_InitQst (&SvyQst); - - /* Get question data from row */ - Svy_GetQstDataFromRow (mysql_res,&SvyQst,Stem); - - HTM_TR_Begin (NULL); - - if (Surveys->Svy.Status.ICanEdit) - { - HTM_TD_Begin ("class=\"BT %s\"",The_GetColorRows ()); - - /* Initialize context */ - Surveys->QstCod = SvyQst.QstCod; - - /* Write icon to remove the question */ - Ico_PutContextualIconToRemove (ActReqRemSvyQst,NULL, - Svy_PutParsToEditQuestion,Surveys); - - /* Write icon to edit the question */ - Ico_PutContextualIconToEdit (ActEdiOneSvyQst,NULL, - Svy_PutParsToEditQuestion,Surveys); - - HTM_TD_End (); - } - - /* Write index of question inside survey */ - HTM_TD_Begin ("class=\"CT DAT_SMALL_%s %s\"", - The_GetSuffix (), - The_GetColorRows ()); - HTM_Unsigned (SvyQst.QstInd + 1); - HTM_TD_End (); - - /* Write the question type (row[2]) */ - HTM_TD_Begin ("class=\"CT DAT_SMALL_%s %s\"", - The_GetSuffix (), - The_GetColorRows ()); - HTM_Txt (Txt_SURVEY_STR_ANSWER_TYPES[SvyQst.AnswerType]); - HTM_TD_End (); - - /* Write the stem and the answers of this question */ - HTM_TD_Begin ("class=\"LT DAT_%s %s\"", - The_GetSuffix (), - The_GetColorRows ()); - Svy_WriteQstStem (Stem); - Svy_WriteAnswersOfAQst (&Surveys->Svy,&SvyQst, - PutFormAnswerSurvey); - if (SvyQst.CommentsAllowed) - Svy_WriteCommentsOfAQst (&Surveys->Svy,&SvyQst, - PutFormAnswerSurvey); - - HTM_TD_End (); - - HTM_TR_End (); + /***** Begin form to send answers to survey *****/ + Frm_BeginForm (ActAnsSvy); + ParCod_PutPar (ParCod_Svy,Surveys->Svy.SvyCod); } - HTM_TABLE_End (); + /***** Write the heading *****/ + HTM_TABLE_Begin ("TBL_SCROLL"); - if (PutFormAnswerSurvey == Frm_PUT_FORM) - { - /***** Button to create/modify survey *****/ - Btn_PutConfirmButton (Txt_Done); + HTM_TR_Begin (NULL); + if (Surveys->Svy.Status.ICanEdit) + HTM_TH_Empty (1); + HTM_TH (Txt_No_INDEX,HTM_HEAD_CENTER); + HTM_TH (Txt_Type ,HTM_HEAD_CENTER); + HTM_TH (Txt_Question,HTM_HEAD_LEFT ); + HTM_TR_End (); - /***** End form *****/ - Frm_EndForm (); + /***** Write questions one by one *****/ + for (NumQst = 0, The_ResetRowColor (); + NumQst < NumQsts; + NumQst++, The_ChangeRowColor ()) + { + /* Initialize question to zero */ + Svy_InitQst (&SvyQst); + + /* Get question data from row */ + Svy_GetQstDataFromRow (mysql_res,&SvyQst,Stem); + + HTM_TR_Begin (NULL); + + if (Surveys->Svy.Status.ICanEdit) + { + HTM_TD_Begin ("class=\"BT %s\"",The_GetColorRows ()); + + /* Initialize context */ + Surveys->QstCod = SvyQst.QstCod; + + /* Write icon to remove the question */ + Ico_PutContextualIconToRemove (ActReqRemSvyQst,NULL, + Svy_PutParsToEditQuestion,Surveys); + + /* Write icon to edit the question */ + Ico_PutContextualIconToEdit (ActEdiOneSvyQst,NULL, + Svy_PutParsToEditQuestion,Surveys); + + HTM_TD_End (); + } + + /* Write index of question inside survey */ + HTM_TD_Begin ("class=\"CT DAT_SMALL_%s %s\"", + The_GetSuffix (), + The_GetColorRows ()); + HTM_Unsigned (SvyQst.QstInd + 1); + HTM_TD_End (); + + /* Write the question type (row[2]) */ + HTM_TD_Begin ("class=\"CT DAT_SMALL_%s %s\"", + The_GetSuffix (), + The_GetColorRows ()); + HTM_Txt (Txt_SURVEY_STR_ANSWER_TYPES[SvyQst.AnswerType]); + HTM_TD_End (); + + /* Write the stem and the answers of this question */ + HTM_TD_Begin ("class=\"LT DAT_%s %s\"", + The_GetSuffix (), + The_GetColorRows ()); + Svy_WriteQstStem (Stem); + Svy_WriteAnswersOfAQst (&Surveys->Svy,&SvyQst, + PutFormAnswerSurvey); + if (SvyQst.CommentsAllowed) + Svy_WriteCommentsOfAQst (&Surveys->Svy,&SvyQst, + PutFormAnswerSurvey); + + HTM_TD_End (); + + HTM_TR_End (); + } + + HTM_TABLE_End (); + + if (PutFormAnswerSurvey == Frm_PUT_FORM) + { + /***** Button to create/modify survey *****/ + Btn_PutConfirmButton (Txt_Done); + + /***** End form *****/ + Frm_EndForm (); + } } - } - else // This survey has no questions - Ale_ShowAlert (Ale_INFO,Txt_This_survey_has_no_questions); + else // This survey has no questions + Ale_ShowAlert (Ale_INFO,Txt_This_survey_has_no_questions); - /***** Free structure that stores the query result *****/ - DB_FreeMySQLResult (&mysql_res); + /***** Free structure that stores the query result *****/ + DB_FreeMySQLResult (&mysql_res); /***** End box *****/ Box_BoxEnd (); diff --git a/swad_syllabus.c b/swad_syllabus.c index 6bfb71c0..bc2e9536 100644 --- a/swad_syllabus.c +++ b/swad_syllabus.c @@ -542,7 +542,7 @@ static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus) bool PutIconToEdit = Syllabus->ViewType == Vie_VIEW && ICanEdit; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_INFO_TITLE[Gbl.Crs.Info.Type], + Box_BoxBegin (Txt_INFO_TITLE[Gbl.Crs.Info.Type], PutIconToEdit ? Inf_PutIconToEditInfo : NULL, PutIconToEdit ? &Gbl.Crs.Info.Type : diff --git a/swad_system_config.c b/swad_system_config.c index 8280a527..3c844800 100644 --- a/swad_system_config.c +++ b/swad_system_config.c @@ -102,7 +102,7 @@ static void SysCfg_Configuration (Vie_ViewType_t ViewType) unsigned NumCtrsWithMap; /***** Begin box *****/ - Box_BoxBegin (NULL,Cfg_PLATFORM_SHORT_NAME, + Box_BoxBegin (Cfg_PLATFORM_SHORT_NAME, ViewType == Vie_VIEW ? SysCfg_PutIconToPrint : NULL,NULL, ViewType == Vie_VIEW ? Hlp_SYSTEM_Information : diff --git a/swad_test.c b/swad_test.c index 83a41acf..dacb367e 100644 --- a/swad_test.c +++ b/swad_test.c @@ -125,8 +125,7 @@ static void Tst_ShowFormRequestTest (struct Qst_Questions *Questions) TstCfg_GetConfig (); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Test, - Tst_PutIconsTests,NULL, + Box_BoxBegin (Txt_Test,Tst_PutIconsTests,NULL, Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE); /***** Get tags *****/ @@ -348,8 +347,7 @@ void Tst_AssessTest (void) Tst_DB_UpdatePrint (&Print); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Result, - NULL,NULL, + Box_BoxBegin (Txt_Result,NULL,NULL, Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE); Lay_WriteHeaderClassPhoto (Vie_VIEW); diff --git a/swad_test_config.c b/swad_test_config.c index 3339743d..c074af62 100644 --- a/swad_test_config.c +++ b/swad_test_config.c @@ -164,8 +164,7 @@ static void TstCfg_ShowFormConfig (void) TstCfg_GetConfig (); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Configure_tests, - Tst_PutIconsTests,NULL, + Box_BoxBegin (Txt_Configure_tests,Tst_PutIconsTests,NULL, Hlp_ASSESSMENT_Tests_configuring_tests,Box_NOT_CLOSABLE); /***** Begin form *****/ diff --git a/swad_test_print.c b/swad_test_print.c index f3bddc65..7394f8a3 100644 --- a/swad_test_print.c +++ b/swad_test_print.c @@ -215,9 +215,7 @@ void TstPrn_ShowTestPrintToFillIt (struct TstPrn_Print *Print, }; /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Test, - NULL,NULL, - Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Test,NULL,NULL,Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE); Lay_WriteHeaderClassPhoto (Vie_VIEW); if (Print->NumQsts.All) @@ -2230,9 +2228,8 @@ void TstPrn_ShowOnePrint (void) Err_WrongExamExit (); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Result, - NULL,NULL, - Hlp_ASSESSMENT_Tests_results,Box_NOT_CLOSABLE); + Box_BoxBegin (Txt_Result,NULL,NULL, + Hlp_ASSESSMENT_Tests_results,Box_NOT_CLOSABLE); Lay_WriteHeaderClassPhoto (Vie_VIEW); /***** Begin table *****/ diff --git a/swad_theme.c b/swad_theme.c index 59292fb0..eb094545 100644 --- a/swad_theme.c +++ b/swad_theme.c @@ -97,9 +97,9 @@ void The_PutIconsToSelectTheme (void) The_Theme_t Theme; char Icon[PATH_MAX + 1]; - Box_BoxBegin (NULL,Txt_Theme_SKIN, - The_PutIconsTheme,NULL, + Box_BoxBegin (Txt_Theme_SKIN,The_PutIconsTheme,NULL, Hlp_PROFILE_Settings_theme,Box_NOT_CLOSABLE); + Set_BeginSettingsHead (); Set_BeginOneSettingSelector (); for (Theme = (The_Theme_t) 0; @@ -117,6 +117,7 @@ void The_PutIconsToSelectTheme (void) } Set_EndOneSettingSelector (); Set_EndSettingsHead (); + Box_BoxEnd (); } diff --git a/swad_timeline.c b/swad_timeline.c index 4cba9473..e82a71f9 100644 --- a/swad_timeline.c +++ b/swad_timeline.c @@ -418,8 +418,7 @@ static void Tml_ShowTimeline (struct Tml_Timeline *Timeline, bool GlobalTimeline = (Gbl.Usrs.Other.UsrDat.UsrCod <= 0); /***** Begin box *****/ - Box_BoxBegin (NULL,Title, - Tml_PutIconsTimeline,NULL, + Box_BoxBegin (Title,Tml_PutIconsTimeline,NULL, Hlp_START_Timeline,Box_NOT_CLOSABLE); /***** Put form to select users whom public activity is displayed *****/ diff --git a/swad_timeline_comment.c b/swad_timeline_comment.c index cd311d84..f7e0d429 100644 --- a/swad_timeline_comment.c +++ b/swad_timeline_comment.c @@ -888,9 +888,7 @@ static void TmlCom_ReqRemComm (struct Tml_Timeline *Timeline) TmlFrm_BeginAlertRemove (Txt_Do_you_really_want_to_remove_the_following_comment); /* Begin box for the comment */ - Box_BoxBegin (NULL,NULL, - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (NULL,NULL,NULL,NULL,Box_NOT_CLOSABLE); /* Indent the comment */ HTM_DIV_Begin ("class=\"Tml_LEFT_PHOTO\""); diff --git a/swad_timeline_note.c b/swad_timeline_note.c index 69e3604b..785332aa 100644 --- a/swad_timeline_note.c +++ b/swad_timeline_note.c @@ -153,9 +153,7 @@ void TmlNot_ShowHighlightedNote (struct Tml_Timeline *Timeline, /***** Show the note highlighted *****/ /* Begin box */ - Box_BoxBegin (NULL,NULL, - NULL,NULL, - NULL,Box_CLOSABLE); + Box_BoxBegin (NULL,NULL,NULL,NULL,Box_CLOSABLE); /* Begin container */ HTM_DIV_Begin ("class=\"Tml_WIDTH Tml_NEW_PUB_%s\"",The_GetSuffix ()); @@ -1019,9 +1017,7 @@ static void TmlNot_ReqRemNote (struct Tml_Timeline *Timeline) TmlFrm_BeginAlertRemove (Txt_Do_you_really_want_to_remove_the_following_post); /* Show note */ - Box_BoxBegin (NULL,NULL, - NULL,NULL, - NULL,Box_CLOSABLE); + Box_BoxBegin (NULL,NULL,NULL,NULL,Box_CLOSABLE); HTM_DIV_Begin ("class=\"Tml_WIDTH\""); TmlNot_CheckAndWriteNoteWithTopMsg (Timeline,&Not, Tml_TOP_MESSAGE_NONE, diff --git a/swad_timetable.c b/swad_timetable.c index 9f06efc6..479a23b1 100644 --- a/swad_timetable.c +++ b/swad_timetable.c @@ -327,6 +327,7 @@ void Tmt_ShowClassTimeTable (void) Gbl.Action.Act == ActPrnMyTT) ? Vie_PRINT : Vie_VIEW; Grp_WhichGroups_t WhichGroups; + bool PutContextualIcons; /***** Initializations *****/ switch (Gbl.Action.Act) @@ -358,51 +359,51 @@ void Tmt_ShowClassTimeTable (void) Grp_GetParWhichGroups (); /***** Begin box *****/ - if (Timetable.ContextualIcons.PutIconEditCrsTT || - Timetable.ContextualIcons.PutIconEditOfficeHours || - Timetable.ContextualIcons.PutIconPrint) - Box_BoxBegin (NULL,Txt_TIMETABLE_TYPES[Timetable.Type], - Tmt_PutContextualIcons,&Timetable, - Help[Timetable.Type],Box_NOT_CLOSABLE); - else - Box_BoxBegin (NULL,Txt_TIMETABLE_TYPES[Timetable.Type], - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + PutContextualIcons = Timetable.ContextualIcons.PutIconEditCrsTT || + Timetable.ContextualIcons.PutIconEditOfficeHours || + Timetable.ContextualIcons.PutIconPrint; + Box_BoxBegin (Txt_TIMETABLE_TYPES[Timetable.Type], + PutContextualIcons ? Tmt_PutContextualIcons : + NULL, + PutContextualIcons ? &Timetable : + NULL, + PutContextualIcons ? Help[Timetable.Type] : + NULL,Box_NOT_CLOSABLE); - /***** Begin time table drawing *****/ - if (Timetable.Type == Tmt_COURSE_TIMETABLE) - Lay_WriteHeaderClassPhoto (ViewType); + /***** Begin time table drawing *****/ + if (Timetable.Type == Tmt_COURSE_TIMETABLE) + Lay_WriteHeaderClassPhoto (ViewType); - switch (ViewType) - { - case Vie_VIEW: - /***** Setting selector *****/ - Set_BeginSettingsHead (); + switch (ViewType) + { + case Vie_VIEW: + /***** Setting selector *****/ + Set_BeginSettingsHead (); - /* Select whether show only my groups or all groups */ - if ( Timetable.Type == Tmt_MY_TIMETABLE || - (Timetable.Type == Tmt_COURSE_TIMETABLE && - Gbl.Crs.Grps.NumGrps)) - Tmt_PutFormToSelectWhichGroupsToShow (&Timetable); + /* Select whether show only my groups or all groups */ + if ( Timetable.Type == Tmt_MY_TIMETABLE || + (Timetable.Type == Tmt_COURSE_TIMETABLE && + Gbl.Crs.Grps.NumGrps)) + Tmt_PutFormToSelectWhichGroupsToShow (&Timetable); - /* Show form to change first day of week */ - WhichGroups = Grp_GetParWhichGroups (); - Cal_ShowFormToSelFirstDayOfWeek (ActChgTT1stDay[Timetable.Type], - Grp_PutParWhichGroups,&WhichGroups); + /* Show form to change first day of week */ + WhichGroups = Grp_GetParWhichGroups (); + Cal_ShowFormToSelFirstDayOfWeek (ActChgTT1stDay[Timetable.Type], + Grp_PutParWhichGroups,&WhichGroups); - Set_EndSettingsHead (); - break; - case Vie_PRINT: - /***** Show whether only my groups or all groups are selected *****/ - Tmt_ShowTimeTableGrpsSelected (); - break; - default: - Err_WrongTypeExit (); - break; - } + Set_EndSettingsHead (); + break; + case Vie_PRINT: + /***** Show whether only my groups or all groups are selected *****/ + Tmt_ShowTimeTableGrpsSelected (); + break; + default: + Err_WrongTypeExit (); + break; + } - /***** Show the time table *****/ - Tmt_ShowTimeTable (&Timetable,Gbl.Usrs.Me.UsrDat.UsrCod); + /***** Show the time table *****/ + Tmt_ShowTimeTable (&Timetable,Gbl.Usrs.Me.UsrDat.UsrCod); /***** End box *****/ Box_BoxEnd (); @@ -464,7 +465,7 @@ void Tmt_EditCrsTimeTable (void) /***** Editable time table *****/ Timetable.Type = Tmt_COURSE_TIMETABLE; - Box_BoxBegin (NULL,Txt_TIMETABLE_TYPES[Timetable.Type], + Box_BoxBegin (Txt_TIMETABLE_TYPES[Timetable.Type], Tmt_PutIconToViewCrsTT,NULL, Hlp_COURSE_Timetable,Box_NOT_CLOSABLE); Tmt_ShowTimeTable (&Timetable,Gbl.Usrs.Me.UsrDat.UsrCod); @@ -483,7 +484,7 @@ void Tmt_EditMyTutTimeTable (void) /***** Time table *****/ Timetable.Type = Tmt_TUTORING_TIMETABLE; - Box_BoxBegin (NULL,Txt_TIMETABLE_TYPES[Timetable.Type], + Box_BoxBegin (Txt_TIMETABLE_TYPES[Timetable.Type], Tmt_PutIconToViewMyTT,NULL, Hlp_PROFILE_Timetable,Box_NOT_CLOSABLE); Tmt_ShowTimeTable (&Timetable,Gbl.Usrs.Me.UsrDat.UsrCod); diff --git a/swad_user.c b/swad_user.c index e4d0abe0..e54ecbac 100644 --- a/swad_user.c +++ b/swad_user.c @@ -2074,8 +2074,7 @@ void Usr_ShowFormsLogoutAndRole (void) Txt_ROLES_SINGUL_abc[Gbl.Usrs.Me.Role.Logged][Gbl.Usrs.Me.UsrDat.Sex]); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_Session, - Usr_PutLinkToLogOut,NULL, + Box_BoxBegin (Txt_Session,Usr_PutLinkToLogOut,NULL, Hlp_PROFILE_Session_role,Box_NOT_CLOSABLE); /***** Put a form to change my role *****/ @@ -3698,9 +3697,7 @@ void Usr_PutFormToSelectUsrsToGoToAct (struct Usr_SelectedUsrs *SelectedUsrs, }; /***** Begin box *****/ - Box_BoxBegin (NULL,Title, - NULL,NULL, - HelpLink,Box_NOT_CLOSABLE); + Box_BoxBegin (Title,NULL,NULL,HelpLink,Box_NOT_CLOSABLE); /***** Get and update type of list, number of columns in class photo @@ -4763,7 +4760,7 @@ unsigned Usr_ListUsrsFound (Rol_Role_t Role, (NumUsrs == 1 ? Txt_ROLES_SINGUL_abc[Role][Sex] : Txt_ROLES_PLURAL_abc[Role][Sex])) < 0) Err_NotEnoughMemoryExit (); - Box_BoxBegin (NULL,Title,NULL,NULL,NULL,Box_NOT_CLOSABLE); + Box_BoxBegin (Title,NULL,NULL,NULL,Box_NOT_CLOSABLE); free (Title); HTM_TABLE_Begin ("TBL_SCROLL"); @@ -4907,8 +4904,7 @@ void Usr_ListDataAdms (void) Adm_GetAdmsLst (Gbl.Scope.Current); /***** Begin box with list of administrators *****/ - Box_BoxBegin (NULL,Txt_ROLES_PLURAL_Abc[Rol_DEG_ADM][Usr_SEX_UNKNOWN], - NULL,NULL, + Box_BoxBegin (Txt_ROLES_PLURAL_Abc[Rol_DEG_ADM][Usr_SEX_UNKNOWN],NULL,NULL, Hlp_USERS_Administrators,Box_NOT_CLOSABLE); /***** Form to select scope *****/ @@ -5046,7 +5042,7 @@ void Usr_SeeGuests (void) Usr_GetGstsLst (Gbl.Scope.Current); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_ROLES_PLURAL_Abc[Rol_GST][Usr_SEX_UNKNOWN], + Box_BoxBegin (Txt_ROLES_PLURAL_Abc[Rol_GST][Usr_SEX_UNKNOWN], Usr_PutIconsListGsts,NULL, Hlp_USERS_Guests,Box_NOT_CLOSABLE); @@ -5185,7 +5181,7 @@ void Usr_SeeStudents (void) Usr_GetListUsrs (Gbl.Scope.Current,Rol_STD); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_ROLES_PLURAL_Abc[Rol_STD][Usr_SEX_UNKNOWN], + Box_BoxBegin (Txt_ROLES_PLURAL_Abc[Rol_STD][Usr_SEX_UNKNOWN], Usr_PutIconsListStds,NULL, Hlp_USERS_Students,Box_NOT_CLOSABLE); @@ -5362,7 +5358,7 @@ void Usr_SeeTeachers (void) 1 << Rol_TCH); /***** Begin box *****/ - Box_BoxBegin (NULL,Txt_ROLES_PLURAL_Abc[Rol_TCH][Usr_SEX_UNKNOWN], + Box_BoxBegin (Txt_ROLES_PLURAL_Abc[Rol_TCH][Usr_SEX_UNKNOWN], Usr_PutIconsListTchs,NULL, Hlp_USERS_Teachers,Box_NOT_CLOSABLE); diff --git a/swad_zip.c b/swad_zip.c index d6916416..2444bf96 100644 --- a/swad_zip.c +++ b/swad_zip.c @@ -529,9 +529,7 @@ static void ZIP_ShowLinkToDownloadZIP (const char *FileName,const char *URL, char FileSizeStr[Fil_MAX_BYTES_FILE_SIZE_STRING + 1]; /***** Begin box and table *****/ - Box_BoxTableShadowBegin (NULL,NULL, - NULL,NULL, - NULL,2); + Box_BoxTableShadowBegin (NULL, NULL,NULL,NULL,2); /***** Link to download the file *****/ HTM_TR_Begin (NULL);