mirror of https://github.com/acanas/swad-core.git
Version19.211
This commit is contained in:
parent
85c3748a08
commit
6be20ecad1
|
@ -472,6 +472,7 @@ CREATE TABLE IF NOT EXISTS exa_groups (
|
||||||
CREATE TABLE IF NOT EXISTS exa_events (
|
CREATE TABLE IF NOT EXISTS exa_events (
|
||||||
EvtCod INT NOT NULL AUTO_INCREMENT,
|
EvtCod INT NOT NULL AUTO_INCREMENT,
|
||||||
ExaCod INT NOT NULL,
|
ExaCod INT NOT NULL,
|
||||||
|
Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',
|
||||||
UsrCod INT NOT NULL,
|
UsrCod INT NOT NULL,
|
||||||
StartTime DATETIME NOT NULL,
|
StartTime DATETIME NOT NULL,
|
||||||
EndTime DATETIME NOT NULL,
|
EndTime DATETIME NOT NULL,
|
||||||
|
|
|
@ -679,6 +679,8 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
|
|
||||||
[ActReqRemExaEvt ] = {1850,-1,TabUnk,ActSeeAllExa ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaEvt_RequestRemoveEvent ,NULL},
|
[ActReqRemExaEvt ] = {1850,-1,TabUnk,ActSeeAllExa ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaEvt_RequestRemoveEvent ,NULL},
|
||||||
[ActRemExaEvt ] = {1851,-1,TabUnk,ActSeeAllExa ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaEvt_RemoveEvent ,NULL},
|
[ActRemExaEvt ] = {1851,-1,TabUnk,ActSeeAllExa ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaEvt_RemoveEvent ,NULL},
|
||||||
|
[ActHidExaEvt ] = {1900,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaEvt_HideEvent ,NULL},
|
||||||
|
[ActShoExaEvt ] = {1901,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaEvt_UnhideEvent ,NULL},
|
||||||
[ActReqNewExaEvt ] = {1852,-1,TabUnk,ActSeeAllExa ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaEvt_RequestNewEvent ,NULL},
|
[ActReqNewExaEvt ] = {1852,-1,TabUnk,ActSeeAllExa ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaEvt_RequestNewEvent ,NULL},
|
||||||
[ActNewExaEvt ] = {1853,-1,TabUnk,ActSeeAllExa ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaEvt_CreateNewEventTch ,NULL},
|
[ActNewExaEvt ] = {1853,-1,TabUnk,ActSeeAllExa ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaEvt_CreateNewEventTch ,NULL},
|
||||||
[ActResExaEvt ] = {1854,-1,TabUnk,ActSeeAllExa ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,ExaEvt_GetEventBeingPlayed ,ExaEvt_ResumeEvent ,NULL},
|
[ActResExaEvt ] = {1854,-1,TabUnk,ActSeeAllExa ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,ExaEvt_GetEventBeingPlayed ,ExaEvt_ResumeEvent ,NULL},
|
||||||
|
@ -3710,6 +3712,8 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
||||||
ActChgTitExaSet, // #1897
|
ActChgTitExaSet, // #1897
|
||||||
ActNewExaSet, // #1898
|
ActNewExaSet, // #1898
|
||||||
ActChgNumQstExaSet, // #1899
|
ActChgNumQstExaSet, // #1899
|
||||||
|
ActHidExaEvt, // #1900
|
||||||
|
ActShoExaEvt, // #1901
|
||||||
};
|
};
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
232
swad_action.h
232
swad_action.h
|
@ -64,7 +64,7 @@ typedef enum
|
||||||
|
|
||||||
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
||||||
|
|
||||||
#define Act_MAX_ACTION_COD 1899
|
#define Act_MAX_ACTION_COD 1901
|
||||||
|
|
||||||
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
|
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
|
||||||
|
|
||||||
|
@ -646,133 +646,135 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
|
||||||
#define ActSeeExa (ActChgCrsTT1stDay + 123)
|
#define ActSeeExa (ActChgCrsTT1stDay + 123)
|
||||||
#define ActReqRemExaEvt (ActChgCrsTT1stDay + 124)
|
#define ActReqRemExaEvt (ActChgCrsTT1stDay + 124)
|
||||||
#define ActRemExaEvt (ActChgCrsTT1stDay + 125)
|
#define ActRemExaEvt (ActChgCrsTT1stDay + 125)
|
||||||
#define ActReqNewExaEvt (ActChgCrsTT1stDay + 126)
|
#define ActHidExaEvt (ActChgCrsTT1stDay + 126)
|
||||||
#define ActNewExaEvt (ActChgCrsTT1stDay + 127)
|
#define ActShoExaEvt (ActChgCrsTT1stDay + 127)
|
||||||
#define ActResExaEvt (ActChgCrsTT1stDay + 128)
|
#define ActReqNewExaEvt (ActChgCrsTT1stDay + 128)
|
||||||
#define ActBckExaEvt (ActChgCrsTT1stDay + 129)
|
#define ActNewExaEvt (ActChgCrsTT1stDay + 129)
|
||||||
#define ActPlyPauExaEvt (ActChgCrsTT1stDay + 130)
|
#define ActResExaEvt (ActChgCrsTT1stDay + 130)
|
||||||
#define ActFwdExaEvt (ActChgCrsTT1stDay + 131)
|
#define ActBckExaEvt (ActChgCrsTT1stDay + 131)
|
||||||
#define ActChgNumColExaEvt (ActChgCrsTT1stDay + 132)
|
#define ActPlyPauExaEvt (ActChgCrsTT1stDay + 132)
|
||||||
#define ActChgVisResExaEvtQst (ActChgCrsTT1stDay + 133)
|
#define ActFwdExaEvt (ActChgCrsTT1stDay + 133)
|
||||||
#define ActExaEvtCntDwn (ActChgCrsTT1stDay + 134)
|
#define ActChgNumColExaEvt (ActChgCrsTT1stDay + 134)
|
||||||
#define ActRefExaEvtTch (ActChgCrsTT1stDay + 135)
|
#define ActChgVisResExaEvtQst (ActChgCrsTT1stDay + 135)
|
||||||
#define ActJoiExaEvt (ActChgCrsTT1stDay + 136)
|
#define ActExaEvtCntDwn (ActChgCrsTT1stDay + 136)
|
||||||
#define ActSeeExaEvtAnsQstStd (ActChgCrsTT1stDay + 137)
|
#define ActRefExaEvtTch (ActChgCrsTT1stDay + 137)
|
||||||
#define ActRemExaEvtAnsQstStd (ActChgCrsTT1stDay + 138)
|
#define ActJoiExaEvt (ActChgCrsTT1stDay + 138)
|
||||||
#define ActAnsExaEvtQstStd (ActChgCrsTT1stDay + 139)
|
#define ActSeeExaEvtAnsQstStd (ActChgCrsTT1stDay + 139)
|
||||||
#define ActRefExaEvtStd (ActChgCrsTT1stDay + 140)
|
#define ActRemExaEvtAnsQstStd (ActChgCrsTT1stDay + 140)
|
||||||
|
#define ActAnsExaEvtQstStd (ActChgCrsTT1stDay + 141)
|
||||||
|
#define ActRefExaEvtStd (ActChgCrsTT1stDay + 142)
|
||||||
|
|
||||||
#define ActSeeMyExaEvtResCrs (ActChgCrsTT1stDay + 141)
|
#define ActSeeMyExaEvtResCrs (ActChgCrsTT1stDay + 143)
|
||||||
#define ActSeeMyExaEvtResExa (ActChgCrsTT1stDay + 142)
|
#define ActSeeMyExaEvtResExa (ActChgCrsTT1stDay + 144)
|
||||||
#define ActSeeMyExaEvtResEvt (ActChgCrsTT1stDay + 143)
|
#define ActSeeMyExaEvtResEvt (ActChgCrsTT1stDay + 145)
|
||||||
#define ActSeeOneExaEvtResMe (ActChgCrsTT1stDay + 144)
|
#define ActSeeOneExaEvtResMe (ActChgCrsTT1stDay + 146)
|
||||||
|
|
||||||
#define ActReqSeeAllExaEvtRes (ActChgCrsTT1stDay + 145)
|
#define ActReqSeeAllExaEvtRes (ActChgCrsTT1stDay + 147)
|
||||||
#define ActSeeAllExaEvtResCrs (ActChgCrsTT1stDay + 146)
|
#define ActSeeAllExaEvtResCrs (ActChgCrsTT1stDay + 148)
|
||||||
#define ActSeeAllExaEvtResExa (ActChgCrsTT1stDay + 147)
|
#define ActSeeAllExaEvtResExa (ActChgCrsTT1stDay + 149)
|
||||||
#define ActSeeAllExaEvtResEvt (ActChgCrsTT1stDay + 148)
|
#define ActSeeAllExaEvtResEvt (ActChgCrsTT1stDay + 150)
|
||||||
#define ActSeeOneExaEvtResOth (ActChgCrsTT1stDay + 149)
|
#define ActSeeOneExaEvtResOth (ActChgCrsTT1stDay + 151)
|
||||||
|
|
||||||
#define ActChgVisResExaEvtUsr (ActChgCrsTT1stDay + 150)
|
#define ActChgVisResExaEvtUsr (ActChgCrsTT1stDay + 152)
|
||||||
|
|
||||||
#define ActFrmNewExa (ActChgCrsTT1stDay + 151)
|
#define ActFrmNewExa (ActChgCrsTT1stDay + 153)
|
||||||
#define ActEdiOneExa (ActChgCrsTT1stDay + 152)
|
#define ActEdiOneExa (ActChgCrsTT1stDay + 154)
|
||||||
#define ActNewExa (ActChgCrsTT1stDay + 153)
|
#define ActNewExa (ActChgCrsTT1stDay + 155)
|
||||||
#define ActChgExa (ActChgCrsTT1stDay + 154)
|
#define ActChgExa (ActChgCrsTT1stDay + 156)
|
||||||
#define ActReqRemExa (ActChgCrsTT1stDay + 155)
|
#define ActReqRemExa (ActChgCrsTT1stDay + 157)
|
||||||
#define ActRemExa (ActChgCrsTT1stDay + 156)
|
#define ActRemExa (ActChgCrsTT1stDay + 158)
|
||||||
#define ActHidExa (ActChgCrsTT1stDay + 157)
|
#define ActHidExa (ActChgCrsTT1stDay + 159)
|
||||||
#define ActShoExa (ActChgCrsTT1stDay + 158)
|
#define ActShoExa (ActChgCrsTT1stDay + 160)
|
||||||
#define ActFrmNewExaSet (ActChgCrsTT1stDay + 159)
|
#define ActFrmNewExaSet (ActChgCrsTT1stDay + 161)
|
||||||
#define ActNewExaSet (ActChgCrsTT1stDay + 160)
|
#define ActNewExaSet (ActChgCrsTT1stDay + 162)
|
||||||
#define ActReqRemExaSet (ActChgCrsTT1stDay + 161)
|
#define ActReqRemExaSet (ActChgCrsTT1stDay + 163)
|
||||||
#define ActRemExaSet (ActChgCrsTT1stDay + 162)
|
#define ActRemExaSet (ActChgCrsTT1stDay + 164)
|
||||||
#define ActUp_ExaSet (ActChgCrsTT1stDay + 163)
|
#define ActUp_ExaSet (ActChgCrsTT1stDay + 165)
|
||||||
#define ActDwnExaSet (ActChgCrsTT1stDay + 164)
|
#define ActDwnExaSet (ActChgCrsTT1stDay + 166)
|
||||||
#define ActChgTitExaSet (ActChgCrsTT1stDay + 165)
|
#define ActChgTitExaSet (ActChgCrsTT1stDay + 167)
|
||||||
#define ActChgNumQstExaSet (ActChgCrsTT1stDay + 166)
|
#define ActChgNumQstExaSet (ActChgCrsTT1stDay + 168)
|
||||||
|
|
||||||
#define ActReqAddQstExaSet (ActChgCrsTT1stDay + 167)
|
#define ActReqAddQstExaSet (ActChgCrsTT1stDay + 169)
|
||||||
#define ActLstTstQstForSet (ActChgCrsTT1stDay + 168)
|
#define ActLstTstQstForSet (ActChgCrsTT1stDay + 170)
|
||||||
#define ActAddQstToExa (ActChgCrsTT1stDay + 169)
|
#define ActAddQstToExa (ActChgCrsTT1stDay + 171)
|
||||||
#define ActReqRemSetQst (ActChgCrsTT1stDay + 170)
|
#define ActReqRemSetQst (ActChgCrsTT1stDay + 172)
|
||||||
#define ActRemExaQst (ActChgCrsTT1stDay + 171)
|
#define ActRemExaQst (ActChgCrsTT1stDay + 173)
|
||||||
|
|
||||||
#define ActSeeGam (ActChgCrsTT1stDay + 172)
|
#define ActSeeGam (ActChgCrsTT1stDay + 174)
|
||||||
#define ActReqRemMch (ActChgCrsTT1stDay + 173)
|
#define ActReqRemMch (ActChgCrsTT1stDay + 175)
|
||||||
#define ActRemMch (ActChgCrsTT1stDay + 174)
|
#define ActRemMch (ActChgCrsTT1stDay + 176)
|
||||||
#define ActReqNewMch (ActChgCrsTT1stDay + 175)
|
#define ActReqNewMch (ActChgCrsTT1stDay + 177)
|
||||||
#define ActNewMch (ActChgCrsTT1stDay + 176)
|
#define ActNewMch (ActChgCrsTT1stDay + 178)
|
||||||
#define ActResMch (ActChgCrsTT1stDay + 177)
|
#define ActResMch (ActChgCrsTT1stDay + 179)
|
||||||
#define ActBckMch (ActChgCrsTT1stDay + 178)
|
#define ActBckMch (ActChgCrsTT1stDay + 180)
|
||||||
#define ActPlyPauMch (ActChgCrsTT1stDay + 179)
|
#define ActPlyPauMch (ActChgCrsTT1stDay + 181)
|
||||||
#define ActFwdMch (ActChgCrsTT1stDay + 180)
|
#define ActFwdMch (ActChgCrsTT1stDay + 182)
|
||||||
#define ActChgNumColMch (ActChgCrsTT1stDay + 181)
|
#define ActChgNumColMch (ActChgCrsTT1stDay + 183)
|
||||||
#define ActChgVisResMchQst (ActChgCrsTT1stDay + 182)
|
#define ActChgVisResMchQst (ActChgCrsTT1stDay + 184)
|
||||||
#define ActMchCntDwn (ActChgCrsTT1stDay + 183)
|
#define ActMchCntDwn (ActChgCrsTT1stDay + 185)
|
||||||
#define ActRefMchTch (ActChgCrsTT1stDay + 184)
|
#define ActRefMchTch (ActChgCrsTT1stDay + 186)
|
||||||
|
|
||||||
#define ActJoiMch (ActChgCrsTT1stDay + 185)
|
#define ActJoiMch (ActChgCrsTT1stDay + 187)
|
||||||
#define ActSeeMchAnsQstStd (ActChgCrsTT1stDay + 186)
|
#define ActSeeMchAnsQstStd (ActChgCrsTT1stDay + 188)
|
||||||
#define ActRemMchAnsQstStd (ActChgCrsTT1stDay + 187)
|
#define ActRemMchAnsQstStd (ActChgCrsTT1stDay + 189)
|
||||||
#define ActAnsMchQstStd (ActChgCrsTT1stDay + 188)
|
#define ActAnsMchQstStd (ActChgCrsTT1stDay + 190)
|
||||||
#define ActRefMchStd (ActChgCrsTT1stDay + 189)
|
#define ActRefMchStd (ActChgCrsTT1stDay + 191)
|
||||||
|
|
||||||
#define ActSeeMyMchResCrs (ActChgCrsTT1stDay + 190)
|
#define ActSeeMyMchResCrs (ActChgCrsTT1stDay + 192)
|
||||||
#define ActSeeMyMchResGam (ActChgCrsTT1stDay + 191)
|
#define ActSeeMyMchResGam (ActChgCrsTT1stDay + 193)
|
||||||
#define ActSeeMyMchResMch (ActChgCrsTT1stDay + 192)
|
#define ActSeeMyMchResMch (ActChgCrsTT1stDay + 194)
|
||||||
#define ActSeeOneMchResMe (ActChgCrsTT1stDay + 193)
|
#define ActSeeOneMchResMe (ActChgCrsTT1stDay + 195)
|
||||||
|
|
||||||
#define ActReqSeeAllMchRes (ActChgCrsTT1stDay + 194)
|
#define ActReqSeeAllMchRes (ActChgCrsTT1stDay + 196)
|
||||||
#define ActSeeAllMchResCrs (ActChgCrsTT1stDay + 195)
|
#define ActSeeAllMchResCrs (ActChgCrsTT1stDay + 197)
|
||||||
#define ActSeeAllMchResGam (ActChgCrsTT1stDay + 196)
|
#define ActSeeAllMchResGam (ActChgCrsTT1stDay + 198)
|
||||||
#define ActSeeAllMchResMch (ActChgCrsTT1stDay + 197)
|
#define ActSeeAllMchResMch (ActChgCrsTT1stDay + 199)
|
||||||
#define ActSeeOneMchResOth (ActChgCrsTT1stDay + 198)
|
#define ActSeeOneMchResOth (ActChgCrsTT1stDay + 200)
|
||||||
|
|
||||||
#define ActChgVisResMchUsr (ActChgCrsTT1stDay + 199)
|
#define ActChgVisResMchUsr (ActChgCrsTT1stDay + 201)
|
||||||
|
|
||||||
#define ActFrmNewGam (ActChgCrsTT1stDay + 200)
|
#define ActFrmNewGam (ActChgCrsTT1stDay + 202)
|
||||||
#define ActEdiOneGam (ActChgCrsTT1stDay + 201)
|
#define ActEdiOneGam (ActChgCrsTT1stDay + 203)
|
||||||
#define ActNewGam (ActChgCrsTT1stDay + 202)
|
#define ActNewGam (ActChgCrsTT1stDay + 204)
|
||||||
#define ActChgGam (ActChgCrsTT1stDay + 203)
|
#define ActChgGam (ActChgCrsTT1stDay + 205)
|
||||||
#define ActReqRemGam (ActChgCrsTT1stDay + 204)
|
#define ActReqRemGam (ActChgCrsTT1stDay + 206)
|
||||||
#define ActRemGam (ActChgCrsTT1stDay + 205)
|
#define ActRemGam (ActChgCrsTT1stDay + 207)
|
||||||
#define ActHidGam (ActChgCrsTT1stDay + 206)
|
#define ActHidGam (ActChgCrsTT1stDay + 208)
|
||||||
#define ActShoGam (ActChgCrsTT1stDay + 207)
|
#define ActShoGam (ActChgCrsTT1stDay + 209)
|
||||||
#define ActAddOneGamQst (ActChgCrsTT1stDay + 208)
|
#define ActAddOneGamQst (ActChgCrsTT1stDay + 210)
|
||||||
#define ActGamLstTstQst (ActChgCrsTT1stDay + 209)
|
#define ActGamLstTstQst (ActChgCrsTT1stDay + 211)
|
||||||
#define ActAddTstQstToGam (ActChgCrsTT1stDay + 210)
|
#define ActAddTstQstToGam (ActChgCrsTT1stDay + 212)
|
||||||
#define ActReqRemGamQst (ActChgCrsTT1stDay + 211)
|
#define ActReqRemGamQst (ActChgCrsTT1stDay + 213)
|
||||||
#define ActRemGamQst (ActChgCrsTT1stDay + 212)
|
#define ActRemGamQst (ActChgCrsTT1stDay + 214)
|
||||||
#define ActUp_GamQst (ActChgCrsTT1stDay + 213)
|
#define ActUp_GamQst (ActChgCrsTT1stDay + 215)
|
||||||
#define ActDwnGamQst (ActChgCrsTT1stDay + 214)
|
#define ActDwnGamQst (ActChgCrsTT1stDay + 216)
|
||||||
|
|
||||||
#define ActSeeSvy (ActChgCrsTT1stDay + 215)
|
#define ActSeeSvy (ActChgCrsTT1stDay + 217)
|
||||||
#define ActAnsSvy (ActChgCrsTT1stDay + 216)
|
#define ActAnsSvy (ActChgCrsTT1stDay + 218)
|
||||||
#define ActFrmNewSvy (ActChgCrsTT1stDay + 217)
|
#define ActFrmNewSvy (ActChgCrsTT1stDay + 219)
|
||||||
#define ActEdiOneSvy (ActChgCrsTT1stDay + 218)
|
#define ActEdiOneSvy (ActChgCrsTT1stDay + 220)
|
||||||
#define ActNewSvy (ActChgCrsTT1stDay + 219)
|
#define ActNewSvy (ActChgCrsTT1stDay + 221)
|
||||||
#define ActChgSvy (ActChgCrsTT1stDay + 220)
|
#define ActChgSvy (ActChgCrsTT1stDay + 222)
|
||||||
#define ActReqRemSvy (ActChgCrsTT1stDay + 221)
|
#define ActReqRemSvy (ActChgCrsTT1stDay + 223)
|
||||||
#define ActRemSvy (ActChgCrsTT1stDay + 222)
|
#define ActRemSvy (ActChgCrsTT1stDay + 224)
|
||||||
#define ActReqRstSvy (ActChgCrsTT1stDay + 223)
|
#define ActReqRstSvy (ActChgCrsTT1stDay + 225)
|
||||||
#define ActRstSvy (ActChgCrsTT1stDay + 224)
|
#define ActRstSvy (ActChgCrsTT1stDay + 226)
|
||||||
#define ActHidSvy (ActChgCrsTT1stDay + 225)
|
#define ActHidSvy (ActChgCrsTT1stDay + 227)
|
||||||
#define ActShoSvy (ActChgCrsTT1stDay + 226)
|
#define ActShoSvy (ActChgCrsTT1stDay + 228)
|
||||||
#define ActEdiOneSvyQst (ActChgCrsTT1stDay + 227)
|
#define ActEdiOneSvyQst (ActChgCrsTT1stDay + 229)
|
||||||
#define ActRcvSvyQst (ActChgCrsTT1stDay + 228)
|
#define ActRcvSvyQst (ActChgCrsTT1stDay + 230)
|
||||||
#define ActReqRemSvyQst (ActChgCrsTT1stDay + 229)
|
#define ActReqRemSvyQst (ActChgCrsTT1stDay + 231)
|
||||||
#define ActRemSvyQst (ActChgCrsTT1stDay + 230)
|
#define ActRemSvyQst (ActChgCrsTT1stDay + 232)
|
||||||
|
|
||||||
#define ActSeeOneExaAnn (ActChgCrsTT1stDay + 231)
|
#define ActSeeOneExaAnn (ActChgCrsTT1stDay + 233)
|
||||||
#define ActSeeDatExaAnn (ActChgCrsTT1stDay + 232)
|
#define ActSeeDatExaAnn (ActChgCrsTT1stDay + 234)
|
||||||
#define ActEdiExaAnn (ActChgCrsTT1stDay + 233)
|
#define ActEdiExaAnn (ActChgCrsTT1stDay + 235)
|
||||||
#define ActRcvExaAnn (ActChgCrsTT1stDay + 234)
|
#define ActRcvExaAnn (ActChgCrsTT1stDay + 236)
|
||||||
#define ActPrnExaAnn (ActChgCrsTT1stDay + 235)
|
#define ActPrnExaAnn (ActChgCrsTT1stDay + 237)
|
||||||
#define ActReqRemExaAnn (ActChgCrsTT1stDay + 236)
|
#define ActReqRemExaAnn (ActChgCrsTT1stDay + 238)
|
||||||
#define ActRemExaAnn (ActChgCrsTT1stDay + 237)
|
#define ActRemExaAnn (ActChgCrsTT1stDay + 239)
|
||||||
#define ActHidExaAnn (ActChgCrsTT1stDay + 238)
|
#define ActHidExaAnn (ActChgCrsTT1stDay + 240)
|
||||||
#define ActShoExaAnn (ActChgCrsTT1stDay + 239)
|
#define ActShoExaAnn (ActChgCrsTT1stDay + 241)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************************** Files tab **********************************/
|
/******************************** Files tab **********************************/
|
||||||
|
|
|
@ -544,10 +544,15 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.210.4 (2020-05-05)"
|
#define Log_PLATFORM_VERSION "SWAD 19.211 (2020-05-05)"
|
||||||
#define CSS_FILE "swad19.193.1.css"
|
#define CSS_FILE "swad19.193.1.css"
|
||||||
#define JS_FILE "swad19.193.1.js"
|
#define JS_FILE "swad19.193.1.js"
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
Version 19.211: May 05, 2020 Exam events can be hidden. (301215 lines)
|
||||||
|
1 change necessary in database:
|
||||||
|
ALTER TABLE exa_events ADD COLUMN Hidden ENUM('N','Y') NOT NULL DEFAULT 'N' AFTER ExaCod;
|
||||||
|
|
||||||
Version 19.210.4: May 05, 2020 Fixed bug searching courses. (301103 lines)
|
Version 19.210.4: May 05, 2020 Fixed bug searching courses. (301103 lines)
|
||||||
Version 19.210.3: May 03, 2020 All figures cacheable are cached everytime they are calculated. (301089 lines)
|
Version 19.210.3: May 03, 2020 All figures cacheable are cached everytime they are calculated. (301089 lines)
|
||||||
Version 19.210.2: May 03, 2020 More figures cached. (301125 lines)
|
Version 19.210.2: May 03, 2020 More figures cached. (301125 lines)
|
||||||
|
|
|
@ -1045,6 +1045,7 @@ mysql> DESCRIBE exa_events;
|
||||||
+----------------+------------------------------------------------+------+-----+---------+----------------+
|
+----------------+------------------------------------------------+------+-----+---------+----------------+
|
||||||
| EvtCod | int(11) | NO | PRI | NULL | auto_increment |
|
| EvtCod | int(11) | NO | PRI | NULL | auto_increment |
|
||||||
| ExaCod | int(11) | NO | MUL | NULL | |
|
| ExaCod | int(11) | NO | MUL | NULL | |
|
||||||
|
| Hidden | enum('N','Y') | NO | | N | |
|
||||||
| UsrCod | int(11) | NO | | NULL | |
|
| UsrCod | int(11) | NO | | NULL | |
|
||||||
| StartTime | datetime | NO | | NULL | |
|
| StartTime | datetime | NO | | NULL | |
|
||||||
| EndTime | datetime | NO | | NULL | |
|
| EndTime | datetime | NO | | NULL | |
|
||||||
|
@ -1057,11 +1058,12 @@ mysql> DESCRIBE exa_events;
|
||||||
| ShowQstResults | enum('N','Y') | NO | | N | |
|
| ShowQstResults | enum('N','Y') | NO | | N | |
|
||||||
| ShowUsrResults | enum('N','Y') | NO | | N | |
|
| ShowUsrResults | enum('N','Y') | NO | | N | |
|
||||||
+----------------+------------------------------------------------+------+-----+---------+----------------+
|
+----------------+------------------------------------------------+------+-----+---------+----------------+
|
||||||
13 rows in set (0.00 sec)
|
14 rows in set (0.00 sec)
|
||||||
*/
|
*/
|
||||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS exa_events ("
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS exa_events ("
|
||||||
"EvtCod INT NOT NULL AUTO_INCREMENT,"
|
"EvtCod INT NOT NULL AUTO_INCREMENT,"
|
||||||
"ExaCod INT NOT NULL,"
|
"ExaCod INT NOT NULL,"
|
||||||
|
"Hidden ENUM('N','Y') NOT NULL DEFAULT 'N',"
|
||||||
"UsrCod INT NOT NULL,"
|
"UsrCod INT NOT NULL,"
|
||||||
"StartTime DATETIME NOT NULL,"
|
"StartTime DATETIME NOT NULL,"
|
||||||
"EndTime DATETIME NOT NULL,"
|
"EndTime DATETIME NOT NULL,"
|
||||||
|
|
14
swad_exam.c
14
swad_exam.c
|
@ -126,7 +126,7 @@ static void Exa_WriteAuthor (struct Exa_Exam *Exam);
|
||||||
|
|
||||||
static void Exa_PutHiddenParamExamOrder (Exa_Order_t SelectedOrder);
|
static void Exa_PutHiddenParamExamOrder (Exa_Order_t SelectedOrder);
|
||||||
|
|
||||||
static void Exa_PutFormsToRemEditOneExam (struct Exa_Exams *Exams,
|
static void Exa_PutIconsToRemEditOneExam (struct Exa_Exams *Exams,
|
||||||
const struct Exa_Exam *Exam,
|
const struct Exa_Exam *Exam,
|
||||||
const char *Anchor);
|
const char *Anchor);
|
||||||
|
|
||||||
|
@ -252,11 +252,11 @@ void Exa_ResetExam (struct Exa_Exam *Exam)
|
||||||
Exam->TimeUTC[Dat_START_TIME] = (time_t) 0;
|
Exam->TimeUTC[Dat_START_TIME] = (time_t) 0;
|
||||||
Exam->TimeUTC[Dat_END_TIME ] = (time_t) 0;
|
Exam->TimeUTC[Dat_END_TIME ] = (time_t) 0;
|
||||||
Exam->Title[0] = '\0';
|
Exam->Title[0] = '\0';
|
||||||
|
Exam->Hidden = false;
|
||||||
Exam->NumSets = 0;
|
Exam->NumSets = 0;
|
||||||
Exam->NumQsts = 0;
|
Exam->NumQsts = 0;
|
||||||
Exam->NumEvts = 0;
|
Exam->NumEvts = 0;
|
||||||
Exam->NumUnfinishedEvts = 0;
|
Exam->NumUnfinishedEvts = 0;
|
||||||
Exam->Hidden = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -582,7 +582,7 @@ static void Exa_ShowOneExam (struct Exa_Exams *Exams,
|
||||||
HTM_TD_Begin ("rowspan=\"2\" class=\"CONTEXT_COL COLOR%u\"",Gbl.RowEvenOdd);
|
HTM_TD_Begin ("rowspan=\"2\" class=\"CONTEXT_COL COLOR%u\"",Gbl.RowEvenOdd);
|
||||||
|
|
||||||
/* Icons to remove/edit this exam */
|
/* Icons to remove/edit this exam */
|
||||||
Exa_PutFormsToRemEditOneExam (Exams,Exam,Anchor);
|
Exa_PutIconsToRemEditOneExam (Exams,Exam,Anchor);
|
||||||
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
}
|
}
|
||||||
|
@ -758,7 +758,7 @@ static void Exa_PutHiddenParamExamOrder (Exa_Order_t SelectedOrder)
|
||||||
/******************** Put a link (form) to edit one exam *********************/
|
/******************** Put a link (form) to edit one exam *********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Exa_PutFormsToRemEditOneExam (struct Exa_Exams *Exams,
|
static void Exa_PutIconsToRemEditOneExam (struct Exa_Exams *Exams,
|
||||||
const struct Exa_Exam *Exam,
|
const struct Exa_Exam *Exam,
|
||||||
const char *Anchor)
|
const char *Anchor)
|
||||||
{
|
{
|
||||||
|
@ -1424,7 +1424,7 @@ void Exa_HideExam (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************************** Show an exam ******************************/
|
/******************************* Unhide an exam ******************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Exa_UnhideExam (void)
|
void Exa_UnhideExam (void)
|
||||||
|
@ -1452,8 +1452,8 @@ void Exa_UnhideExam (void)
|
||||||
Exa_GetDataOfExamByCod (&Exam);
|
Exa_GetDataOfExamByCod (&Exam);
|
||||||
Exams.ExaCod = Exam.ExaCod;
|
Exams.ExaCod = Exam.ExaCod;
|
||||||
|
|
||||||
/***** Show exam *****/
|
/***** Unhide exam *****/
|
||||||
DB_QueryUPDATE ("can not show exam",
|
DB_QueryUPDATE ("can not unhide exam",
|
||||||
"UPDATE exa_exams SET Hidden='N' WHERE ExaCod=%ld",
|
"UPDATE exa_exams SET Hidden='N' WHERE ExaCod=%ld",
|
||||||
Exam.ExaCod);
|
Exam.ExaCod);
|
||||||
|
|
||||||
|
|
|
@ -114,10 +114,12 @@ static void ExaEvt_ListOneOrMoreEventsHeading (bool ICanEditEvents);
|
||||||
static bool ExaEvt_CheckIfICanEditEvents (void);
|
static bool ExaEvt_CheckIfICanEditEvents (void);
|
||||||
static bool ExaEvt_CheckIfICanEditThisEvent (const struct ExaEvt_Event *Event);
|
static bool ExaEvt_CheckIfICanEditThisEvent (const struct ExaEvt_Event *Event);
|
||||||
static void ExaEvt_ListOneOrMoreEventsIcons (struct Exa_Exams *Exams,
|
static void ExaEvt_ListOneOrMoreEventsIcons (struct Exa_Exams *Exams,
|
||||||
const struct ExaEvt_Event *Event);
|
const struct ExaEvt_Event *Event,
|
||||||
|
const char *Anchor);
|
||||||
static void ExaEvt_ListOneOrMoreEventsAuthor (const struct ExaEvt_Event *Event);
|
static void ExaEvt_ListOneOrMoreEventsAuthor (const struct ExaEvt_Event *Event);
|
||||||
static void ExaEvt_ListOneOrMoreEventsTimes (const struct ExaEvt_Event *Event,unsigned UniqueId);
|
static void ExaEvt_ListOneOrMoreEventsTimes (const struct ExaEvt_Event *Event,unsigned UniqueId);
|
||||||
static void ExaEvt_ListOneOrMoreEventsTitleGrps (const struct ExaEvt_Event *Event);
|
static void ExaEvt_ListOneOrMoreEventsTitleGrps (const struct ExaEvt_Event *Event,
|
||||||
|
const char *Anchor);
|
||||||
static void ExaEvt_GetAndWriteNamesOfGrpsAssociatedToEvent (const struct ExaEvt_Event *Event);
|
static void ExaEvt_GetAndWriteNamesOfGrpsAssociatedToEvent (const struct ExaEvt_Event *Event);
|
||||||
static void ExaEvt_ListOneOrMoreEventsNumParticipants (const struct ExaEvt_Event *Event);
|
static void ExaEvt_ListOneOrMoreEventsNumParticipants (const struct ExaEvt_Event *Event);
|
||||||
static void ExaEvt_ListOneOrMoreEventsStatus (struct ExaEvt_Event *Event,unsigned NumQsts);
|
static void ExaEvt_ListOneOrMoreEventsStatus (struct ExaEvt_Event *Event,unsigned NumQsts);
|
||||||
|
@ -253,13 +255,18 @@ long ExaEvt_GetEvtCodBeingPlayed (void)
|
||||||
|
|
||||||
void ExaEvt_ResetEvent (struct ExaEvt_Event *Event)
|
void ExaEvt_ResetEvent (struct ExaEvt_Event *Event)
|
||||||
{
|
{
|
||||||
|
Dat_StartEndTime_t StartEndTime;
|
||||||
|
|
||||||
/***** Initialize to empty match *****/
|
/***** Initialize to empty match *****/
|
||||||
Event->EvtCod = -1L;
|
Event->EvtCod = -1L;
|
||||||
Event->ExaCod = -1L;
|
Event->ExaCod = -1L;
|
||||||
Event->UsrCod = -1L;
|
Event->UsrCod = -1L;
|
||||||
Event->TimeUTC[Dat_START_TIME] = (time_t) 0;
|
for (StartEndTime = (Dat_StartEndTime_t) 0;
|
||||||
Event->TimeUTC[Dat_END_TIME ] = (time_t) 0;
|
StartEndTime <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1);
|
||||||
|
StartEndTime++)
|
||||||
|
Event->TimeUTC[StartEndTime] = (time_t) 0;
|
||||||
Event->Title[0] = '\0';
|
Event->Title[0] = '\0';
|
||||||
|
Event->Hidden = false;
|
||||||
Event->Status.QstInd = 0;
|
Event->Status.QstInd = 0;
|
||||||
Event->Status.QstCod = -1L;
|
Event->Status.QstCod = -1L;
|
||||||
Event->Status.QstStartTimeUTC = (time_t) 0;
|
Event->Status.QstStartTimeUTC = (time_t) 0;
|
||||||
|
@ -309,19 +316,20 @@ void ExaEvt_ListEvents (struct Exa_Exams *Exams,
|
||||||
|
|
||||||
/* Make query */
|
/* Make query */
|
||||||
NumEvents = (unsigned) DB_QuerySELECT (&mysql_res,"can not get events",
|
NumEvents = (unsigned) DB_QuerySELECT (&mysql_res,"can not get events",
|
||||||
"SELECT EvtCod," // row[ 0]
|
"SELECT EvtCod," // row[ 0]
|
||||||
"ExaCod," // row[ 1]
|
"ExaCod," // row[ 1]
|
||||||
"UsrCod," // row[ 2]
|
"Hidden," // row[ 2]
|
||||||
"UNIX_TIMESTAMP(StartTime)," // row[ 3]
|
"UsrCod," // row[ 3]
|
||||||
"UNIX_TIMESTAMP(EndTime)," // row[ 4]
|
"UNIX_TIMESTAMP(StartTime)," // row[ 4]
|
||||||
"Title," // row[ 5]
|
"UNIX_TIMESTAMP(EndTime)," // row[ 5]
|
||||||
"QstInd," // row[ 6]
|
"Title," // row[ 6]
|
||||||
"QstCod," // row[ 7]
|
"QstInd," // row[ 7]
|
||||||
"Showing," // row[ 8]
|
"QstCod," // row[ 8]
|
||||||
"Countdown," // row[ 9]
|
"Showing," // row[ 9]
|
||||||
"NumCols," // row[10]
|
"Countdown," // row[10]
|
||||||
"ShowQstResults," // row[11]
|
"NumCols," // row[11]
|
||||||
"ShowUsrResults" // row[12]
|
"ShowQstResults," // row[12]
|
||||||
|
"ShowUsrResults" // row[13]
|
||||||
" FROM exa_events"
|
" FROM exa_events"
|
||||||
" WHERE ExaCod=%ld%s"
|
" WHERE ExaCod=%ld%s"
|
||||||
" ORDER BY EvtCod",
|
" ORDER BY EvtCod",
|
||||||
|
@ -391,55 +399,37 @@ void ExaEvt_GetDataOfEventByCod (struct ExaEvt_Event *Event)
|
||||||
{
|
{
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
unsigned long NumRows;
|
unsigned long NumRows;
|
||||||
Dat_StartEndTime_t StartEndTime;
|
|
||||||
|
|
||||||
/***** Get exam data event from database *****/
|
/***** Get exam data event from database *****/
|
||||||
NumRows = (unsigned) DB_QuerySELECT (&mysql_res,"can not get events",
|
NumRows = (unsigned)
|
||||||
"SELECT EvtCod," // row[ 0]
|
DB_QuerySELECT (&mysql_res,"can not get events",
|
||||||
"ExaCod," // row[ 1]
|
"SELECT EvtCod," // row[ 0]
|
||||||
"UsrCod," // row[ 2]
|
"ExaCod," // row[ 1]
|
||||||
"UNIX_TIMESTAMP(StartTime)," // row[ 3]
|
"Hidden," // row[ 2]
|
||||||
"UNIX_TIMESTAMP(EndTime)," // row[ 4]
|
"UsrCod," // row[ 3]
|
||||||
"Title," // row[ 5]
|
"UNIX_TIMESTAMP(StartTime),"// row[ 4]
|
||||||
"QstInd," // row[ 6]
|
"UNIX_TIMESTAMP(EndTime)," // row[ 5]
|
||||||
"QstCod," // row[ 7]
|
"Title," // row[ 6]
|
||||||
"Showing," // row[ 8]
|
"QstInd," // row[ 7]
|
||||||
"Countdown," // row[ 9]
|
"QstCod," // row[ 8]
|
||||||
"NumCols," // row[10]
|
"Showing," // row[ 9]
|
||||||
"ShowQstResults," // row[11]
|
"Countdown," // row[10]
|
||||||
"ShowUsrResults" // row[12]
|
"NumCols," // row[11]
|
||||||
" FROM exa_events"
|
"ShowQstResults," // row[12]
|
||||||
" WHERE EvtCod=%ld"
|
"ShowUsrResults" // row[13]
|
||||||
" AND ExaCod IN" // Extra check
|
" FROM exa_events"
|
||||||
" (SELECT ExaCod FROM exa_exams"
|
" WHERE EvtCod=%ld"
|
||||||
" WHERE CrsCod='%ld')",
|
" AND ExaCod IN" // Extra check
|
||||||
Event->EvtCod,
|
" (SELECT ExaCod FROM exa_exams"
|
||||||
Gbl.Hierarchy.Crs.CrsCod);
|
" WHERE CrsCod='%ld')",
|
||||||
|
Event->EvtCod,
|
||||||
|
Gbl.Hierarchy.Crs.CrsCod);
|
||||||
if (NumRows) // Event found...
|
if (NumRows) // Event found...
|
||||||
/***** Get exam event data from row *****/
|
/* Get exam event data from row */
|
||||||
ExaEvt_GetEventDataFromRow (mysql_res,Event);
|
ExaEvt_GetEventDataFromRow (mysql_res,Event);
|
||||||
else
|
else
|
||||||
{
|
|
||||||
/* Initialize to empty exam event */
|
/* Initialize to empty exam event */
|
||||||
Event->EvtCod = -1L;
|
ExaEvt_ResetEvent (Event);
|
||||||
Event->ExaCod = -1L;
|
|
||||||
Event->UsrCod = -1L;
|
|
||||||
for (StartEndTime = (Dat_StartEndTime_t) 0;
|
|
||||||
StartEndTime <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1);
|
|
||||||
StartEndTime++)
|
|
||||||
Event->TimeUTC[StartEndTime] = (time_t) 0;
|
|
||||||
Event->Title[0] = '\0';
|
|
||||||
Event->Status.QstInd = 0;
|
|
||||||
Event->Status.QstCod = -1L;
|
|
||||||
Event->Status.QstStartTimeUTC = (time_t) 0;
|
|
||||||
Event->Status.Showing = ExaEvt_START;
|
|
||||||
Event->Status.Countdown = -1L;
|
|
||||||
Event->Status.Happening = false;
|
|
||||||
Event->Status.NumParticipants = 0;
|
|
||||||
Event->Status.NumCols = ExaEvt_NUM_COLS_DEFAULT;
|
|
||||||
Event->Status.ShowQstResults = false;
|
|
||||||
Event->Status.ShowUsrResults = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
|
@ -487,6 +477,7 @@ static void ExaEvt_ListOneOrMoreEvents (struct Exa_Exams *Exams,
|
||||||
{
|
{
|
||||||
unsigned NumEvent;
|
unsigned NumEvent;
|
||||||
unsigned UniqueId;
|
unsigned UniqueId;
|
||||||
|
char *Anchor;
|
||||||
struct ExaEvt_Event Event;
|
struct ExaEvt_Event Event;
|
||||||
bool ICanEditEvents = ExaEvt_CheckIfICanEditEvents ();
|
bool ICanEditEvents = ExaEvt_CheckIfICanEditEvents ();
|
||||||
|
|
||||||
|
@ -513,12 +504,17 @@ static void ExaEvt_ListOneOrMoreEvents (struct Exa_Exams *Exams,
|
||||||
|
|
||||||
if (ExaEvt_CheckIfICanPlayThisEventBasedOnGrps (&Event))
|
if (ExaEvt_CheckIfICanPlayThisEventBasedOnGrps (&Event))
|
||||||
{
|
{
|
||||||
/***** Write row for this exam event ****/
|
/***** Build anchor string *****/
|
||||||
|
if (asprintf (&Anchor,"evt_%ld_%ld",Exam->ExaCod,Event.EvtCod) < 0)
|
||||||
|
Lay_NotEnoughMemoryExit ();
|
||||||
|
|
||||||
|
/***** Begin row for this exam event ****/
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
/* Icons */
|
/* Icons */
|
||||||
if (ICanEditEvents)
|
if (ICanEditEvents)
|
||||||
ExaEvt_ListOneOrMoreEventsIcons (Exams,&Event);
|
if (ExaEvt_CheckIfICanEditThisEvent (&Event))
|
||||||
|
ExaEvt_ListOneOrMoreEventsIcons (Exams,&Event,Anchor);
|
||||||
|
|
||||||
/* Event participant */
|
/* Event participant */
|
||||||
ExaEvt_ListOneOrMoreEventsAuthor (&Event);
|
ExaEvt_ListOneOrMoreEventsAuthor (&Event);
|
||||||
|
@ -527,7 +523,7 @@ static void ExaEvt_ListOneOrMoreEvents (struct Exa_Exams *Exams,
|
||||||
ExaEvt_ListOneOrMoreEventsTimes (&Event,UniqueId);
|
ExaEvt_ListOneOrMoreEventsTimes (&Event,UniqueId);
|
||||||
|
|
||||||
/* Title and groups */
|
/* Title and groups */
|
||||||
ExaEvt_ListOneOrMoreEventsTitleGrps (&Event);
|
ExaEvt_ListOneOrMoreEventsTitleGrps (&Event,Anchor);
|
||||||
|
|
||||||
/* Number of participants who have answered any question in the exam event */
|
/* Number of participants who have answered any question in the exam event */
|
||||||
ExaEvt_ListOneOrMoreEventsNumParticipants (&Event);
|
ExaEvt_ListOneOrMoreEventsNumParticipants (&Event);
|
||||||
|
@ -537,6 +533,12 @@ static void ExaEvt_ListOneOrMoreEvents (struct Exa_Exams *Exams,
|
||||||
|
|
||||||
/* Event result visible? */
|
/* Event result visible? */
|
||||||
ExaEvt_ListOneOrMoreEventsResult (Exams,&Event);
|
ExaEvt_ListOneOrMoreEventsResult (Exams,&Event);
|
||||||
|
|
||||||
|
/***** End row for this exam event ****/
|
||||||
|
HTM_TR_End ();
|
||||||
|
|
||||||
|
/***** Free anchor string *****/
|
||||||
|
free (Anchor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -617,22 +619,29 @@ static bool ExaEvt_CheckIfICanEditThisEvent (const struct ExaEvt_Event *Event)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void ExaEvt_ListOneOrMoreEventsIcons (struct Exa_Exams *Exams,
|
static void ExaEvt_ListOneOrMoreEventsIcons (struct Exa_Exams *Exams,
|
||||||
const struct ExaEvt_Event *Event)
|
const struct ExaEvt_Event *Event,
|
||||||
|
const char *Anchor)
|
||||||
{
|
{
|
||||||
HTM_TD_Begin ("class=\"BT%u\"",Gbl.RowEvenOdd);
|
HTM_TD_Begin ("class=\"BT%u\"",Gbl.RowEvenOdd);
|
||||||
|
|
||||||
/***** Put icon to remove the exam event *****/
|
Exams->ExaCod = Event->ExaCod;
|
||||||
if (ExaEvt_CheckIfICanEditThisEvent (Event))
|
Exams->EvtCod = Event->EvtCod;
|
||||||
{
|
|
||||||
Exams->ExaCod = Event->ExaCod;
|
/* Icon to remove the exam event */
|
||||||
Exams->EvtCod = Event->EvtCod;
|
Frm_StartForm (ActReqRemExaEvt);
|
||||||
Frm_StartForm (ActReqRemExaEvt);
|
ExaEvt_PutParamsEdit (Exams);
|
||||||
ExaEvt_PutParamsEdit (Exams);
|
Ico_PutIconRemove ();
|
||||||
Ico_PutIconRemove ();
|
Frm_EndForm ();
|
||||||
Frm_EndForm ();
|
|
||||||
}
|
/* Icon to hide/unhide the exam event */
|
||||||
|
if (Event->Hidden)
|
||||||
|
Ico_PutContextualIconToUnhide (ActShoExaEvt,Anchor,
|
||||||
|
ExaEvt_PutParamsEdit,Exams);
|
||||||
else
|
else
|
||||||
Ico_PutIconRemovalNotAllowed ();
|
Ico_PutContextualIconToHide (ActHidExaEvt,Anchor,
|
||||||
|
ExaEvt_PutParamsEdit,Exams);
|
||||||
|
|
||||||
|
/* Icon to edit the exam event */
|
||||||
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
}
|
}
|
||||||
|
@ -645,7 +654,7 @@ static void ExaEvt_ListOneOrMoreEventsAuthor (const struct ExaEvt_Event *Event)
|
||||||
{
|
{
|
||||||
/***** Event author (teacher) *****/
|
/***** Event author (teacher) *****/
|
||||||
HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
|
HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
|
||||||
Usr_WriteAuthor1Line (Event->UsrCod,false);
|
Usr_WriteAuthor1Line (Event->UsrCod,Event->Hidden);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -656,19 +665,24 @@ static void ExaEvt_ListOneOrMoreEventsAuthor (const struct ExaEvt_Event *Event)
|
||||||
static void ExaEvt_ListOneOrMoreEventsTimes (const struct ExaEvt_Event *Event,unsigned UniqueId)
|
static void ExaEvt_ListOneOrMoreEventsTimes (const struct ExaEvt_Event *Event,unsigned UniqueId)
|
||||||
{
|
{
|
||||||
Dat_StartEndTime_t StartEndTime;
|
Dat_StartEndTime_t StartEndTime;
|
||||||
|
const char *Color;
|
||||||
char *Id;
|
char *Id;
|
||||||
|
|
||||||
for (StartEndTime = (Dat_StartEndTime_t) 0;
|
for (StartEndTime = (Dat_StartEndTime_t) 0;
|
||||||
StartEndTime <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1);
|
StartEndTime <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1);
|
||||||
StartEndTime++)
|
StartEndTime++)
|
||||||
{
|
{
|
||||||
|
Color = Event->Status.Showing == ExaEvt_END ? (Event->Hidden ? "DATE_GREEN_LIGHT":
|
||||||
|
"DATE_GREEN") :
|
||||||
|
(Event->Hidden ? "DATE_RED_LIGHT":
|
||||||
|
"DATE_RED");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (asprintf (&Id,"exa_time_%u_%u",(unsigned) StartEndTime,UniqueId) < 0)
|
if (asprintf (&Id,"exa_time_%u_%u",(unsigned) StartEndTime,UniqueId) < 0)
|
||||||
Lay_NotEnoughMemoryExit ();
|
Lay_NotEnoughMemoryExit ();
|
||||||
HTM_TD_Begin ("id=\"%s\" class=\"%s LT COLOR%u\"",
|
HTM_TD_Begin ("id=\"%s\" class=\"%s LT COLOR%u\"",
|
||||||
Id,
|
Id,Color,Gbl.RowEvenOdd);
|
||||||
Event->Status.Showing == ExaEvt_END ? "DATE_RED" :
|
|
||||||
"DATE_GREEN",
|
|
||||||
Gbl.RowEvenOdd);
|
|
||||||
Dat_WriteLocalDateHMSFromUTC (Id,Event->TimeUTC[StartEndTime],
|
Dat_WriteLocalDateHMSFromUTC (Id,Event->TimeUTC[StartEndTime],
|
||||||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||||
true,true,true,0x7);
|
true,true,true,0x7);
|
||||||
|
@ -681,7 +695,8 @@ static void ExaEvt_ListOneOrMoreEventsTimes (const struct ExaEvt_Event *Event,un
|
||||||
/*************** Put a column for exam event title and grous *****************/
|
/*************** Put a column for exam event title and grous *****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void ExaEvt_ListOneOrMoreEventsTitleGrps (const struct ExaEvt_Event *Event)
|
static void ExaEvt_ListOneOrMoreEventsTitleGrps (const struct ExaEvt_Event *Event,
|
||||||
|
const char *Anchor)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Play;
|
extern const char *Txt_Play;
|
||||||
extern const char *Txt_Resume;
|
extern const char *Txt_Resume;
|
||||||
|
@ -689,15 +704,19 @@ static void ExaEvt_ListOneOrMoreEventsTitleGrps (const struct ExaEvt_Event *Even
|
||||||
HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
|
HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
|
||||||
|
|
||||||
/***** Event title *****/
|
/***** Event title *****/
|
||||||
|
HTM_ARTICLE_Begin (Anchor);
|
||||||
Frm_StartForm (Gbl.Usrs.Me.Role.Logged == Rol_STD ? ActJoiExaEvt :
|
Frm_StartForm (Gbl.Usrs.Me.Role.Logged == Rol_STD ? ActJoiExaEvt :
|
||||||
ActResExaEvt);
|
ActResExaEvt);
|
||||||
ExaEvt_PutParamEvtCod (Event->EvtCod);
|
ExaEvt_PutParamEvtCod (Event->EvtCod);
|
||||||
HTM_BUTTON_SUBMIT_Begin (Gbl.Usrs.Me.Role.Logged == Rol_STD ? Txt_Play :
|
HTM_BUTTON_SUBMIT_Begin (Gbl.Usrs.Me.Role.Logged == Rol_STD ? Txt_Play :
|
||||||
Txt_Resume,
|
Txt_Resume,
|
||||||
"BT_LINK LT ASG_TITLE",NULL);
|
Event->Hidden ? "BT_LINK LT ASG_TITLE_LIGHT":
|
||||||
|
"BT_LINK LT ASG_TITLE",
|
||||||
|
NULL);
|
||||||
HTM_Txt (Event->Title);
|
HTM_Txt (Event->Title);
|
||||||
HTM_BUTTON_End ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
HTM_ARTICLE_End ();
|
||||||
|
|
||||||
/***** Groups whose students can answer this exam event *****/
|
/***** Groups whose students can answer this exam event *****/
|
||||||
if (Gbl.Crs.Grps.NumGrps)
|
if (Gbl.Crs.Grps.NumGrps)
|
||||||
|
@ -732,7 +751,8 @@ static void ExaEvt_GetAndWriteNamesOfGrpsAssociatedToEvent (const struct ExaEvt_
|
||||||
Event->EvtCod);
|
Event->EvtCod);
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Write heading *****/
|
||||||
HTM_DIV_Begin ("class=\"ASG_GRP\"");
|
HTM_DIV_Begin ("class=\"%s\"",Event->Hidden ? "ASG_GRP_LIGHT":
|
||||||
|
"ASG_GRP");
|
||||||
HTM_TxtColonNBSP (NumRows == 1 ? Txt_Group :
|
HTM_TxtColonNBSP (NumRows == 1 ? Txt_Group :
|
||||||
Txt_Groups);
|
Txt_Groups);
|
||||||
|
|
||||||
|
@ -964,10 +984,11 @@ static void ExaEvt_GetEventDataFromRow (MYSQL_RES *mysql_res,
|
||||||
/*
|
/*
|
||||||
row[ 0] EvtCod
|
row[ 0] EvtCod
|
||||||
row[ 1] ExaCod
|
row[ 1] ExaCod
|
||||||
row[ 2] UsrCod
|
row[ 2] Hidden
|
||||||
row[ 3] UNIX_TIMESTAMP(StartTime)
|
row[ 3] UsrCod
|
||||||
row[ 4] UNIX_TIMESTAMP(EndTime)
|
row[ 4] UNIX_TIMESTAMP(StartTime)
|
||||||
row[ 5] Title
|
row[ 5] UNIX_TIMESTAMP(EndTime)
|
||||||
|
row[ 6] Title
|
||||||
*/
|
*/
|
||||||
/***** Get exam event data *****/
|
/***** Get exam event data *****/
|
||||||
/* Code of the exam event (row[0]) */
|
/* Code of the exam event (row[0]) */
|
||||||
|
@ -978,55 +999,58 @@ static void ExaEvt_GetEventDataFromRow (MYSQL_RES *mysql_res,
|
||||||
if ((Event->ExaCod = Str_ConvertStrCodToLongCod (row[1])) <= 0)
|
if ((Event->ExaCod = Str_ConvertStrCodToLongCod (row[1])) <= 0)
|
||||||
Lay_ShowErrorAndExit ("Wrong code of exam.");
|
Lay_ShowErrorAndExit ("Wrong code of exam.");
|
||||||
|
|
||||||
/* Get exam event teacher (row[2]) */
|
/* Get whether the exam is hidden (row[2]) */
|
||||||
Event->UsrCod = Str_ConvertStrCodToLongCod (row[2]);
|
Event->Hidden = (row[2][0] == 'Y');
|
||||||
|
|
||||||
/* Get start/end times (row[3], row[4] hold start/end UTC times) */
|
/* Get exam event teacher (row[3]) */
|
||||||
|
Event->UsrCod = Str_ConvertStrCodToLongCod (row[3]);
|
||||||
|
|
||||||
|
/* Get start/end times (row[4], row[5] hold start/end UTC times) */
|
||||||
for (StartEndTime = (Dat_StartEndTime_t) 0;
|
for (StartEndTime = (Dat_StartEndTime_t) 0;
|
||||||
StartEndTime <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1);
|
StartEndTime <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1);
|
||||||
StartEndTime++)
|
StartEndTime++)
|
||||||
Event->TimeUTC[StartEndTime] = Dat_GetUNIXTimeFromStr (row[3 + StartEndTime]);
|
Event->TimeUTC[StartEndTime] = Dat_GetUNIXTimeFromStr (row[4 + StartEndTime]);
|
||||||
|
|
||||||
/* Get the title of the exam (row[5]) */
|
/* Get the title of the exam (row[6]) */
|
||||||
if (row[5])
|
if (row[6])
|
||||||
Str_Copy (Event->Title,row[5],
|
Str_Copy (Event->Title,row[6],
|
||||||
Exa_MAX_BYTES_TITLE);
|
Exa_MAX_BYTES_TITLE);
|
||||||
else
|
else
|
||||||
Event->Title[0] = '\0';
|
Event->Title[0] = '\0';
|
||||||
|
|
||||||
/***** Get current exam event status *****/
|
/***** Get current exam event status *****/
|
||||||
/*
|
/*
|
||||||
row[ 6] QstInd
|
row[ 7] QstInd
|
||||||
row[ 7] QstCod
|
row[ 8] QstCod
|
||||||
row[ 8] Showing
|
row[ 9] Showing
|
||||||
row[ 9] Countdown
|
row[10] Countdown
|
||||||
row[10] NumCols
|
row[11] NumCols
|
||||||
row[11] ShowQstResults
|
row[12] ShowQstResults
|
||||||
row[12] ShowUsrResults
|
row[13] ShowUsrResults
|
||||||
*/
|
*/
|
||||||
/* Current question index (row[6]) */
|
/* Current question index (row[7]) */
|
||||||
Event->Status.QstInd = Str_ConvertStrToUnsigned (row[6]);
|
Event->Status.QstInd = Str_ConvertStrToUnsigned (row[7]);
|
||||||
|
|
||||||
/* Current question code (row[7]) */
|
/* Current question code (row[8]) */
|
||||||
Event->Status.QstCod = Str_ConvertStrCodToLongCod (row[7]);
|
Event->Status.QstCod = Str_ConvertStrCodToLongCod (row[8]);
|
||||||
|
|
||||||
/* Get what to show (stem, answers, results) (row(8)) */
|
/* Get what to show (stem, answers, results) (row(9)) */
|
||||||
Event->Status.Showing = ExaEvt_GetShowingFromStr (row[8]);
|
Event->Status.Showing = ExaEvt_GetShowingFromStr (row[9]);
|
||||||
|
|
||||||
/* Get countdown (row[9]) */
|
/* Get countdown (row[10]) */
|
||||||
Event->Status.Countdown = Str_ConvertStrCodToLongCod (row[9]);
|
Event->Status.Countdown = Str_ConvertStrCodToLongCod (row[10]);
|
||||||
|
|
||||||
/* Get number of columns (row[10]) */
|
/* Get number of columns (row[11]) */
|
||||||
LongNum = Str_ConvertStrCodToLongCod (row[10]);
|
LongNum = Str_ConvertStrCodToLongCod (row[11]);
|
||||||
Event->Status.NumCols = (LongNum <= 1 ) ? 1 :
|
Event->Status.NumCols = (LongNum <= 1 ) ? 1 :
|
||||||
((LongNum >= ExaEvt_MAX_COLS) ? ExaEvt_MAX_COLS :
|
((LongNum >= ExaEvt_MAX_COLS) ? ExaEvt_MAX_COLS :
|
||||||
(unsigned) LongNum);
|
(unsigned) LongNum);
|
||||||
|
|
||||||
/* Get whether to show question results or not (row(11)) */
|
/* Get whether to show question results or not (row(12)) */
|
||||||
Event->Status.ShowQstResults = (row[11][0] == 'Y');
|
Event->Status.ShowQstResults = (row[12][0] == 'Y');
|
||||||
|
|
||||||
/* Get whether to show user results or not (row(12)) */
|
/* Get whether to show user results or not (row(13)) */
|
||||||
Event->Status.ShowUsrResults = (row[12][0] == 'Y');
|
Event->Status.ShowUsrResults = (row[13][0] == 'Y');
|
||||||
|
|
||||||
/***** Get whether the exam event is being played or not *****/
|
/***** Get whether the exam event is being played or not *****/
|
||||||
if (Event->Status.Showing == ExaEvt_END) // Event over
|
if (Event->Status.Showing == ExaEvt_END) // Event over
|
||||||
|
@ -1261,6 +1285,78 @@ static void ExaEvt_RemoveUsrEvtResultsInCrs (long UsrCod,long CrsCod,const char
|
||||||
UsrCod);
|
UsrCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/******************************** Hide an event ******************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void ExaEvt_HideEvent (void)
|
||||||
|
{
|
||||||
|
struct Exa_Exams Exams;
|
||||||
|
struct Exa_Exam Exam;
|
||||||
|
struct ExaEvt_Event Event;
|
||||||
|
|
||||||
|
/***** Reset exams context *****/
|
||||||
|
Exa_ResetExams (&Exams);
|
||||||
|
|
||||||
|
/***** Reset exam and event *****/
|
||||||
|
Exa_ResetExam (&Exam);
|
||||||
|
ExaEvt_ResetEvent (&Event);
|
||||||
|
|
||||||
|
/***** Get and check parameters *****/
|
||||||
|
ExaEvt_GetAndCheckParameters (&Exams,&Exam,&Event);
|
||||||
|
|
||||||
|
/***** Check if I can remove this exam event *****/
|
||||||
|
if (!ExaEvt_CheckIfICanEditThisEvent (&Event))
|
||||||
|
Lay_NoPermissionExit ();
|
||||||
|
|
||||||
|
/***** Hide event *****/
|
||||||
|
DB_QueryUPDATE ("can not hide exam event",
|
||||||
|
"UPDATE exa_events SET Hidden='Y'"
|
||||||
|
" WHERE EvtCod=%ld"
|
||||||
|
" AND ExaCod=%ld", // Extra check
|
||||||
|
Event.EvtCod,Event.ExaCod);
|
||||||
|
|
||||||
|
/***** Show current exam *****/
|
||||||
|
Exa_ShowOnlyOneExam (&Exams,&Exam,
|
||||||
|
false); // Do not put form to start new exam event
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/****************************** Unhide an event ******************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void ExaEvt_UnhideEvent (void)
|
||||||
|
{
|
||||||
|
struct Exa_Exams Exams;
|
||||||
|
struct Exa_Exam Exam;
|
||||||
|
struct ExaEvt_Event Event;
|
||||||
|
|
||||||
|
/***** Reset exams context *****/
|
||||||
|
Exa_ResetExams (&Exams);
|
||||||
|
|
||||||
|
/***** Reset exam and event *****/
|
||||||
|
Exa_ResetExam (&Exam);
|
||||||
|
ExaEvt_ResetEvent (&Event);
|
||||||
|
|
||||||
|
/***** Get and check parameters *****/
|
||||||
|
ExaEvt_GetAndCheckParameters (&Exams,&Exam,&Event);
|
||||||
|
|
||||||
|
/***** Check if I can remove this exam event *****/
|
||||||
|
if (!ExaEvt_CheckIfICanEditThisEvent (&Event))
|
||||||
|
Lay_NoPermissionExit ();
|
||||||
|
|
||||||
|
/***** Unhide event *****/
|
||||||
|
DB_QueryUPDATE ("can not unhide exam event",
|
||||||
|
"UPDATE exa_events SET Hidden='N'",
|
||||||
|
" WHERE EvtCod=%ld"
|
||||||
|
" AND ExaCod=%ld", // Extra check
|
||||||
|
Event.EvtCod,Event.ExaCod);
|
||||||
|
|
||||||
|
/***** Show current exam *****/
|
||||||
|
Exa_ShowOnlyOneExam (&Exams,&Exam,
|
||||||
|
false); // Do not put form to start new exam event
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************** Params used to edit an exam event **********************/
|
/******************** Params used to edit an exam event **********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -56,6 +56,7 @@ struct ExaEvt_Event
|
||||||
long UsrCod;
|
long UsrCod;
|
||||||
time_t TimeUTC[Dat_NUM_START_END_TIME];
|
time_t TimeUTC[Dat_NUM_START_END_TIME];
|
||||||
char Title[Exa_MAX_BYTES_TITLE + 1];
|
char Title[Exa_MAX_BYTES_TITLE + 1];
|
||||||
|
bool Hidden;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
unsigned QstInd; // 0 means that the exam has not started. First question has index 1.
|
unsigned QstInd; // 0 means that the exam has not started. First question has index 1.
|
||||||
|
@ -101,6 +102,9 @@ void ExaEvt_RemoveEventsInExamFromAllTables (long ExaCod);
|
||||||
void ExaEvt_RemoveEventInCourseFromAllTables (long CrsCod);
|
void ExaEvt_RemoveEventInCourseFromAllTables (long CrsCod);
|
||||||
void ExaEvt_RemoveUsrFromEventTablesInCrs (long UsrCod,long CrsCod);
|
void ExaEvt_RemoveUsrFromEventTablesInCrs (long UsrCod,long CrsCod);
|
||||||
|
|
||||||
|
void ExaEvt_HideEvent (void);
|
||||||
|
void ExaEvt_UnhideEvent (void);
|
||||||
|
|
||||||
void ExaEvt_PutParamsEdit (void *Exams);
|
void ExaEvt_PutParamsEdit (void *Exams);
|
||||||
void ExaEvt_GetAndCheckParameters (struct Exa_Exams *Exams,
|
void ExaEvt_GetAndCheckParameters (struct Exa_Exams *Exams,
|
||||||
struct Exa_Exam *Exam,
|
struct Exa_Exam *Exam,
|
||||||
|
|
|
@ -104,12 +104,12 @@ bool FigCch_GetFigureFromCache (FigCch_FigureCached_t Figure,
|
||||||
time_t TimeCached[Hie_NUM_LEVELS] = // Time in seconds
|
time_t TimeCached[Hie_NUM_LEVELS] = // Time in seconds
|
||||||
{
|
{
|
||||||
[Hie_UNK] = (time_t) ( 0), // Unknown
|
[Hie_UNK] = (time_t) ( 0), // Unknown
|
||||||
[Hie_SYS] = (time_t) ( 1UL * 60UL * 60UL), // System
|
[Hie_SYS] = (time_t) (24UL * 60UL * 60UL), // System
|
||||||
[Hie_CTY] = (time_t) ( 30UL * 60UL), // Country
|
[Hie_CTY] = (time_t) (12UL * 60UL * 60UL), // Country
|
||||||
[Hie_INS] = (time_t) ( 15UL * 60UL), // Institution
|
[Hie_INS] = (time_t) ( 6UL * 60UL * 60UL), // Institution
|
||||||
[Hie_CTR] = (time_t) ( 5UL * 60UL), // Centre
|
[Hie_CTR] = (time_t) ( 3UL * 60UL * 60UL), // Centre
|
||||||
[Hie_DEG] = (time_t) ( 60UL), // Degree
|
[Hie_DEG] = (time_t) ( 1UL * 60UL * 60UL), // Degree
|
||||||
[Hie_CRS] = (time_t) ( 10UL), // Course
|
[Hie_CRS] = (time_t) ( 60UL), // Course
|
||||||
};
|
};
|
||||||
static const char *Field[FigCch_NUM_TYPES] =
|
static const char *Field[FigCch_NUM_TYPES] =
|
||||||
{
|
{
|
||||||
|
|
80
swad_match.c
80
swad_match.c
|
@ -253,12 +253,16 @@ long Mch_GetMchCodBeingPlayed (void)
|
||||||
|
|
||||||
void Mch_ResetMatch (struct Mch_Match *Match)
|
void Mch_ResetMatch (struct Mch_Match *Match)
|
||||||
{
|
{
|
||||||
|
Dat_StartEndTime_t StartEndTime;
|
||||||
|
|
||||||
/***** Initialize to empty match *****/
|
/***** Initialize to empty match *****/
|
||||||
Match->MchCod = -1L;
|
Match->MchCod = -1L;
|
||||||
Match->GamCod = -1L;
|
Match->GamCod = -1L;
|
||||||
Match->UsrCod = -1L;
|
Match->UsrCod = -1L;
|
||||||
Match->TimeUTC[Dat_START_TIME] = (time_t) 0;
|
for (StartEndTime = (Dat_StartEndTime_t) 0;
|
||||||
Match->TimeUTC[Dat_END_TIME ] = (time_t) 0;
|
StartEndTime <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1);
|
||||||
|
StartEndTime++)
|
||||||
|
Match->TimeUTC[StartEndTime] = (time_t) 0;
|
||||||
Match->Title[0] = '\0';
|
Match->Title[0] = '\0';
|
||||||
Match->Status.QstInd = 0;
|
Match->Status.QstInd = 0;
|
||||||
Match->Status.QstCod = -1L;
|
Match->Status.QstCod = -1L;
|
||||||
|
@ -379,55 +383,36 @@ void Mch_GetDataOfMatchByCod (struct Mch_Match *Match)
|
||||||
{
|
{
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
unsigned long NumRows;
|
unsigned long NumRows;
|
||||||
Dat_StartEndTime_t StartEndTime;
|
|
||||||
|
|
||||||
/***** Get data of match from database *****/
|
/***** Get data of match from database *****/
|
||||||
NumRows = (unsigned) DB_QuerySELECT (&mysql_res,"can not get matches",
|
NumRows = (unsigned)
|
||||||
"SELECT MchCod," // row[ 0]
|
DB_QuerySELECT (&mysql_res,"can not get matches",
|
||||||
"GamCod," // row[ 1]
|
"SELECT MchCod," // row[ 0]
|
||||||
"UsrCod," // row[ 2]
|
"GamCod," // row[ 1]
|
||||||
"UNIX_TIMESTAMP(StartTime)," // row[ 3]
|
"UsrCod," // row[ 2]
|
||||||
"UNIX_TIMESTAMP(EndTime)," // row[ 4]
|
"UNIX_TIMESTAMP(StartTime),"// row[ 3]
|
||||||
"Title," // row[ 5]
|
"UNIX_TIMESTAMP(EndTime)," // row[ 4]
|
||||||
"QstInd," // row[ 6]
|
"Title," // row[ 5]
|
||||||
"QstCod," // row[ 7]
|
"QstInd," // row[ 6]
|
||||||
"Showing," // row[ 8]
|
"QstCod," // row[ 7]
|
||||||
"Countdown," // row[ 9]
|
"Showing," // row[ 8]
|
||||||
"NumCols," // row[10]
|
"Countdown," // row[ 9]
|
||||||
"ShowQstResults," // row[11]
|
"NumCols," // row[10]
|
||||||
"ShowUsrResults" // row[12]
|
"ShowQstResults," // row[11]
|
||||||
" FROM mch_matches"
|
"ShowUsrResults" // row[12]
|
||||||
" WHERE MchCod=%ld"
|
" FROM mch_matches"
|
||||||
" AND GamCod IN" // Extra check
|
" WHERE MchCod=%ld"
|
||||||
" (SELECT GamCod FROM gam_games"
|
" AND GamCod IN" // Extra check
|
||||||
" WHERE CrsCod='%ld')",
|
" (SELECT GamCod FROM gam_games"
|
||||||
Match->MchCod,
|
" WHERE CrsCod='%ld')",
|
||||||
Gbl.Hierarchy.Crs.CrsCod);
|
Match->MchCod,
|
||||||
|
Gbl.Hierarchy.Crs.CrsCod);
|
||||||
if (NumRows) // Match found...
|
if (NumRows) // Match found...
|
||||||
/***** Get match data from row *****/
|
/* Get match data from row */
|
||||||
Mch_GetMatchDataFromRow (mysql_res,Match);
|
Mch_GetMatchDataFromRow (mysql_res,Match);
|
||||||
else
|
else
|
||||||
{
|
|
||||||
/* Initialize to empty match */
|
/* Initialize to empty match */
|
||||||
Match->MchCod = -1L;
|
Mch_ResetMatch (Match);
|
||||||
Match->GamCod = -1L;
|
|
||||||
Match->UsrCod = -1L;
|
|
||||||
for (StartEndTime = (Dat_StartEndTime_t) 0;
|
|
||||||
StartEndTime <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1);
|
|
||||||
StartEndTime++)
|
|
||||||
Match->TimeUTC[StartEndTime] = (time_t) 0;
|
|
||||||
Match->Title[0] = '\0';
|
|
||||||
Match->Status.QstInd = 0;
|
|
||||||
Match->Status.QstCod = -1L;
|
|
||||||
Match->Status.QstStartTimeUTC = (time_t) 0;
|
|
||||||
Match->Status.Showing = Mch_START;
|
|
||||||
Match->Status.Countdown = -1L;
|
|
||||||
Match->Status.Playing = false;
|
|
||||||
Match->Status.NumPlayers = 0;
|
|
||||||
Match->Status.NumCols = Mch_NUM_COLS_DEFAULT;
|
|
||||||
Match->Status.ShowQstResults = false;
|
|
||||||
Match->Status.ShowUsrResults = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
|
@ -501,7 +486,7 @@ static void Mch_ListOneOrMoreMatches (struct Gam_Games *Games,
|
||||||
|
|
||||||
if (Mch_CheckIfICanPlayThisMatchBasedOnGrps (&Match))
|
if (Mch_CheckIfICanPlayThisMatchBasedOnGrps (&Match))
|
||||||
{
|
{
|
||||||
/***** Write row for this match ****/
|
/***** Begin row for this match ****/
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
/* Icons */
|
/* Icons */
|
||||||
|
@ -525,6 +510,9 @@ static void Mch_ListOneOrMoreMatches (struct Gam_Games *Games,
|
||||||
|
|
||||||
/* Match result visible? */
|
/* Match result visible? */
|
||||||
Mch_ListOneOrMoreMatchesResult (Games,&Match);
|
Mch_ListOneOrMoreMatchesResult (Games,&Match);
|
||||||
|
|
||||||
|
/***** Begin row for this match ****/
|
||||||
|
HTM_TR_Begin (NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10119,6 +10119,48 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
|
||||||
"" // Potrzebujesz tlumaczenie
|
"" // Potrzebujesz tlumaczenie
|
||||||
#elif L==9 // pt
|
#elif L==9 // pt
|
||||||
"" // Precisa de tradução
|
"" // Precisa de tradução
|
||||||
|
#endif
|
||||||
|
,
|
||||||
|
[ActHidExaEvt] =
|
||||||
|
#if L==1 // ca
|
||||||
|
"" // Necessita traducció
|
||||||
|
#elif L==2 // de
|
||||||
|
"" // Need Übersetzung
|
||||||
|
#elif L==3 // en
|
||||||
|
"Hide exam event"
|
||||||
|
#elif L==4 // es
|
||||||
|
"Ocultar evento de examen"
|
||||||
|
#elif L==5 // fr
|
||||||
|
"" // Besoin de traduction
|
||||||
|
#elif L==6 // gn
|
||||||
|
"" // Okoteve traducción
|
||||||
|
#elif L==7 // it
|
||||||
|
"" // Bisogno di traduzione
|
||||||
|
#elif L==8 // pl
|
||||||
|
"" // Potrzebujesz tlumaczenie
|
||||||
|
#elif L==9 // pt
|
||||||
|
"" // Precisa de tradução
|
||||||
|
#endif
|
||||||
|
,
|
||||||
|
[ActShoExaEvt] =
|
||||||
|
#if L==1 // ca
|
||||||
|
"" // Necessita traducció
|
||||||
|
#elif L==2 // de
|
||||||
|
"" // Need Übersetzung
|
||||||
|
#elif L==3 // en
|
||||||
|
"Unhide exam event"
|
||||||
|
#elif L==4 // es
|
||||||
|
"Mostrar evento de examen"
|
||||||
|
#elif L==5 // fr
|
||||||
|
"" // Besoin de traduction
|
||||||
|
#elif L==6 // gn
|
||||||
|
"" // Okoteve traducción
|
||||||
|
#elif L==7 // it
|
||||||
|
"" // Bisogno di traduzione
|
||||||
|
#elif L==8 // pl
|
||||||
|
"" // Potrzebujesz tlumaczenie
|
||||||
|
#elif L==9 // pt
|
||||||
|
"" // Precisa de tradução
|
||||||
#endif
|
#endif
|
||||||
,
|
,
|
||||||
[ActReqNewExaEvt] =
|
[ActReqNewExaEvt] =
|
||||||
|
|
Loading…
Reference in New Issue