Version19.180.1

This commit is contained in:
acanas 2020-04-12 22:52:01 +02:00
parent df628d40b1
commit 63157df70b
4 changed files with 14 additions and 18 deletions

View File

@ -497,7 +497,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 19.180 (2020-04-12)"
#define Log_PLATFORM_VERSION "SWAD 19.180.1 (2020-04-12)"
#define CSS_FILE "swad19.146.css"
#define JS_FILE "swad19.172.1.js"
/*
@ -548,6 +548,7 @@ Funci
// TODO: Oresti Baños: cambiar ojos por candados en descriptores para prohibir/permitir y dejar los ojos para poder elegir descriptores
// TODO: Integrar pull requests con traducciones del alemán del usuario eruedin en GitHub
Version 19.180.1: Apr 12, 2020 Changes in stats of clicks. (285599 lines)
Version 19.180: Apr 12, 2020 Code refactoring in photo of degree. (285603 lines)
Version 19.179: Apr 12, 2020 Code refactoring in indicators. (285582 lines)
Version 19.178: Apr 12, 2020 Code refactoring in statistics. (285569 lines)

View File

@ -992,9 +992,9 @@ void Dat_GetIniEndDatesFromForm (void)
tm.tm_min = 0;
tm.tm_sec = 0;
tm.tm_isdst = -1; // a negative value means that mktime() should
// (use timezone information and system databases to)
// attempt to determine whether DST
// is in effect at the specified time.
// (use timezone information and system databases to)
// attempt to determine whether DST
// is in effect at the specified time.
if ((Gbl.DateRange.TimeUTC[Dat_START_TIME] = mktime (&tm)) < 0)
Gbl.DateRange.TimeUTC[Dat_START_TIME] = (time_t) 0;
tm_ptr = &tm;

View File

@ -1224,6 +1224,7 @@ static void Rep_ShowMyHitsPerYear (bool AnyCourse,long CrsCod,Rol_Role_t Role,
unsigned long NumRows;
unsigned long NumRow;
unsigned ReadYear;
unsigned FirstYear;
unsigned LastYear;
unsigned Year;
@ -1251,7 +1252,7 @@ static void Rep_ShowMyHitsPerYear (bool AnyCourse,long CrsCod,Rol_Role_t Role,
SubQueryRol);
/***** Initialize first year *****/
Gbl.DateRange.DateIni.Date.Year = 1900 + Report->tm_FirstClickTime.tm_year;
FirstYear = 1900 + Report->tm_FirstClickTime.tm_year;
/***** Initialize LastYear *****/
LastYear = Gbl.Now.Date.Year;
@ -1302,8 +1303,8 @@ static void Rep_ShowMyHitsPerYear (bool AnyCourse,long CrsCod,Rol_Role_t Role,
DB_FreeMySQLResult (&mysql_res);
/***** Finally, show the oldest years without clicks *****/
for (Year = LastYear;
Year >= Gbl.DateRange.DateIni.Date.Year;
for (Year = LastYear;
Year >= FirstYear;
Year--)
{
/* Write the year */

View File

@ -456,7 +456,11 @@ void Sta_AskShowGblHits (void)
extern const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY];
extern const char *Txt_Show_hits;
struct Sta_Stats Stats;
Dat_SetHMS SetHMS[Dat_NUM_START_END_TIME];
static const Dat_SetHMS SetHMS[Dat_NUM_START_END_TIME] =
{
[Dat_START_TIME] = Dat_HMS_TO_000000,
[Dat_END_TIME ] = Dat_HMS_TO_235959
};
Sta_Role_t RoleStat;
unsigned RoleStatUnsigned;
Sta_ClicksGroupedBy_t ClicksGroupedBy;
@ -480,16 +484,6 @@ void Sta_AskShowGblHits (void)
Hlp_ANALYTICS_Visits_global_visits,Box_NOT_CLOSABLE,2);
/***** Start and end dates for the search *****/
if (Gbl.Action.Act == ActReqAccCrs)
{
SetHMS[Dat_START_TIME] = Dat_HMS_TO_000000;
SetHMS[Dat_END_TIME ] = Dat_HMS_TO_235959;
}
else
{
SetHMS[Dat_START_TIME] = Dat_HMS_DO_NOT_SET;
SetHMS[Dat_END_TIME ] = Dat_HMS_DO_NOT_SET;
}
Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (SetHMS);
/***** Users' roles whose accesses we want to see *****/