Version 21.111: Jul 21, 2022 Changes in edition of program items.

This commit is contained in:
acanas 2022-07-21 00:36:17 +02:00
parent 84487984b0
commit 03220b5d4c
8 changed files with 358 additions and 262 deletions

View File

@ -430,10 +430,11 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
[ActEdiCrsInf ] = { 848,-1,TabUnk,ActSeeCrsInf ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Inf_FormsToSelSendInfo ,NULL},
[ActEdiPrg ] = {1926, 1,TabCrs,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_EditCourseProgram ,NULL},
[ActFrmNewPrgItm ] = {1822,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_RequestCreateItem ,NULL},
[ActSeePrgItm ] = {1927,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_ViewItemAfterEdit ,NULL},
[ActFrmChgPrgItm ] = {1823,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_RequestChangeItem ,NULL},
[ActNewPrgItm ] = {1825,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_ReceiveFormNewItem ,NULL},
[ActFrmNewPrgItm ] = {1822,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_RequestCreateItem ,NULL},
[ActChgPrgItm ] = {1826,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_ReceiveFormChgItem ,NULL},
[ActNewPrgItm ] = {1825,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_ReceiveFormNewItem ,NULL},
[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},
@ -443,7 +444,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
[ActLftPrgItm ] = {1834,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_MoveLeftItem ,NULL},
[ActRgtPrgItm ] = {1833,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prg_MoveRightItem ,NULL},
[ActFrmSeePrgRsc ] = {1925,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,PrgRsc_ViewResources ,NULL},
[ActFrmSeePrgRsc ] = {1925,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,PrgRsc_ViewResourcesAfterEdit ,NULL},
[ActFrmEdiPrgRsc ] = {1918,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,PrgRsc_EditResources ,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},
@ -3763,6 +3764,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
ActDwnPrgRsc, // #1924
ActFrmSeePrgRsc, // #1925
ActEdiPrg, // #1926
ActSeePrgItm, // #1927
};
/*****************************************************************************/

View File

