diff --git a/swad_agenda.c b/swad_agenda.c index b7e2aca9..d7f41e67 100644 --- a/swad_agenda.c +++ b/swad_agenda.c @@ -860,7 +860,7 @@ static void Agd_PutFormsToRemEditOneEvent (struct Agd_Agenda *Agenda, struct Agd_Event *AgdEvent, const char *Anchor) { - static Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = + static const Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = { [HidVis_HIDDEN ] = ActUnhEvtMyAgd, // Hidden ==> action to unhide [HidVis_VISIBLE] = ActHidEvtMyAgd, // Visible ==> action to hide diff --git a/swad_announcement.c b/swad_announcement.c index c598aa60..944e2c50 100644 --- a/swad_announcement.c +++ b/swad_announcement.c @@ -217,7 +217,7 @@ static void Ann_DrawAnAnnouncement (struct Ann_Announcement *Announcement, [Ann_ACTIVE_ANNOUNCEMENT ] = "NOTICE_BOX NOTICE_BOX_WIDE", [Ann_OBSOLETE_ANNOUNCEMENT] = "NOTICE_BOX NOTICE_BOX_WIDE LIGHT", }; - static Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = + static const Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = { [HidVis_HIDDEN ] = ActUnhAnn, // Hidden ==> action to unhide [HidVis_VISIBLE] = ActHidAnn, // Visible ==> action to hide diff --git a/swad_assignment.c b/swad_assignment.c index 770ddd1d..26007dc1 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -697,7 +697,7 @@ Dat_StartEndTime_t Asg_GetParAsgOrder (void) static void Asg_PutIconsToRemEditOneAsg (struct Asg_Assignments *Assignments, const char *Anchor) { - static Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = + static const Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = { [HidVis_HIDDEN ] = ActUnhAsg, // Hidden ==> action to unhide [HidVis_VISIBLE] = ActHidAsg, // Visible ==> action to hide diff --git a/swad_attendance.c b/swad_attendance.c index eed1d94f..2c96d86a 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -574,7 +574,7 @@ static Dat_StartEndTime_t Att_GetParAttOrder (void) static void Att_PutFormsToRemEditOneEvent (struct Att_Events *Events, const char *Anchor) { - static Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = + static const Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = { [HidVis_HIDDEN ] = ActUnhAtt, // Hidden ==> action to unhide [HidVis_VISIBLE] = ActHidAtt, // Visible ==> action to hide diff --git a/swad_banner.c b/swad_banner.c index 0042e13d..d8e2e880 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -384,12 +384,12 @@ void Ban_PutIconToViewBanners (void) static void Ban_ListBannersForEdition (struct Ban_Banners *Banners) { extern const char *HidVis_DataClass[HidVis_NUM_HIDDEN_VISIBLE]; - static Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = + static const Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = { [HidVis_HIDDEN ] = ActUnhBan, // Hidden ==> action to unhide [HidVis_VISIBLE] = ActHidBan, // Visible ==> action to hide }; - static Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = + static const Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = { [Nam_SHRT_NAME] = ActRenBanSho, [Nam_FULL_NAME] = ActRenBanFul, diff --git a/swad_building.c b/swad_building.c index 1e7742fb..a90604f5 100644 --- a/swad_building.c +++ b/swad_building.c @@ -390,7 +390,7 @@ void Bld_FreeListBuildings (struct Bld_Buildings *Buildings) static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings) { - static Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = + static const Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = { [Nam_SHRT_NAME] = ActRenBldSho, [Nam_FULL_NAME] = ActRenBldFul, diff --git a/swad_call_for_exam.c b/swad_call_for_exam.c index 388056c9..cba23dfb 100644 --- a/swad_call_for_exam.c +++ b/swad_call_for_exam.c @@ -1474,7 +1474,7 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams, static void Cfe_PutIconsCallForExam (void *CallsForExams) { - static Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = + static const Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = { [HidVis_HIDDEN ] = ActUnhCfe, // Hidden ==> action to unhide [HidVis_VISIBLE] = ActHidCfe, // Visible ==> action to hide diff --git a/swad_center.c b/swad_center.c index 2b5bb06d..8750e423 100644 --- a/swad_center.c +++ b/swad_center.c @@ -732,7 +732,7 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places) { extern const char *Txt_Another_place; extern const char *Txt_CENTER_STATUS[Hie_NUM_STATUS_TXT]; - static Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = + static const Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = { [Nam_SHRT_NAME] = ActRenCtrSho, [Nam_FULL_NAME] = ActRenCtrFul, diff --git a/swad_changelog.h b/swad_changelog.h index d441ec67..a09105b4 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -633,12 +633,12 @@ 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.38.1 (2023-10-27)" +#define Log_PLATFORM_VERSION "SWAD 23.38.2 (2023-10-27)" #define CSS_FILE "swad23.35.1.css" #define JS_FILE "swad22.49.js" /* - * URGENTE: En un juego edito una pregunta y al guardarla se estropea todo. * Un ítem del programa está contraído. Al pulsar en editarlo, debería expandirse. + Version 23.38.2: Oct 27, 2023 Fix bug showing the question just edited. (335152 lines) Version 23.38.1: Oct 27, 2023 Fix issue related to public profile and record card. Reported by Francisco Javier Fernández Baldomero. (335152 lines) Version 23.38: Oct 18, 2023 Matches of a game are displayed as hidden when the game is hidden. (335149 lines) Version 23.37: Oct 14, 2023 Code refactoring in HTML. (335165 lines) diff --git a/swad_course.c b/swad_course.c index 0f1781c3..bd760f11 100644 --- a/swad_course.c +++ b/swad_course.c @@ -918,7 +918,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) { extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE]; extern const char *Txt_COURSE_STATUS[Hie_NUM_STATUS_TXT]; - static Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = + static const Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = { [Nam_SHRT_NAME] = ActRenCrsSho, [Nam_FULL_NAME] = ActRenCrsFul, diff --git a/swad_degree.c b/swad_degree.c index 47c0a947..c4083654 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -317,7 +317,7 @@ void Deg_ShowDegsOfCurrentCtr (void) static void Deg_ListDegreesForEdition (const struct DegTyp_DegTypes *DegTypes) { extern const char *Txt_DEGREE_STATUS[Hie_NUM_STATUS_TXT]; - static Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = + static const Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = { [Nam_SHRT_NAME] = ActRenDegSho, [Nam_FULL_NAME] = ActRenDegFul, diff --git a/swad_department.c b/swad_department.c index 6db7db81..8b13cbad 100644 --- a/swad_department.c +++ b/swad_department.c @@ -443,7 +443,7 @@ static void Dpt_GetDepartmentDataFromRow (MYSQL_RES *mysql_res, static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departments) { extern const char *Txt_Another_institution; - static Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = + static const Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = { [Nam_SHRT_NAME] = ActRenDptSho, [Nam_FULL_NAME] = ActRenDptFul, diff --git a/swad_exam.c b/swad_exam.c index eb557f9a..1d067762 100644 --- a/swad_exam.c +++ b/swad_exam.c @@ -663,7 +663,7 @@ static void Exa_PutParExamOrder (Exa_Order_t SelectedOrder) static void Exa_PutIconsToRemEditOneExam (struct Exa_Exams *Exams, const char *Anchor) { - static Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = + static const Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = { [HidVis_HIDDEN ] = ActUnhExa, // Hidden ==> action to unhide [HidVis_VISIBLE] = ActHidExa, // Visible ==> action to hide @@ -1320,7 +1320,7 @@ static void Exa_PutFormEditionExam (struct Exa_Exams *Exams, extern const char *Txt_Description; extern const char *Txt_Save_changes; extern const char *Txt_Create; - static Act_Action_t NextAction[] = + static const Act_Action_t NextAction[] = { [Exa_EXISTING_EXAM] = ActChgExa, [Exa_NEW_EXAM ] = ActNewExa, diff --git a/swad_exam_session.c b/swad_exam_session.c index 7137e2fb..86627414 100644 --- a/swad_exam_session.c +++ b/swad_exam_session.c @@ -428,7 +428,7 @@ static void ExaSes_ListOneOrMoreSessionsIcons (struct Exa_Exams *Exams, const struct ExaSes_Session *Session, const char *Anchor) { - static Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = + static const Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = { [HidVis_HIDDEN ] = ActUnhExaSes, // Hidden ==> action to unhide [HidVis_VISIBLE] = ActHidExaSes, // Visible ==> action to hide diff --git a/swad_game.c b/swad_game.c index f4d46c54..1ddcba50 100644 --- a/swad_game.c +++ b/swad_game.c @@ -707,7 +707,7 @@ static void Gam_PutParGameOrder (Gam_Order_t SelectedOrder) static void Gam_PutIconsToRemEditOneGame (struct Gam_Games *Games, const char *Anchor) { - static Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = + static const Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = { [HidVis_HIDDEN ] = ActUnhGam, // Hidden ==> action to unhide [HidVis_VISIBLE] = ActHidGam, // Visible ==> action to hide @@ -1310,7 +1310,7 @@ static void Gam_PutFormEditionGame (struct Gam_Games *Games, extern const char *Txt_Description; extern const char *Txt_Save_changes; extern const char *Txt_Create; - static Act_Action_t NextAction[] = + static const Act_Action_t NextAction[] = { [Gam_EXISTING_GAME] = ActChgGam, [Gam_NEW_GAME ] = ActNewGam, diff --git a/swad_hierarchy_config.c b/swad_hierarchy_config.c index fee43be7..53e9d8d3 100644 --- a/swad_hierarchy_config.c +++ b/swad_hierarchy_config.c @@ -92,7 +92,7 @@ void HieCfg_Name (bool PutForm,Hie_Level_t Level,Nam_ShrtOrFullName_t ShrtOrFull extern const char *Nam_Classes[Nam_NUM_SHRT_FULL_NAMES]; extern const char **Hie_TxtLevel[Hie_NUM_LEVELS]; extern const char *Txt_Short_name; - static Act_Action_t Action[Hie_NUM_LEVELS][Nam_NUM_SHRT_FULL_NAMES] = + static const Act_Action_t Action[Hie_NUM_LEVELS][Nam_NUM_SHRT_FULL_NAMES] = { [Hie_INS][Nam_SHRT_NAME] = ActRenInsShoCfg, [Hie_INS][Nam_FULL_NAME] = ActRenInsFulCfg, diff --git a/swad_institution.c b/swad_institution.c index f429f38d..dbbb2d8a 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -877,7 +877,7 @@ void Ins_WriteSelectorOfInstitution (void) static void Ins_ListInstitutionsForEdition (void) { extern const char *Txt_INSTITUTION_STATUS[Hie_NUM_STATUS_TXT]; - static Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = + static const Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = { [Nam_SHRT_NAME] = ActRenInsSho, [Nam_FULL_NAME] = ActRenInsFul, diff --git a/swad_link.c b/swad_link.c index fdd60e20..64d83c06 100644 --- a/swad_link.c +++ b/swad_link.c @@ -397,7 +397,7 @@ static void Lnk_FreeListLinks (struct Lnk_Links *Links) static void Lnk_ListLinksForEdition (const struct Lnk_Links *Links) { - static Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = + static const Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = { [Nam_SHRT_NAME] = ActRenLnkSho, [Nam_FULL_NAME] = ActRenLnkFul, diff --git a/swad_logo.c b/swad_logo.c index 24c8e161..ad01bbdf 100644 --- a/swad_logo.c +++ b/swad_logo.c @@ -200,7 +200,7 @@ void Lgo_DrawLogo (Hie_Level_t Level, void Lgo_PutIconToChangeLogo (Hie_Level_t Level) { - static Act_Action_t Action[Hie_NUM_LEVELS] = + static const Act_Action_t Action[Hie_NUM_LEVELS] = { [Hie_UNK] = ActUnk, // Unknown [Hie_SYS] = ActUnk, // System @@ -225,7 +225,7 @@ void Lgo_RequestLogo (Hie_Level_t Level) extern const char *Txt_Logo; extern const char *Txt_You_can_send_a_file_with_an_image_in_PNG_format_transparent_background_and_size_X_Y; extern const char *Txt_File_with_the_logo; - static Act_Action_t ActionRec[Hie_NUM_LEVELS] = + static const Act_Action_t ActionRec[Hie_NUM_LEVELS] = { [Hie_INS] = ActRecInsLog, [Hie_CTR] = ActRecCtrLog, diff --git a/swad_name.c b/swad_name.c index 579fe0f6..358097bc 100644 --- a/swad_name.c +++ b/swad_name.c @@ -103,7 +103,7 @@ void Nam_NewShortAndFullNames (const char *Names[Nam_NUM_SHRT_FULL_NAMES]) } } -void Nam_ExistingShortAndFullNames (Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES], +void Nam_ExistingShortAndFullNames (const Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES], ParCod_Param_t ParCod,long Cod, const char *Names[Nam_NUM_SHRT_FULL_NAMES], bool PutForm) diff --git a/swad_name.h b/swad_name.h index 3f5adb5a..39520908 100644 --- a/swad_name.h +++ b/swad_name.h @@ -61,7 +61,7 @@ void Nam_GetParsShrtAndFullName (char *Names[Nam_NUM_SHRT_FULL_NAMES]); void Nam_GetParShrtOrFullName (Nam_ShrtOrFullName_t ShrtOrFull,char *Name); void Nam_NewShortAndFullNames (const char *Names[Nam_NUM_SHRT_FULL_NAMES]); -void Nam_ExistingShortAndFullNames (Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES], +void Nam_ExistingShortAndFullNames (const Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES], ParCod_Param_t ParCod,long Cod, const char *Names[Nam_NUM_SHRT_FULL_NAMES], bool PutForm); diff --git a/swad_notice.c b/swad_notice.c index eaf1a1c8..0b8cc582 100644 --- a/swad_notice.c +++ b/swad_notice.c @@ -505,7 +505,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing, bool Highlight) { extern const char *Txt_See_full_notice; - static Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = + static const Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = { [HidVis_HIDDEN ] = ActUnhNot, // Hidden ==> action to unhide [HidVis_VISIBLE] = ActHidNot, // Visible ==> action to hide diff --git a/swad_place.c b/swad_place.c index 594e818a..189c8a69 100644 --- a/swad_place.c +++ b/swad_place.c @@ -423,7 +423,7 @@ void Plc_FreeListPlaces (struct Plc_Places *Places) static void Plc_ListPlacesForEdition (const struct Plc_Places *Places) { - static Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = + static const Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = { [Nam_SHRT_NAME] = ActRenPlcSho, [Nam_FULL_NAME] = ActRenPlcFul, diff --git a/swad_program.c b/swad_program.c index 8daf30d8..9cd16fb5 100644 --- a/swad_program.c +++ b/swad_program.c @@ -666,7 +666,7 @@ static void Prg_WriteRowItem (Prg_ListingType_t ListingType, static void Prg_PutIconToContractExpandItem (struct Prg_Item *Item, bool Expanded,bool Editing) { - static Act_Action_t NextAction[2][2] = + static const Act_Action_t NextAction[2][2] = { [false][false] = ActExpSeePrgItm, // Contracted, Not editing ==> action to expand [false][true ] = ActExpEdiPrgItm, // Contracted, Editing ==> action to expand @@ -977,7 +977,7 @@ static void Prg_PutFormsToRemEditOneItem (Prg_ListingType_t ListingType, bool HighlightItem) { extern const char *Txt_Movement_not_allowed; - static Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = + static const Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = { [HidVis_HIDDEN ] = ActUnhPrgItm, // Hidden ==> action to unhide [HidVis_VISIBLE] = ActHidPrgItm, // Visible ==> action to hide diff --git a/swad_program_resource.c b/swad_program_resource.c index ff250710..ce77c4e2 100644 --- a/swad_program_resource.c +++ b/swad_program_resource.c @@ -508,7 +508,7 @@ static void PrgRsc_PutFormsToRemEditOneResource (struct Prg_Item *Item, unsigned NumRsc, unsigned NumResources) { - static Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = + static const Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = { [HidVis_HIDDEN ] = ActUnhPrgRsc, // Hidden ==> action to unhide [HidVis_VISIBLE] = ActHidPrgRsc, // Visible ==> action to hide diff --git a/swad_project.c b/swad_project.c index 56ba3f6d..c768b1da 100644 --- a/swad_project.c +++ b/swad_project.c @@ -2843,7 +2843,7 @@ static void Prj_FormToSelectUsrs (struct Prj_Projects *Projects, extern const char *Hlp_ASSESSMENT_Projects_add_user; extern const char *Txt_Add_USERS; extern const char *Txt_PROJECT_ROLES_PLURAL_abc[Prj_NUM_ROLES_IN_PROJECT]; - static Act_Action_t ActionAddUsr[Prj_NUM_ROLES_IN_PROJECT] = + static const Act_Action_t ActionAddUsr[Prj_NUM_ROLES_IN_PROJECT] = { [Prj_ROLE_UNK] = ActUnk, // Unknown [Prj_ROLE_STD] = ActAddStdPrj, // Student @@ -3007,7 +3007,7 @@ static void Prj_ReqRemUsrFromPrj (struct Prj_Projects *Projects, extern const char *Txt_Do_you_really_want_to_remove_the_following_user_as_a_X_from_the_project_Y; extern const char *Txt_PROJECT_ROLES_SINGUL_abc[Prj_NUM_ROLES_IN_PROJECT][Usr_NUM_SEXS]; extern const char *Txt_Remove_USER_from_this_project; - static Act_Action_t ActionRemUsr[Prj_NUM_ROLES_IN_PROJECT] = + static const Act_Action_t ActionRemUsr[Prj_NUM_ROLES_IN_PROJECT] = { [Prj_ROLE_UNK] = ActUnk, // Unknown [Prj_ROLE_STD] = ActRemStdPrj, // Student @@ -3160,7 +3160,7 @@ static Prj_Order_t Prj_GetParPrjOrder (void) static void Prj_PutIconsToRemEditOnePrj (struct Prj_Projects *Projects, const char *Anchor) { - static Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = + static const Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = { [HidVis_HIDDEN ] = ActUnhPrj, // Hidden ==> action to unhide [HidVis_VISIBLE] = ActHidPrj, // Visible ==> action to hide diff --git a/swad_question.c b/swad_question.c index b905e517..dc7e706c 100644 --- a/swad_question.c +++ b/swad_question.c @@ -1383,7 +1383,7 @@ void Qst_ListOneQstToEdit (struct Qst_Questions *Questions) Qst_WriteQuestionListing (Questions,0); /***** End table and box *****/ - Box_BoxEnd (); + Box_BoxTableEnd (); } /*****************************************************************************/ diff --git a/swad_record.c b/swad_record.c index 9497b6aa..c68e4991 100644 --- a/swad_record.c +++ b/swad_record.c @@ -2289,7 +2289,7 @@ static void Rec_PutIconsCommands (__attribute__((unused)) void *Args) Usr_MeOrOther_t MeOrOther = Usr_ItsMe (Rec_Record.UsrDat->UsrCod); bool ICanViewUsrProfile; bool RecipientHasBannedMe; - static Act_Action_t NextAction[Rol_NUM_ROLES] = + static const Act_Action_t NextAction[Rol_NUM_ROLES] = { [Rol_UNK ] = ActReqMdfOth, [Rol_GST ] = ActReqMdfOth, @@ -2302,32 +2302,32 @@ static void Rec_PutIconsCommands (__attribute__((unused)) void *Args) [Rol_INS_ADM] = ActReqMdfOth, [Rol_SYS_ADM] = ActReqMdfOth, }; - static Act_Action_t ActSeeAgd[Usr_NUM_ME_OR_OTHER] = + static const Act_Action_t ActSeeAgd[Usr_NUM_ME_OR_OTHER] = { [Usr_ME ] = ActSeeMyAgd, [Usr_OTHER] = ActSeeUsrAgd, }; - static Act_Action_t ActSeeTstResCrs[Usr_NUM_ME_OR_OTHER] = + static const Act_Action_t ActSeeTstResCrs[Usr_NUM_ME_OR_OTHER] = { [Usr_ME ] = ActSeeMyTstResCrs, [Usr_OTHER] = ActSeeUsrTstResCrs, }; - static Act_Action_t ActSeeExaResCrs[Usr_NUM_ME_OR_OTHER] = + static const Act_Action_t ActSeeExaResCrs[Usr_NUM_ME_OR_OTHER] = { [Usr_ME ] = ActSeeMyExaResCrs, [Usr_OTHER] = ActSeeUsrExaResCrs, }; - static Act_Action_t ActSeeMchResCrs[Usr_NUM_ME_OR_OTHER] = + static const Act_Action_t ActSeeMchResCrs[Usr_NUM_ME_OR_OTHER] = { [Usr_ME ] = ActSeeMyMchResCrs, [Usr_OTHER] = ActSeeUsrMchResCrs, }; - static Act_Action_t ActAdmAsgWrk[Usr_NUM_ME_OR_OTHER] = + static const Act_Action_t ActAdmAsgWrk[Usr_NUM_ME_OR_OTHER] = { [Usr_ME ] = ActAdmAsgWrkUsr, [Usr_OTHER] = ActAdmAsgWrkCrs, // Not me, I am not a student in current course }; - static Act_Action_t ActSeeLstAtt[Usr_NUM_ME_OR_OTHER] = + static const Act_Action_t ActSeeLstAtt[Usr_NUM_ME_OR_OTHER] = { [Usr_ME ] = ActSeeLstMyAtt, [Usr_OTHER] = ActSeeLstUsrAtt, diff --git a/swad_room.c b/swad_room.c index 61c98f4d..8d5a3646 100644 --- a/swad_room.c +++ b/swad_room.c @@ -628,7 +628,7 @@ void Roo_FreeListRooms (struct Roo_Rooms *Rooms) static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings, const struct Roo_Rooms *Rooms) { - static Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = + static const Act_Action_t ActionRename[Nam_NUM_SHRT_FULL_NAMES] = { [Nam_SHRT_NAME] = ActRenRooSho, [Nam_FULL_NAME] = ActRenRooFul, diff --git a/swad_rubric.c b/swad_rubric.c index d410afab..c92873b7 100644 --- a/swad_rubric.c +++ b/swad_rubric.c @@ -830,7 +830,7 @@ static void Rub_PutFormEditionRubric (struct Rub_Rubrics *Rubrics, extern const char *Txt_Description; extern const char *Txt_Create; extern const char *Txt_Save_changes; - static Act_Action_t NextAction[] = + static const Act_Action_t NextAction[] = { [Rub_EXISTING_RUBRIC] = ActChgRub, [Rub_NEW_RUBRIC ] = ActNewRub, diff --git a/swad_rubric_criteria.c b/swad_rubric_criteria.c index f0874d35..7a243e07 100644 --- a/swad_rubric_criteria.c +++ b/swad_rubric_criteria.c @@ -657,7 +657,7 @@ static void RubCri_ListOneOrMoreCriteriaForEdition (struct Rub_Rubrics *Rubrics, extern const char *Txt_Criteria; extern const char *Txt_Movement_not_allowed; // Actions to change minimum/maximum criterion values - static Act_Action_t RubCri_ActionsValues[RubCri_NUM_VALUES] = + static const Act_Action_t RubCri_ActionsValues[RubCri_NUM_VALUES] = { [RubCri_MIN] = ActChgMinRubCri, [RubCri_MAX] = ActChgMaxRubCri, diff --git a/swad_survey.c b/swad_survey.c index 5811f8ef..61997b0e 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -836,7 +836,7 @@ void Svy_PutParSvyOrder (Dat_StartEndTime_t SelectedOrder) static void Svy_PutFormsToRemEditOneSvy (struct Svy_Surveys *Surveys, const char *Anchor) { - static Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = + static const Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] = { [HidVis_HIDDEN ] = ActUnhSvy, // Hidden ==> action to unhide [HidVis_VISIBLE] = ActHidSvy, // Visible ==> action to hide diff --git a/swad_timetable.c b/swad_timetable.c index 0d54734f..be26b4c7 100644 --- a/swad_timetable.c +++ b/swad_timetable.c @@ -1487,7 +1487,7 @@ static void Tmt_TimeTableDrawCellEdit (const struct Tmt_Timetable *Timetable, extern const char *Txt_Group; extern const char *Txt_All_groups; extern const char *Txt_Info; - static Act_Action_t NextAction[Tmt_NUM_VIEW_EDIT] = + static const Act_Action_t NextAction[Tmt_NUM_VIEW_EDIT] = { [Tmt_CRS_VIEW] = ActUnk, // course view [Tmt_TUT_VIEW] = ActUnk, // tutorials view