mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-03 15:25:22 +02:00
Version 18.1
This commit is contained in:
parent
e7da37b8b3
commit
a252d31dce
|
@ -1,12 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<project>
|
||||
|
||||
<configuration id="cdt.managedbuild.toolchain.gnu.base.1290182859" name="Default">
|
||||
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="(gcc)|([gc]\+\+)|(clang)" prefer-non-shared="true"/>
|
||||
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" ref="shared-provider"/>
|
||||
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
|
||||
</extension>
|
||||
|
||||
</configuration>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -340,7 +340,7 @@ Buenos d
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.0 (2018-10-04)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.1 (2018-10-07)"
|
||||
#define CSS_FILE "swad17.25.4.css"
|
||||
#define JS_FILE "swad17.17.1.js"
|
||||
|
||||
|
@ -359,6 +359,7 @@ En OpenSWAD:
|
|||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
/*
|
||||
Version 18.1: Oct 07, 2018 New statistics grouped per year. (234943 lines)
|
||||
Version 18.0.1: Oct 04, 2018 My courses are highlighted in listing of courses of current degree. (234738 lines)
|
||||
Version 18.0: Oct 04, 2018 New version of fotomaton, programmed by Daniel Calandria and Jesús Mesa.
|
||||
Changes in code to avoid new warnings with GCC 7.3. (234736 lines)
|
||||
|
|
99
swad_date.c
99
swad_date.c
|
@ -1009,37 +1009,7 @@ void Dat_WriteRFC822DateFromTM (FILE *File,struct tm *tm_ptr)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Compute the preceding date of a given date *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Dat_GetDateBefore (struct Date *Date,struct Date *PrecedingDate)
|
||||
{
|
||||
if (Date->Day == 1)
|
||||
{
|
||||
if (Date->Month == 1)
|
||||
{
|
||||
PrecedingDate->Year = Date->Year - 1;
|
||||
PrecedingDate->Month = 12;
|
||||
PrecedingDate->Day = 31;
|
||||
}
|
||||
else
|
||||
{
|
||||
PrecedingDate->Year = Date->Year;
|
||||
PrecedingDate->Month = Date->Month - 1;
|
||||
PrecedingDate->Day = (PrecedingDate->Month == 2) ? Dat_GetNumDaysFebruary (PrecedingDate->Year) :
|
||||
Dat_NumDaysMonth[PrecedingDate->Month];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PrecedingDate->Year = Date->Year;
|
||||
PrecedingDate->Month = Date->Month;
|
||||
PrecedingDate->Day = Date->Day - 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Compute the preceding date of a given date *******************/
|
||||
/************** Compute the subsequent date of a given date ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Dat_GetDateAfter (struct Date *Date,struct Date *SubsequentDate)
|
||||
|
@ -1070,6 +1040,36 @@ void Dat_GetDateAfter (struct Date *Date,struct Date *SubsequentDate)
|
|||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Compute the preceding date of a given date *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Dat_GetDateBefore (struct Date *Date,struct Date *PrecedingDate)
|
||||
{
|
||||
if (Date->Day == 1)
|
||||
{
|
||||
if (Date->Month == 1)
|
||||
{
|
||||
PrecedingDate->Year = Date->Year - 1;
|
||||
PrecedingDate->Month = 12;
|
||||
PrecedingDate->Day = 31;
|
||||
}
|
||||
else
|
||||
{
|
||||
PrecedingDate->Year = Date->Year;
|
||||
PrecedingDate->Month = Date->Month - 1;
|
||||
PrecedingDate->Day = (PrecedingDate->Month == 2) ? Dat_GetNumDaysFebruary (PrecedingDate->Year) :
|
||||
Dat_NumDaysMonth[PrecedingDate->Month];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PrecedingDate->Year = Date->Year;
|
||||
PrecedingDate->Month = Date->Month;
|
||||
PrecedingDate->Day = Date->Day - 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Compute the week before to a given week ********************/
|
||||
/*****************************************************************************/
|
||||
|
@ -1106,6 +1106,15 @@ void Dat_GetMonthBefore (struct Date *Date,struct Date *PrecedingDate)
|
|||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Compute the year before to a given year ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Dat_GetYearBefore (struct Date *Date,struct Date *PrecedingDate)
|
||||
{
|
||||
PrecedingDate->Year = Date->Year - 1;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Compute the number of days beteen two dates ******************/
|
||||
/*****************************************************************************/
|
||||
|
@ -1113,7 +1122,8 @@ void Dat_GetMonthBefore (struct Date *Date,struct Date *PrecedingDate)
|
|||
// If the old date is the day before the new data, return 2
|
||||
// ...
|
||||
|
||||
unsigned Dat_GetNumDaysBetweenDates (struct Date *DateIni,struct Date *DateEnd)
|
||||
unsigned Dat_GetNumDaysBetweenDates (struct Date *DateIni,
|
||||
struct Date *DateEnd)
|
||||
{
|
||||
int DiffDays;
|
||||
unsigned Year;
|
||||
|
@ -1138,7 +1148,8 @@ unsigned Dat_GetNumDaysBetweenDates (struct Date *DateIni,struct Date *DateEnd)
|
|||
/*****************************************************************************/
|
||||
// If the two dates are in the same week, return 1
|
||||
|
||||
unsigned Dat_GetNumWeeksBetweenDates (struct Date *DateIni,struct Date *DateEnd)
|
||||
unsigned Dat_GetNumWeeksBetweenDates (struct Date *DateIni,
|
||||
struct Date *DateEnd)
|
||||
{
|
||||
int DiffWeeks;
|
||||
unsigned Year;
|
||||
|
@ -1148,7 +1159,8 @@ unsigned Dat_GetNumWeeksBetweenDates (struct Date *DateIni,struct Date *DateEnd)
|
|||
if (DateIni->Year > DateEnd->Year)
|
||||
return 0;
|
||||
|
||||
/***** Initial year is lower or equal to ending year ==> compute difference in weeks *****/
|
||||
/***** Initial year is lower or equal to ending year ==>
|
||||
compute difference in weeks *****/
|
||||
DiffWeeks = (int) DateEnd->Week - (int) DateIni->Week + 1;
|
||||
for (Year = DateIni->Year;
|
||||
Year < DateEnd->Year;
|
||||
|
@ -1163,7 +1175,8 @@ unsigned Dat_GetNumWeeksBetweenDates (struct Date *DateIni,struct Date *DateEnd)
|
|||
/*****************************************************************************/
|
||||
// If the two dates are in the same month, return 1
|
||||
|
||||
unsigned Dat_GetNumMonthsBetweenDates (struct Date *DateIni,struct Date *DateEnd)
|
||||
unsigned Dat_GetNumMonthsBetweenDates (struct Date *DateIni,
|
||||
struct Date *DateEnd)
|
||||
{
|
||||
int DiffMonths;
|
||||
|
||||
|
@ -1174,6 +1187,22 @@ unsigned Dat_GetNumMonthsBetweenDates (struct Date *DateIni,struct Date *DateEnd
|
|||
0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Compute the number of years between two dates ****************/
|
||||
/*****************************************************************************/
|
||||
// If the two dates are in the same year, return 1
|
||||
|
||||
unsigned Dat_GetNumYearsBetweenDates (struct Date *DateIni,
|
||||
struct Date *DateEnd)
|
||||
{
|
||||
int DiffYears;
|
||||
|
||||
/***** Compute the difference in years *****/
|
||||
DiffYears = (int) DateEnd->Year - (int) DateIni->Year + 1;
|
||||
return (DiffYears > 0) ? (unsigned) DiffYears :
|
||||
0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************** Compute the number of days in a given year ******************/
|
||||
/*****************************************************************************/
|
||||
|
|
18
swad_date.h
18
swad_date.h
|
@ -162,13 +162,19 @@ void Dat_GetIniEndDatesFromForm (void);
|
|||
|
||||
void Dat_WriteRFC822DateFromTM (FILE *File,struct tm *tm);
|
||||
|
||||
void Dat_GetDateBefore (struct Date *Date,struct Date *PrecedingDate);
|
||||
void Dat_GetDateAfter (struct Date *Date,struct Date *SubsequentDate);
|
||||
void Dat_GetWeekBefore (struct Date *Date,struct Date *PrecedingDate);
|
||||
void Dat_GetMonthBefore (struct Date *Date,struct Date *PrecedingDate);
|
||||
unsigned Dat_GetNumDaysBetweenDates (struct Date *DateIni,struct Date *DateEnd);
|
||||
unsigned Dat_GetNumWeeksBetweenDates (struct Date *DateIni,struct Date *DateEnd);
|
||||
unsigned Dat_GetNumMonthsBetweenDates (struct Date *DateIni,struct Date *DateEnd);
|
||||
void Dat_GetDateBefore (struct Date *Date,struct Date *PrecedingDate );
|
||||
void Dat_GetWeekBefore (struct Date *Date,struct Date *PrecedingDate );
|
||||
void Dat_GetMonthBefore (struct Date *Date,struct Date *PrecedingDate );
|
||||
void Dat_GetYearBefore (struct Date *Date,struct Date *PrecedingDate );
|
||||
unsigned Dat_GetNumDaysBetweenDates (struct Date *DateIni,
|
||||
struct Date *DateEnd);
|
||||
unsigned Dat_GetNumWeeksBetweenDates (struct Date *DateIni,
|
||||
struct Date *DateEnd);
|
||||
unsigned Dat_GetNumMonthsBetweenDates (struct Date *DateIni,
|
||||
struct Date *DateEnd);
|
||||
unsigned Dat_GetNumYearsBetweenDates (struct Date *DateIni,
|
||||
struct Date *DateEnd);
|
||||
unsigned Dat_GetNumDaysInYear (unsigned Year);
|
||||
unsigned Dat_GetNumDaysFebruary (unsigned Year);
|
||||
bool Dat_GetIfLeapYear (unsigned Year);
|
||||
|
|
293
swad_statistic.c
293
swad_statistic.c
|
@ -74,23 +74,25 @@ const unsigned Sta_CellPadding[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
2, // Sta_CLICKS_CRS_DETAILED_LIST
|
||||
|
||||
1, // Sta_CLICKS_CRS_PER_USR
|
||||
1, // Sta_CLICKS_CRS_PER_DAYS
|
||||
0, // Sta_CLICKS_CRS_PER_DAYS_AND_HOUR
|
||||
1, // Sta_CLICKS_CRS_PER_WEEKS
|
||||
1, // Sta_CLICKS_CRS_PER_MONTHS
|
||||
1, // Sta_CLICKS_CRS_PER_DAY
|
||||
0, // Sta_CLICKS_CRS_PER_DAY_AND_HOUR
|
||||
1, // Sta_CLICKS_CRS_PER_WEEK
|
||||
1, // Sta_CLICKS_CRS_PER_MONTH
|
||||
1, // Sta_CLICKS_CRS_PER_YEAR
|
||||
1, // Sta_CLICKS_CRS_PER_HOUR
|
||||
0, // Sta_CLICKS_CRS_PER_MINUTE
|
||||
1, // Sta_CLICKS_CRS_PER_ACTION
|
||||
|
||||
1, // Sta_CLICKS_GBL_PER_DAYS
|
||||
0, // Sta_CLICKS_GBL_PER_DAYS_AND_HOUR
|
||||
1, // Sta_CLICKS_GBL_PER_WEEKS
|
||||
1, // Sta_CLICKS_GBL_PER_MONTHS
|
||||
1, // Sta_CLICKS_GBL_PER_DAY
|
||||
0, // Sta_CLICKS_GBL_PER_DAY_AND_HOUR
|
||||
1, // Sta_CLICKS_GBL_PER_WEEK
|
||||
1, // Sta_CLICKS_GBL_PER_MONTH
|
||||
1, // Sta_CLICKS_GBL_PER_YEAR
|
||||
1, // Sta_CLICKS_GBL_PER_HOUR
|
||||
0, // Sta_CLICKS_GBL_PER_MINUTE
|
||||
1, // Sta_CLICKS_GBL_PER_ACTION
|
||||
1, // Sta_CLICKS_GBL_PER_PLUGIN
|
||||
1, // Sta_CLICKS_GBL_PER_WEB_SERVICE_FUNCTION
|
||||
1, // Sta_CLICKS_GBL_PER_API_FUNCTION
|
||||
1, // Sta_CLICKS_GBL_PER_BANNER
|
||||
1, // Sta_CLICKS_GBL_PER_COUNTRY
|
||||
1, // Sta_CLICKS_GBL_PER_INSTITUTION
|
||||
|
@ -140,16 +142,18 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse);
|
|||
static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql_res);
|
||||
static void Sta_WriteLogComments (long LogCod);
|
||||
static void Sta_ShowNumHitsPerUsr (unsigned long NumRows,MYSQL_RES *mysql_res);
|
||||
static void Sta_ShowNumHitsPerDays (unsigned long NumRows,MYSQL_RES *mysql_res);
|
||||
static void Sta_ShowDistrAccessesPerDaysAndHour (unsigned long NumRows,MYSQL_RES *mysql_res);
|
||||
static void Sta_ShowNumHitsPerDay (unsigned long NumRows,MYSQL_RES *mysql_res);
|
||||
static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES *mysql_res);
|
||||
static Sta_ColorType_t Sta_GetStatColorType (void);
|
||||
static void Sta_DrawBarColors (Sta_ColorType_t ColorType,float HitsMax);
|
||||
static void Sta_DrawAccessesPerHourForADay (Sta_ColorType_t ColorType,float HitsNum[24],float HitsMax);
|
||||
static void Sta_SetColor (Sta_ColorType_t ColorType,float HitsNum,float HitsMax,
|
||||
unsigned *R,unsigned *G,unsigned *B);
|
||||
static void Sta_ShowNumHitsPerWeeks (unsigned long NumRows,
|
||||
static void Sta_ShowNumHitsPerWeek (unsigned long NumRows,
|
||||
MYSQL_RES *mysql_res);
|
||||
static void Sta_ShowNumHitsPerMonths (unsigned long NumRows,
|
||||
static void Sta_ShowNumHitsPerMonth (unsigned long NumRows,
|
||||
MYSQL_RES *mysql_res);
|
||||
static void Sta_ShowNumHitsPerYear (unsigned long NumRows,
|
||||
MYSQL_RES *mysql_res);
|
||||
static void Sta_ShowNumHitsPerHour (unsigned long NumRows,
|
||||
MYSQL_RES *mysql_res);
|
||||
|
@ -739,12 +743,12 @@ void Sta_AskShowGblHits (void)
|
|||
fprintf (Gbl.F.Out,"<label class=\"%s\"> %s ",
|
||||
The_ClassForm[Gbl.Prefs.Theme],Txt_distributed_by);
|
||||
|
||||
if (Gbl.Stat.ClicksGroupedBy < Sta_CLICKS_GBL_PER_DAYS ||
|
||||
if (Gbl.Stat.ClicksGroupedBy < Sta_CLICKS_GBL_PER_DAY ||
|
||||
Gbl.Stat.ClicksGroupedBy > Sta_CLICKS_GBL_PER_COURSE)
|
||||
Gbl.Stat.ClicksGroupedBy = Sta_CLICKS_GBL_PER_DAYS;
|
||||
Gbl.Stat.ClicksGroupedBy = Sta_CLICKS_GBL_PER_DAY;
|
||||
|
||||
fprintf (Gbl.F.Out,"<select name=\"GroupedBy\">");
|
||||
for (ClicksGroupedBy = Sta_CLICKS_GBL_PER_DAYS;
|
||||
for (ClicksGroupedBy = Sta_CLICKS_GBL_PER_DAY;
|
||||
ClicksGroupedBy <= Sta_CLICKS_GBL_PER_COURSE;
|
||||
ClicksGroupedBy++)
|
||||
{
|
||||
|
@ -1075,16 +1079,16 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
sprintf (Query,"SELECT SQL_NO_CACHE UsrCod,%s AS Num FROM %s",
|
||||
StrQueryCountType,LogTable);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_DAYS:
|
||||
case Sta_CLICKS_GBL_PER_DAYS:
|
||||
case Sta_CLICKS_CRS_PER_DAY:
|
||||
case Sta_CLICKS_GBL_PER_DAY:
|
||||
sprintf (Query,"SELECT SQL_NO_CACHE "
|
||||
"DATE_FORMAT(CONVERT_TZ(ClickTime,@@session.time_zone,'%s'),'%%Y%%m%%d') AS Day,"
|
||||
"%s FROM %s",
|
||||
BrowserTimeZone,
|
||||
StrQueryCountType,LogTable);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_DAYS_AND_HOUR:
|
||||
case Sta_CLICKS_GBL_PER_DAYS_AND_HOUR:
|
||||
case Sta_CLICKS_CRS_PER_DAY_AND_HOUR:
|
||||
case Sta_CLICKS_GBL_PER_DAY_AND_HOUR:
|
||||
sprintf (Query,"SELECT SQL_NO_CACHE "
|
||||
"DATE_FORMAT(CONVERT_TZ(ClickTime,@@session.time_zone,'%s'),'%%Y%%m%%d') AS Day,"
|
||||
"DATE_FORMAT(CONVERT_TZ(ClickTime,@@session.time_zone,'%s'),'%%H') AS Hour,"
|
||||
|
@ -1093,8 +1097,8 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
BrowserTimeZone,
|
||||
StrQueryCountType,LogTable);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_WEEKS:
|
||||
case Sta_CLICKS_GBL_PER_WEEKS:
|
||||
case Sta_CLICKS_CRS_PER_WEEK:
|
||||
case Sta_CLICKS_GBL_PER_WEEK:
|
||||
/* With %x%v the weeks are counted from monday to sunday.
|
||||
With %X%V the weeks are counted from sunday to saturday. */
|
||||
sprintf (Query,(Gbl.Prefs.FirstDayOfWeek == 0) ?
|
||||
|
@ -1107,14 +1111,22 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
BrowserTimeZone,
|
||||
StrQueryCountType,LogTable);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_MONTHS:
|
||||
case Sta_CLICKS_GBL_PER_MONTHS:
|
||||
case Sta_CLICKS_CRS_PER_MONTH:
|
||||
case Sta_CLICKS_GBL_PER_MONTH:
|
||||
sprintf (Query,"SELECT SQL_NO_CACHE "
|
||||
"DATE_FORMAT(CONVERT_TZ(ClickTime,@@session.time_zone,'%s'),'%%Y%%m') AS Month,"
|
||||
"%s FROM %s",
|
||||
BrowserTimeZone,
|
||||
StrQueryCountType,LogTable);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_YEAR:
|
||||
case Sta_CLICKS_GBL_PER_YEAR:
|
||||
sprintf (Query,"SELECT SQL_NO_CACHE "
|
||||
"DATE_FORMAT(CONVERT_TZ(ClickTime,@@session.time_zone,'%s'),'%%Y') AS Year,"
|
||||
"%s FROM %s",
|
||||
BrowserTimeZone,
|
||||
StrQueryCountType,LogTable);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_HOUR:
|
||||
case Sta_CLICKS_GBL_PER_HOUR:
|
||||
sprintf (Query,"SELECT SQL_NO_CACHE "
|
||||
|
@ -1140,7 +1152,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
sprintf (Query,"SELECT SQL_NO_CACHE log_ws.PlgCod,%s AS Num FROM %s,log_ws",
|
||||
StrQueryCountType,LogTable);
|
||||
break;
|
||||
case Sta_CLICKS_GBL_PER_WEB_SERVICE_FUNCTION:
|
||||
case Sta_CLICKS_GBL_PER_API_FUNCTION:
|
||||
sprintf (Query,"SELECT SQL_NO_CACHE log_ws.FunCod,%s AS Num FROM %s,log_ws",
|
||||
StrQueryCountType,LogTable);
|
||||
break;
|
||||
|
@ -1302,7 +1314,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
switch (Gbl.Stat.ClicksGroupedBy)
|
||||
{
|
||||
case Sta_CLICKS_GBL_PER_PLUGIN:
|
||||
case Sta_CLICKS_GBL_PER_WEB_SERVICE_FUNCTION:
|
||||
case Sta_CLICKS_GBL_PER_API_FUNCTION:
|
||||
sprintf (QueryAux," AND %s.LogCod=log_ws.LogCod",
|
||||
LogTable);
|
||||
Str_Concat (Query,QueryAux,
|
||||
|
@ -1378,26 +1390,31 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
Str_Concat (Query,QueryAux,
|
||||
Sta_MAX_BYTES_QUERY_ACCESS);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_DAYS:
|
||||
case Sta_CLICKS_GBL_PER_DAYS:
|
||||
case Sta_CLICKS_CRS_PER_DAY:
|
||||
case Sta_CLICKS_GBL_PER_DAY:
|
||||
Str_Concat (Query," GROUP BY Day DESC",
|
||||
Sta_MAX_BYTES_QUERY_ACCESS);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_DAYS_AND_HOUR:
|
||||
case Sta_CLICKS_GBL_PER_DAYS_AND_HOUR:
|
||||
case Sta_CLICKS_CRS_PER_DAY_AND_HOUR:
|
||||
case Sta_CLICKS_GBL_PER_DAY_AND_HOUR:
|
||||
Str_Concat (Query," GROUP BY Day DESC,Hour",
|
||||
Sta_MAX_BYTES_QUERY_ACCESS);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_WEEKS:
|
||||
case Sta_CLICKS_GBL_PER_WEEKS:
|
||||
case Sta_CLICKS_CRS_PER_WEEK:
|
||||
case Sta_CLICKS_GBL_PER_WEEK:
|
||||
Str_Concat (Query," GROUP BY Week DESC",
|
||||
Sta_MAX_BYTES_QUERY_ACCESS);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_MONTHS:
|
||||
case Sta_CLICKS_GBL_PER_MONTHS:
|
||||
case Sta_CLICKS_CRS_PER_MONTH:
|
||||
case Sta_CLICKS_GBL_PER_MONTH:
|
||||
Str_Concat (Query," GROUP BY Month DESC",
|
||||
Sta_MAX_BYTES_QUERY_ACCESS);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_YEAR:
|
||||
case Sta_CLICKS_GBL_PER_YEAR:
|
||||
Str_Concat (Query," GROUP BY Year DESC",
|
||||
Sta_MAX_BYTES_QUERY_ACCESS);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_HOUR:
|
||||
case Sta_CLICKS_GBL_PER_HOUR:
|
||||
Str_Concat (Query," GROUP BY Hour",
|
||||
|
@ -1418,7 +1435,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
Str_Concat (Query," GROUP BY log_ws.PlgCod ORDER BY Num DESC",
|
||||
Sta_MAX_BYTES_QUERY_ACCESS);
|
||||
break;
|
||||
case Sta_CLICKS_GBL_PER_WEB_SERVICE_FUNCTION:
|
||||
case Sta_CLICKS_GBL_PER_API_FUNCTION:
|
||||
Str_Concat (Query," GROUP BY log_ws.FunCod ORDER BY Num DESC",
|
||||
Sta_MAX_BYTES_QUERY_ACCESS);
|
||||
break;
|
||||
|
@ -1454,8 +1471,8 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
}
|
||||
/***** Write query for debug *****/
|
||||
/*
|
||||
if (Gbl.Usrs.Me.Roles.LoggedRole == Rol_SYS_ADM)
|
||||
Lay_ShowAlert (Lay_INFO,Query);
|
||||
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
|
||||
Ale_ShowAlert (Ale_INFO,Query);
|
||||
*/
|
||||
/***** Make the query *****/
|
||||
NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get clicks");
|
||||
|
@ -1487,21 +1504,25 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
case Sta_CLICKS_CRS_PER_USR:
|
||||
Sta_ShowNumHitsPerUsr (NumRows,mysql_res);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_DAYS:
|
||||
case Sta_CLICKS_GBL_PER_DAYS:
|
||||
Sta_ShowNumHitsPerDays (NumRows,mysql_res);
|
||||
case Sta_CLICKS_CRS_PER_DAY:
|
||||
case Sta_CLICKS_GBL_PER_DAY:
|
||||
Sta_ShowNumHitsPerDay (NumRows,mysql_res);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_DAYS_AND_HOUR:
|
||||
case Sta_CLICKS_GBL_PER_DAYS_AND_HOUR:
|
||||
Sta_ShowDistrAccessesPerDaysAndHour (NumRows,mysql_res);
|
||||
case Sta_CLICKS_CRS_PER_DAY_AND_HOUR:
|
||||
case Sta_CLICKS_GBL_PER_DAY_AND_HOUR:
|
||||
Sta_ShowDistrAccessesPerDayAndHour (NumRows,mysql_res);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_WEEKS:
|
||||
case Sta_CLICKS_GBL_PER_WEEKS:
|
||||
Sta_ShowNumHitsPerWeeks (NumRows,mysql_res);
|
||||
case Sta_CLICKS_CRS_PER_WEEK:
|
||||
case Sta_CLICKS_GBL_PER_WEEK:
|
||||
Sta_ShowNumHitsPerWeek (NumRows,mysql_res);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_MONTHS:
|
||||
case Sta_CLICKS_GBL_PER_MONTHS:
|
||||
Sta_ShowNumHitsPerMonths (NumRows,mysql_res);
|
||||
case Sta_CLICKS_CRS_PER_MONTH:
|
||||
case Sta_CLICKS_GBL_PER_MONTH:
|
||||
Sta_ShowNumHitsPerMonth (NumRows,mysql_res);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_YEAR:
|
||||
case Sta_CLICKS_GBL_PER_YEAR:
|
||||
Sta_ShowNumHitsPerYear (NumRows,mysql_res);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_HOUR:
|
||||
case Sta_CLICKS_GBL_PER_HOUR:
|
||||
|
@ -1518,7 +1539,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
case Sta_CLICKS_GBL_PER_PLUGIN:
|
||||
Sta_ShowNumHitsPerPlugin (NumRows,mysql_res);
|
||||
break;
|
||||
case Sta_CLICKS_GBL_PER_WEB_SERVICE_FUNCTION:
|
||||
case Sta_CLICKS_GBL_PER_API_FUNCTION:
|
||||
Sta_ShowNumHitsPerWSFunction (NumRows,mysql_res);
|
||||
break;
|
||||
case Sta_CLICKS_GBL_PER_BANNER:
|
||||
|
@ -1557,14 +1578,16 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
/***** Write time zone used in the calculation of these statistics *****/
|
||||
switch (Gbl.Stat.ClicksGroupedBy)
|
||||
{
|
||||
case Sta_CLICKS_CRS_PER_DAYS:
|
||||
case Sta_CLICKS_GBL_PER_DAYS:
|
||||
case Sta_CLICKS_CRS_PER_DAYS_AND_HOUR:
|
||||
case Sta_CLICKS_GBL_PER_DAYS_AND_HOUR:
|
||||
case Sta_CLICKS_CRS_PER_WEEKS:
|
||||
case Sta_CLICKS_GBL_PER_WEEKS:
|
||||
case Sta_CLICKS_CRS_PER_MONTHS:
|
||||
case Sta_CLICKS_GBL_PER_MONTHS:
|
||||
case Sta_CLICKS_CRS_PER_DAY:
|
||||
case Sta_CLICKS_GBL_PER_DAY:
|
||||
case Sta_CLICKS_CRS_PER_DAY_AND_HOUR:
|
||||
case Sta_CLICKS_GBL_PER_DAY_AND_HOUR:
|
||||
case Sta_CLICKS_CRS_PER_WEEK:
|
||||
case Sta_CLICKS_GBL_PER_WEEK:
|
||||
case Sta_CLICKS_CRS_PER_MONTH:
|
||||
case Sta_CLICKS_GBL_PER_MONTH:
|
||||
case Sta_CLICKS_CRS_PER_YEAR:
|
||||
case Sta_CLICKS_GBL_PER_YEAR:
|
||||
case Sta_CLICKS_CRS_PER_HOUR:
|
||||
case Sta_CLICKS_GBL_PER_HOUR:
|
||||
case Sta_CLICKS_CRS_PER_MINUTE:
|
||||
|
@ -1994,7 +2017,7 @@ static void Sta_ShowNumHitsPerUsr (unsigned long NumRows,MYSQL_RES *mysql_res)
|
|||
/********** Show a listing of with the number of clicks in each date *********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Sta_ShowNumHitsPerDays (unsigned long NumRows,MYSQL_RES *mysql_res)
|
||||
static void Sta_ShowNumHitsPerDay (unsigned long NumRows,MYSQL_RES *mysql_res)
|
||||
{
|
||||
extern const char *Txt_Date;
|
||||
extern const char *Txt_Day;
|
||||
|
@ -2076,7 +2099,7 @@ static void Sta_ShowNumHitsPerDays (unsigned long NumRows,MYSQL_RES *mysql_res)
|
|||
"LOG",
|
||||
Txt_DAYS_SMALL[NumDayWeek]);
|
||||
|
||||
/* Draw bar proportional to number of pages generated */
|
||||
/* Draw bar proportional to number of hits */
|
||||
Sta_DrawBarNumHits (NumDayWeek == 6 ? 'r' :
|
||||
'c',
|
||||
D == NumDaysFromLastDateToCurrDate ? Hits.Num :
|
||||
|
@ -2116,7 +2139,7 @@ static void Sta_ShowNumHitsPerDays (unsigned long NumRows,MYSQL_RES *mysql_res)
|
|||
"LOG",
|
||||
Txt_DAYS_SMALL[NumDayWeek]);
|
||||
|
||||
/* Draw bar proportional to number of pages generated */
|
||||
/* Draw bar proportional to number of hits */
|
||||
Sta_DrawBarNumHits (NumDayWeek == 6 ? 'r' :
|
||||
'c',
|
||||
0.0,Hits.Max,Hits.Total,500);
|
||||
|
@ -2133,7 +2156,7 @@ static void Sta_ShowNumHitsPerDays (unsigned long NumRows,MYSQL_RES *mysql_res)
|
|||
#define GRAPH_DISTRIBUTION_PER_HOUR_HOUR_WIDTH 25
|
||||
#define GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH (GRAPH_DISTRIBUTION_PER_HOUR_HOUR_WIDTH * 24)
|
||||
|
||||
static void Sta_ShowDistrAccessesPerDaysAndHour (unsigned long NumRows,MYSQL_RES *mysql_res)
|
||||
static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES *mysql_res)
|
||||
{
|
||||
extern const char *The_ClassForm[The_NUM_THEMES];
|
||||
extern const char *Txt_Color_of_the_graphic;
|
||||
|
@ -2579,7 +2602,7 @@ static void Sta_SetColor (Sta_ColorType_t ColorType,float HitsNum,float HitsMax,
|
|||
/********** Show listing with number of pages generated per week *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Sta_ShowNumHitsPerWeeks (unsigned long NumRows,
|
||||
static void Sta_ShowNumHitsPerWeek (unsigned long NumRows,
|
||||
MYSQL_RES *mysql_res)
|
||||
{
|
||||
extern const char *Txt_Week;
|
||||
|
@ -2589,7 +2612,7 @@ static void Sta_ShowNumHitsPerWeeks (unsigned long NumRows,
|
|||
struct Date LastDate;
|
||||
struct Date Date;
|
||||
unsigned W;
|
||||
unsigned NumWeeksBetweenLastDateAndCurrentDate;
|
||||
unsigned NumWeeksBetweenLastDateAndCurDate;
|
||||
struct Sta_Hits Hits;
|
||||
MYSQL_ROW row;
|
||||
|
||||
|
@ -2628,9 +2651,9 @@ static void Sta_ShowNumHitsPerWeeks (unsigned long NumRows,
|
|||
Hits.Num = Str_GetFloatNumFromStr (row[1]);
|
||||
|
||||
Dat_AssignDate (&Date,&LastDate);
|
||||
NumWeeksBetweenLastDateAndCurrentDate = Dat_GetNumWeeksBetweenDates (&ReadDate,&LastDate);
|
||||
NumWeeksBetweenLastDateAndCurDate = Dat_GetNumWeeksBetweenDates (&ReadDate,&LastDate);
|
||||
for (W = 1;
|
||||
W <= NumWeeksBetweenLastDateAndCurrentDate;
|
||||
W <= NumWeeksBetweenLastDateAndCurDate;
|
||||
W++)
|
||||
{
|
||||
/* Write week */
|
||||
|
@ -2640,9 +2663,9 @@ static void Sta_ShowNumHitsPerWeeks (unsigned long NumRows,
|
|||
"</td>",
|
||||
Date.Year,Date.Week);
|
||||
|
||||
/* Draw bar proportional to number of pages generated */
|
||||
/* Draw bar proportional to number of hits */
|
||||
Sta_DrawBarNumHits ('c',
|
||||
W == NumWeeksBetweenLastDateAndCurrentDate ? Hits.Num :
|
||||
W == NumWeeksBetweenLastDateAndCurDate ? Hits.Num :
|
||||
0.0,
|
||||
Hits.Max,Hits.Total,500);
|
||||
|
||||
|
@ -2654,9 +2677,10 @@ static void Sta_ShowNumHitsPerWeeks (unsigned long NumRows,
|
|||
|
||||
/***** Finally, show the old weeks without pages generated *****/
|
||||
Dat_CalculateWeekOfYear (&Gbl.DateRange.DateIni.Date); // Changes Week and Year
|
||||
NumWeeksBetweenLastDateAndCurrentDate = Dat_GetNumWeeksBetweenDates (&Gbl.DateRange.DateIni.Date,&LastDate);
|
||||
NumWeeksBetweenLastDateAndCurDate = Dat_GetNumWeeksBetweenDates (&Gbl.DateRange.DateIni.Date,
|
||||
&LastDate);
|
||||
for (W = 1;
|
||||
W <= NumWeeksBetweenLastDateAndCurrentDate;
|
||||
W <= NumWeeksBetweenLastDateAndCurDate;
|
||||
W++)
|
||||
{
|
||||
/* Write week */
|
||||
|
@ -2666,7 +2690,7 @@ static void Sta_ShowNumHitsPerWeeks (unsigned long NumRows,
|
|||
"</td>",
|
||||
Date.Year,Date.Week);
|
||||
|
||||
/* Draw bar proportional to number of pages generated */
|
||||
/* Draw bar proportional to number of hits */
|
||||
Sta_DrawBarNumHits ('c',0.0,Hits.Max,Hits.Total,500);
|
||||
|
||||
/* Decrement week */
|
||||
|
@ -2678,7 +2702,7 @@ static void Sta_ShowNumHitsPerWeeks (unsigned long NumRows,
|
|||
/********** Show a graph with the number of clicks in each month *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Sta_ShowNumHitsPerMonths (unsigned long NumRows,
|
||||
static void Sta_ShowNumHitsPerMonth (unsigned long NumRows,
|
||||
MYSQL_RES *mysql_res)
|
||||
{
|
||||
extern const char *Txt_Month;
|
||||
|
@ -2688,7 +2712,7 @@ static void Sta_ShowNumHitsPerMonths (unsigned long NumRows,
|
|||
struct Date LastDate;
|
||||
struct Date Date;
|
||||
unsigned M;
|
||||
unsigned NumMonthsBetweenLastDateAndCurrentDate;
|
||||
unsigned NumMonthsBetweenLastDateAndCurDate;
|
||||
struct Sta_Hits Hits;
|
||||
MYSQL_ROW row;
|
||||
|
||||
|
@ -2726,9 +2750,10 @@ static void Sta_ShowNumHitsPerMonths (unsigned long NumRows,
|
|||
Hits.Num = Str_GetFloatNumFromStr (row[1]);
|
||||
|
||||
Dat_AssignDate (&Date,&LastDate);
|
||||
NumMonthsBetweenLastDateAndCurrentDate = Dat_GetNumMonthsBetweenDates (&ReadDate,&LastDate);
|
||||
NumMonthsBetweenLastDateAndCurDate = Dat_GetNumMonthsBetweenDates (&ReadDate,
|
||||
&LastDate);
|
||||
for (M = 1;
|
||||
M <= NumMonthsBetweenLastDateAndCurrentDate;
|
||||
M <= NumMonthsBetweenLastDateAndCurDate;
|
||||
M++)
|
||||
{
|
||||
/* Write the month */
|
||||
|
@ -2738,9 +2763,9 @@ static void Sta_ShowNumHitsPerMonths (unsigned long NumRows,
|
|||
"</td>",
|
||||
Date.Year,Date.Month);
|
||||
|
||||
/* Draw bar proportional to number of pages generated */
|
||||
/* Draw bar proportional to number of hits */
|
||||
Sta_DrawBarNumHits ('c',
|
||||
M == NumMonthsBetweenLastDateAndCurrentDate ? Hits.Num :
|
||||
M == NumMonthsBetweenLastDateAndCurDate ? Hits.Num :
|
||||
0.0,
|
||||
Hits.Max,Hits.Total,500);
|
||||
|
||||
|
@ -2751,9 +2776,10 @@ static void Sta_ShowNumHitsPerMonths (unsigned long NumRows,
|
|||
}
|
||||
|
||||
/***** Finally, show the oldest months without clicks *****/
|
||||
NumMonthsBetweenLastDateAndCurrentDate = Dat_GetNumMonthsBetweenDates (&Gbl.DateRange.DateIni.Date,&LastDate);
|
||||
NumMonthsBetweenLastDateAndCurDate = Dat_GetNumMonthsBetweenDates (&Gbl.DateRange.DateIni.Date,
|
||||
&LastDate);
|
||||
for (M = 1;
|
||||
M <= NumMonthsBetweenLastDateAndCurrentDate;
|
||||
M <= NumMonthsBetweenLastDateAndCurDate;
|
||||
M++)
|
||||
{
|
||||
/* Write the month */
|
||||
|
@ -2763,7 +2789,7 @@ static void Sta_ShowNumHitsPerMonths (unsigned long NumRows,
|
|||
"</td>",
|
||||
Date.Year,Date.Month);
|
||||
|
||||
/* Draw bar proportional to number of pages generated */
|
||||
/* Draw bar proportional to number of hits */
|
||||
Sta_DrawBarNumHits ('c',0.0,Hits.Max,Hits.Total,500);
|
||||
|
||||
/* Decrease month */
|
||||
|
@ -2771,6 +2797,105 @@ static void Sta_ShowNumHitsPerMonths (unsigned long NumRows,
|
|||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********** Show a graph with the number of clicks in each year *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Sta_ShowNumHitsPerYear (unsigned long NumRows,
|
||||
MYSQL_RES *mysql_res)
|
||||
{
|
||||
extern const char *Txt_Year;
|
||||
extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_COUNT_TYPES];
|
||||
unsigned long NumRow;
|
||||
struct Date ReadDate;
|
||||
struct Date LastDate;
|
||||
struct Date Date;
|
||||
unsigned Y;
|
||||
unsigned NumYearsBetweenLastDateAndCurDate;
|
||||
struct Sta_Hits Hits;
|
||||
MYSQL_ROW row;
|
||||
|
||||
/***** Initialize LastDate *****/
|
||||
Dat_AssignDate (&LastDate,&Gbl.DateRange.DateEnd.Date);
|
||||
|
||||
/***** Write heading *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<th class=\"LEFT_TOP\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"<th class=\"LEFT_TOP\">"
|
||||
"%s"
|
||||
"</th>"
|
||||
"</tr>",
|
||||
Txt_Year,
|
||||
Txt_STAT_TYPE_COUNT_CAPS[Gbl.Stat.CountType]);
|
||||
|
||||
/***** Compute maximum number of pages generated per year *****/
|
||||
Sta_ComputeMaxAndTotalHits (&Hits,NumRows,mysql_res,1,1);
|
||||
|
||||
/***** Write rows *****/
|
||||
mysql_data_seek (mysql_res,0);
|
||||
for (NumRow = 1;
|
||||
NumRow <= NumRows;
|
||||
NumRow++)
|
||||
{
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
|
||||
/* Get the year (in row[0] is the date in YYYY format) */
|
||||
if (sscanf (row[0],"%04u",&ReadDate.Year) != 1)
|
||||
Lay_ShowErrorAndExit ("Wrong date.");
|
||||
|
||||
/* Get number of pages generated (in row[1]) */
|
||||
Hits.Num = Str_GetFloatNumFromStr (row[1]);
|
||||
|
||||
Dat_AssignDate (&Date,&LastDate);
|
||||
NumYearsBetweenLastDateAndCurDate = Dat_GetNumYearsBetweenDates (&ReadDate,
|
||||
&LastDate);
|
||||
for (Y = 1;
|
||||
Y <= NumYearsBetweenLastDateAndCurDate;
|
||||
Y++)
|
||||
{
|
||||
/* Write the year */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"LOG LEFT_TOP\">"
|
||||
"%04u "
|
||||
"</td>",
|
||||
Date.Year);
|
||||
|
||||
/* Draw bar proportional to number of hits */
|
||||
Sta_DrawBarNumHits ('c',
|
||||
Y == NumYearsBetweenLastDateAndCurDate ? Hits.Num :
|
||||
0.0,
|
||||
Hits.Max,Hits.Total,500);
|
||||
|
||||
/* Decrease year */
|
||||
Dat_GetYearBefore (&Date,&Date);
|
||||
}
|
||||
Dat_AssignDate (&LastDate,&Date);
|
||||
}
|
||||
|
||||
/***** Finally, show the oldest years without clicks *****/
|
||||
NumYearsBetweenLastDateAndCurDate = Dat_GetNumYearsBetweenDates (&Gbl.DateRange.DateIni.Date,
|
||||
&LastDate);
|
||||
for (Y = 1;
|
||||
Y <= NumYearsBetweenLastDateAndCurDate;
|
||||
Y++)
|
||||
{
|
||||
/* Write the year */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"LOG LEFT_TOP\">"
|
||||
"%04u "
|
||||
"</td>",
|
||||
Date.Year);
|
||||
|
||||
/* Draw bar proportional to number of hits */
|
||||
Sta_DrawBarNumHits ('c',0.0,Hits.Max,Hits.Total,500);
|
||||
|
||||
/* Decrease year */
|
||||
Dat_GetYearBefore (&Date,&Date);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Show graphic of number of pages generated per hour ***************/
|
||||
/*****************************************************************************/
|
||||
|
@ -3142,7 +3267,7 @@ static void Sta_ShowNumHitsPerAction (unsigned long NumRows,
|
|||
"? "
|
||||
"</td>");
|
||||
|
||||
/* Draw bar proportional to number of pages generated */
|
||||
/* Draw bar proportional to number of hits */
|
||||
Hits.Num = Str_GetFloatNumFromStr (row[1]);
|
||||
Sta_DrawBarNumHits ('c',Hits.Num,Hits.Max,Hits.Total,500);
|
||||
}
|
||||
|
@ -3196,7 +3321,7 @@ static void Sta_ShowNumHitsPerPlugin (unsigned long NumRows,
|
|||
fprintf (Gbl.F.Out,"?");
|
||||
fprintf (Gbl.F.Out," </td>");
|
||||
|
||||
/* Draw bar proportional to number of pages generated */
|
||||
/* Draw bar proportional to number of hits */
|
||||
Hits.Num = Str_GetFloatNumFromStr (row[1]);
|
||||
Sta_DrawBarNumHits ('c',Hits.Num,Hits.Max,Hits.Total,500);
|
||||
}
|
||||
|
@ -3248,7 +3373,7 @@ static void Sta_ShowNumHitsPerWSFunction (unsigned long NumRows,
|
|||
"</td>",
|
||||
Svc_GetFunctionNameFromFunCod (FunCod));
|
||||
|
||||
/* Draw bar proportional to number of pages generated */
|
||||
/* Draw bar proportional to number of hits */
|
||||
Hits.Num = Str_GetFloatNumFromStr (row[1]);
|
||||
Sta_DrawBarNumHits ('c',Hits.Num,Hits.Max,Hits.Total,500);
|
||||
}
|
||||
|
@ -3806,7 +3931,7 @@ static void Sta_ShowNumHitsPerCourse (unsigned long NumRows,
|
|||
Act_FormEnd ();
|
||||
fprintf (Gbl.F.Out,"</td>");
|
||||
|
||||
/* Draw bar proportional to number of pages generated */
|
||||
/* Draw bar proportional to number of hits */
|
||||
Hits.Num = Str_GetFloatNumFromStr (row[1]);
|
||||
Sta_DrawBarNumHits ('c',Hits.Num,Hits.Max,Hits.Total,375);
|
||||
}
|
||||
|
|
|
@ -72,35 +72,37 @@ typedef enum
|
|||
} Sta_ClicksDetailedOrGrouped_t;
|
||||
#define Sta_CLICKS_DETAILED_OR_GROUPED_DEFAULT Sta_CLICKS_GROUPED
|
||||
|
||||
#define Sta_NUM_CLICKS_GROUPED_BY 24
|
||||
#define Sta_NUM_CLICKS_GROUPED_BY 26
|
||||
typedef enum
|
||||
{
|
||||
Sta_CLICKS_CRS_DETAILED_LIST = 0,
|
||||
|
||||
Sta_CLICKS_CRS_PER_USR = 1,
|
||||
Sta_CLICKS_CRS_PER_DAYS = 2,
|
||||
Sta_CLICKS_CRS_PER_DAYS_AND_HOUR = 3,
|
||||
Sta_CLICKS_CRS_PER_WEEKS = 4,
|
||||
Sta_CLICKS_CRS_PER_MONTHS = 5,
|
||||
Sta_CLICKS_CRS_PER_HOUR = 6,
|
||||
Sta_CLICKS_CRS_PER_MINUTE = 7,
|
||||
Sta_CLICKS_CRS_PER_ACTION = 8,
|
||||
Sta_CLICKS_CRS_PER_DAY = 2,
|
||||
Sta_CLICKS_CRS_PER_DAY_AND_HOUR = 3,
|
||||
Sta_CLICKS_CRS_PER_WEEK = 4,
|
||||
Sta_CLICKS_CRS_PER_MONTH = 5,
|
||||
Sta_CLICKS_CRS_PER_YEAR = 6,
|
||||
Sta_CLICKS_CRS_PER_HOUR = 7,
|
||||
Sta_CLICKS_CRS_PER_MINUTE = 8,
|
||||
Sta_CLICKS_CRS_PER_ACTION = 9,
|
||||
|
||||
Sta_CLICKS_GBL_PER_DAYS = 9,
|
||||
Sta_CLICKS_GBL_PER_DAYS_AND_HOUR = 10,
|
||||
Sta_CLICKS_GBL_PER_WEEKS = 11,
|
||||
Sta_CLICKS_GBL_PER_MONTHS = 12,
|
||||
Sta_CLICKS_GBL_PER_HOUR = 13,
|
||||
Sta_CLICKS_GBL_PER_MINUTE = 14,
|
||||
Sta_CLICKS_GBL_PER_ACTION = 15,
|
||||
Sta_CLICKS_GBL_PER_PLUGIN = 16,
|
||||
Sta_CLICKS_GBL_PER_WEB_SERVICE_FUNCTION = 17,
|
||||
Sta_CLICKS_GBL_PER_BANNER = 18,
|
||||
Sta_CLICKS_GBL_PER_COUNTRY = 19,
|
||||
Sta_CLICKS_GBL_PER_INSTITUTION = 20,
|
||||
Sta_CLICKS_GBL_PER_CENTRE = 21,
|
||||
Sta_CLICKS_GBL_PER_DEGREE = 22,
|
||||
Sta_CLICKS_GBL_PER_COURSE = 23,
|
||||
Sta_CLICKS_GBL_PER_DAY = 10,
|
||||
Sta_CLICKS_GBL_PER_DAY_AND_HOUR = 11,
|
||||
Sta_CLICKS_GBL_PER_WEEK = 12,
|
||||
Sta_CLICKS_GBL_PER_MONTH = 13,
|
||||
Sta_CLICKS_GBL_PER_YEAR = 14,
|
||||
Sta_CLICKS_GBL_PER_HOUR = 15,
|
||||
Sta_CLICKS_GBL_PER_MINUTE = 16,
|
||||
Sta_CLICKS_GBL_PER_ACTION = 17,
|
||||
Sta_CLICKS_GBL_PER_PLUGIN = 18,
|
||||
Sta_CLICKS_GBL_PER_API_FUNCTION = 19,
|
||||
Sta_CLICKS_GBL_PER_BANNER = 20,
|
||||
Sta_CLICKS_GBL_PER_COUNTRY = 21,
|
||||
Sta_CLICKS_GBL_PER_INSTITUTION = 22,
|
||||
Sta_CLICKS_GBL_PER_CENTRE = 23,
|
||||
Sta_CLICKS_GBL_PER_DEGREE = 24,
|
||||
Sta_CLICKS_GBL_PER_COURSE = 25,
|
||||
} Sta_ClicksGroupedBy_t;
|
||||
#define Sta_CLICKS_GROUPED_BY_DEFAULT Sta_CLICKS_CRS_PER_USR
|
||||
|
||||
|
|
116
swad_text.c
116
swad_text.c
|
@ -40684,6 +40684,7 @@ const char *Txt_Source_of_information =
|
|||
|
||||
const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
||||
{
|
||||
// Sta_CLICKS_CRS_DETAILED_LIST
|
||||
#if L==1
|
||||
"clics detallats"
|
||||
#elif L==2
|
||||
|
@ -40703,7 +40704,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"detalhadamente cliques"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_CRS_PER_USR
|
||||
#if L==1
|
||||
"usuari"
|
||||
#elif L==2
|
||||
|
@ -40723,7 +40724,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"utilizador"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_CRS_PER_DAY
|
||||
#if L==1
|
||||
"dia"
|
||||
#elif L==2
|
||||
|
@ -40735,7 +40736,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==5
|
||||
"jour"
|
||||
#elif L==6
|
||||
"día" // Okoteve traducción
|
||||
"ára"
|
||||
#elif L==7
|
||||
"giorno"
|
||||
#elif L==8
|
||||
|
@ -40743,7 +40744,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"dia"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_CRS_PER_DAY_AND_HOUR
|
||||
#if L==1
|
||||
"dia i hora"
|
||||
#elif L==2
|
||||
|
@ -40755,7 +40756,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==5
|
||||
"jour et heure"
|
||||
#elif L==6
|
||||
"día y hora" // Okoteve traducción
|
||||
"ára ha aravo"
|
||||
#elif L==7
|
||||
"giorno e ora"
|
||||
#elif L==8
|
||||
|
@ -40763,7 +40764,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"dia e hora"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_CRS_PER_WEEK
|
||||
#if L==1
|
||||
"setmana"
|
||||
#elif L==2
|
||||
|
@ -40783,7 +40784,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"semana"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_CRS_PER_MONTH
|
||||
#if L==1
|
||||
"mes"
|
||||
#elif L==2
|
||||
|
@ -40803,7 +40804,27 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"mês"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_CRS_PER_YEAR
|
||||
#if L==1
|
||||
"any"
|
||||
#elif L==2
|
||||
"Jahr"
|
||||
#elif L==3
|
||||
"year"
|
||||
#elif L==4
|
||||
"año"
|
||||
#elif L==5
|
||||
"année"
|
||||
#elif L==6
|
||||
"ary"
|
||||
#elif L==7
|
||||
"anno"
|
||||
#elif L==8
|
||||
"rok"
|
||||
#elif L==9
|
||||
"ano"
|
||||
#endif
|
||||
, // Sta_CLICKS_CRS_PER_HOUR
|
||||
#if L==1
|
||||
"hora"
|
||||
#elif L==2
|
||||
|
@ -40823,7 +40844,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"hora"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_CRS_PER_MINUTE
|
||||
#if L==1
|
||||
"minut"
|
||||
#elif L==2
|
||||
|
@ -40843,7 +40864,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"minuto"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_CRS_PER_ACTION
|
||||
#if L==1
|
||||
"acció"
|
||||
#elif L==2
|
||||
|
@ -40863,7 +40884,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"ação"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_GBL_PER_DAY
|
||||
#if L==1
|
||||
"dia"
|
||||
#elif L==2
|
||||
|
@ -40875,7 +40896,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==5
|
||||
"jour"
|
||||
#elif L==6
|
||||
"día" // Okoteve traducción
|
||||
"ára"
|
||||
#elif L==7
|
||||
"giorno"
|
||||
#elif L==8
|
||||
|
@ -40883,7 +40904,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"dia"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_GBL_PER_DAY_AND_HOUR
|
||||
#if L==1
|
||||
"dia i hora"
|
||||
#elif L==2
|
||||
|
@ -40895,7 +40916,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==5
|
||||
"jour et heure"
|
||||
#elif L==6
|
||||
"día y hora" // Okoteve traducción
|
||||
"ára ha aravo"
|
||||
#elif L==7
|
||||
"giorno e ora"
|
||||
#elif L==8
|
||||
|
@ -40903,7 +40924,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"dia e hora"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_GBL_PER_WEEK
|
||||
#if L==1
|
||||
"setmana"
|
||||
#elif L==2
|
||||
|
@ -40923,7 +40944,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"semana"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_GBL_PER_MONTH
|
||||
#if L==1
|
||||
"mes"
|
||||
#elif L==2
|
||||
|
@ -40943,7 +40964,27 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"mês"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_GBL_PER_YEAR
|
||||
#if L==1
|
||||
"any"
|
||||
#elif L==2
|
||||
"Jahr"
|
||||
#elif L==3
|
||||
"year"
|
||||
#elif L==4
|
||||
"año"
|
||||
#elif L==5
|
||||
"année"
|
||||
#elif L==6
|
||||
"ary"
|
||||
#elif L==7
|
||||
"anno"
|
||||
#elif L==8
|
||||
"rok"
|
||||
#elif L==9
|
||||
"ano"
|
||||
#endif
|
||||
, // Sta_CLICKS_GBL_PER_HOUR
|
||||
#if L==1
|
||||
"hora"
|
||||
#elif L==2
|
||||
|
@ -40963,7 +41004,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"hora"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_GBL_PER_MINUTE
|
||||
#if L==1
|
||||
"minut"
|
||||
#elif L==2
|
||||
|
@ -40983,7 +41024,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"minuto"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_GBL_PER_ACTION
|
||||
#if L==1
|
||||
"acció"
|
||||
#elif L==2
|
||||
|
@ -41003,7 +41044,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"ação"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_GBL_PER_PLUGIN
|
||||
#if L==1
|
||||
"complement"
|
||||
#elif L==2
|
||||
|
@ -41023,7 +41064,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"plugin"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_GBL_PER_API_FUNCTION
|
||||
#if L==1
|
||||
"funció"
|
||||
#elif L==2
|
||||
|
@ -41043,7 +41084,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"função"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_GBL_PER_BANNER
|
||||
#if L==1
|
||||
"banner"
|
||||
#elif L==2
|
||||
|
@ -41063,7 +41104,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"banner"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_GBL_PER_COUNTRY
|
||||
#if L==1
|
||||
"país"
|
||||
#elif L==2
|
||||
|
@ -41083,7 +41124,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"país"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_GBL_PER_INSTITUTION
|
||||
#if L==1
|
||||
"institució"
|
||||
#elif L==2
|
||||
|
@ -41103,7 +41144,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"institução"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_GBL_PER_CENTRE
|
||||
#if L==1
|
||||
"centre"
|
||||
#elif L==2
|
||||
|
@ -41123,7 +41164,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"centro"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_GBL_PER_DEGREE
|
||||
#if L==1
|
||||
"titulació"
|
||||
#elif L==2
|
||||
|
@ -41143,7 +41184,7 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#elif L==9
|
||||
"titulação"
|
||||
#endif
|
||||
,
|
||||
, // Sta_CLICKS_GBL_PER_COURSE
|
||||
#if L==1
|
||||
"assignatura"
|
||||
#elif L==2
|
||||
|
@ -54141,6 +54182,27 @@ const char *Txt_XML_file_content =
|
|||
"Conteúdo do arquivo XML";
|
||||
#endif
|
||||
|
||||
const char *Txt_Year = // 1984, 2011...
|
||||
#if L==1
|
||||
"Any";
|
||||
#elif L==2
|
||||
"Jahr";
|
||||
#elif L==3
|
||||
"Year";
|
||||
#elif L==4
|
||||
"Año";
|
||||
#elif L==5
|
||||
"Année";
|
||||
#elif L==6
|
||||
"Ary";
|
||||
#elif L==7
|
||||
"Anno";
|
||||
#elif L==8
|
||||
"Rok";
|
||||
#elif L==9
|
||||
"Ano";
|
||||
#endif
|
||||
|
||||
const char *Txt_Year_OF_A_DEGREE = // 1, 2, 3..., not 1984, 2011...
|
||||
#if L==1
|
||||
"Any o semestre";
|
||||
|
|
Loading…
Reference in New Issue
Block a user