@ -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 1926
#define Act_MAX_ACTION_COD 1927
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
@ -397,127 +397,128 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
#define ActChgCrsYeaCfg (ActChgCrsSta + 14)
#define ActEdiCrsInf (ActChgCrsSta + 15)
#define ActEdiPrg (ActChgCrsSta + 16)
#define ActFrmNewPrgItm (ActChgCrsSta + 17)
#define ActSeePrgItm (ActChgCrsSta + 17)
#define ActFrmChgPrgItm (ActChgCrsSta + 18)
#define ActNewPrgItm (ActChgCrsSta + 19)
#define ActFrmNewPrgItm (ActChgCrsSta + 19)
#define ActChgPrgItm (ActChgCrsSta + 20)
#define ActReqRemPrgItm (ActChgCrsSta + 21)
#define ActRemPrgItm (ActChgCrsSta + 22)
#define ActHidPrgItm (ActChgCrsSta + 23)
#define ActUnhPrgItm (ActChgCrsSta + 24)
#define ActUp_PrgItm (ActChgCrsSta + 25)
#define ActDwnPrgItm (ActChgCrsSta + 26)
#define ActLftPrgItm (ActChgCrsSta + 27)
#define ActRgtPrgItm (ActChgCrsSta + 28)
#define ActFrmSeePrgRsc (ActChgCrsSta + 29)
#define ActFrmEdiPrgRsc (ActChgCrsSta + 30)
#define ActReqRemPrgRsc (ActChgCrsSta + 31)
#define ActRemPrgRsc (ActChgCrsSta + 32)
#define ActHidPrgRsc (ActChgCrsSta + 33)
#define ActUnhPrgRsc (ActChgCrsSta + 34)
#define ActUp_PrgRsc (ActChgCrsSta + 35)
#define ActDwnPrgRsc (ActChgCrsSta + 36)
#define ActEdiTchGui (ActChgCrsSta + 37)
#define ActSeeSylLec (ActChgCrsSta + 38)
#define ActSeeSylPra (ActChgCrsSta + 39)
#define ActEdiSylLec (ActChgCrsSta + 40)
#define ActEdiSylPra (ActChgCrsSta + 41)
#define ActDelItmSylLec (ActChgCrsSta + 42)
#define ActDelItmSylPra (ActChgCrsSta + 43)
#define ActUp_IteSylLec (ActChgCrsSta + 44)
#define ActUp_IteSylPra (ActChgCrsSta + 45)
#define ActDwnIteSylLec (ActChgCrsSta + 46)
#define ActDwnIteSylPra (ActChgCrsSta + 47)
#define ActRgtIteSylLec (ActChgCrsSta + 48)
#define ActRgtIteSylPra (ActChgCrsSta + 49)
#define ActLftIteSylLec (ActChgCrsSta + 50)
#define ActLftIteSylPra (ActChgCrsSta + 51)
#define ActInsIteSylLec (ActChgCrsSta + 52)
#define ActInsIteSylPra (ActChgCrsSta + 53)
#define ActModIteSylLec (ActChgCrsSta + 54)
#define ActModIteSylPra (ActChgCrsSta + 55)
#define ActNewPrgItm (ActChgCrsSta + 21)
#define ActReqRemPrgItm (ActChgCrsSta + 22)
#define ActRemPrgItm (ActChgCrsSta + 23)
#define ActHidPrgItm (ActChgCrsSta + 24)
#define ActUnhPrgItm (ActChgCrsSta + 25)
#define ActUp_PrgItm (ActChgCrsSta + 26)
#define ActDwnPrgItm (ActChgCrsSta + 27)
#define ActLftPrgItm (ActChgCrsSta + 28)
#define ActRgtPrgItm (ActChgCrsSta + 29)
#define ActFrmSeePrgRsc (ActChgCrsSta + 30)
#define ActFrmEdiPrgRsc (ActChgCrsSta + 31)
#define ActReqRemPrgRsc (ActChgCrsSta + 32)
#define ActRemPrgRsc (ActChgCrsSta + 33)
#define ActHidPrgRsc (ActChgCrsSta + 34)
#define ActUnhPrgRsc (ActChgCrsSta + 35)
#define ActUp_PrgRsc (ActChgCrsSta + 36)
#define ActDwnPrgRsc (ActChgCrsSta + 37)
#define ActEdiTchGui (ActChgCrsSta + 38)
#define ActSeeSylLec (ActChgCrsSta + 39)
#define ActSeeSylPra (ActChgCrsSta + 40)
#define ActEdiSylLec (ActChgCrsSta + 41)
#define ActEdiSylPra (ActChgCrsSta + 42)
#define ActDelItmSylLec (ActChgCrsSta + 43)
#define ActDelItmSylPra (ActChgCrsSta + 44)
#define ActUp_IteSylLec (ActChgCrsSta + 45)
#define ActUp_IteSylPra (ActChgCrsSta + 46)
#define ActDwnIteSylLec (ActChgCrsSta + 47)
#define ActDwnIteSylPra (ActChgCrsSta + 48)
#define ActRgtIteSylLec (ActChgCrsSta + 49)
#define ActRgtIteSylPra (ActChgCrsSta + 50)
#define ActLftIteSylLec (ActChgCrsSta + 51)
#define ActLftIteSylPra (ActChgCrsSta + 52)
#define ActInsIteSylLec (ActChgCrsSta + 53)
#define ActInsIteSylPra (ActChgCrsSta + 54)
#define ActModIteSylLec (ActChgCrsSta + 55)
#define ActModIteSylPra (ActChgCrsSta + 56)
#define ActEdiBib (ActChgCrsSta + 56)
#define ActEdiFAQ (ActChgCrsSta + 57)
#define ActEdiCrsLnk (ActChgCrsSta + 58)
#define ActEdiBib (ActChgCrsSta + 57)
#define ActEdiFAQ (ActChgCrsSta + 58)
#define ActEdiCrsLnk (ActChgCrsSta + 59)
#define ActChgFrcReaCrsInf (ActChgCrsSta + 59)
#define ActChgFrcReaTchGui (ActChgCrsSta + 60)
#define ActChgFrcReaSylLec (ActChgCrsSta + 61)
#define ActChgFrcReaSylPra (ActChgCrsSta + 62)
#define ActChgFrcReaBib (ActChgCrsSta + 63)
#define ActChgFrcReaFAQ (ActChgCrsSta + 64)
#define ActChgFrcReaCrsLnk (ActChgCrsSta + 65)
#define ActChgFrcReaCrsInf (ActChgCrsSta + 60)
#define ActChgFrcReaTchGui (ActChgCrsSta + 61)
#define ActChgFrcReaSylLec (ActChgCrsSta + 62)
#define ActChgFrcReaSylPra (ActChgCrsSta + 63)
#define ActChgFrcReaBib (ActChgCrsSta + 64)
#define ActChgFrcReaFAQ (ActChgCrsSta + 65)
#define ActChgFrcReaCrsLnk (ActChgCrsSta + 66)
#define ActChgHavReaCrsInf (ActChgCrsSta + 66)
#define ActChgHavReaTchGui (ActChgCrsSta + 67)
#define ActChgHavReaSylLec (ActChgCrsSta + 68)
#define ActChgHavReaSylPra (ActChgCrsSta + 69)
#define ActChgHavReaBib (ActChgCrsSta + 70)
#define ActChgHavReaFAQ (ActChgCrsSta + 71)
#define ActChgHavReaCrsLnk (ActChgCrsSta + 72)
#define ActChgHavReaCrsInf (ActChgCrsSta + 67)
#define ActChgHavReaTchGui (ActChgCrsSta + 68)
#define ActChgHavReaSylLec (ActChgCrsSta + 69)
#define ActChgHavReaSylPra (ActChgCrsSta + 70)
#define ActChgHavReaBib (ActChgCrsSta + 71)
#define ActChgHavReaFAQ (ActChgCrsSta + 72)
#define ActChgHavReaCrsLnk (ActChgCrsSta + 73)
#define ActSelInfSrcCrsInf (ActChgCrsSta + 73)
#define ActSelInfSrcTchGui (ActChgCrsSta + 74)
#define ActSelInfSrcSylLec (ActChgCrsSta + 75)
#define ActSelInfSrcSylPra (ActChgCrsSta + 76)
#define ActSelInfSrcBib (ActChgCrsSta + 77)
#define ActSelInfSrcFAQ (ActChgCrsSta + 78)
#define ActSelInfSrcCrsLnk (ActChgCrsSta + 79)
#define ActRcvURLCrsInf (ActChgCrsSta + 80)
#define ActRcvURLTchGui (ActChgCrsSta + 81)
#define ActRcvURLSylLec (ActChgCrsSta + 82)
#define ActRcvURLSylPra (ActChgCrsSta + 83)
#define ActRcvURLBib (ActChgCrsSta + 84)
#define ActRcvURLFAQ (ActChgCrsSta + 85)
#define ActRcvURLCrsLnk (ActChgCrsSta + 86)
#define ActRcvPagCrsInf (ActChgCrsSta + 87)
#define ActRcvPagTchGui (ActChgCrsSta + 88)
#define ActRcvPagSylLec (ActChgCrsSta + 89)
#define ActRcvPagSylPra (ActChgCrsSta + 90)
#define ActRcvPagBib (ActChgCrsSta + 91)
#define ActRcvPagFAQ (ActChgCrsSta + 92)
#define ActRcvPagCrsLnk (ActChgCrsSta + 93)
#define ActEditorCrsInf (ActChgCrsSta + 94)
#define ActEditorTchGui (ActChgCrsSta + 95)
#define ActEditorSylLec (ActChgCrsSta + 96)
#define ActEditorSylPra (ActChgCrsSta + 97)
#define ActEditorBib (ActChgCrsSta + 98)
#define ActEditorFAQ (ActChgCrsSta + 99)
#define ActEditorCrsLnk (ActChgCrsSta + 100)
#define ActPlaTxtEdiCrsInf (ActChgCrsSta + 101)
#define ActPlaTxtEdiTchGui (ActChgCrsSta + 102)
#define ActPlaTxtEdiSylLec (ActChgCrsSta + 103)
#define ActPlaTxtEdiSylPra (ActChgCrsSta + 104)
#define ActPlaTxtEdiBib (ActChgCrsSta + 105)
#define ActPlaTxtEdiFAQ (ActChgCrsSta + 106)
#define ActPlaTxtEdiCrsLnk (ActChgCrsSta + 107)
#define ActRchTxtEdiCrsInf (ActChgCrsSta + 108)
#define ActRchTxtEdiTchGui (ActChgCrsSta + 109)
#define ActRchTxtEdiSylLec (ActChgCrsSta + 110)
#define ActRchTxtEdiSylPra (ActChgCrsSta + 111)
#define ActRchTxtEdiBib (ActChgCrsSta + 112)
#define ActRchTxtEdiFAQ (ActChgCrsSta + 113)
#define ActRchTxtEdiCrsLnk (ActChgCrsSta + 114)
#define ActRcvPlaTxtCrsInf (ActChgCrsSta + 115)
#define ActRcvPlaTxtTchGui (ActChgCrsSta + 116)
#define ActRcvPlaTxtSylLec (ActChgCrsSta + 117)
#define ActRcvPlaTxtSylPra (ActChgCrsSta + 118)
#define ActRcvPlaTxtBib (ActChgCrsSta + 119)
#define ActRcvPlaTxtFAQ (ActChgCrsSta + 120)
#define ActRcvPlaTxtCrsLnk (ActChgCrsSta + 121)
#define ActRcvRchTxtCrsInf (ActChgCrsSta + 122)
#define ActRcvRchTxtTchGui (ActChgCrsSta + 123)
#define ActRcvRchTxtSylLec (ActChgCrsSta + 124)
#define ActRcvRchTxtSylPra (ActChgCrsSta + 125)
#define ActRcvRchTxtBib (ActChgCrsSta + 126)
#define ActRcvRchTxtFAQ (ActChgCrsSta + 127)
#define ActRcvRchTxtCrsLnk (ActChgCrsSta + 128)
#define ActSelInfSrcCrsInf (ActChgCrsSta + 74)
#define ActSelInfSrcTchGui (ActChgCrsSta + 75)
#define ActSelInfSrcSylLec (ActChgCrsSta + 76)
#define ActSelInfSrcSylPra (ActChgCrsSta + 77)
#define ActSelInfSrcBib (ActChgCrsSta + 78)
#define ActSelInfSrcFAQ (ActChgCrsSta + 79)
#define ActSelInfSrcCrsLnk (ActChgCrsSta + 80)
#define ActRcvURLCrsInf (ActChgCrsSta + 81)
#define ActRcvURLTchGui (ActChgCrsSta + 82)
#define ActRcvURLSylLec (ActChgCrsSta + 83)
#define ActRcvURLSylPra (ActChgCrsSta + 84)
#define ActRcvURLBib (ActChgCrsSta + 85)
#define ActRcvURLFAQ (ActChgCrsSta + 86)
#define ActRcvURLCrsLnk (ActChgCrsSta + 87)
#define ActRcvPagCrsInf (ActChgCrsSta + 88)
#define ActRcvPagTchGui (ActChgCrsSta + 89)
#define ActRcvPagSylLec (ActChgCrsSta + 90)
#define ActRcvPagSylPra (ActChgCrsSta + 91)
#define ActRcvPagBib (ActChgCrsSta + 92)
#define ActRcvPagFAQ (ActChgCrsSta + 93)
#define ActRcvPagCrsLnk (ActChgCrsSta + 94)
#define ActEditorCrsInf (ActChgCrsSta + 95)
#define ActEditorTchGui (ActChgCrsSta + 96)
#define ActEditorSylLec (ActChgCrsSta + 97)
#define ActEditorSylPra (ActChgCrsSta + 98)
#define ActEditorBib (ActChgCrsSta + 99)
#define ActEditorFAQ (ActChgCrsSta + 100)
#define ActEditorCrsLnk (ActChgCrsSta + 101)
#define ActPlaTxtEdiCrsInf (ActChgCrsSta + 102)
#define ActPlaTxtEdiTchGui (ActChgCrsSta + 103)
#define ActPlaTxtEdiSylLec (ActChgCrsSta + 104)
#define ActPlaTxtEdiSylPra (ActChgCrsSta + 105)
#define ActPlaTxtEdiBib (ActChgCrsSta + 106)
#define ActPlaTxtEdiFAQ (ActChgCrsSta + 107)
#define ActPlaTxtEdiCrsLnk (ActChgCrsSta + 108)
#define ActRchTxtEdiCrsInf (ActChgCrsSta + 109)
#define ActRchTxtEdiTchGui (ActChgCrsSta + 110)
#define ActRchTxtEdiSylLec (ActChgCrsSta + 111)
#define ActRchTxtEdiSylPra (ActChgCrsSta + 112)
#define ActRchTxtEdiBib (ActChgCrsSta + 113)
#define ActRchTxtEdiFAQ (ActChgCrsSta + 114)
#define ActRchTxtEdiCrsLnk (ActChgCrsSta + 115)
#define ActRcvPlaTxtCrsInf (ActChgCrsSta + 116)
#define ActRcvPlaTxtTchGui (ActChgCrsSta + 117)
#define ActRcvPlaTxtSylLec (ActChgCrsSta + 118)
#define ActRcvPlaTxtSylPra (ActChgCrsSta + 119)
#define ActRcvPlaTxtBib (ActChgCrsSta + 120)
#define ActRcvPlaTxtFAQ (ActChgCrsSta + 121)
#define ActRcvPlaTxtCrsLnk (ActChgCrsSta + 122)
#define ActRcvRchTxtCrsInf (ActChgCrsSta + 123)
#define ActRcvRchTxtTchGui (ActChgCrsSta + 124)
#define ActRcvRchTxtSylLec (ActChgCrsSta + 125)
#define ActRcvRchTxtSylPra (ActChgCrsSta + 126)
#define ActRcvRchTxtBib (ActChgCrsSta + 127)
#define ActRcvRchTxtFAQ (ActChgCrsSta + 128)
#define ActRcvRchTxtCrsLnk (ActChgCrsSta + 129)
#define ActPrnCrsTT (ActChgCrsSta + 129)
#define ActEdiCrsTT (ActChgCrsSta + 130)
#define ActChgCrsTT (ActChgCrsSta + 131)
#define ActChgCrsTT1stDay (ActChgCrsSta + 132)
#define ActPrnCrsTT (ActChgCrsSta + 130)
#define ActEdiCrsTT (ActChgCrsSta + 131)
#define ActChgCrsTT (ActChgCrsSta + 132)
#define ActChgCrsTT1stDay (ActChgCrsSta + 133)
/*****************************************************************************/
/***************************** Assessment tab ********************************/

