mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-17 05:55:43 +02:00
Version 22.50.1: Oct 19, 2022 Code refactoring related to dates.
This commit is contained in:
parent
bb3ba72121
commit
84c32104d8
|
@ -586,7 +586,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
[ActSeeAsg ] = { 801, 1,TabAss,ActSeeAsg ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Asg_SeeAssignments ,"edit" },
|
[ActSeeAsg ] = { 801, 1,TabAss,ActSeeAsg ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Asg_SeeAssignments ,"edit" },
|
||||||
[ActSeePrj ] = {1674, 2,TabAss,ActSeePrj ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prj_SeeProjects ,"file-invoice" },
|
[ActSeePrj ] = {1674, 2,TabAss,ActSeePrj ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prj_SeeProjects ,"file-invoice" },
|
||||||
[ActSeeAllCfe ] = { 85, 3,TabAss,ActSeeAllCfe ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Cfe_ListCallsForExamsSee ,"bullhorn" },
|
[ActSeeAllCfe ] = { 85, 3,TabAss,ActSeeAllCfe ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Cfe_ListCallsForExamsSee ,"bullhorn" },
|
||||||
[ActEdiTstQst ] = { 104, 4,TabAss,ActEdiTstQst ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDates ,Qst_RequestEditQsts ,"tasks" },
|
[ActEdiTstQst ] = { 104, 4,TabAss,ActEdiTstQst ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDatesToDistantPastToNow ,Qst_RequestEditQsts ,"tasks" },
|
||||||
[ActReqTst ] = { 103, 5,TabAss,ActReqTst ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_RequestTest ,"check" },
|
[ActReqTst ] = { 103, 5,TabAss,ActReqTst ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_RequestTest ,"check" },
|
||||||
[ActSeeAllExa ] = {1848, 6,TabAss,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Exa_SeeAllExams ,"file-signature" },
|
[ActSeeAllExa ] = {1848, 6,TabAss,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Exa_SeeAllExams ,"file-signature" },
|
||||||
[ActSeeAllGam ] = {1649, 7,TabAss,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_SeeAllGames ,"gamepad" },
|
[ActSeeAllGam ] = {1649, 7,TabAss,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_SeeAllGames ,"gamepad" },
|
||||||
|
@ -726,10 +726,10 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
[ActCfgTst ] = { 451,-1,TabUnk,ActReqTst ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TstCfg_CheckAndShowFormConfig ,NULL},
|
[ActCfgTst ] = { 451,-1,TabUnk,ActReqTst ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TstCfg_CheckAndShowFormConfig ,NULL},
|
||||||
[ActRcvCfgTst ] = { 454,-1,TabUnk,ActReqTst ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TstCfg_ReceiveConfigTst ,NULL},
|
[ActRcvCfgTst ] = { 454,-1,TabUnk,ActReqTst ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TstCfg_ReceiveConfigTst ,NULL},
|
||||||
|
|
||||||
[ActReqSeeMyTstRes ] = {1083,-1,TabUnk,ActReqTst ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDates ,TstPrn_SelDatesToSeeMyPrints ,NULL},
|
[ActReqSeeMyTstRes ] = {1083,-1,TabUnk,ActReqTst ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDatesToDistantPastToNow ,TstPrn_SelDatesToSeeMyPrints ,NULL},
|
||||||
[ActSeeMyTstResCrs ] = {1084,-1,TabUnk,ActReqTst ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TstPrn_ShowMyPrints ,NULL},
|
[ActSeeMyTstResCrs ] = {1084,-1,TabUnk,ActReqTst ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TstPrn_ShowMyPrints ,NULL},
|
||||||
[ActSeeOneTstResMe ] = {1085,-1,TabUnk,ActReqTst ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TstPrn_ShowOnePrint ,NULL},
|
[ActSeeOneTstResMe ] = {1085,-1,TabUnk,ActReqTst ,0x208,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TstPrn_ShowOnePrint ,NULL},
|
||||||
[ActReqSeeUsrTstRes ] = {1080,-1,TabUnk,ActReqTst ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDates ,TstPrn_SelUsrsToViewUsrsPrints ,NULL},
|
[ActReqSeeUsrTstRes ] = {1080,-1,TabUnk,ActReqTst ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDatesToDistantPastToNow ,TstPrn_SelUsrsToViewUsrsPrints ,NULL},
|
||||||
[ActSeeUsrTstResCrs ] = {1081,-1,TabUnk,ActReqTst ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TstPrn_GetUsrsAndShowPrints ,NULL},
|
[ActSeeUsrTstResCrs ] = {1081,-1,TabUnk,ActReqTst ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TstPrn_GetUsrsAndShowPrints ,NULL},
|
||||||
[ActSeeOneTstResOth ] = {1082,-1,TabUnk,ActReqTst ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TstPrn_ShowOnePrint ,NULL},
|
[ActSeeOneTstResOth ] = {1082,-1,TabUnk,ActReqTst ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TstPrn_ShowOnePrint ,NULL},
|
||||||
|
|
||||||
|
@ -745,7 +745,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
[ActUnhExa ] = {1884,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Exa_UnhideExam ,NULL},
|
[ActUnhExa ] = {1884,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Exa_UnhideExam ,NULL},
|
||||||
[ActReqLnkExa ] = {1936,-1,TabUnk,ActSeeAllExa ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaRsc_GetLinkToExam ,NULL},
|
[ActReqLnkExa ] = {1936,-1,TabUnk,ActSeeAllExa ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaRsc_GetLinkToExam ,NULL},
|
||||||
|
|
||||||
[ActFrmNewExaSet ] = {1892,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDates ,ExaSet_RequestCreatOrEditSet ,NULL},
|
[ActFrmNewExaSet ] = {1892,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDatesToDistantPastToNow ,ExaSet_RequestCreatOrEditSet ,NULL},
|
||||||
[ActNewExaSet ] = {1898,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaSet_ReceiveFormSet ,NULL},
|
[ActNewExaSet ] = {1898,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaSet_ReceiveFormSet ,NULL},
|
||||||
[ActReqRemExaSet ] = {1893,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaSet_RequestRemoveSet ,NULL},
|
[ActReqRemExaSet ] = {1893,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaSet_RequestRemoveSet ,NULL},
|
||||||
[ActRemExaSet ] = {1894,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaSet_RemoveSet ,NULL},
|
[ActRemExaSet ] = {1894,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaSet_RemoveSet ,NULL},
|
||||||
|
@ -754,7 +754,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
[ActChgTitExaSet ] = {1897,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaSet_ChangeSetTitle ,NULL},
|
[ActChgTitExaSet ] = {1897,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaSet_ChangeSetTitle ,NULL},
|
||||||
[ActChgNumQstExaSet ] = {1899,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaSet_ChangeNumQstsToExam ,NULL},
|
[ActChgNumQstExaSet ] = {1899,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaSet_ChangeNumQstsToExam ,NULL},
|
||||||
|
|
||||||
[ActReqAddQstExaSet ] = {1885,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDates ,ExaSet_ReqSelectQstsToAddToSet ,NULL},
|
[ActReqAddQstExaSet ] = {1885,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDatesToDistantPastToNow ,ExaSet_ReqSelectQstsToAddToSet ,NULL},
|
||||||
[ActLstTstQstForSet ] = {1886,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaSet_ListQstsToAddToSet ,NULL},
|
[ActLstTstQstForSet ] = {1886,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaSet_ListQstsToAddToSet ,NULL},
|
||||||
[ActAddQstToExa ] = {1887,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaSet_AddQstsToSet ,NULL},
|
[ActAddQstToExa ] = {1887,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaSet_AddQstsToSet ,NULL},
|
||||||
[ActReqRemSetQst ] = {1888,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaSet_RequestRemoveQstFromSet ,NULL},
|
[ActReqRemSetQst ] = {1888,-1,TabUnk,ActSeeAllExa ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ExaSet_RequestRemoveQstFromSet ,NULL},
|
||||||
|
@ -834,7 +834,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
[ActRemGam ] = {1657,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RemoveGame ,NULL},
|
[ActRemGam ] = {1657,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RemoveGame ,NULL},
|
||||||
[ActHidGam ] = {1660,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_HideGame ,NULL},
|
[ActHidGam ] = {1660,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_HideGame ,NULL},
|
||||||
[ActUnhGam ] = {1661,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_UnhideGame ,NULL},
|
[ActUnhGam ] = {1661,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_UnhideGame ,NULL},
|
||||||
[ActAddOneGamQst ] = {1662,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDates ,Gam_ReqSelectQstsToAddToGame ,NULL},
|
[ActAddOneGamQst ] = {1662,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDatesToDistantPastToNow ,Gam_ReqSelectQstsToAddToGame ,NULL},
|
||||||
[ActGamLstTstQst ] = {1666,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_ListQstsToAddToGame ,NULL},
|
[ActGamLstTstQst ] = {1666,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_ListQstsToAddToGame ,NULL},
|
||||||
[ActAddTstQstToGam ] = {1667,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_AddQstsToGame ,NULL},
|
[ActAddTstQstToGam ] = {1667,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_AddQstsToGame ,NULL},
|
||||||
[ActReqRemGamQst ] = {1664,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RequestRemoveQstFromGame ,NULL},
|
[ActReqRemGamQst ] = {1664,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RequestRemoveQstFromGame ,NULL},
|
||||||
|
@ -1765,7 +1765,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
[ActReqUseGbl ] = { 761, 0,TabAna,ActReqUseGbl ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Fig_ReqShowFigures ,"chart-pie" },
|
[ActReqUseGbl ] = { 761, 0,TabAna,ActReqUseGbl ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Fig_ReqShowFigures ,"chart-pie" },
|
||||||
[ActSeePhoDeg ] = { 447, 1,TabAna,ActSeePhoDeg ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Pho_ShowPhotoDegree ,"graduation-cap" },
|
[ActSeePhoDeg ] = { 447, 1,TabAna,ActSeePhoDeg ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Pho_ShowPhotoDegree ,"graduation-cap" },
|
||||||
[ActReqStaCrs ] = { 767, 2,TabAna,ActReqStaCrs ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ind_ReqIndicatorsCourses ,"tasks" },
|
[ActReqStaCrs ] = { 767, 2,TabAna,ActReqStaCrs ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ind_ReqIndicatorsCourses ,"tasks" },
|
||||||
[ActReqAccGbl ] = { 591, 3,TabAna,ActReqAccGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,Sta_SetIniEndDates ,Sta_AskShowGblHits ,"chart-line" },
|
[ActReqAccGbl ] = { 591, 3,TabAna,ActReqAccGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDatesToRecentWeeks ,Sta_AskShowGblHits ,"chart-line" },
|
||||||
[ActReqMyUsgRep ] = {1586, 4,TabAna,ActReqMyUsgRep ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rep_ReqMyUsageReport ,"file-alt" },
|
[ActReqMyUsgRep ] = {1586, 4,TabAna,ActReqMyUsgRep ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rep_ReqMyUsageReport ,"file-alt" },
|
||||||
[ActMFUAct ] = { 993, 5,TabAna,ActMFUAct ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,MFU_ShowMyMFUActions ,"heart" },
|
[ActMFUAct ] = { 993, 5,TabAna,ActMFUAct ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,MFU_ShowMyMFUActions ,"heart" },
|
||||||
|
|
||||||
|
@ -1774,7 +1774,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
[ActPrnPhoDeg ] = { 448,-1,TabUnk,ActSeePhoDeg ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Pho_PrintPhotoDegree ,NULL},
|
[ActPrnPhoDeg ] = { 448,-1,TabUnk,ActSeePhoDeg ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Pho_PrintPhotoDegree ,NULL},
|
||||||
[ActCalPhoDeg ] = { 444,-1,TabUnk,ActSeePhoDeg ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Pho_CalcPhotoDegree ,NULL},
|
[ActCalPhoDeg ] = { 444,-1,TabUnk,ActSeePhoDeg ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Pho_CalcPhotoDegree ,NULL},
|
||||||
[ActSeeAccGbl ] = { 79,-1,TabUnk,ActReqAccGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Sta_SeeGblAccesses ,NULL},
|
[ActSeeAccGbl ] = { 79,-1,TabUnk,ActReqAccGbl ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Sta_SeeGblAccesses ,NULL},
|
||||||
[ActReqAccCrs ] = { 594,-1,TabUnk,ActReqAccGbl ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Sta_SetIniEndDates ,Sta_AskShowCrsHits ,NULL},
|
[ActReqAccCrs ] = { 594,-1,TabUnk,ActReqAccGbl ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_SetIniEndDatesToRecentWeeks ,Sta_AskShowCrsHits ,NULL},
|
||||||
[ActSeeAccCrs ] = { 119,-1,TabUnk,ActReqAccGbl ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Sta_SeeCrsAccesses ,NULL},
|
[ActSeeAccCrs ] = { 119,-1,TabUnk,ActReqAccGbl ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Sta_SeeCrsAccesses ,NULL},
|
||||||
[ActSeeAllStaCrs ] = { 768,-1,TabUnk,ActReqAccGbl ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Ind_ShowIndicatorsCourses ,NULL},
|
[ActSeeAllStaCrs ] = { 768,-1,TabUnk,ActReqAccGbl ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Ind_ShowIndicatorsCourses ,NULL},
|
||||||
|
|
||||||
|
|
|
@ -606,10 +606,11 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
|
||||||
|
|
||||||
TODO: Attach pdf files in multimedia.
|
TODO: Attach pdf files in multimedia.
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 22.50 (2022-10-19)"
|
#define Log_PLATFORM_VERSION "SWAD 22.50.1 (2022-10-19)"
|
||||||
#define CSS_FILE "swad22.49.4.css"
|
#define CSS_FILE "swad22.49.4.css"
|
||||||
#define JS_FILE "swad22.49.js"
|
#define JS_FILE "swad22.49.js"
|
||||||
/*
|
/*
|
||||||
|
Version 22.50.1: Oct 19, 2022 Code refactoring related to dates. (333332 lines)
|
||||||
Version 22.50: Oct 19, 2022 Code refactoring related to dates. (333318 lines)
|
Version 22.50: Oct 19, 2022 Code refactoring related to dates. (333318 lines)
|
||||||
Version 22.49.9: Oct 18, 2022 Code refactoring related to XML. (333257 lines)
|
Version 22.49.9: Oct 18, 2022 Code refactoring related to XML. (333257 lines)
|
||||||
Version 22.49.8: Oct 18, 2022 Code refactoring related to parameters. (333253 lines)
|
Version 22.49.8: Oct 18, 2022 Code refactoring related to parameters. (333253 lines)
|
||||||
|
|
117
swad_date.c
117
swad_date.c
|
@ -95,9 +95,14 @@ static struct
|
||||||
struct timeval tvStart;
|
struct timeval tvStart;
|
||||||
struct timeval tvPageCreated;
|
struct timeval tvPageCreated;
|
||||||
time_t StartExecutionTimeUTC;
|
time_t StartExecutionTimeUTC;
|
||||||
struct Dat_DateTime Now;
|
|
||||||
long TimeGenerationInMicroseconds;
|
long TimeGenerationInMicroseconds;
|
||||||
long TimeSendInMicroseconds;
|
long TimeSendInMicroseconds;
|
||||||
|
struct Dat_DateTime Now;
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
struct Dat_DateTime DateTime[Dat_NUM_START_END_TIME]; // TODO: Remove in future versions?
|
||||||
|
time_t TimeUTC[Dat_NUM_START_END_TIME];
|
||||||
|
} Range;
|
||||||
} Dat_Time =
|
} Dat_Time =
|
||||||
{
|
{
|
||||||
.TimeGenerationInMicroseconds = 0L,
|
.TimeGenerationInMicroseconds = 0L,
|
||||||
|
@ -575,6 +580,20 @@ void Dat_ConvDateToDateStr (const struct Dat_Date *Date,char StrDate[Cns_MAX_BYT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/**************************** Get start/end date *****************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
time_t Dat_GetRangeTimeUTC (Dat_StartEndTime_t StartEndTime)
|
||||||
|
{
|
||||||
|
return Dat_Time.Range.TimeUTC[StartEndTime];
|
||||||
|
}
|
||||||
|
|
||||||
|
struct Dat_Date *Dat_GetRangeDate (Dat_StartEndTime_t StartEndTime)
|
||||||
|
{
|
||||||
|
return &Dat_Time.Range.DateTime[StartEndTime].Date;
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*************** Show forms to enter initial and ending dates ****************/
|
/*************** Show forms to enter initial and ending dates ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -596,7 +615,7 @@ void Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (const Dat_SetHMS
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
Dat_WriteFormClientLocalDateTimeFromTimeUTC ("Start",
|
Dat_WriteFormClientLocalDateTimeFromTimeUTC ("Start",
|
||||||
"Start",
|
"Start",
|
||||||
Gbl.DateRange.TimeUTC[Dat_STR_TIME],
|
Dat_Time.Range.TimeUTC[Dat_STR_TIME],
|
||||||
Cfg_LOG_START_YEAR,
|
Cfg_LOG_START_YEAR,
|
||||||
CurrentYear,
|
CurrentYear,
|
||||||
Dat_FORM_SECONDS_ON,
|
Dat_FORM_SECONDS_ON,
|
||||||
|
@ -623,7 +642,7 @@ void Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (const Dat_SetHMS
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
Dat_WriteFormClientLocalDateTimeFromTimeUTC ("End",
|
Dat_WriteFormClientLocalDateTimeFromTimeUTC ("End",
|
||||||
"End",
|
"End",
|
||||||
Gbl.DateRange.TimeUTC[Dat_END_TIME],
|
Dat_Time.Range.TimeUTC[Dat_END_TIME],
|
||||||
Cfg_LOG_START_YEAR,
|
Cfg_LOG_START_YEAR,
|
||||||
CurrentYear,
|
CurrentYear,
|
||||||
Dat_FORM_SECONDS_ON,
|
Dat_FORM_SECONDS_ON,
|
||||||
|
@ -1150,10 +1169,22 @@ void Dat_GetDateFromForm (const char *ParamNameDay,const char *ParamNameMonth,co
|
||||||
/******* Set initial date to distant past and end date to current date *******/
|
/******* Set initial date to distant past and end date to current date *******/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Dat_SetIniEndDates (void)
|
void Dat_SetIniEndDatesToDistantPastToNow (void)
|
||||||
{
|
{
|
||||||
Gbl.DateRange.TimeUTC[Dat_STR_TIME] = (time_t) 0;
|
Dat_Time.Range.TimeUTC[Dat_STR_TIME] = (time_t) 0;
|
||||||
Gbl.DateRange.TimeUTC[Dat_END_TIME] = Dat_GetStartExecutionTimeUTC ();
|
Dat_Time.Range.TimeUTC[Dat_END_TIME] = Dat_GetStartExecutionTimeUTC ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/************ Set end date to current date ************/
|
||||||
|
/************ and set initial date to end date minus several days ************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Dat_SetIniEndDatesToRecentWeeks (void)
|
||||||
|
{
|
||||||
|
Dat_Time.Range.TimeUTC[Dat_END_TIME] = Dat_GetStartExecutionTimeUTC ();
|
||||||
|
Dat_Time.Range.TimeUTC[Dat_STR_TIME] = Dat_Time.Range.TimeUTC[Dat_END_TIME] -
|
||||||
|
((Cfg_DAYS_IN_RECENT_LOG - 1) * 24 * 60 * 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1162,8 +1193,8 @@ void Dat_SetIniEndDates (void)
|
||||||
|
|
||||||
void Dat_WriteParamsIniEndDates (void)
|
void Dat_WriteParamsIniEndDates (void)
|
||||||
{
|
{
|
||||||
Par_PutHiddenParamUnsigned (NULL,"StartTimeUTC",Gbl.DateRange.TimeUTC[Dat_STR_TIME]);
|
Par_PutHiddenParamUnsigned (NULL,"StartTimeUTC",Dat_Time.Range.TimeUTC[Dat_STR_TIME]);
|
||||||
Par_PutHiddenParamUnsigned (NULL,"EndTimeUTC" ,Gbl.DateRange.TimeUTC[Dat_END_TIME]);
|
Par_PutHiddenParamUnsigned (NULL,"EndTimeUTC" ,Dat_Time.Range.TimeUTC[Dat_END_TIME]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1176,11 +1207,11 @@ void Dat_GetIniEndDatesFromForm (void)
|
||||||
struct tm *tm_ptr;
|
struct tm *tm_ptr;
|
||||||
|
|
||||||
/***** Get initial date *****/
|
/***** Get initial date *****/
|
||||||
Gbl.DateRange.TimeUTC[Dat_STR_TIME] = Dat_GetTimeUTCFromForm ("StartTimeUTC");
|
Dat_Time.Range.TimeUTC[Dat_STR_TIME] = Dat_GetTimeUTCFromForm ("StartTimeUTC");
|
||||||
if (Gbl.DateRange.TimeUTC[Dat_STR_TIME])
|
if (Dat_Time.Range.TimeUTC[Dat_STR_TIME])
|
||||||
/* Convert time UTC to a local date */
|
/* Convert time UTC to a local date */
|
||||||
tm_ptr = Dat_GetLocalTimeFromClock (&Gbl.DateRange.TimeUTC[Dat_STR_TIME]);
|
tm_ptr = Dat_GetLocalTimeFromClock (&Dat_Time.Range.TimeUTC[Dat_STR_TIME]);
|
||||||
else // Gbl.DateRange.TimeUTC[Dat_STR_TIME] == 0 ==> initial date not specified
|
else // Dat_Time.Range.TimeUTC[Dat_STR_TIME] == 0 ==> initial date not specified
|
||||||
{
|
{
|
||||||
tm.tm_year = Cfg_LOG_START_YEAR - 1900;
|
tm.tm_year = Cfg_LOG_START_YEAR - 1900;
|
||||||
tm.tm_mon = 0; // January
|
tm.tm_mon = 0; // January
|
||||||
|
@ -1192,32 +1223,32 @@ void Dat_GetIniEndDatesFromForm (void)
|
||||||
// (use timezone information and system databases to)
|
// (use timezone information and system databases to)
|
||||||
// attempt to determine whether DST
|
// attempt to determine whether DST
|
||||||
// is in effect at the specified time.
|
// is in effect at the specified time.
|
||||||
if ((Gbl.DateRange.TimeUTC[Dat_STR_TIME] = mktime (&tm)) < 0)
|
if ((Dat_Time.Range.TimeUTC[Dat_STR_TIME] = mktime (&tm)) < 0)
|
||||||
Gbl.DateRange.TimeUTC[Dat_STR_TIME] = (time_t) 0;
|
Dat_Time.Range.TimeUTC[Dat_STR_TIME] = (time_t) 0;
|
||||||
tm_ptr = &tm;
|
tm_ptr = &tm;
|
||||||
}
|
}
|
||||||
|
|
||||||
Gbl.DateRange.DateIni.Date.Year = tm_ptr->tm_year + 1900;
|
Dat_Time.Range.DateTime[Dat_STR_TIME].Date.Year = tm_ptr->tm_year + 1900;
|
||||||
Gbl.DateRange.DateIni.Date.Month = tm_ptr->tm_mon + 1;
|
Dat_Time.Range.DateTime[Dat_STR_TIME].Date.Month = tm_ptr->tm_mon + 1;
|
||||||
Gbl.DateRange.DateIni.Date.Day = tm_ptr->tm_mday;
|
Dat_Time.Range.DateTime[Dat_STR_TIME].Date.Day = tm_ptr->tm_mday;
|
||||||
Gbl.DateRange.DateIni.Time.Hour = tm_ptr->tm_hour;
|
Dat_Time.Range.DateTime[Dat_STR_TIME].Time.Hour = tm_ptr->tm_hour;
|
||||||
Gbl.DateRange.DateIni.Time.Minute = tm_ptr->tm_min;
|
Dat_Time.Range.DateTime[Dat_STR_TIME].Time.Minute = tm_ptr->tm_min;
|
||||||
Gbl.DateRange.DateIni.Time.Second = tm_ptr->tm_sec;
|
Dat_Time.Range.DateTime[Dat_STR_TIME].Time.Second = tm_ptr->tm_sec;
|
||||||
|
|
||||||
/***** Get end date *****/
|
/***** Get end date *****/
|
||||||
Gbl.DateRange.TimeUTC[Dat_END_TIME] = Dat_GetTimeUTCFromForm ("EndTimeUTC");
|
Dat_Time.Range.TimeUTC[Dat_END_TIME] = Dat_GetTimeUTCFromForm ("EndTimeUTC");
|
||||||
if (Gbl.DateRange.TimeUTC[Dat_END_TIME] == 0) // Gbl.DateRange.TimeUTC[Dat_END_TIME] == 0 ==> end date not specified
|
if (Dat_Time.Range.TimeUTC[Dat_END_TIME] == 0) // Dat_Time.Range.TimeUTC[Dat_END_TIME] == 0 ==> end date not specified
|
||||||
Gbl.DateRange.TimeUTC[Dat_END_TIME] = Dat_GetStartExecutionTimeUTC ();
|
Dat_Time.Range.TimeUTC[Dat_END_TIME] = Dat_GetStartExecutionTimeUTC ();
|
||||||
|
|
||||||
/* Convert current time UTC to a local date */
|
/* Convert current time UTC to a local date */
|
||||||
tm_ptr = Dat_GetLocalTimeFromClock (&Gbl.DateRange.TimeUTC[Dat_END_TIME]);
|
tm_ptr = Dat_GetLocalTimeFromClock (&Dat_Time.Range.TimeUTC[Dat_END_TIME]);
|
||||||
|
|
||||||
Gbl.DateRange.DateEnd.Date.Year = tm_ptr->tm_year + 1900;
|
Dat_Time.Range.DateTime[Dat_END_TIME].Date.Year = tm_ptr->tm_year + 1900;
|
||||||
Gbl.DateRange.DateEnd.Date.Month = tm_ptr->tm_mon + 1;
|
Dat_Time.Range.DateTime[Dat_END_TIME].Date.Month = tm_ptr->tm_mon + 1;
|
||||||
Gbl.DateRange.DateEnd.Date.Day = tm_ptr->tm_mday;
|
Dat_Time.Range.DateTime[Dat_END_TIME].Date.Day = tm_ptr->tm_mday;
|
||||||
Gbl.DateRange.DateEnd.Time.Hour = tm_ptr->tm_hour;
|
Dat_Time.Range.DateTime[Dat_END_TIME].Time.Hour = tm_ptr->tm_hour;
|
||||||
Gbl.DateRange.DateEnd.Time.Minute = tm_ptr->tm_min;
|
Dat_Time.Range.DateTime[Dat_END_TIME].Time.Minute = tm_ptr->tm_min;
|
||||||
Gbl.DateRange.DateEnd.Time.Second = tm_ptr->tm_sec;
|
Dat_Time.Range.DateTime[Dat_END_TIME].Time.Second = tm_ptr->tm_sec;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1377,7 +1408,7 @@ void Dat_GetYearBefore (struct Dat_Date *Date,struct Dat_Date *PrecedingDate)
|
||||||
// If the old date is the day before the new data, return 2
|
// If the old date is the day before the new data, return 2
|
||||||
// ...
|
// ...
|
||||||
|
|
||||||
unsigned Dat_GetNumDaysBetweenDates (struct Dat_Date *DateIni,
|
unsigned Dat_GetNumDaysBetweenDates (struct Dat_Date *DateStr,
|
||||||
struct Dat_Date *DateEnd)
|
struct Dat_Date *DateEnd)
|
||||||
{
|
{
|
||||||
int DiffDays;
|
int DiffDays;
|
||||||
|
@ -1385,12 +1416,12 @@ unsigned Dat_GetNumDaysBetweenDates (struct Dat_Date *DateIni,
|
||||||
|
|
||||||
/***** If initial year is less than end year, return 0
|
/***** If initial year is less than end year, return 0
|
||||||
(actually the difference in days should be negative) *****/
|
(actually the difference in days should be negative) *****/
|
||||||
if (DateIni->Year > DateEnd->Year)
|
if (DateStr->Year > DateEnd->Year)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/***** Initial year is less or equal than end year ==> compute difference in days *****/
|
/***** Initial year is less or equal than end year ==> compute difference in days *****/
|
||||||
DiffDays = (int) Dat_GetDayOfYear (DateEnd) - (int) Dat_GetDayOfYear (DateIni) + 1;
|
DiffDays = (int) Dat_GetDayOfYear (DateEnd) - (int) Dat_GetDayOfYear (DateStr) + 1;
|
||||||
for (Year = DateIni->Year;
|
for (Year = DateStr->Year;
|
||||||
Year < DateEnd->Year;
|
Year < DateEnd->Year;
|
||||||
Year++)
|
Year++)
|
||||||
DiffDays += (int) Dat_GetNumDaysInYear (Year);
|
DiffDays += (int) Dat_GetNumDaysInYear (Year);
|
||||||
|
@ -1403,7 +1434,7 @@ unsigned Dat_GetNumDaysBetweenDates (struct Dat_Date *DateIni,
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
// If the two dates are in the same week, return 1
|
// If the two dates are in the same week, return 1
|
||||||
|
|
||||||
unsigned Dat_GetNumWeeksBetweenDates (struct Dat_Date *DateIni,
|
unsigned Dat_GetNumWeeksBetweenDates (struct Dat_Date *DateStr,
|
||||||
struct Dat_Date *DateEnd)
|
struct Dat_Date *DateEnd)
|
||||||
{
|
{
|
||||||
int DiffWeeks;
|
int DiffWeeks;
|
||||||
|
@ -1411,13 +1442,13 @@ unsigned Dat_GetNumWeeksBetweenDates (struct Dat_Date *DateIni,
|
||||||
|
|
||||||
/***** If initial year is lower than the ending year, return 0
|
/***** If initial year is lower than the ending year, return 0
|
||||||
(actually the difference should be negative) *****/
|
(actually the difference should be negative) *****/
|
||||||
if (DateIni->Year > DateEnd->Year)
|
if (DateStr->Year > DateEnd->Year)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/***** Initial year is lower or equal to ending year ==>
|
/***** Initial year is lower or equal to ending year ==>
|
||||||
compute difference in weeks *****/
|
compute difference in weeks *****/
|
||||||
DiffWeeks = (int) DateEnd->Week - (int) DateIni->Week + 1;
|
DiffWeeks = (int) DateEnd->Week - (int) DateStr->Week + 1;
|
||||||
for (Year = DateIni->Year;
|
for (Year = DateStr->Year;
|
||||||
Year < DateEnd->Year;
|
Year < DateEnd->Year;
|
||||||
Year++)
|
Year++)
|
||||||
DiffWeeks += (int) Dat_GetNumWeeksInYear (Year);
|
DiffWeeks += (int) Dat_GetNumWeeksInYear (Year);
|
||||||
|
@ -1430,14 +1461,14 @@ unsigned Dat_GetNumWeeksBetweenDates (struct Dat_Date *DateIni,
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
// If the two dates are in the same month, return 1
|
// If the two dates are in the same month, return 1
|
||||||
|
|
||||||
unsigned Dat_GetNumMonthsBetweenDates (struct Dat_Date *DateIni,
|
unsigned Dat_GetNumMonthsBetweenDates (struct Dat_Date *DateStr,
|
||||||
struct Dat_Date *DateEnd)
|
struct Dat_Date *DateEnd)
|
||||||
{
|
{
|
||||||
int DiffMonths;
|
int DiffMonths;
|
||||||
|
|
||||||
/***** Compute the difference in months *****/
|
/***** Compute the difference in months *****/
|
||||||
DiffMonths = ((int) DateEnd->Year - (int) DateIni->Year) * 12 +
|
DiffMonths = ((int) DateEnd->Year - (int) DateStr->Year) * 12 +
|
||||||
(int) DateEnd->Month - (int) DateIni->Month + 1;
|
(int) DateEnd->Month - (int) DateStr->Month + 1;
|
||||||
return (DiffMonths > 0) ? (unsigned) DiffMonths :
|
return (DiffMonths > 0) ? (unsigned) DiffMonths :
|
||||||
0;
|
0;
|
||||||
}
|
}
|
||||||
|
@ -1447,13 +1478,13 @@ unsigned Dat_GetNumMonthsBetweenDates (struct Dat_Date *DateIni,
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
// If the two dates are in the same year, return 1
|
// If the two dates are in the same year, return 1
|
||||||
|
|
||||||
unsigned Dat_GetNumYearsBetweenDates (struct Dat_Date *DateIni,
|
unsigned Dat_GetNumYearsBetweenDates (struct Dat_Date *DateStr,
|
||||||
struct Dat_Date *DateEnd)
|
struct Dat_Date *DateEnd)
|
||||||
{
|
{
|
||||||
int DiffYears;
|
int DiffYears;
|
||||||
|
|
||||||
/***** Compute the difference in years *****/
|
/***** Compute the difference in years *****/
|
||||||
DiffYears = (int) DateEnd->Year - (int) DateIni->Year + 1;
|
DiffYears = (int) DateEnd->Year - (int) DateStr->Year + 1;
|
||||||
return (DiffYears > 0) ? (unsigned) DiffYears :
|
return (DiffYears > 0) ? (unsigned) DiffYears :
|
||||||
0;
|
0;
|
||||||
}
|
}
|
||||||
|
|
14
swad_date.h
14
swad_date.h
|
@ -161,6 +161,9 @@ void Dat_ShowClientLocalTime (void);
|
||||||
struct tm *Dat_GetLocalTimeFromClock (const time_t *timep);
|
struct tm *Dat_GetLocalTimeFromClock (const time_t *timep);
|
||||||
void Dat_ConvDateToDateStr (const struct Dat_Date *Date,char StrDate[Cns_MAX_BYTES_DATE + 1]);
|
void Dat_ConvDateToDateStr (const struct Dat_Date *Date,char StrDate[Cns_MAX_BYTES_DATE + 1]);
|
||||||
|
|
||||||
|
time_t Dat_GetRangeTimeUTC (Dat_StartEndTime_t StartEndTime);
|
||||||
|
struct Dat_Date *Dat_GetRangeDate (Dat_StartEndTime_t StartEndTime);
|
||||||
|
|
||||||
void Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (const Dat_SetHMS SetHMS[Dat_NUM_START_END_TIME]);
|
void Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (const Dat_SetHMS SetHMS[Dat_NUM_START_END_TIME]);
|
||||||
void Dat_PutFormStartEndClientLocalDateTimes (const time_t TimeUTC[Dat_NUM_START_END_TIME],
|
void Dat_PutFormStartEndClientLocalDateTimes (const time_t TimeUTC[Dat_NUM_START_END_TIME],
|
||||||
Dat_FormSeconds FormSeconds,
|
Dat_FormSeconds FormSeconds,
|
||||||
|
@ -186,7 +189,8 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
|
||||||
void Dat_GetDateFromForm (const char *ParamNameDay,const char *ParamNameMonth,const char *ParamNameYear,
|
void Dat_GetDateFromForm (const char *ParamNameDay,const char *ParamNameMonth,const char *ParamNameYear,
|
||||||
unsigned *Day,unsigned *Month,unsigned *Year);
|
unsigned *Day,unsigned *Month,unsigned *Year);
|
||||||
|
|
||||||
void Dat_SetIniEndDates (void);
|
void Dat_SetIniEndDatesToDistantPastToNow (void);
|
||||||
|
void Dat_SetIniEndDatesToRecentWeeks (void);
|
||||||
void Dat_WriteParamsIniEndDates (void);
|
void Dat_WriteParamsIniEndDates (void);
|
||||||
void Dat_GetIniEndDatesFromForm (void);
|
void Dat_GetIniEndDatesFromForm (void);
|
||||||
|
|
||||||
|
@ -197,13 +201,13 @@ void Dat_GetDateBefore (struct Dat_Date *Date,struct Dat_Date *PrecedingDate );
|
||||||
void Dat_GetWeekBefore (struct Dat_Date *Date,struct Dat_Date *PrecedingDate );
|
void Dat_GetWeekBefore (struct Dat_Date *Date,struct Dat_Date *PrecedingDate );
|
||||||
void Dat_GetMonthBefore (struct Dat_Date *Date,struct Dat_Date *PrecedingDate );
|
void Dat_GetMonthBefore (struct Dat_Date *Date,struct Dat_Date *PrecedingDate );
|
||||||
void Dat_GetYearBefore (struct Dat_Date *Date,struct Dat_Date *PrecedingDate );
|
void Dat_GetYearBefore (struct Dat_Date *Date,struct Dat_Date *PrecedingDate );
|
||||||
unsigned Dat_GetNumDaysBetweenDates (struct Dat_Date *DateIni,
|
unsigned Dat_GetNumDaysBetweenDates (struct Dat_Date *DateStr,
|
||||||
struct Dat_Date *DateEnd);
|
struct Dat_Date *DateEnd);
|
||||||
unsigned Dat_GetNumWeeksBetweenDates (struct Dat_Date *DateIni,
|
unsigned Dat_GetNumWeeksBetweenDates (struct Dat_Date *DateStr,
|
||||||
struct Dat_Date *DateEnd);
|
struct Dat_Date *DateEnd);
|
||||||
unsigned Dat_GetNumMonthsBetweenDates (struct Dat_Date *DateIni,
|
unsigned Dat_GetNumMonthsBetweenDates (struct Dat_Date *DateStr,
|
||||||
struct Dat_Date *DateEnd);
|
struct Dat_Date *DateEnd);
|
||||||
unsigned Dat_GetNumYearsBetweenDates (struct Dat_Date *DateIni,
|
unsigned Dat_GetNumYearsBetweenDates (struct Dat_Date *DateStr,
|
||||||
struct Dat_Date *DateEnd);
|
struct Dat_Date *DateEnd);
|
||||||
unsigned Dat_GetNumDaysInYear (unsigned Year);
|
unsigned Dat_GetNumDaysInYear (unsigned Year);
|
||||||
unsigned Dat_GetNumDaysFebruary (unsigned Year);
|
unsigned Dat_GetNumDaysFebruary (unsigned Year);
|
||||||
|
|
|
@ -84,13 +84,6 @@ struct Globals
|
||||||
bool HTMLEndWritten; // Used to avoid writing more than once the HTML end
|
bool HTMLEndWritten; // Used to avoid writing more than once the HTML end
|
||||||
} Layout;
|
} Layout;
|
||||||
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
struct Dat_DateTime DateIni; // TODO: Remove in future versions
|
|
||||||
struct Dat_DateTime DateEnd; // TODO: Remove in future versions
|
|
||||||
time_t TimeUTC[Dat_NUM_START_END_TIME];
|
|
||||||
} DateRange; // TODO: Move to swad_date.c
|
|
||||||
|
|
||||||
char IP[Cns_MAX_BYTES_IP + 1];
|
char IP[Cns_MAX_BYTES_IP + 1];
|
||||||
char UniqueNameEncrypted[Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1]; // Used for session id, temporary directory names, etc.
|
char UniqueNameEncrypted[Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1]; // Used for session id, temporary directory names, etc.
|
||||||
|
|
||||||
|
|
|
@ -293,12 +293,12 @@ unsigned Qst_DB_GetQsts (MYSQL_RES **mysql_res,
|
||||||
Str_Concat (Query," AND tst_questions.EditTime>=FROM_UNIXTIME('",
|
Str_Concat (Query," AND tst_questions.EditTime>=FROM_UNIXTIME('",
|
||||||
Qst_MAX_BYTES_QUERY_QUESTIONS);
|
Qst_MAX_BYTES_QUERY_QUESTIONS);
|
||||||
snprintf (LongStr,sizeof (LongStr),"%ld",
|
snprintf (LongStr,sizeof (LongStr),"%ld",
|
||||||
(long) Gbl.DateRange.TimeUTC[Dat_STR_TIME]);
|
(long) Dat_GetRangeTimeUTC (Dat_STR_TIME));
|
||||||
Str_Concat (Query,LongStr,Qst_MAX_BYTES_QUERY_QUESTIONS);
|
Str_Concat (Query,LongStr,Qst_MAX_BYTES_QUERY_QUESTIONS);
|
||||||
Str_Concat (Query,"') AND tst_questions.EditTime<=FROM_UNIXTIME('",
|
Str_Concat (Query,"') AND tst_questions.EditTime<=FROM_UNIXTIME('",
|
||||||
Qst_MAX_BYTES_QUERY_QUESTIONS);
|
Qst_MAX_BYTES_QUERY_QUESTIONS);
|
||||||
snprintf (LongStr,sizeof (LongStr),"%ld",
|
snprintf (LongStr,sizeof (LongStr),"%ld",
|
||||||
(long) Gbl.DateRange.TimeUTC[Dat_END_TIME]);
|
(long) Dat_GetRangeTimeUTC (Dat_END_TIME));
|
||||||
Str_Concat (Query,LongStr,Qst_MAX_BYTES_QUERY_QUESTIONS);
|
Str_Concat (Query,LongStr,Qst_MAX_BYTES_QUERY_QUESTIONS);
|
||||||
Str_Concat (Query,"')",Qst_MAX_BYTES_QUERY_QUESTIONS);
|
Str_Concat (Query,"')",Qst_MAX_BYTES_QUERY_QUESTIONS);
|
||||||
|
|
||||||
|
|
|
@ -2488,14 +2488,14 @@ void Rec_PutParamUsrCodEncrypted (__attribute__((unused)) void *Args)
|
||||||
|
|
||||||
static void Rec_PutParamsMyTsts (__attribute__((unused)) void *Args)
|
static void Rec_PutParamsMyTsts (__attribute__((unused)) void *Args)
|
||||||
{
|
{
|
||||||
Dat_SetIniEndDates ();
|
Dat_SetIniEndDatesToDistantPastToNow ();
|
||||||
Dat_WriteParamsIniEndDates ();
|
Dat_WriteParamsIniEndDates ();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Rec_PutParamsStdTsts (__attribute__((unused)) void *Args)
|
static void Rec_PutParamsStdTsts (__attribute__((unused)) void *Args)
|
||||||
{
|
{
|
||||||
Rec_PutParamsStudent (NULL);
|
Rec_PutParamsStudent (NULL);
|
||||||
Dat_SetIniEndDates ();
|
Dat_SetIniEndDatesToDistantPastToNow ();
|
||||||
Dat_WriteParamsIniEndDates ();
|
Dat_WriteParamsIniEndDates ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -718,17 +718,6 @@ static void Sta_WriteSelectorAction (const struct Sta_Stats *Stats)
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/************ Set end date to current date ************/
|
|
||||||
/************ and set initial date to end date minus several days ************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
void Sta_SetIniEndDates (void)
|
|
||||||
{
|
|
||||||
Gbl.DateRange.TimeUTC[Dat_END_TIME] = Dat_GetStartExecutionTimeUTC ();
|
|
||||||
Gbl.DateRange.TimeUTC[Dat_STR_TIME] = Gbl.DateRange.TimeUTC[Dat_END_TIME] - ((Cfg_DAYS_IN_RECENT_LOG - 1) * 24 * 60 * 60);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************** Compute and show access statistics *********************/
|
/******************** Compute and show access statistics *********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -782,7 +771,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
||||||
/***** Set table where to find depending on initial date *****/
|
/***** Set table where to find depending on initial date *****/
|
||||||
/* If initial day is older than current day minus Cfg_DAYS_IN_RECENT_LOG,
|
/* If initial day is older than current day minus Cfg_DAYS_IN_RECENT_LOG,
|
||||||
then use recent log table, else use historic log table */
|
then use recent log table, else use historic log table */
|
||||||
LogTable = (Dat_GetNumDaysBetweenDates (&Gbl.DateRange.DateIni.Date,
|
LogTable = (Dat_GetNumDaysBetweenDates (Dat_GetRangeDate (Dat_STR_TIME),
|
||||||
Dat_GetCurrentDate ())
|
Dat_GetCurrentDate ())
|
||||||
<= Cfg_DAYS_IN_RECENT_LOG) ? "log_recent" :
|
<= Cfg_DAYS_IN_RECENT_LOG) ? "log_recent" :
|
||||||
"log";
|
"log";
|
||||||
|
@ -905,8 +894,8 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Check if range of dates is forbidden for me *****/
|
/***** Check if range of dates is forbidden for me *****/
|
||||||
NumDays = Dat_GetNumDaysBetweenDates (&Gbl.DateRange.DateIni.Date,
|
NumDays = Dat_GetNumDaysBetweenDates (Dat_GetRangeDate (Dat_STR_TIME),
|
||||||
&Gbl.DateRange.DateEnd.Date);
|
Dat_GetRangeDate (Dat_END_TIME));
|
||||||
ICanQueryWholeRange = (Gbl.Usrs.Me.Role.Logged >= Rol_TCH && Stats.GlobalOrCourse == Sta_SHOW_COURSE_ACCESSES) ||
|
ICanQueryWholeRange = (Gbl.Usrs.Me.Role.Logged >= Rol_TCH && Stats.GlobalOrCourse == Sta_SHOW_COURSE_ACCESSES) ||
|
||||||
(Gbl.Usrs.Me.Role.Logged == Rol_TCH && Gbl.Scope.Current == HieLvl_CRS) ||
|
(Gbl.Usrs.Me.Role.Logged == Rol_TCH && Gbl.Scope.Current == HieLvl_CRS) ||
|
||||||
(Gbl.Usrs.Me.Role.Logged == Rol_DEG_ADM && (Gbl.Scope.Current == HieLvl_DEG ||
|
(Gbl.Usrs.Me.Role.Logged == Rol_DEG_ADM && (Gbl.Scope.Current == HieLvl_DEG ||
|
||||||
|
@ -1456,7 +1445,7 @@ static void Sta_ShowNumHitsPerDay (Sta_CountType_t CountType,
|
||||||
char StrDate[Cns_MAX_BYTES_DATE + 1];
|
char StrDate[Cns_MAX_BYTES_DATE + 1];
|
||||||
|
|
||||||
/***** Initialize LastDate *****/
|
/***** Initialize LastDate *****/
|
||||||
Dat_AssignDate (&LastDate,&Gbl.DateRange.DateEnd.Date);
|
Dat_AssignDate (&LastDate,Dat_GetRangeDate (Dat_END_TIME));
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Write heading *****/
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
@ -1527,7 +1516,7 @@ static void Sta_ShowNumHitsPerDay (Sta_CountType_t CountType,
|
||||||
}
|
}
|
||||||
Dat_AssignDate (&LastDate,&Date);
|
Dat_AssignDate (&LastDate,&Date);
|
||||||
}
|
}
|
||||||
NumDaysFromLastDateToCurrDate = Dat_GetNumDaysBetweenDates (&Gbl.DateRange.DateIni.Date,
|
NumDaysFromLastDateToCurrDate = Dat_GetNumDaysBetweenDates (Dat_GetRangeDate (Dat_STR_TIME),
|
||||||
&LastDate);
|
&LastDate);
|
||||||
|
|
||||||
/***** Finally NumDaysFromLastDateToCurrDate days are shown with 0 clicks
|
/***** Finally NumDaysFromLastDateToCurrDate days are shown with 0 clicks
|
||||||
|
@ -1649,7 +1638,7 @@ static void Sta_ShowDistrAccessesPerDayAndHour (const struct Sta_Stats *Stats,
|
||||||
Sta_ComputeMaxAndTotalHits (&Hits,NumHits,mysql_res,2,1);
|
Sta_ComputeMaxAndTotalHits (&Hits,NumHits,mysql_res,2,1);
|
||||||
|
|
||||||
/***** Initialize LastDate *****/
|
/***** Initialize LastDate *****/
|
||||||
Dat_AssignDate (&LastDate,&Gbl.DateRange.DateEnd.Date);
|
Dat_AssignDate (&LastDate,Dat_GetRangeDate (Dat_END_TIME));
|
||||||
|
|
||||||
/***** Reset number of pages generated per hour *****/
|
/***** Reset number of pages generated per hour *****/
|
||||||
for (Hour = 0;
|
for (Hour = 0;
|
||||||
|
@ -1811,7 +1800,7 @@ static void Sta_ShowDistrAccessesPerDayAndHour (const struct Sta_Stats *Stats,
|
||||||
/***** Finally NumDaysFromLastDateToCurrDate days are shown with 0 clicks
|
/***** Finally NumDaysFromLastDateToCurrDate days are shown with 0 clicks
|
||||||
(the oldest days since the initial day requested by the user until the first with clicks) *****/
|
(the oldest days since the initial day requested by the user until the first with clicks) *****/
|
||||||
Dat_AssignDate (&LastDate,&Date);
|
Dat_AssignDate (&LastDate,&Date);
|
||||||
NumDaysFromLastDateToCurrDate = Dat_GetNumDaysBetweenDates (&Gbl.DateRange.DateIni.Date,
|
NumDaysFromLastDateToCurrDate = Dat_GetNumDaysBetweenDates (Dat_GetRangeDate (Dat_STR_TIME),
|
||||||
&LastDate);
|
&LastDate);
|
||||||
for (D = 1;
|
for (D = 1;
|
||||||
D <= NumDaysFromLastDateToCurrDate;
|
D <= NumDaysFromLastDateToCurrDate;
|
||||||
|
@ -2062,8 +2051,8 @@ static void Sta_ShowNumHitsPerWeek (Sta_CountType_t CountType,
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
|
|
||||||
/***** Initialize LastDate to avoid warning *****/
|
/***** Initialize LastDate to avoid warning *****/
|
||||||
Dat_CalculateWeekOfYear (&Gbl.DateRange.DateEnd.Date); // Changes Week and Year
|
Dat_CalculateWeekOfYear (Dat_GetRangeDate (Dat_END_TIME)); // Changes Week and Year
|
||||||
Dat_AssignDate (&LastDate,&Gbl.DateRange.DateEnd.Date);
|
Dat_AssignDate (&LastDate,Dat_GetRangeDate (Dat_END_TIME));
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Write heading *****/
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
@ -2117,8 +2106,8 @@ static void Sta_ShowNumHitsPerWeek (Sta_CountType_t CountType,
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Finally, show the old weeks without pages generated *****/
|
/***** Finally, show the old weeks without pages generated *****/
|
||||||
Dat_CalculateWeekOfYear (&Gbl.DateRange.DateIni.Date); // Changes Week and Year
|
Dat_CalculateWeekOfYear (Dat_GetRangeDate (Dat_STR_TIME)); // Changes Week and Year
|
||||||
NumWeeksBetweenLastDateAndCurDate = Dat_GetNumWeeksBetweenDates (&Gbl.DateRange.DateIni.Date,
|
NumWeeksBetweenLastDateAndCurDate = Dat_GetNumWeeksBetweenDates (Dat_GetRangeDate (Dat_STR_TIME),
|
||||||
&LastDate);
|
&LastDate);
|
||||||
for (W = 1;
|
for (W = 1;
|
||||||
W <= NumWeeksBetweenLastDateAndCurDate;
|
W <= NumWeeksBetweenLastDateAndCurDate;
|
||||||
|
@ -2162,7 +2151,7 @@ static void Sta_ShowNumHitsPerMonth (Sta_CountType_t CountType,
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
|
|
||||||
/***** Initialize LastDate *****/
|
/***** Initialize LastDate *****/
|
||||||
Dat_AssignDate (&LastDate,&Gbl.DateRange.DateEnd.Date);
|
Dat_AssignDate (&LastDate,Dat_GetRangeDate (Dat_END_TIME));
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Write heading *****/
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
@ -2217,7 +2206,7 @@ static void Sta_ShowNumHitsPerMonth (Sta_CountType_t CountType,
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Finally, show the oldest months without clicks *****/
|
/***** Finally, show the oldest months without clicks *****/
|
||||||
NumMonthsBetweenLastDateAndCurDate = Dat_GetNumMonthsBetweenDates (&Gbl.DateRange.DateIni.Date,
|
NumMonthsBetweenLastDateAndCurDate = Dat_GetNumMonthsBetweenDates (Dat_GetRangeDate (Dat_STR_TIME),
|
||||||
&LastDate);
|
&LastDate);
|
||||||
for (M = 1;
|
for (M = 1;
|
||||||
M <= NumMonthsBetweenLastDateAndCurDate;
|
M <= NumMonthsBetweenLastDateAndCurDate;
|
||||||
|
@ -2261,7 +2250,7 @@ static void Sta_ShowNumHitsPerYear (Sta_CountType_t CountType,
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
|
|
||||||
/***** Initialize LastDate *****/
|
/***** Initialize LastDate *****/
|
||||||
Dat_AssignDate (&LastDate,&Gbl.DateRange.DateEnd.Date);
|
Dat_AssignDate (&LastDate,Dat_GetRangeDate (Dat_END_TIME));
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Write heading *****/
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
@ -2316,7 +2305,7 @@ static void Sta_ShowNumHitsPerYear (Sta_CountType_t CountType,
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Finally, show the oldest years without clicks *****/
|
/***** Finally, show the oldest years without clicks *****/
|
||||||
NumYearsBetweenLastDateAndCurDate = Dat_GetNumYearsBetweenDates (&Gbl.DateRange.DateIni.Date,
|
NumYearsBetweenLastDateAndCurDate = Dat_GetNumYearsBetweenDates (Dat_GetRangeDate (Dat_STR_TIME),
|
||||||
&LastDate);
|
&LastDate);
|
||||||
for (Y = 1;
|
for (Y = 1;
|
||||||
Y <= NumYearsBetweenLastDateAndCurDate;
|
Y <= NumYearsBetweenLastDateAndCurDate;
|
||||||
|
@ -2359,8 +2348,8 @@ static void Sta_ShowNumHitsPerHour (unsigned NumHits,
|
||||||
unsigned ColumnWidth;
|
unsigned ColumnWidth;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
|
|
||||||
if ((NumDays = Dat_GetNumDaysBetweenDates (&Gbl.DateRange.DateIni.Date,
|
if ((NumDays = Dat_GetNumDaysBetweenDates (Dat_GetRangeDate (Dat_STR_TIME),
|
||||||
&Gbl.DateRange.DateEnd.Date)))
|
Dat_GetRangeDate (Dat_END_TIME))))
|
||||||
{
|
{
|
||||||
/***** Compute maximum number of pages generated per hour *****/
|
/***** Compute maximum number of pages generated per hour *****/
|
||||||
Sta_ComputeMaxAndTotalHits (&Hits,NumHits,mysql_res,1,NumDays);
|
Sta_ComputeMaxAndTotalHits (&Hits,NumHits,mysql_res,1,NumDays);
|
||||||
|
@ -2470,8 +2459,8 @@ static void Sta_ShowNumHitsPerMinute (unsigned NumHits,MYSQL_RES *mysql_res)
|
||||||
double IncX;
|
double IncX;
|
||||||
char *Format;
|
char *Format;
|
||||||
|
|
||||||
if ((NumDays = Dat_GetNumDaysBetweenDates (&Gbl.DateRange.DateIni.Date,
|
if ((NumDays = Dat_GetNumDaysBetweenDates (Dat_GetRangeDate (Dat_STR_TIME),
|
||||||
&Gbl.DateRange.DateEnd.Date)))
|
Dat_GetRangeDate (Dat_END_TIME))))
|
||||||
{
|
{
|
||||||
/***** Compute number of clicks (and máximo) in every minute *****/
|
/***** Compute number of clicks (and máximo) in every minute *****/
|
||||||
Hits.Max = 0.0;
|
Hits.Max = 0.0;
|
||||||
|
|
|
@ -158,7 +158,7 @@ void Sta_AskShowCrsHits (void);
|
||||||
void Sta_AskShowGblHits (void);
|
void Sta_AskShowGblHits (void);
|
||||||
void Sta_PutLinkToCourseHits (void);
|
void Sta_PutLinkToCourseHits (void);
|
||||||
void Sta_PutLinkToGlobalHits (void);
|
void Sta_PutLinkToGlobalHits (void);
|
||||||
void Sta_SetIniEndDates (void);
|
|
||||||
void Sta_SeeGblAccesses (void);
|
void Sta_SeeGblAccesses (void);
|
||||||
void Sta_SeeCrsAccesses (void);
|
void Sta_SeeCrsAccesses (void);
|
||||||
|
|
||||||
|
|
|
@ -266,8 +266,8 @@ unsigned Sta_DB_GetHits (MYSQL_RES **mysql_res,
|
||||||
" BETWEEN FROM_UNIXTIME(%ld)"
|
" BETWEEN FROM_UNIXTIME(%ld)"
|
||||||
" AND FROM_UNIXTIME(%ld)",
|
" AND FROM_UNIXTIME(%ld)",
|
||||||
LogTable,
|
LogTable,
|
||||||
(long) Gbl.DateRange.TimeUTC[Dat_STR_TIME],
|
(long) Dat_GetRangeTimeUTC (Dat_STR_TIME),
|
||||||
(long) Gbl.DateRange.TimeUTC[Dat_END_TIME]);
|
(long) Dat_GetRangeTimeUTC (Dat_END_TIME));
|
||||||
Str_Concat (Query,SubQuery,Sta_DB_MAX_BYTES_QUERY);
|
Str_Concat (Query,SubQuery,Sta_DB_MAX_BYTES_QUERY);
|
||||||
|
|
||||||
switch (Stats->GlobalOrCourse)
|
switch (Stats->GlobalOrCourse)
|
||||||
|
|
|
@ -289,8 +289,8 @@ unsigned Tst_DB_GetUsrPrintsInCurrentCrs (MYSQL_RES **mysql_res,long UsrCod)
|
||||||
" ORDER BY ExaCod",
|
" ORDER BY ExaCod",
|
||||||
Gbl.Hierarchy.Crs.CrsCod,
|
Gbl.Hierarchy.Crs.CrsCod,
|
||||||
UsrCod,
|
UsrCod,
|
||||||
(long) Gbl.DateRange.TimeUTC[Dat_STR_TIME],
|
(long) Dat_GetRangeTimeUTC (Dat_STR_TIME),
|
||||||
(long) Gbl.DateRange.TimeUTC[Dat_END_TIME]);
|
(long) Dat_GetRangeTimeUTC (Dat_END_TIME));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user