mirror of https://github.com/acanas/swad-core.git
Version 21.106: Jul 14, 2022 Hide/unhide resource from program item.
This commit is contained in:
parent
a87d0d26d4
commit
e45bf73e21
|
@ -436,7 +436,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
[ActReqRemPrgItm ] = {1827,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_ReqRemItem ,NULL},
|
||||
[ActRemPrgItm ] = {1828,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_RemoveItem ,NULL},
|
||||
[ActHidPrgItm ] = {1829,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_HideItem ,NULL},
|
||||
[ActShoPrgItm ] = {1830,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_UnhideItem ,NULL},
|
||||
[ActUnhPrgItm ] = {1830,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_UnhideItem ,NULL},
|
||||
[ActUp_PrgItm ] = {1831,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_MoveUpItem ,NULL},
|
||||
[ActDwnPrgItm ] = {1832,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_MoveDownItem ,NULL},
|
||||
[ActLftPrgItm ] = {1834,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_MoveLeftItem ,NULL},
|
||||
|
@ -445,6 +445,10 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
[ActFrmNewPrgRsc ] = {1918,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_RequestChangeItem ,NULL},
|
||||
[ActReqRemPrgRsc ] = {1919,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,PrgRsc_ReqRemResource ,NULL},
|
||||
[ActRemPrgRsc ] = {1920,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,PrgRsc_RemoveResource ,NULL},
|
||||
[ActHidPrgRsc ] = {1921,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,PrgRsc_HideResource ,NULL},
|
||||
[ActUnhPrgRsc ] = {1922,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,PrgRsc_UnhideResource ,NULL},
|
||||
[ActUp_PrgRsc ] = {1923,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,PrgRsc_MoveUpResource ,NULL},
|
||||
[ActDwnPrgRsc ] = {1924,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,PrgRsc_MoveDownResource ,NULL},
|
||||
|
||||
[ActEdiTchGui ] = { 785,-1,TabUnk,ActSeeTchGui ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Inf_FormsToSelSendInfo ,NULL},
|
||||
|
||||
|
@ -3660,7 +3664,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
|||
ActReqRemPrgItm, // #1827
|
||||
ActRemPrgItm, // #1828
|
||||
ActHidPrgItm, // #1829
|
||||
ActShoPrgItm, // #1830
|
||||
ActUnhPrgItm, // #1830
|
||||
ActUp_PrgItm, // #1832
|
||||
ActDwnPrgItm, // #1833
|
||||
ActRgtPrgItm, // #1833
|
||||
|
@ -3751,6 +3755,10 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
|||
ActFrmNewPrgRsc, // #1918
|
||||
ActReqRemPrgRsc, // #1919
|
||||
ActRemPrgRsc, // #1920
|
||||
ActHidPrgRsc, // #1921
|
||||
ActUnhPrgRsc, // #1922
|
||||
ActUp_PrgRsc, // #1923
|
||||
ActDwnPrgRsc, // #1924
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
200
swad_action.h
200
swad_action.h
|
@ -65,7 +65,7 @@ typedef enum
|
|||
|
||||
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
||||
|
||||
#define Act_MAX_ACTION_COD 1920
|
||||
#define Act_MAX_ACTION_COD 1924
|
||||
|
||||
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
|
||||
|
||||
|
@ -403,7 +403,7 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
|
|||
#define ActReqRemPrgItm (ActChgCrsSta + 20)
|
||||
#define ActRemPrgItm (ActChgCrsSta + 21)
|
||||
#define ActHidPrgItm (ActChgCrsSta + 22)
|
||||
#define ActShoPrgItm (ActChgCrsSta + 23)
|
||||
#define ActUnhPrgItm (ActChgCrsSta + 23)
|
||||
#define ActUp_PrgItm (ActChgCrsSta + 24)
|
||||
#define ActDwnPrgItm (ActChgCrsSta + 25)
|
||||
#define ActLftPrgItm (ActChgCrsSta + 26)
|
||||
|
@ -411,107 +411,111 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
|
|||
#define ActFrmNewPrgRsc (ActChgCrsSta + 28)
|
||||
#define ActReqRemPrgRsc (ActChgCrsSta + 29)
|
||||
#define ActRemPrgRsc (ActChgCrsSta + 30)
|
||||
#define ActEdiTchGui (ActChgCrsSta + 31)
|
||||
#define ActSeeSylLec (ActChgCrsSta + 32)
|
||||
#define ActSeeSylPra (ActChgCrsSta + 33)
|
||||
#define ActEdiSylLec (ActChgCrsSta + 34)
|
||||
#define ActEdiSylPra (ActChgCrsSta + 35)
|
||||
#define ActDelItmSylLec (ActChgCrsSta + 36)
|
||||
#define ActDelItmSylPra (ActChgCrsSta + 37)
|
||||
#define ActUp_IteSylLec (ActChgCrsSta + 38)
|
||||
#define ActUp_IteSylPra (ActChgCrsSta + 39)
|
||||
#define ActDwnIteSylLec (ActChgCrsSta + 40)
|
||||
#define ActDwnIteSylPra (ActChgCrsSta + 41)
|
||||
#define ActRgtIteSylLec (ActChgCrsSta + 42)
|
||||
#define ActRgtIteSylPra (ActChgCrsSta + 43)
|
||||
#define ActLftIteSylLec (ActChgCrsSta + 44)
|
||||
#define ActLftIteSylPra (ActChgCrsSta + 45)
|
||||
#define ActInsIteSylLec (ActChgCrsSta + 46)
|
||||
#define ActInsIteSylPra (ActChgCrsSta + 47)
|
||||
#define ActModIteSylLec (ActChgCrsSta + 48)
|
||||
#define ActModIteSylPra (ActChgCrsSta + 49)
|
||||
#define ActHidPrgRsc (ActChgCrsSta + 31)
|
||||
#define ActUnhPrgRsc (ActChgCrsSta + 32)
|
||||
#define ActUp_PrgRsc (ActChgCrsSta + 33)
|
||||
#define ActDwnPrgRsc (ActChgCrsSta + 34)
|
||||
#define ActEdiTchGui (ActChgCrsSta + 35)
|
||||
#define ActSeeSylLec (ActChgCrsSta + 36)
|
||||
#define ActSeeSylPra (ActChgCrsSta + 37)
|
||||
#define ActEdiSylLec (ActChgCrsSta + 38)
|
||||
#define ActEdiSylPra (ActChgCrsSta + 39)
|
||||
#define ActDelItmSylLec (ActChgCrsSta + 40)
|
||||
#define ActDelItmSylPra (ActChgCrsSta + 41)
|
||||
#define ActUp_IteSylLec (ActChgCrsSta + 42)
|
||||
#define ActUp_IteSylPra (ActChgCrsSta + 43)
|
||||
#define ActDwnIteSylLec (ActChgCrsSta + 44)
|
||||
#define ActDwnIteSylPra (ActChgCrsSta + 45)
|
||||
#define ActRgtIteSylLec (ActChgCrsSta + 46)
|
||||
#define ActRgtIteSylPra (ActChgCrsSta + 47)
|
||||
#define ActLftIteSylLec (ActChgCrsSta + 48)
|
||||
#define ActLftIteSylPra (ActChgCrsSta + 49)
|
||||
#define ActInsIteSylLec (ActChgCrsSta + 50)
|
||||
#define ActInsIteSylPra (ActChgCrsSta + 51)
|
||||
#define ActModIteSylLec (ActChgCrsSta + 52)
|
||||
#define ActModIteSylPra (ActChgCrsSta + 53)
|
||||
|
||||
#define ActEdiBib (ActChgCrsSta + 50)
|
||||
#define ActEdiFAQ (ActChgCrsSta + 51)
|
||||
#define ActEdiCrsLnk (ActChgCrsSta + 52)
|
||||
#define ActEdiBib (ActChgCrsSta + 54)
|
||||
#define ActEdiFAQ (ActChgCrsSta + 55)
|
||||
#define ActEdiCrsLnk (ActChgCrsSta + 56)
|
||||
|
||||
#define ActChgFrcReaCrsInf (ActChgCrsSta + 53)
|
||||
#define ActChgFrcReaTchGui (ActChgCrsSta + 54)
|
||||
#define ActChgFrcReaSylLec (ActChgCrsSta + 55)
|
||||
#define ActChgFrcReaSylPra (ActChgCrsSta + 56)
|
||||
#define ActChgFrcReaBib (ActChgCrsSta + 57)
|
||||
#define ActChgFrcReaFAQ (ActChgCrsSta + 58)
|
||||
#define ActChgFrcReaCrsLnk (ActChgCrsSta + 59)
|
||||
#define ActChgFrcReaCrsInf (ActChgCrsSta + 57)
|
||||
#define ActChgFrcReaTchGui (ActChgCrsSta + 58)
|
||||
#define ActChgFrcReaSylLec (ActChgCrsSta + 59)
|
||||
#define ActChgFrcReaSylPra (ActChgCrsSta + 60)
|
||||
#define ActChgFrcReaBib (ActChgCrsSta + 61)
|
||||
#define ActChgFrcReaFAQ (ActChgCrsSta + 62)
|
||||
#define ActChgFrcReaCrsLnk (ActChgCrsSta + 63)
|
||||
|
||||
#define ActChgHavReaCrsInf (ActChgCrsSta + 60)
|
||||
#define ActChgHavReaTchGui (ActChgCrsSta + 61)
|
||||
#define ActChgHavReaSylLec (ActChgCrsSta + 62)
|
||||
#define ActChgHavReaSylPra (ActChgCrsSta + 63)
|
||||
#define ActChgHavReaBib (ActChgCrsSta + 64)
|
||||
#define ActChgHavReaFAQ (ActChgCrsSta + 65)
|
||||
#define ActChgHavReaCrsLnk (ActChgCrsSta + 66)
|
||||
#define ActChgHavReaCrsInf (ActChgCrsSta + 64)
|
||||
#define ActChgHavReaTchGui (ActChgCrsSta + 65)
|
||||
#define ActChgHavReaSylLec (ActChgCrsSta + 66)
|
||||
#define ActChgHavReaSylPra (ActChgCrsSta + 67)
|
||||
#define ActChgHavReaBib (ActChgCrsSta + 68)
|
||||
#define ActChgHavReaFAQ (ActChgCrsSta + 69)
|
||||
#define ActChgHavReaCrsLnk (ActChgCrsSta + 70)
|
||||
|
||||
#define ActSelInfSrcCrsInf (ActChgCrsSta + 67)
|
||||
#define ActSelInfSrcTchGui (ActChgCrsSta + 68)
|
||||
#define ActSelInfSrcSylLec (ActChgCrsSta + 69)
|
||||
#define ActSelInfSrcSylPra (ActChgCrsSta + 70)
|
||||
#define ActSelInfSrcBib (ActChgCrsSta + 71)
|
||||
#define ActSelInfSrcFAQ (ActChgCrsSta + 72)
|
||||
#define ActSelInfSrcCrsLnk (ActChgCrsSta + 73)
|
||||
#define ActRcvURLCrsInf (ActChgCrsSta + 74)
|
||||
#define ActRcvURLTchGui (ActChgCrsSta + 75)
|
||||
#define ActRcvURLSylLec (ActChgCrsSta + 76)
|
||||
#define ActRcvURLSylPra (ActChgCrsSta + 77)
|
||||
#define ActRcvURLBib (ActChgCrsSta + 78)
|
||||
#define ActRcvURLFAQ (ActChgCrsSta + 79)
|
||||
#define ActRcvURLCrsLnk (ActChgCrsSta + 80)
|
||||
#define ActRcvPagCrsInf (ActChgCrsSta + 81)
|
||||
#define ActRcvPagTchGui (ActChgCrsSta + 82)
|
||||
#define ActRcvPagSylLec (ActChgCrsSta + 83)
|
||||
#define ActRcvPagSylPra (ActChgCrsSta + 84)
|
||||
#define ActRcvPagBib (ActChgCrsSta + 85)
|
||||
#define ActRcvPagFAQ (ActChgCrsSta + 86)
|
||||
#define ActRcvPagCrsLnk (ActChgCrsSta + 87)
|
||||
#define ActEditorCrsInf (ActChgCrsSta + 88)
|
||||
#define ActEditorTchGui (ActChgCrsSta + 89)
|
||||
#define ActEditorSylLec (ActChgCrsSta + 90)
|
||||
#define ActEditorSylPra (ActChgCrsSta + 91)
|
||||
#define ActEditorBib (ActChgCrsSta + 92)
|
||||
#define ActEditorFAQ (ActChgCrsSta + 93)
|
||||
#define ActEditorCrsLnk (ActChgCrsSta + 94)
|
||||
#define ActPlaTxtEdiCrsInf (ActChgCrsSta + 95)
|
||||
#define ActPlaTxtEdiTchGui (ActChgCrsSta + 96)
|
||||
#define ActPlaTxtEdiSylLec (ActChgCrsSta + 97)
|
||||
#define ActPlaTxtEdiSylPra (ActChgCrsSta + 98)
|
||||
#define ActPlaTxtEdiBib (ActChgCrsSta + 99)
|
||||
#define ActPlaTxtEdiFAQ (ActChgCrsSta + 100)
|
||||
#define ActPlaTxtEdiCrsLnk (ActChgCrsSta + 101)
|
||||
#define ActRchTxtEdiCrsInf (ActChgCrsSta + 102)
|
||||
#define ActRchTxtEdiTchGui (ActChgCrsSta + 103)
|
||||
#define ActRchTxtEdiSylLec (ActChgCrsSta + 104)
|
||||
#define ActRchTxtEdiSylPra (ActChgCrsSta + 105)
|
||||
#define ActRchTxtEdiBib (ActChgCrsSta + 106)
|
||||
#define ActRchTxtEdiFAQ (ActChgCrsSta + 107)
|
||||
#define ActRchTxtEdiCrsLnk (ActChgCrsSta + 108)
|
||||
#define ActRcvPlaTxtCrsInf (ActChgCrsSta + 109)
|
||||
#define ActRcvPlaTxtTchGui (ActChgCrsSta + 110)
|
||||
#define ActRcvPlaTxtSylLec (ActChgCrsSta + 111)
|
||||
#define ActRcvPlaTxtSylPra (ActChgCrsSta + 112)
|
||||
#define ActRcvPlaTxtBib (ActChgCrsSta + 113)
|
||||
#define ActRcvPlaTxtFAQ (ActChgCrsSta + 114)
|
||||
#define ActRcvPlaTxtCrsLnk (ActChgCrsSta + 115)
|
||||
#define ActRcvRchTxtCrsInf (ActChgCrsSta + 116)
|
||||
#define ActRcvRchTxtTchGui (ActChgCrsSta + 117)
|
||||
#define ActRcvRchTxtSylLec (ActChgCrsSta + 118)
|
||||
#define ActRcvRchTxtSylPra (ActChgCrsSta + 119)
|
||||
#define ActRcvRchTxtBib (ActChgCrsSta + 120)
|
||||
#define ActRcvRchTxtFAQ (ActChgCrsSta + 121)
|
||||
#define ActRcvRchTxtCrsLnk (ActChgCrsSta + 122)
|
||||
#define ActSelInfSrcCrsInf (ActChgCrsSta + 71)
|
||||
#define ActSelInfSrcTchGui (ActChgCrsSta + 72)
|
||||
#define ActSelInfSrcSylLec (ActChgCrsSta + 73)
|
||||
#define ActSelInfSrcSylPra (ActChgCrsSta + 74)
|
||||
#define ActSelInfSrcBib (ActChgCrsSta + 75)
|
||||
#define ActSelInfSrcFAQ (ActChgCrsSta + 76)
|
||||
#define ActSelInfSrcCrsLnk (ActChgCrsSta + 77)
|
||||
#define ActRcvURLCrsInf (ActChgCrsSta + 78)
|
||||
#define ActRcvURLTchGui (ActChgCrsSta + 79)
|
||||
#define ActRcvURLSylLec (ActChgCrsSta + 80)
|
||||
#define ActRcvURLSylPra (ActChgCrsSta + 81)
|
||||
#define ActRcvURLBib (ActChgCrsSta + 82)
|
||||
#define ActRcvURLFAQ (ActChgCrsSta + 83)
|
||||
#define ActRcvURLCrsLnk (ActChgCrsSta + 84)
|
||||
#define ActRcvPagCrsInf (ActChgCrsSta + 85)
|
||||
#define ActRcvPagTchGui (ActChgCrsSta + 86)
|
||||
#define ActRcvPagSylLec (ActChgCrsSta + 87)
|
||||
#define ActRcvPagSylPra (ActChgCrsSta + 88)
|
||||
#define ActRcvPagBib (ActChgCrsSta + 89)
|
||||
#define ActRcvPagFAQ (ActChgCrsSta + 90)
|
||||
#define ActRcvPagCrsLnk (ActChgCrsSta + 91)
|
||||
#define ActEditorCrsInf (ActChgCrsSta + 92)
|
||||
#define ActEditorTchGui (ActChgCrsSta + 93)
|
||||
#define ActEditorSylLec (ActChgCrsSta + 94)
|
||||
#define ActEditorSylPra (ActChgCrsSta + 95)
|
||||
#define ActEditorBib (ActChgCrsSta + 96)
|
||||
#define ActEditorFAQ (ActChgCrsSta + 97)
|
||||
#define ActEditorCrsLnk (ActChgCrsSta + 98)
|
||||
#define ActPlaTxtEdiCrsInf (ActChgCrsSta + 99)
|
||||
#define ActPlaTxtEdiTchGui (ActChgCrsSta + 100)
|
||||
#define ActPlaTxtEdiSylLec (ActChgCrsSta + 101)
|
||||
#define ActPlaTxtEdiSylPra (ActChgCrsSta + 102)
|
||||
#define ActPlaTxtEdiBib (ActChgCrsSta + 103)
|
||||
#define ActPlaTxtEdiFAQ (ActChgCrsSta + 104)
|
||||
#define ActPlaTxtEdiCrsLnk (ActChgCrsSta + 105)
|
||||
#define ActRchTxtEdiCrsInf (ActChgCrsSta + 106)
|
||||
#define ActRchTxtEdiTchGui (ActChgCrsSta + 107)
|
||||
#define ActRchTxtEdiSylLec (ActChgCrsSta + 108)
|
||||
#define ActRchTxtEdiSylPra (ActChgCrsSta + 109)
|
||||
#define ActRchTxtEdiBib (ActChgCrsSta + 110)
|
||||
#define ActRchTxtEdiFAQ (ActChgCrsSta + 111)
|
||||
#define ActRchTxtEdiCrsLnk (ActChgCrsSta + 112)
|
||||
#define ActRcvPlaTxtCrsInf (ActChgCrsSta + 113)
|
||||
#define ActRcvPlaTxtTchGui (ActChgCrsSta + 114)
|
||||
#define ActRcvPlaTxtSylLec (ActChgCrsSta + 115)
|
||||
#define ActRcvPlaTxtSylPra (ActChgCrsSta + 116)
|
||||
#define ActRcvPlaTxtBib (ActChgCrsSta + 117)
|
||||
#define ActRcvPlaTxtFAQ (ActChgCrsSta + 118)
|
||||
#define ActRcvPlaTxtCrsLnk (ActChgCrsSta + 119)
|
||||
#define ActRcvRchTxtCrsInf (ActChgCrsSta + 120)
|
||||
#define ActRcvRchTxtTchGui (ActChgCrsSta + 121)
|
||||
#define ActRcvRchTxtSylLec (ActChgCrsSta + 122)
|
||||
#define ActRcvRchTxtSylPra (ActChgCrsSta + 123)
|
||||
#define ActRcvRchTxtBib (ActChgCrsSta + 124)
|
||||
#define ActRcvRchTxtFAQ (ActChgCrsSta + 125)
|
||||
#define ActRcvRchTxtCrsLnk (ActChgCrsSta + 126)
|
||||
|
||||
#define ActPrnCrsTT (ActChgCrsSta + 123)
|
||||
#define ActEdiCrsTT (ActChgCrsSta + 124)
|
||||
#define ActChgCrsTT (ActChgCrsSta + 125)
|
||||
#define ActChgCrsTT1stDay (ActChgCrsSta + 126)
|
||||
#define ActPrnCrsTT (ActChgCrsSta + 127)
|
||||
#define ActEdiCrsTT (ActChgCrsSta + 128)
|
||||
#define ActChgCrsTT (ActChgCrsSta + 129)
|
||||
#define ActChgCrsTT1stDay (ActChgCrsSta + 130)
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Assessment tab ********************************/
|
||||
|
|
|
@ -606,10 +606,11 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
|
|||
|
||||
TODO: Attach pdf files in multimedia.
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 21.105 (2022-07-14)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 21.106 (2022-07-14)"
|
||||
#define CSS_FILE "swad21.103.6.css"
|
||||
#define JS_FILE "swad21.100.js"
|
||||
/*
|
||||
Version 21.106: Jul 14, 2022 Hide/unhide resource from program item. (328816 lines)
|
||||
Version 21.105: Jul 14, 2022 Removing resource from program item. (328617 lines)
|
||||
Version 21.104.1: Jul 13, 2022 Adding resources to program items. (328504 lines)
|
||||
Version 21.104: Jul 12, 2022 Adding resources to program items. (328263 lines)
|
||||
|
|
|
@ -751,7 +751,7 @@ static void Prg_PutFormsToRemEditOneItem (unsigned NumItem,
|
|||
|
||||
/***** Put form to hide/show program item *****/
|
||||
if (Item->Hierarchy.Hidden)
|
||||
Ico_PutContextualIconToUnhide (ActShoPrgItm,"prg_highlighted",
|
||||
Ico_PutContextualIconToUnhide (ActUnhPrgItm,"prg_highlighted",
|
||||
Prg_PutParams,&Item->Hierarchy.ItmCod);
|
||||
else
|
||||
Ico_PutContextualIconToHide (ActHidPrgItm,"prg_highlighted",
|
||||
|
@ -818,7 +818,7 @@ static bool Prg_CheckIfMoveUpIsAllowed (unsigned NumItem)
|
|||
return false;
|
||||
|
||||
/***** Move up is allowed if the item has brothers before it *****/
|
||||
// NumItem >= 2
|
||||
// NumItem >= 1
|
||||
return Prg_GetLevelFromNumItem (NumItem - 1) >=
|
||||
Prg_GetLevelFromNumItem (NumItem );
|
||||
}
|
||||
|
|
|
@ -260,8 +260,9 @@ void Prg_DB_GetItemTxt (long ItmCod,char Txt[Cns_MAX_BYTES_TEXT + 1])
|
|||
/****************** Get list of item resources from database *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
unsigned Prg_DB_GetListResources (MYSQL_RES **mysql_res,long ItmCod)
|
||||
{
|
||||
unsigned Prg_DB_GetListResources (MYSQL_RES **mysql_res,long ItmCod,
|
||||
bool ShowHiddenResources)
|
||||
{/*
|
||||
static const char *HiddenSubQuery[Rol_NUM_ROLES] =
|
||||
{
|
||||
[Rol_UNK ] = " AND Hidden='N'",
|
||||
|
@ -274,6 +275,11 @@ unsigned Prg_DB_GetListResources (MYSQL_RES **mysql_res,long ItmCod)
|
|||
[Rol_CTR_ADM] = " AND Hidden='N'",
|
||||
[Rol_INS_ADM] = " AND Hidden='N'",
|
||||
[Rol_SYS_ADM] = "",
|
||||
}; */
|
||||
static const char *HiddenSubQuery[2] =
|
||||
{
|
||||
[false] = " AND Hidden='N'",
|
||||
[true ] = "",
|
||||
};
|
||||
|
||||
return (unsigned)
|
||||
|
@ -284,10 +290,10 @@ unsigned Prg_DB_GetListResources (MYSQL_RES **mysql_res,long ItmCod)
|
|||
"Title" // row[3]
|
||||
" FROM prg_resources"
|
||||
" WHERE ItmCod=%ld"
|
||||
"%s"
|
||||
"%s"
|
||||
" ORDER BY RscInd",
|
||||
ItmCod,
|
||||
HiddenSubQuery[Gbl.Usrs.Me.Role.Logged]);
|
||||
HiddenSubQuery[ShowHiddenResources]);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -501,3 +507,18 @@ void Prg_DB_RemoveResource (const struct PrgRsc_Resource *Resource)
|
|||
Resource->RscCod,
|
||||
Resource->ItmCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************ Hide/unhide an item resource ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Prg_DB_HideOrUnhideResource (long RscCod,bool Hide)
|
||||
{
|
||||
DB_QueryUPDATE ("can not hide/unhide item resource",
|
||||
"UPDATE prg_resources"
|
||||
" SET Hidden='%c'"
|
||||
" WHERE RscCod=%ld",
|
||||
Hide ? 'Y' :
|
||||
'N',
|
||||
RscCod);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,8 @@ unsigned Prg_DB_GetListItems (MYSQL_RES **mysql_res);
|
|||
unsigned Prg_DB_GetDataOfItemByCod (MYSQL_RES **mysql_res,long ItmCod);
|
||||
void Prg_DB_GetItemTxt (long ItmCod,char Txt[Cns_MAX_BYTES_TEXT + 1]);
|
||||
|
||||
unsigned Prg_DB_GetListResources (MYSQL_RES **mysql_res,long ItmCod);
|
||||
unsigned Prg_DB_GetListResources (MYSQL_RES **mysql_res,long ItmCod,
|
||||
bool ShowHiddenResources);
|
||||
unsigned Prg_DB_GetDataOfResourceByCod (MYSQL_RES **mysql_res,long RscCod);
|
||||
|
||||
unsigned Prg_DB_GetNumCoursesWithItems (HieLvl_Level_t Scope);
|
||||
|
@ -62,4 +63,6 @@ void Prg_DB_RemoveCrsItems (long CrsCod);
|
|||
//------------------------------ Resources ------------------------------------
|
||||
void Prg_DB_RemoveResource (const struct PrgRsc_Resource *Resource);
|
||||
|
||||
void Prg_DB_HideOrUnhideResource (long RscCod,bool Hide);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -128,13 +128,21 @@ static void PrgRsc_GetDataOfResource (struct PrgRsc_Resource *Resource,
|
|||
static void PrgRsc_ResetResource (struct PrgRsc_Resource *Resource);
|
||||
static void PrgRsc_WriteRowShowResource (unsigned NumRsc,
|
||||
struct PrgRsc_Resource *Resource);
|
||||
static void PrgRsc_WriteRowEditResource (unsigned NumRsc,
|
||||
static void PrgRsc_WriteRowEditResource (unsigned NumRsc,unsigned NumResources,
|
||||
struct PrgRsc_Resource *Resource);
|
||||
static void PrgRsc_PutFormsToRemEditOneResource (struct PrgRsc_Resource *Resource);
|
||||
static void PrgRsc_PutFormsToRemEditOneResource (unsigned NumRsc,
|
||||
unsigned NumResources,
|
||||
struct PrgRsc_Resource *Resource);
|
||||
static void PrgRsc_PutParams (void *RscCod);
|
||||
static void PrgRsc_PutParamRscCod (long RscCod);
|
||||
static long PrgRsc_GetParamRscCod (void);
|
||||
|
||||
static void PrgRsc_HideOrUnhideResource (bool Hide);
|
||||
|
||||
static bool PrgRsc_CheckIfMoveUpIsAllowed (unsigned NumRsc);
|
||||
static bool PrgRsc_CheckIfMoveDownIsAllowed (unsigned NumRsc,
|
||||
unsigned NumResources);
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Show resources *******************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -151,7 +159,8 @@ void PrgRsc_ShowResources (long ItmCod)
|
|||
return;
|
||||
|
||||
/***** Get list of item resources from database *****/
|
||||
if ((NumResources = Prg_DB_GetListResources (&mysql_res,ItmCod))) // Resources found...
|
||||
if ((NumResources = Prg_DB_GetListResources (&mysql_res,ItmCod,
|
||||
false))) // Don't get hidden resources
|
||||
{
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin ("100%",NULL,
|
||||
|
@ -202,7 +211,8 @@ void PrgRsc_EditResources (long ItmCod)
|
|||
return;
|
||||
|
||||
/***** Get list of item resources from database *****/
|
||||
NumResources = Prg_DB_GetListResources (&mysql_res,ItmCod); // Resources found...
|
||||
NumResources = Prg_DB_GetListResources (&mysql_res,ItmCod,
|
||||
true); // Get hidden resources
|
||||
|
||||
/***** Begin section *****/
|
||||
HTM_SECTION_Begin (PrgRsc_RESOURCE_SECTION_ID);
|
||||
|
@ -231,15 +241,15 @@ void PrgRsc_EditResources (long ItmCod)
|
|||
HTM_TBODY_Begin (NULL);
|
||||
|
||||
/***** Write all item resources *****/
|
||||
for (NumRsc = 1;
|
||||
NumRsc <= NumResources;
|
||||
for (NumRsc = 0;
|
||||
NumRsc < NumResources;
|
||||
NumRsc++)
|
||||
{
|
||||
/* Get data of this item resource */
|
||||
PrgRsc_GetDataOfResource (&Resource,&mysql_res);
|
||||
|
||||
/* Show item */
|
||||
PrgRsc_WriteRowEditResource (NumRsc,&Resource);
|
||||
PrgRsc_WriteRowEditResource (NumRsc,NumResources,&Resource);
|
||||
|
||||
The_ChangeRowColor ();
|
||||
}
|
||||
|
@ -425,7 +435,7 @@ static void PrgRsc_WriteRowShowResource (unsigned NumRsc,
|
|||
/************************** Edit one item resource ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void PrgRsc_WriteRowEditResource (unsigned NumRsc,
|
||||
static void PrgRsc_WriteRowEditResource (unsigned NumRsc,unsigned NumResources,
|
||||
struct PrgRsc_Resource *Resource)
|
||||
{
|
||||
/***** Begin row *****/
|
||||
|
@ -433,12 +443,12 @@ static void PrgRsc_WriteRowEditResource (unsigned NumRsc,
|
|||
|
||||
/***** Forms to remove/edit this item resource *****/
|
||||
HTM_TD_Begin ("class=\"PRG_COL1 LT %s\"",The_GetColorRows ());
|
||||
PrgRsc_PutFormsToRemEditOneResource (Resource);
|
||||
PrgRsc_PutFormsToRemEditOneResource (NumRsc,NumResources,Resource);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Resource number *****/
|
||||
HTM_TD_Begin ("class=\"PRG_NUM RT %s\"",The_GetColorRows ());
|
||||
HTM_Unsigned (NumRsc);
|
||||
HTM_Unsigned (NumRsc + 1);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Title *****/
|
||||
|
@ -454,7 +464,9 @@ static void PrgRsc_WriteRowEditResource (unsigned NumRsc,
|
|||
/**************** Put a link (form) to edit one program item *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void PrgRsc_PutFormsToRemEditOneResource (struct PrgRsc_Resource *Resource)
|
||||
static void PrgRsc_PutFormsToRemEditOneResource (unsigned NumRsc,
|
||||
unsigned NumResources,
|
||||
struct PrgRsc_Resource *Resource)
|
||||
{
|
||||
extern const char *Txt_Movement_not_allowed;
|
||||
// char StrItemIndex[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
|
@ -466,17 +478,17 @@ static void PrgRsc_PutFormsToRemEditOneResource (struct PrgRsc_Resource *Resourc
|
|||
{
|
||||
case Rol_TCH:
|
||||
case Rol_SYS_ADM:
|
||||
/***** Put form to remove program item *****/
|
||||
/***** Put form to remove item resource *****/
|
||||
Ico_PutContextualIconToRemove (ActReqRemPrgRsc,PrgRsc_RESOURCE_SECTION_ID,
|
||||
PrgRsc_PutParams,&Resource->RscCod);
|
||||
|
||||
/***** Put form to hide/show program item *****/
|
||||
//if (Item->Hierarchy.Hidden)
|
||||
// Ico_PutContextualIconToUnhide (ActShoPrgItm,"prg_highlighted",
|
||||
// Prg_PutParams,&Item->Hierarchy.ItmCod);
|
||||
//else
|
||||
// Ico_PutContextualIconToHide (ActHidPrgItm,"prg_highlighted",
|
||||
// Prg_PutParams,&Item->Hierarchy.ItmCod);
|
||||
/***** Put form to hide/show item resource *****/
|
||||
if (Resource->Hidden)
|
||||
Ico_PutContextualIconToUnhide (ActUnhPrgRsc,PrgRsc_RESOURCE_SECTION_ID,
|
||||
PrgRsc_PutParams,&Resource->RscCod);
|
||||
else
|
||||
Ico_PutContextualIconToHide (ActHidPrgRsc,PrgRsc_RESOURCE_SECTION_ID,
|
||||
PrgRsc_PutParams,&Resource->RscCod);
|
||||
|
||||
/***** Put form to edit program item *****/
|
||||
// Ico_PutContextualIconToEdit (ActFrmChgPrgItm,"item_form",
|
||||
|
@ -489,19 +501,19 @@ static void PrgRsc_PutFormsToRemEditOneResource (struct PrgRsc_Resource *Resourc
|
|||
HTM_BR ();
|
||||
|
||||
/***** Put icon to move up the item *****/
|
||||
// if (Prg_CheckIfMoveUpIsAllowed (NumItem))
|
||||
// Lay_PutContextualLinkOnlyIcon (ActUp_PrgItm,"prg_highlighted",
|
||||
// Prg_PutParams,&Item->Hierarchy.ItmCod,
|
||||
// "arrow-up.svg",Ico_BLACK);
|
||||
// else
|
||||
if (PrgRsc_CheckIfMoveUpIsAllowed (NumRsc))
|
||||
Lay_PutContextualLinkOnlyIcon (ActUp_PrgRsc,PrgRsc_RESOURCE_SECTION_ID,
|
||||
PrgRsc_PutParams,&Resource->RscCod,
|
||||
"arrow-up.svg",Ico_BLACK);
|
||||
else
|
||||
Ico_PutIconOff ("arrow-up.svg",Ico_BLACK,Txt_Movement_not_allowed);
|
||||
|
||||
/***** Put icon to move down the item *****/
|
||||
// if (Prg_CheckIfMoveDownIsAllowed (NumItem))
|
||||
// Lay_PutContextualLinkOnlyIcon (ActDwnPrgItm,"prg_highlighted",
|
||||
// Prg_PutParams,&Item->Hierarchy.ItmCod,
|
||||
// "arrow-down.svg",Ico_BLACK);
|
||||
//else
|
||||
if (PrgRsc_CheckIfMoveDownIsAllowed (NumRsc,NumResources))
|
||||
Lay_PutContextualLinkOnlyIcon (ActDwnPrgRsc,PrgRsc_RESOURCE_SECTION_ID,
|
||||
PrgRsc_PutParams,&Resource->RscCod,
|
||||
"arrow-down.svg",Ico_BLACK);
|
||||
else
|
||||
Ico_PutIconOff ("arrow-down.svg",Ico_BLACK,Txt_Movement_not_allowed);
|
||||
break;
|
||||
case Rol_STD:
|
||||
|
@ -621,3 +633,80 @@ void PrgRsc_RemoveResource (void)
|
|||
/***** Free list of program items *****/
|
||||
Prg_FreeListItems ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Hide a program item ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void PrgRsc_HideResource (void)
|
||||
{
|
||||
PrgRsc_HideOrUnhideResource (true);
|
||||
}
|
||||
|
||||
void PrgRsc_UnhideResource (void)
|
||||
{
|
||||
PrgRsc_HideOrUnhideResource (false);
|
||||
}
|
||||
|
||||
static void PrgRsc_HideOrUnhideResource (bool Hide)
|
||||
{
|
||||
struct PrgRsc_Resource Resource;
|
||||
long ItmCodBeforeForm;
|
||||
unsigned FormLevel;
|
||||
struct Prg_ItemRange ToHighlight;
|
||||
|
||||
/***** Get list of program items *****/
|
||||
Prg_GetListItems ();
|
||||
|
||||
/***** Get data of the item resource from database *****/
|
||||
Resource.RscCod = PrgRsc_GetParamRscCod ();
|
||||
PrgRsc_GetDataOfResourceByCod (&Resource);
|
||||
if (Resource.ItmCod <= 0)
|
||||
Err_WrongResourceExit ();
|
||||
|
||||
/***** Hide/unhide item resource *****/
|
||||
Prg_DB_HideOrUnhideResource (Resource.RscCod,Hide);
|
||||
|
||||
/***** Get the code of the program item *****/
|
||||
ItmCodBeforeForm = Resource.ItmCod;
|
||||
FormLevel = Prg_GetLevelFromNumItem (Prg_GetNumItemFromItmCod (Resource.ItmCod));
|
||||
|
||||
/***** Show current program items, if any *****/
|
||||
Prg_SetItemRangeEmpty (&ToHighlight);
|
||||
Prg_ShowAllItems (Prg_PUT_FORM_CHANGE_ITEM,
|
||||
&ToHighlight,-1L,ItmCodBeforeForm,FormLevel);
|
||||
|
||||
/***** Free list of program items *****/
|
||||
Prg_FreeListItems ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************* Check if resource can be moved up *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static bool PrgRsc_CheckIfMoveUpIsAllowed (unsigned NumRsc)
|
||||
{
|
||||
/***** Trivial check: if resource is the first one, move up is not allowed *****/
|
||||
return (NumRsc != 0);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************** Check if resource can be moved down ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static bool PrgRsc_CheckIfMoveDownIsAllowed (unsigned NumRsc,
|
||||
unsigned NumResources)
|
||||
{
|
||||
/***** Trivial check: if resource is the last one, move up is not allowed *****/
|
||||
return (NumRsc < NumResources - 1);
|
||||
}
|
||||
|
||||
void PrgRsc_MoveUpResource (void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void PrgRsc_MoveDownResource (void)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -55,7 +55,14 @@ struct PrgRsc_Resource
|
|||
void PrgRsc_ShowResources (long ItmCod);
|
||||
void PrgRsc_EditResources (long ItmCod);
|
||||
void PrgRsc_RequestCreateResource (void);
|
||||
|
||||
void PrgRsc_ReqRemResource (void);
|
||||
void PrgRsc_RemoveResource (void);
|
||||
|
||||
void PrgRsc_HideResource (void);
|
||||
void PrgRsc_UnhideResource (void);
|
||||
|
||||
void PrgRsc_MoveUpResource (void);
|
||||
void PrgRsc_MoveDownResource (void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5582,7 +5582,7 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
|
|||
"Hide program item" // Çeviri lazim!
|
||||
#endif
|
||||
,
|
||||
[ActShoPrgItm] =
|
||||
[ActUnhPrgItm] =
|
||||
#if L==1 // ca
|
||||
"Show program item" // Necessita traducció
|
||||
#elif L==2 // de
|
||||
|
@ -5764,6 +5764,98 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
|
|||
"Remove resource" // Precisa de tradução
|
||||
#elif L==10 // tr
|
||||
"Remove resource" // Çeviri lazim!
|
||||
#endif
|
||||
,
|
||||
[ActHidPrgRsc] =
|
||||
#if L==1 // ca
|
||||
"Hide resource" // Necessita traducció
|
||||
#elif L==2 // de
|
||||
"Hide resource" // Need Übersetzung
|
||||
#elif L==3 // en
|
||||
"Hide resource"
|
||||
#elif L==4 // es
|
||||
"Ocultar recurso"
|
||||
#elif L==5 // fr
|
||||
"Hide resource" // Besoin de traduction
|
||||
#elif L==6 // gn
|
||||
"Ocultar recurso" // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Hide resource" // Bisogno di traduzione
|
||||
#elif L==8 // pl
|
||||
"Hide resource" // Potrzebujesz tlumaczenie
|
||||
#elif L==9 // pt
|
||||
"Hide resource" // Precisa de tradução
|
||||
#elif L==10 // tr
|
||||
"Hide resource" // Çeviri lazim!
|
||||
#endif
|
||||
,
|
||||
[ActUnhPrgRsc] =
|
||||
#if L==1 // ca
|
||||
"Unhide resource" // Necessita traducció
|
||||
#elif L==2 // de
|
||||
"Unhide resource" // Need Übersetzung
|
||||
#elif L==3 // en
|
||||
"Unhide resource"
|
||||
#elif L==4 // es
|
||||
"Mostrar recurso"
|
||||
#elif L==5 // fr
|
||||
"Unhide resource" // Besoin de traduction
|
||||
#elif L==6 // gn
|
||||
"Mostrar recurso" // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Unhide resource" // Bisogno di traduzione
|
||||
#elif L==8 // pl
|
||||
"Unhide resource" // Potrzebujesz tlumaczenie
|
||||
#elif L==9 // pt
|
||||
"Unhide resource" // Precisa de tradução
|
||||
#elif L==10 // tr
|
||||
"Unhide resource" // Çeviri lazim!
|
||||
#endif
|
||||
,
|
||||
[ActUp_PrgRsc] =
|
||||
#if L==1 // ca
|
||||
"Move up resource" // Necessita traducció
|
||||
#elif L==2 // de
|
||||
"Move up resource" // Need Übersetzung
|
||||
#elif L==3 // en
|
||||
"Move up resource"
|
||||
#elif L==4 // es
|
||||
"Subir recurso"
|
||||
#elif L==5 // fr
|
||||
"Move up resource" // Besoin de traduction
|
||||
#elif L==6 // gn
|
||||
"Subir recurso" // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Move up resource" // Bisogno di traduzione
|
||||
#elif L==8 // pl
|
||||
"Move up resource" // Potrzebujesz tlumaczenie
|
||||
#elif L==9 // pt
|
||||
"Move up resource" // Precisa de tradução
|
||||
#elif L==10 // tr
|
||||
"Move up resource" // Çeviri lazim!
|
||||
#endif
|
||||
,
|
||||
[ActDwnPrgRsc] =
|
||||
#if L==1 // ca
|
||||
"Move down resource" // Necessita traducció
|
||||
#elif L==2 // de
|
||||
"Move down resource" // Need Übersetzung
|
||||
#elif L==3 // en
|
||||
"Move down resource"
|
||||
#elif L==4 // es
|
||||
"Bajar recurso"
|
||||
#elif L==5 // fr
|
||||
"Move down resource" // Besoin de traduction
|
||||
#elif L==6 // gn
|
||||
"Bajar recurso" // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Move down resource" // Bisogno di traduzione
|
||||
#elif L==8 // pl
|
||||
"Move down resource" // Potrzebujesz tlumaczenie
|
||||
#elif L==9 // pt
|
||||
"Move down resource" // Precisa de tradução
|
||||
#elif L==10 // tr
|
||||
"Move down resource" // Çeviri lazim!
|
||||
#endif
|
||||
,
|
||||
[ActSeeTchGui] =
|
||||
|
|
Loading…
Reference in New Issue