View File

@ -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.110 (2022-07-19)"
#define Log_PLATFORM_VERSION "SWAD 21.111 (2022-07-21)"
#define CSS_FILE "swad21.107.1.css"
#define JS_FILE "swad21.100.js"
/*
Version 21.111: Jul 21, 2022 Changes in edition of program items. (329115 lines)
Version 21.110: Jul 19, 2022 Changes in edition of program items. (329031 lines)
Version 21.109: Jul 19, 2022 Changes in edition of program items. (328975 lines)
Version 21.108: Jul 18, 2022 Changes in edition of program items. (328908 lines)

View File

@ -114,6 +114,7 @@ static void Prg_PutButtonToCreateNewItem (void);
static void Prg_WriteRowItem (Prg_ListingType_t ListingType,
unsigned NumItem,struct Prg_Item *Item);
static void Prg_WriteItemText (long ItmCod,bool LightStyle);
static void Prg_WriteRowToCreateItem (long ItmCod,unsigned FormLevel);
static void Prg_SetTitleClass (char **TitleClass,unsigned Level,bool LightStyle);
static void Prg_FreeTitleClass (char *TitleClass);
@ -132,8 +133,9 @@ static void Prg_SetHiddenLevel (unsigned Level,bool Hidden);
static bool Prg_GetHiddenLevel (unsigned Level);
static bool Prg_CheckIfAnyHigherLevelIsHidden (unsigned CurrentLevel);
static void Prg_PutFormsToRemEditOneItem (unsigned NumItem,
struct Prg_Item *Item);
static void Prg_PutFormsToRemEditOneItem (Prg_ListingType_t ListingType,
unsigned NumItem,
struct Prg_Item *Item);
static bool Prg_CheckIfMoveUpIsAllowed (unsigned NumItem);
static bool Prg_CheckIfMoveDownIsAllowed (unsigned NumItem);
static bool Prg_CheckIfMoveLeftIsAllowed (unsigned NumItem);
@ -222,6 +224,7 @@ void Prg_ShowAllItems (Prg_ListingType_t ListingType,
[Prg_EDIT_LIST ] = Prg_PutIconsEditItems,
[Prg_NEW_ITEM ] = Prg_PutIconsEditItems,
[Prg_EDIT_ITEM ] = Prg_PutIconsEditItems,
[Prg_END_EDIT_ITEM ] = Prg_PutIconsEditItems,
[Prg_EDIT_RESOURCES] = Prg_PutIconsEditItems,
[Prg_END_EDIT_RES ] = Prg_PutIconsEditItems,
};
@ -280,6 +283,7 @@ void Prg_ShowAllItems (Prg_ListingType_t ListingType,
Prg_WriteRowToCreateItem (ParentItmCod,FormLevel);
break;
case Prg_EDIT_ITEM:
case Prg_END_EDIT_ITEM:
case Prg_EDIT_RESOURCES:
case Prg_END_EDIT_RES:
Prg_WriteRowItem (Item.Hierarchy.ItmCod == ItmCod ? ListingType :
@ -421,7 +425,6 @@ static void Prg_WriteRowItem (Prg_ListingType_t ListingType,
unsigned NumCol;
char *TitleClass;
Dat_StartEndTime_t StartEndTime;
char Txt[Cns_MAX_BYTES_TEXT + 1];
/***** Check if this item should be shown as hidden *****/
Prg_SetHiddenLevel (Item->Hierarchy.Level,Item->Hierarchy.Hidden);
@ -444,11 +447,12 @@ static void Prg_WriteRowItem (Prg_ListingType_t ListingType,
{
case Prg_EDIT_LIST:
case Prg_EDIT_ITEM:
case Prg_END_EDIT_ITEM:
case Prg_EDIT_RESOURCES:
case Prg_END_EDIT_RES:
HTM_TD_Begin ("rowspan=\"2\" class=\"PRG_COL1 LT %s\"",
The_GetColorRows ());
Prg_PutFormsToRemEditOneItem (NumItem,Item);
Prg_PutFormsToRemEditOneItem (ListingType,NumItem,Item);
HTM_TD_End ();
break;
default:
@ -477,14 +481,22 @@ static void Prg_WriteRowItem (Prg_ListingType_t ListingType,
case Prg_PRINT:
HTM_TD_Begin ("colspan=\"%u\" class=\"PRG_MAIN %s\"",
ColSpan,TitleClass);
HTM_Txt (Item->Title);
HTM_TD_End ();
break;
default:
HTM_TD_Begin ("colspan=\"%u\" class=\"PRG_MAIN %s %s\"",
ColSpan,TitleClass,The_GetColorRows ());
if (ListingType == Prg_EDIT_ITEM ||
ListingType == Prg_END_EDIT_ITEM)
HTM_ARTICLE_Begin ("item_form");
HTM_Txt (Item->Title);
if (ListingType == Prg_EDIT_ITEM ||
ListingType == Prg_END_EDIT_ITEM)
HTM_ARTICLE_End ();
HTM_TD_End ();
break;
}
HTM_Txt (Item->Title);
HTM_TD_End ();
/***** Start/end date/time *****/
UniqueId++;
@ -552,18 +564,15 @@ static void Prg_WriteRowItem (Prg_ListingType_t ListingType,
Prg_ShowFormToChangeItem (Item->Hierarchy.ItmCod);
HTM_ARTICLE_End ();
break;
case Prg_END_EDIT_ITEM:
/* Text */
HTM_ARTICLE_Begin ("item_form");
Prg_WriteItemText (Item->Hierarchy.ItmCod,LightStyle);
HTM_ARTICLE_End ();
break;
default:
/* Text */
Prg_DB_GetItemTxt (Item->Hierarchy.ItmCod,Txt);
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
ALn_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
HTM_DIV_Begin ("class=\"PAR PRG_TXT_%s%s\"",
The_GetSuffix (),
LightStyle ? " PRG_HIDDEN" :
"");
HTM_Txt (Txt);
HTM_DIV_End ();
Prg_WriteItemText (Item->Hierarchy.ItmCod,LightStyle);
break;
}
@ -580,6 +589,27 @@ static void Prg_WriteRowItem (Prg_ListingType_t ListingType,
Prg_FreeTitleClass (TitleClass);
}
/*****************************************************************************/
/**************************** Show item text *********************************/
/*****************************************************************************/
static void Prg_WriteItemText (long ItmCod,bool LightStyle)
{
char Txt[Cns_MAX_BYTES_TEXT + 1];
/* Text */
Prg_DB_GetItemTxt (ItmCod,Txt);
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
ALn_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
HTM_DIV_Begin ("class=\"PAR PRG_TXT_%s%s\"",
The_GetSuffix (),
LightStyle ? " PRG_HIDDEN" :
"");
HTM_Txt (Txt);
HTM_DIV_End ();
}
/*****************************************************************************/
/**************************** Show item form *********************************/
/*****************************************************************************/
@ -811,8 +841,9 @@ static bool Prg_CheckIfAnyHigherLevelIsHidden (unsigned CurrentLevel)
/**************** Put a link (form) to edit one program item *****************/
/*****************************************************************************/
static void Prg_PutFormsToRemEditOneItem (unsigned NumItem,
struct Prg_Item *Item)
static void Prg_PutFormsToRemEditOneItem (Prg_ListingType_t ListingType,
unsigned NumItem,
struct Prg_Item *Item)
{
extern const char *Txt_Movement_not_allowed;
char StrItemIndex[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
@ -837,8 +868,17 @@ static void Prg_PutFormsToRemEditOneItem (unsigned NumItem,
Prg_PutParams,&Item->Hierarchy.ItmCod);
/***** Put form to edit program item *****/
Ico_PutContextualIconToEdit (ActFrmChgPrgItm,"item_form",
Prg_PutParams,&Item->Hierarchy.ItmCod);
switch (ListingType)
{
case Prg_EDIT_ITEM:
Ico_PutContextualIconToView (ActSeePrgItm,"item_form",
Prg_PutParams,&Item->Hierarchy.ItmCod);
break;
default:
Ico_PutContextualIconToEdit (ActFrmChgPrgItm,"item_form",
Prg_PutParams,&Item->Hierarchy.ItmCod);
break;
}
/***** Put form to add a new child item inside this item *****/
Ico_PutContextualIconToAdd (ActFrmNewPrgItm,"item_form",
@ -1627,7 +1667,57 @@ static unsigned Prg_GetLastChild (int NumItem)
}
/*****************************************************************************/
/******* Put a form to create/edit program item and show current items *******/
/******** List program items when click on view an item after edition ********/
/*****************************************************************************/
void Prg_ViewItemAfterEdit (void)
{
long ItmCod;
unsigned FormLevel;
/***** Get list of program items *****/
Prg_GetListItems ();
/***** Get the code of the program item *****/
if ((ItmCod = Prg_GetParamItmCod ()) > 0)
FormLevel = Prg_GetLevelFromNumItem (Prg_GetNumItemFromItmCod (ItmCod));
else
FormLevel = 0;
/***** Show current program items, if any *****/
Prg_ShowAllItems (Prg_END_EDIT_ITEM,NULL,-1L,ItmCod,FormLevel);
/***** Free list of program items *****/
Prg_FreeListItems ();
}
/*****************************************************************************/
/*********** List program items with a form to change a given item ***********/
/*****************************************************************************/
void Prg_RequestChangeItem (void)
{
long ItmCod;
unsigned FormLevel;
/***** Get list of program items *****/
Prg_GetListItems ();
/***** Get the code of the program item *****/
if ((ItmCod = Prg_GetParamItmCod ()) > 0)
FormLevel = Prg_GetLevelFromNumItem (Prg_GetNumItemFromItmCod (ItmCod));
else
FormLevel = 0;
/***** Show current program items, if any *****/
Prg_ShowAllItems (Prg_EDIT_ITEM,NULL,-1L,ItmCod,FormLevel);
/***** Free list of program items *****/
Prg_FreeListItems ();
}
/*****************************************************************************/
/************ List program items with a form to create a new item ************/
/*****************************************************************************/
void Prg_RequestCreateItem (void)
@ -1665,27 +1755,6 @@ void Prg_RequestCreateItem (void)
Prg_FreeListItems ();
}
void Prg_RequestChangeItem (void)
{
long ItmCod;
unsigned FormLevel;
/***** Get list of program items *****/
Prg_GetListItems ();
/***** Get the code of the program item *****/
if ((ItmCod = Prg_GetParamItmCod ()) > 0)
FormLevel = Prg_GetLevelFromNumItem (Prg_GetNumItemFromItmCod (ItmCod));
else
FormLevel = 0;
/***** Show current program items, if any *****/
Prg_ShowAllItems (Prg_EDIT_ITEM,NULL,-1L,ItmCod,FormLevel);
/***** Free list of program items *****/
Prg_FreeListItems ();
}
/*****************************************************************************/
/***************** Put a form to create a new program item *******************/
/*****************************************************************************/
@ -1835,6 +1904,57 @@ static void Prg_ShowFormItem (const struct Prg_Item *Item,
HTM_TR_End ();
}
/*****************************************************************************/
/************* Receive form to change an existing program item ***************/
/*****************************************************************************/
void Prg_ReceiveFormChgItem (void)
{
// struct Prg_Item OldItem; // Current program item data in database
struct Prg_Item NewItem; // Item data received from form
char Description[Cns_MAX_BYTES_TEXT + 1];
struct Prg_ItemRange ToHighlight;
/***** Get list of program items *****/
Prg_GetListItems ();
/***** Get data of the item from database *****/
NewItem.Hierarchy.ItmCod = Prg_GetParamItmCod ();
Prg_GetDataOfItemByCod (&NewItem);
if (NewItem.Hierarchy.ItmCod <= 0)
Err_WrongItemExit ();
/***** Get data of the old (current) program item from database *****/
// OldItem.Hierarchy.ItmCod = NewItem.Hierarchy.ItmCod;
// Prg_GetDataOfItemByCod (&OldItem);
/***** Get start/end date-times *****/
NewItem.TimeUTC[Dat_STR_TIME] = Dat_GetTimeUTCFromForm ("StartTimeUTC");
NewItem.TimeUTC[Dat_END_TIME] = Dat_GetTimeUTCFromForm ("EndTimeUTC" );
/***** Get program item title *****/
Par_GetParToText ("Title",NewItem.Title,Prg_MAX_BYTES_PROGRAM_ITEM_TITLE);
/***** Get program item text *****/
Par_GetParToHTML ("Txt",Description,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
/***** Adjust dates *****/
if (NewItem.TimeUTC[Dat_STR_TIME] == 0)
NewItem.TimeUTC[Dat_STR_TIME] = Gbl.StartExecutionTimeUTC;
if (NewItem.TimeUTC[Dat_END_TIME] == 0)
NewItem.TimeUTC[Dat_END_TIME] = NewItem.TimeUTC[Dat_STR_TIME] + 2 * 60 * 60; // +2 hours
/***** Update existing item *****/
Prg_DB_UpdateItem (&NewItem,Description);
/***** Show program items highlighting subtree *****/
Prg_SetItemRangeOnlyItem (NewItem.Hierarchy.Index,&ToHighlight);
Prg_EditCourseProgramHighlightingItem (&ToHighlight);
/***** Free list of program items *****/
Prg_FreeListItems ();
}
/*****************************************************************************/
/***************** Receive form to create a new program item *****************/
/*****************************************************************************/
@ -1889,57 +2009,6 @@ void Prg_ReceiveFormNewItem (void)
Prg_FreeListItems ();
}
/*****************************************************************************/
/************* Receive form to change an existing program item ***************/
/*****************************************************************************/
void Prg_ReceiveFormChgItem (void)
{
// struct Prg_Item OldItem; // Current program item data in database
struct Prg_Item NewItem; // Item data received from form
char Description[Cns_MAX_BYTES_TEXT + 1];
struct Prg_ItemRange ToHighlight;
/***** Get list of program items *****/
Prg_GetListItems ();
/***** Get data of the item from database *****/
NewItem.Hierarchy.ItmCod = Prg_GetParamItmCod ();
Prg_GetDataOfItemByCod (&NewItem);
if (NewItem.Hierarchy.ItmCod <= 0)
Err_WrongItemExit ();
/***** Get data of the old (current) program item from database *****/
// OldItem.Hierarchy.ItmCod = NewItem.Hierarchy.ItmCod;
// Prg_GetDataOfItemByCod (&OldItem);
/***** Get start/end date-times *****/
NewItem.TimeUTC[Dat_STR_TIME] = Dat_GetTimeUTCFromForm ("StartTimeUTC");
NewItem.TimeUTC[Dat_END_TIME] = Dat_GetTimeUTCFromForm ("EndTimeUTC" );
/***** Get program item title *****/
Par_GetParToText ("Title",NewItem.Title,Prg_MAX_BYTES_PROGRAM_ITEM_TITLE);
/***** Get program item text *****/
Par_GetParToHTML ("Txt",Description,Cns_MAX_BYTES_TEXT); // Store in HTML format (not rigorous)
/***** Adjust dates *****/
if (NewItem.TimeUTC[Dat_STR_TIME] == 0)
NewItem.TimeUTC[Dat_STR_TIME] = Gbl.StartExecutionTimeUTC;
if (NewItem.TimeUTC[Dat_END_TIME] == 0)
NewItem.TimeUTC[Dat_END_TIME] = NewItem.TimeUTC[Dat_STR_TIME] + 2 * 60 * 60; // +2 hours
/***** Update existing item *****/
Prg_DB_UpdateItem (&NewItem,Description);
/***** Show program items highlighting subtree *****/
Prg_SetItemRangeOnlyItem (NewItem.Hierarchy.Index,&ToHighlight);
Prg_EditCourseProgramHighlightingItem (&ToHighlight);
/***** Free list of program items *****/
Prg_FreeListItems ();
}
/*****************************************************************************/
/*********** Insert a new program item as a child of a parent item ***********/
/*****************************************************************************/

View File

@ -71,14 +71,17 @@ typedef enum
Prg_MOVE_RIGHT,
} Prg_MoveLeftRight_t;
#define Prg_NUM_LISTING_TYPES 7
#define Prg_NUM_LISTING_TYPES 8
typedef enum
{
Prg_PRINT, // List items ready to be printed
Prg_VIEW, // List items without any edition
Prg_EDIT_LIST, // Buttons to edit list of items
Prg_NEW_ITEM, // Form to create a new item
Prg_EDIT_ITEM, // Form to edit a selected item
Prg_END_EDIT_ITEM, // List item after edition
Prg_EDIT_RESOURCES, // List resources of a selected item for edition
Prg_END_EDIT_RES, // List resources of a selected item after edition
} Prg_ListingType_t;
@ -104,10 +107,11 @@ long Prg_GetParamItmCod (void);
unsigned Prg_GetNumItemFromItmCod (long ItmCod);
unsigned Prg_GetLevelFromNumItem (unsigned NumItem);
void Prg_RequestCreateItem (void);
void Prg_ViewItemAfterEdit (void);
void Prg_RequestChangeItem (void);
void Prg_ReceiveFormNewItem (void);
void Prg_RequestCreateItem (void);
void Prg_ReceiveFormChgItem (void);
void Prg_ReceiveFormNewItem (void);
void Prg_ReqRemItem (void);
void Prg_RemoveItem (void);

View File

@ -91,7 +91,7 @@ static bool PrgRsc_ExchangeResources (const struct PrgRsc_Rsc *Rsc1,
/****************************** View resources *******************************/
/*****************************************************************************/
void PrgRsc_ViewResources (void)
void PrgRsc_ViewResourcesAfterEdit (void)
{
long ItmCod;
unsigned FormLevel;
@ -157,16 +157,18 @@ void PrgRsc_ListItemResources (Prg_ListingType_t ListingType,long ItmCod)
[Prg_EDIT_LIST ] = false,
[Prg_NEW_ITEM ] = false,
[Prg_EDIT_ITEM ] = false,
[Prg_END_EDIT_ITEM ] = false,
[Prg_EDIT_RESOURCES] = true,
[Prg_END_EDIT_RES ] = false,
};
static bool ShowEmptyList[Prg_NUM_LISTING_TYPES] =
static bool ShowListWhenEmpty[Prg_NUM_LISTING_TYPES] =
{
[Prg_PRINT ] = false,
[Prg_VIEW ] = false,
[Prg_EDIT_LIST ] = true,
[Prg_NEW_ITEM ] = true,
[Prg_EDIT_ITEM ] = true,
[Prg_END_EDIT_ITEM ] = true,
[Prg_EDIT_RESOURCES] = true,
[Prg_END_EDIT_RES ] = true,
};
@ -177,9 +179,21 @@ void PrgRsc_ListItemResources (Prg_ListingType_t ListingType,long ItmCod)
[Prg_EDIT_LIST ] = false,
[Prg_NEW_ITEM ] = false,
[Prg_EDIT_ITEM ] = false,
[Prg_END_EDIT_ITEM ] = false,
[Prg_EDIT_RESOURCES] = true,
[Prg_END_EDIT_RES ] = true,
};
static void (*FunctionToDrawContextualIcons[Prg_NUM_LISTING_TYPES]) (void *Args) =
{
[Prg_PRINT ] = NULL,
[Prg_VIEW ] = NULL,
[Prg_EDIT_LIST ] = PrgRsc_PutIconsEditResources,
[Prg_NEW_ITEM ] = PrgRsc_PutIconsEditResources,
[Prg_EDIT_ITEM ] = PrgRsc_PutIconsEditResources,
[Prg_END_EDIT_ITEM ] = PrgRsc_PutIconsEditResources,
[Prg_EDIT_RESOURCES] = PrgRsc_PutIconsViewResources,
[Prg_END_EDIT_RES ] = PrgRsc_PutIconsEditResources,
};
/***** Trivial check *****/
if (ItmCod <= 0)
@ -189,7 +203,7 @@ void PrgRsc_ListItemResources (Prg_ListingType_t ListingType,long ItmCod)
NumResources = Prg_DB_GetListResources (&mysql_res,ItmCod,
GetHiddenResources[ListingType]);
if (NumResources || ShowEmptyList[ListingType])
if (NumResources || ShowListWhenEmpty[ListingType])
{
/***** Begin section *****/
if (FeaturedList[ListingType])
@ -211,27 +225,9 @@ void PrgRsc_ListItemResources (Prg_ListingType_t ListingType,long ItmCod)
}
/***** Begin box *****/
switch (ListingType)
{
case Prg_EDIT_LIST:
case Prg_NEW_ITEM:
case Prg_EDIT_ITEM:
case Prg_END_EDIT_RES:
Box_BoxBegin ("100%",Txt_Resources,
PrgRsc_PutIconsEditResources,&ItmCod,
Hlp_COURSE_Program,Box_NOT_CLOSABLE);
break;
case Prg_EDIT_RESOURCES:
Box_BoxBegin ("100%",Txt_Resources,
PrgRsc_PutIconsViewResources,&ItmCod,
Hlp_COURSE_Program,Box_NOT_CLOSABLE);
break;
default:
Box_BoxBegin ("100%",Txt_Resources,
NULL,NULL,
Hlp_COURSE_Program,Box_NOT_CLOSABLE);
break;
}
Box_BoxBegin ("100%",Txt_Resources,
FunctionToDrawContextualIcons[ListingType],&ItmCod,
Hlp_COURSE_Program,Box_NOT_CLOSABLE);
/***** Table *****/
HTM_TABLE_BeginWideMarginPadding (2);

View File

@ -52,7 +52,7 @@ struct PrgRsc_Resource
/***************************** Public prototypes *****************************/
/*****************************************************************************/
void PrgRsc_ViewResources (void);
void PrgRsc_ViewResourcesAfterEdit (void);
void PrgRsc_EditResources (void);
void PrgRsc_ListItemResources (Prg_ListingType_t ListingType,long ItmCod);

View File

@ -5743,27 +5743,27 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Edit educational schedule of course" // Çeviri lazim!
#endif
,
[ActFrmNewPrgItm] =
[ActSeePrgItm] =
#if L==1 // ca
"Request new program item" // Necessita traducció
"See program item" // Necessita traducció
#elif L==2 // de
"Request new program item" // Need Übersetzung
"See program item" // Need Übersetzung
#elif L==3 // en
"Request new program item"
"See program item"
#elif L==4 // es
"Solicitar nuevo &iacute;tem del programa"
"Ver &iacute;tem del programa"
#elif L==5 // fr
"Request new program item" // Besoin de traduction
"See program item" // Besoin de traduction
#elif L==6 // gn
"Solicitar nuevo &iacute;tem del programa" // Okoteve traducción
"Ver &iacute;tem del programa" // Okoteve traducción
#elif L==7 // it
"Request new program item" // Bisogno di traduzione
"See program item" // Bisogno di traduzione
#elif L==8 // pl
"Request new program item" // Potrzebujesz tlumaczenie
"See program item" // Potrzebujesz tlumaczenie
#elif L==9 // pt
"Request new program item" // Precisa de tradução
"See program item" // Precisa de tradução
#elif L==10 // tr
"Request new program item" // Çeviri lazim!
"See program item" // Çeviri lazim!
#endif
,
[ActFrmChgPrgItm] =
@ -5789,27 +5789,27 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Edit program item" // Çeviri lazim!
#endif
,
[ActNewPrgItm] =
[ActFrmNewPrgItm] =
#if L==1 // ca
"Create new program item" // Necessita traducció
"Request new program item" // Necessita traducció
#elif L==2 // de
"Create new program item" // Need Übersetzung
"Request new program item" // Need Übersetzung
#elif L==3 // en
"Create new program item"
"Request new program item"
#elif L==4 // es
"Crear nuevo &iacute;tem del programa"
"Solicitar nuevo &iacute;tem del programa"
#elif L==5 // fr
"Create new program item" // Besoin de traduction
"Request new program item" // Besoin de traduction
#elif L==6 // gn
"Crear nuevo &iacute;tem del programa" // Okoteve traducción
"Solicitar nuevo &iacute;tem del programa" // Okoteve traducción
#elif L==7 // it
"Create new program item" // Bisogno di traduzione
"Request new program item" // Bisogno di traduzione
#elif L==8 // pl
"Create new program item" // Potrzebujesz tlumaczenie
"Request new program item" // Potrzebujesz tlumaczenie
#elif L==9 // pt
"Create new program item" // Precisa de tradução
"Request new program item" // Precisa de tradução
#elif L==10 // tr
"Create new program item" // Çeviri lazim!
"Request new program item" // Çeviri lazim!
#endif
,
[ActChgPrgItm] =
@ -5833,6 +5833,29 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Change program item" // Precisa de tradução
#elif L==10 // tr
"Change program item" // Çeviri lazim!
#endif
,
[ActNewPrgItm] =
#if L==1 // ca
"Create new program item" // Necessita traducció
#elif L==2 // de
"Create new program item" // Need Übersetzung
#elif L==3 // en
"Create new program item"
#elif L==4 // es
"Crear nuevo &iacute;tem del programa"
#elif L==5 // fr
"Create new program item" // Besoin de traduction
#elif L==6 // gn
"Crear nuevo &iacute;tem del programa" // Okoteve traducción
#elif L==7 // it
"Create new program item" // Bisogno di traduzione
#elif L==8 // pl
"Create new program item" // Potrzebujesz tlumaczenie
#elif L==9 // pt
"Create new program item" // Precisa de tradução
#elif L==10 // tr
"Create new program item" // Çeviri lazim!
#endif
,
[ActReqRemPrgItm] =