mirror of https://github.com/acanas/swad-core.git
Version 15.28
This commit is contained in:
parent
4af7c60b7f
commit
568742be30
14
js/swad.js
14
js/swad.js
|
@ -202,6 +202,14 @@ function setTZ(id) {
|
|||
FormTZ.value = d.getTimezoneOffset();
|
||||
}
|
||||
|
||||
// Set form param with time difference between UTC time and client local time, in minutes
|
||||
// For example, if your time zone is GMT+2, -120 will be returned
|
||||
function setTZname(id) {
|
||||
var FormTZname = document.getElementById(id);
|
||||
var tz = jstz.determine(); // Determines the time zone of the browser client
|
||||
FormTZname.value = tz.name(); // Returns the name of the time zone eg "Europe/Berlin"
|
||||
}
|
||||
|
||||
// Adjust a date form correcting days in the month
|
||||
function adjustDateForm (id) {
|
||||
var FormYea = document.getElementById(id+'Year' );
|
||||
|
@ -244,18 +252,18 @@ function setDateToYesterday() {
|
|||
var d = new (Date);
|
||||
|
||||
d.setTime(d.getTime() - 24*60*60*1000); // Today - 1 day
|
||||
setDate(d);
|
||||
setDateRange(d);
|
||||
}
|
||||
|
||||
// Set a date range form to today
|
||||
function setDateToToday() {
|
||||
var d = new (Date);
|
||||
|
||||
setDate(d);
|
||||
setDateRange(d);
|
||||
}
|
||||
|
||||
// Set a date range form to a specific day
|
||||
function setDate(d) {
|
||||
function setDateRange(d) {
|
||||
var FormYea;
|
||||
var Yea = d.getFullYear();
|
||||
var Mon = d.getMonth()+1;
|
||||
|
|
|
@ -108,13 +108,22 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.27 (2015/10/28)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.28 (2015/10/28)"
|
||||
|
||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
||||
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
||||
/*
|
||||
Version 15.27: Oct 28, 2015 Fized bug in dates. (186300 lines)
|
||||
Version 15.26.1: Oct 27, 2015 Fized bug in statistics. (186282 lines)
|
||||
Version 15.28: Oct 28, 2015 IANA zone names are used in the calculation of some statistics. (186407 lines)
|
||||
1 script necessary:
|
||||
Download JavaScript jstz script, available in:
|
||||
https://bitbucket.org/pellepim/jstimezonedetect/
|
||||
http://pellepim.bitbucket.org/jstz/
|
||||
Create new directory jstz in public HTML directory.
|
||||
Copy script jstz.js from https://bitbucket.org/pellepim/jstimezonedetect/ > Download repository > pellepim-jstimezonedetect-3a00f59861bd.zip > dist > jstz.js to /var/www/html/swad/jstz/jstz.js
|
||||
|
||||
(186302 lines)
|
||||
Version 15.27: Oct 28, 2015 Fixed bug in dates. (186302 lines)
|
||||
Version 15.26.1: Oct 27, 2015 Fixed bug in statistics. (186282 lines)
|
||||
Version 15.26: Oct 27, 2015 Statistics are computed properly for clients with time-zones different to that of the server. (186278 lines)
|
||||
Version 15.25.4: Oct 27, 2015 Day and month are displayed in clock. (186251 lines)
|
||||
Version 15.25.3: Oct 27, 2015 Statistics computed using time UTC. (186225 lines)
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
/** Uncomment one of the following installations of SWAD or create your own **/
|
||||
/*****************************************************************************/
|
||||
|
||||
//#define LOCALHOST_UBUNTU // Comment this line if not applicable
|
||||
#define OPENSWAD_ORG // Comment this line if not applicable
|
||||
#define LOCALHOST_UBUNTU // Comment this line if not applicable
|
||||
//#define OPENSWAD_ORG // Comment this line if not applicable
|
||||
//#define SWAD_UGR_ES // Comment this line if not applicable
|
||||
//#define WWW_CEVUNA_UNA_PY // Comment this line if not applicable
|
||||
|
||||
|
|
80
swad_date.c
80
swad_date.c
|
@ -28,6 +28,7 @@
|
|||
#include <string.h> // For string functions
|
||||
|
||||
#include "swad_config.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_date.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_parameter.h"
|
||||
|
@ -467,44 +468,77 @@ time_t Dat_GetTimeUTCFromForm (const char *ParamName)
|
|||
/**************** in minutes ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Dat_PutHiddenParClientTZDiff (void)
|
||||
void Dat_PutHiddenParBrowserTZDiff (void)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<input type=\"hidden\""
|
||||
" id=\"ClientTZDiff\" name=\"ClientTZDiff\""
|
||||
" id=\"BrowserTZName\" name=\"BrowserTZName\""
|
||||
" value=\"\" />"
|
||||
"<input type=\"hidden\""
|
||||
" id=\"BrowserTZDiff\" name=\"BrowserTZDiff\""
|
||||
" value=\"0\" />"
|
||||
"<script type=\"text/javascript\">"
|
||||
"setTZ('ClientTZDiff');"
|
||||
"setTZname('BrowserTZName');"
|
||||
"setTZ('BrowserTZDiff');"
|
||||
"</script>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Get string with time difference ********************/
|
||||
/**************** between UTC time and client local time, ********************/
|
||||
/**************** in +hh:mm or -hh:mm format ********************/
|
||||
/*************************** Get browser time zone ***************************/
|
||||
/*****************************************************************************/
|
||||
// ClientTimeZoneDiffStr must have space for strings in +hh:mm format (6 characters + \0)
|
||||
// MySQL CONVERT_TZ function may fail around changes related to Daylight Saving Time
|
||||
// when a fixed amount (for example +01:00) is used as destination time zone,
|
||||
// because this amount may be different before and after the DST change
|
||||
|
||||
void Dat_GetClientTimeZoneDiff (char *ClientTimeZoneDiffStr)
|
||||
void Dat_GetBrowserTimeZone (char BrowserTimeZone[Dat_MAX_BYTES_TIME_ZONE+1])
|
||||
{
|
||||
char Query[512];
|
||||
MYSQL_RES *mysql_res;
|
||||
bool TZNameIsUsable = false;
|
||||
char IntStr[1+10+1];
|
||||
int ClientUTCMinusLocal; // Time difference between UTC time and client local time, in minutes
|
||||
// The getTimezoneOffset() method returns the time difference between UTC time and local time, in minutes.
|
||||
// For example, If your time zone is GMT+2, -120 will be returned.
|
||||
|
||||
/***** Get client time zone *****/
|
||||
Par_GetParToText ("ClientTZDiff",IntStr,1+10);
|
||||
if (sscanf (IntStr,"%d",&ClientUTCMinusLocal) != 1)
|
||||
ClientUTCMinusLocal = 0;
|
||||
/***** 1. Get client time zone name *****/
|
||||
// We get client time zone using JavaScript jstz script, available in:
|
||||
// - http://pellepim.bitbucket.org/jstz/
|
||||
// - https://bitbucket.org/pellepim/jstimezonedetect/
|
||||
// The return value is an IANA zone info key (aka the Olson time zone database).
|
||||
// For example, if browser is in Madrid(Spain) timezone, "Europe/Berlin" will be returned.
|
||||
Par_GetParToText ("BrowserTZName",BrowserTimeZone,Dat_MAX_BYTES_TIME_ZONE);
|
||||
|
||||
/***** Convert from minutes to +hh:mm or -hh:mm *****/
|
||||
if (ClientUTCMinusLocal <= 0)
|
||||
sprintf (ClientTimeZoneDiffStr,"+%02u:%02u",
|
||||
(unsigned) (-ClientUTCMinusLocal) / 60,
|
||||
(unsigned) (-ClientUTCMinusLocal) % 60);
|
||||
else // ClientUTCMinusLocal > 0
|
||||
sprintf (ClientTimeZoneDiffStr,"-%02u:%02u",
|
||||
(unsigned) ClientUTCMinusLocal / 60,
|
||||
(unsigned) ClientUTCMinusLocal % 60);
|
||||
/* Check if client time zone is usable with CONVERT_TZ */
|
||||
if (BrowserTimeZone[0])
|
||||
{
|
||||
/* Try to convert a date from server time zone to browser time zone */
|
||||
sprintf (Query,"SELECT CONVERT_TZ(NOW(),@@session.time_zone,'%s')",
|
||||
BrowserTimeZone);
|
||||
if (DB_QuerySELECT (Query,&mysql_res,"can not check if time zone name is usable"))
|
||||
TZNameIsUsable = true;
|
||||
|
||||
/* Free structure that stores the query result */
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
}
|
||||
|
||||
if (!TZNameIsUsable)
|
||||
{
|
||||
/***** 2. Get client time zone difference *****/
|
||||
// We get client TZ difference using JavaScript getTimezoneOffset() method
|
||||
// getTimezoneOffset() returns UTC-time - browser-local-time, in minutes.
|
||||
// For example, if browser time zone is GMT+2, -120 will be returned.
|
||||
Par_GetParToText ("BrowserTZDiff",IntStr,1+10);
|
||||
if (sscanf (IntStr,"%d",&ClientUTCMinusLocal) != 1)
|
||||
ClientUTCMinusLocal = 0;
|
||||
|
||||
/* Convert from minutes to +-hh:mm */
|
||||
// BrowserTimeZone must have space for strings in +hh:mm format (6 chars + \0)
|
||||
if (ClientUTCMinusLocal > 0)
|
||||
sprintf (BrowserTimeZone,"-%02u:%02u",
|
||||
(unsigned) ClientUTCMinusLocal / 60,
|
||||
(unsigned) ClientUTCMinusLocal % 60);
|
||||
else // ClientUTCMinusLocal <= 0
|
||||
sprintf (BrowserTimeZone,"+%02u:%02u",
|
||||
(unsigned) (-ClientUTCMinusLocal) / 60,
|
||||
(unsigned) (-ClientUTCMinusLocal) % 60);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -37,6 +37,8 @@
|
|||
|
||||
#define Dat_SECONDS_IN_ONE_MONTH (30UL*24UL*60UL*60UL)
|
||||
|
||||
#define Dat_MAX_BYTES_TIME_ZONE 256
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************* Public types ********************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -86,8 +88,8 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
|
|||
bool SubmitFormOnChange);
|
||||
time_t Dat_GetTimeUTCFromForm (const char *ParamName);
|
||||
|
||||
void Dat_PutHiddenParClientTZDiff (void);
|
||||
void Dat_GetClientTimeZoneDiff (char *ClientTimeZoneDiffStr);
|
||||
void Dat_PutHiddenParBrowserTZDiff (void);
|
||||
void Dat_GetBrowserTimeZone (char BrowserTimeZone[Dat_MAX_BYTES_TIME_ZONE+1]);
|
||||
|
||||
void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
|
||||
const char *Id,
|
||||
|
|
|
@ -481,43 +481,58 @@ static void Lay_WriteScripts (void)
|
|||
Lay_WriteScriptConnectedUsrs ();
|
||||
}
|
||||
|
||||
/***** Script for uploading files using Dropzone.js (http://www.dropzonejs.com/) *****/
|
||||
// The public directory dropzone must hold:
|
||||
// dropzone.js
|
||||
// css/dropzone.css
|
||||
// images/spritemap@2x.png
|
||||
// images/spritemap.png
|
||||
if (Gbl.CurrentAct == ActFrmCreDocIns || // Brw_ADMI_DOCUM_INS
|
||||
Gbl.CurrentAct == ActFrmCreComIns || // Brw_ADMI_SHARE_INS
|
||||
Gbl.CurrentAct == ActFrmCreDocCtr || // Brw_ADMI_DOCUM_CTR
|
||||
Gbl.CurrentAct == ActFrmCreComCtr || // Brw_ADMI_SHARE_CTR
|
||||
Gbl.CurrentAct == ActFrmCreDocDeg || // Brw_ADMI_DOCUM_DEG
|
||||
Gbl.CurrentAct == ActFrmCreComDeg || // Brw_ADMI_SHARE_DEG
|
||||
Gbl.CurrentAct == ActFrmCreDocCrs || // Brw_ADMI_DOCUM_CRS
|
||||
Gbl.CurrentAct == ActFrmCreDocGrp || // Brw_ADMI_DOCUM_GRP
|
||||
Gbl.CurrentAct == ActFrmCreComCrs || // Brw_ADMI_SHARE_CRS
|
||||
Gbl.CurrentAct == ActFrmCreComGrp || // Brw_ADMI_SHARE_GRP
|
||||
Gbl.CurrentAct == ActFrmCreAsgUsr || // Brw_ADMI_ASSIG_USR
|
||||
Gbl.CurrentAct == ActFrmCreAsgCrs || // Brw_ADMI_ASSIG_CRS
|
||||
Gbl.CurrentAct == ActFrmCreWrkUsr || // Brw_ADMI_WORKS_USR
|
||||
Gbl.CurrentAct == ActFrmCreWrkCrs || // Brw_ADMI_WORKS_CRS
|
||||
Gbl.CurrentAct == ActFrmCreMrkCrs || // Brw_ADMI_MARKS_CRS
|
||||
Gbl.CurrentAct == ActFrmCreMrkGrp || // Brw_ADMI_MARKS_GRP
|
||||
Gbl.CurrentAct == ActFrmCreBrf) // Brw_ADMI_BRIEF_USR
|
||||
/***** Scripts depending on action *****/
|
||||
switch (Gbl.CurrentAct)
|
||||
{
|
||||
// Use charset="windows-1252" to force error messages in windows-1252 (default is UTF-8)
|
||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\""
|
||||
" src=\"%s/dropzone/dropzone.js\""
|
||||
" charset=\"windows-1252\">"
|
||||
"</script>\n",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC);
|
||||
Lay_WriteScriptCustomDropzone ();
|
||||
/***** Script to print world map *****/
|
||||
case ActSeeCty:
|
||||
Cty_WriteScriptGoogleGeochart ();
|
||||
break;
|
||||
/***** Script for uploading files using Dropzone.js (http://www.dropzonejs.com/) *****/
|
||||
// The public directory dropzone must hold:
|
||||
// dropzone.js
|
||||
// css/dropzone.css
|
||||
// images/spritemap@2x.png
|
||||
// images/spritemap.png
|
||||
case ActFrmCreDocIns: // Brw_ADMI_DOCUM_INS
|
||||
case ActFrmCreComIns: // Brw_ADMI_SHARE_INS
|
||||
case ActFrmCreDocCtr: // Brw_ADMI_DOCUM_CTR
|
||||
case ActFrmCreComCtr: // Brw_ADMI_SHARE_CTR
|
||||
case ActFrmCreDocDeg: // Brw_ADMI_DOCUM_DEG
|
||||
case ActFrmCreComDeg: // Brw_ADMI_SHARE_DEG
|
||||
case ActFrmCreDocCrs: // Brw_ADMI_DOCUM_CRS
|
||||
case ActFrmCreDocGrp: // Brw_ADMI_DOCUM_GRP
|
||||
case ActFrmCreComCrs: // Brw_ADMI_SHARE_CRS
|
||||
case ActFrmCreComGrp: // Brw_ADMI_SHARE_GRP
|
||||
case ActFrmCreAsgUsr: // Brw_ADMI_ASSIG_USR
|
||||
case ActFrmCreAsgCrs: // Brw_ADMI_ASSIG_CRS
|
||||
case ActFrmCreWrkUsr: // Brw_ADMI_WORKS_USR
|
||||
case ActFrmCreWrkCrs: // Brw_ADMI_WORKS_CRS
|
||||
case ActFrmCreMrkCrs: // Brw_ADMI_MARKS_CRS
|
||||
case ActFrmCreMrkGrp: // Brw_ADMI_MARKS_GRP
|
||||
case ActFrmCreBrf: // Brw_ADMI_BRIEF_USR
|
||||
// Use charset="windows-1252" to force error messages in windows-1252 (default is UTF-8)
|
||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\""
|
||||
" src=\"%s/dropzone/dropzone.js\""
|
||||
" charset=\"windows-1252\">"
|
||||
"</script>\n",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC);
|
||||
Lay_WriteScriptCustomDropzone ();
|
||||
break;
|
||||
case ActReqAccGbl:
|
||||
case ActSeeAccGbl:
|
||||
case ActReqAccCrs:
|
||||
case ActSeeAccCrs:
|
||||
case ActSeeAllStaCrs:
|
||||
fprintf (Gbl.F.Out,"<script type=\"text/javascript\""
|
||||
" src=\"%s/jstz/jstz.js\">"
|
||||
"</script>\n",
|
||||
Cfg_HTTPS_URL_SWAD_PUBLIC);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/***** Script to print world map *****/
|
||||
if (Gbl.CurrentAct == ActSeeCty)
|
||||
Cty_WriteScriptGoogleGeochart ();
|
||||
|
||||
/***** Script for Google Analytics *****/
|
||||
fprintf (Gbl.F.Out,"%s",Cfg_GOOGLE_ANALYTICS);
|
||||
}
|
||||
|
|
|
@ -579,7 +579,7 @@ void Sta_AskShowCrsHits (void)
|
|||
"</table>");
|
||||
|
||||
/***** Hidden param used to get client time zone *****/
|
||||
Dat_PutHiddenParClientTZDiff ();
|
||||
Dat_PutHiddenParBrowserTZDiff ();
|
||||
|
||||
/***** Send button *****/
|
||||
Lay_PutConfirmButton (Txt_Show_hits);
|
||||
|
@ -727,7 +727,7 @@ void Sta_AskShowGblHits (void)
|
|||
"</table>");
|
||||
|
||||
/***** Hidden param used to get client time zone *****/
|
||||
Dat_PutHiddenParClientTZDiff ();
|
||||
Dat_PutHiddenParBrowserTZDiff ();
|
||||
|
||||
/***** Send button *****/
|
||||
Lay_PutConfirmButton (Txt_Show_hits);
|
||||
|
@ -843,6 +843,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
extern const char *Txt_There_are_no_accesses_with_the_selected_search_criteria;
|
||||
extern const char *Txt_List_of_detailed_clicks;
|
||||
extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_COUNT_TYPES];
|
||||
extern const char *Txt_Time_zone_used_in_the_calculation_of_these_statistics;
|
||||
char Query[MAX_LENGTH_QUERY_ACCESS+1];
|
||||
char QueryAux[512];
|
||||
long LengthQuery;
|
||||
|
@ -853,8 +854,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
const char *LogTable;
|
||||
Sta_ClicksDetailedOrGrouped_t DetailedOrGrouped = Sta_CLICKS_GROUPED;
|
||||
struct UsrData UsrDat;
|
||||
char ClientTimeZoneDiffStr[1+2+1+2+1]; // Time difference between UTC time and client local time,
|
||||
// in +hh:mm or -hh:mm format
|
||||
char BrowserTimeZone[Dat_MAX_BYTES_TIME_ZONE+1];
|
||||
unsigned NumUsr = 0;
|
||||
const char *Ptr;
|
||||
char StrRole[256];
|
||||
|
@ -868,7 +868,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
Dat_GetIniEndDatesFromForm ();
|
||||
|
||||
/***** Get client time zone *****/
|
||||
Dat_GetClientTimeZoneDiff (ClientTimeZoneDiffStr);
|
||||
Dat_GetBrowserTimeZone (BrowserTimeZone);
|
||||
|
||||
/***** Set table where to find depending on initial date *****/
|
||||
// If initial day is older than current day minus Cfg_DAYS_IN_RECENT_LOG, then use recent log table, else use historic log table */
|
||||
|
@ -1032,7 +1032,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
sprintf (Query,"SELECT SQL_NO_CACHE "
|
||||
"DATE_FORMAT(CONVERT_TZ(ClickTime,@@session.time_zone,'%s'),'%%Y%%m%%d') AS Day,"
|
||||
"%s FROM %s",
|
||||
ClientTimeZoneDiffStr,
|
||||
BrowserTimeZone,
|
||||
StrQueryCountType,LogTable);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_DAYS_AND_HOUR:
|
||||
|
@ -1041,8 +1041,8 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
"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,"
|
||||
"%s FROM %s",
|
||||
ClientTimeZoneDiffStr,
|
||||
ClientTimeZoneDiffStr,
|
||||
BrowserTimeZone,
|
||||
BrowserTimeZone,
|
||||
StrQueryCountType,LogTable);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_WEEKS:
|
||||
|
@ -1053,7 +1053,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
sprintf (Query,"SELECT SQL_NO_CACHE "
|
||||
"DATE_FORMAT(CONVERT_TZ(ClickTime,@@session.time_zone,'%s'),'%%x%%v') AS Week,"
|
||||
"%s FROM %s",
|
||||
ClientTimeZoneDiffStr,
|
||||
BrowserTimeZone,
|
||||
StrQueryCountType,LogTable);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_MONTHS:
|
||||
|
@ -1061,7 +1061,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
sprintf (Query,"SELECT SQL_NO_CACHE "
|
||||
"DATE_FORMAT(CONVERT_TZ(ClickTime,@@session.time_zone,'%s'),'%%Y%%m') AS Month,"
|
||||
"%s FROM %s",
|
||||
ClientTimeZoneDiffStr,
|
||||
BrowserTimeZone,
|
||||
StrQueryCountType,LogTable);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_HOUR:
|
||||
|
@ -1069,7 +1069,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
sprintf (Query,"SELECT SQL_NO_CACHE "
|
||||
"DATE_FORMAT(CONVERT_TZ(ClickTime,@@session.time_zone,'%s'),'%%H') AS Hour,"
|
||||
"%s FROM %s",
|
||||
ClientTimeZoneDiffStr,
|
||||
BrowserTimeZone,
|
||||
StrQueryCountType,LogTable);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_MINUTE:
|
||||
|
@ -1077,7 +1077,7 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
sprintf (Query,"SELECT SQL_NO_CACHE "
|
||||
"DATE_FORMAT(CONVERT_TZ(ClickTime,@@session.time_zone,'%s'),'%%H%%i') AS Minute,"
|
||||
"%s FROM %s",
|
||||
ClientTimeZoneDiffStr,
|
||||
BrowserTimeZone,
|
||||
StrQueryCountType,LogTable);
|
||||
break;
|
||||
case Sta_CLICKS_CRS_PER_ACTION:
|
||||
|
@ -1377,9 +1377,10 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
/* Write start of table frame */
|
||||
fprintf (Gbl.F.Out,"<section id=\"stat_results\">");
|
||||
if (Gbl.Stat.ClicksGroupedBy == Sta_CLICKS_CRS_DETAILED_LIST)
|
||||
Lay_StartRoundFrameTable ("95%",0,Txt_List_of_detailed_clicks);
|
||||
Lay_StartRoundFrame ("95%",Txt_List_of_detailed_clicks);
|
||||
else
|
||||
Lay_StartRoundFrameTable (NULL,0,Txt_STAT_TYPE_COUNT_CAPS[Gbl.Stat.CountType]);
|
||||
Lay_StartRoundFrame (NULL,Txt_STAT_TYPE_COUNT_CAPS[Gbl.Stat.CountType]);
|
||||
fprintf (Gbl.F.Out,"<table>");
|
||||
|
||||
switch (Gbl.Stat.ClicksGroupedBy)
|
||||
{
|
||||
|
@ -1442,9 +1443,10 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
Sta_ShowNumHitsPerCourse (NumRows,mysql_res);
|
||||
break;
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</table>");
|
||||
|
||||
/* End of frame */
|
||||
Lay_EndRoundFrameTable ();
|
||||
Lay_EndRoundFrame ();
|
||||
fprintf (Gbl.F.Out,"</section>");
|
||||
}
|
||||
|
||||
|
@ -1457,6 +1459,29 @@ static void Sta_ShowHits (Sta_GlobalOrCourseAccesses_t GlobalOrCourse)
|
|||
|
||||
/***** Free memory used by the data of the user *****/
|
||||
Usr_UsrDataDestructor (&UsrDat);
|
||||
|
||||
/***** 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_HOUR:
|
||||
case Sta_CLICKS_GBL_PER_HOUR:
|
||||
case Sta_CLICKS_CRS_PER_MINUTE:
|
||||
case Sta_CLICKS_GBL_PER_MINUTE:
|
||||
fprintf (Gbl.F.Out,"<p class=\"DAT_SMALL CENTER_MIDDLE\">%s: %s</p>",
|
||||
Txt_Time_zone_used_in_the_calculation_of_these_statistics,
|
||||
BrowserTimeZone);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
237
swad_text.c
237
swad_text.c
|
@ -35218,123 +35218,123 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#endif
|
||||
,
|
||||
#if L==0
|
||||
"dia*"
|
||||
"dia"
|
||||
#elif L==1
|
||||
"Tag*"
|
||||
"Tag"
|
||||
#elif L==2
|
||||
"day*"
|
||||
"day"
|
||||
#elif L==3
|
||||
"día*"
|
||||
"día"
|
||||
#elif L==4
|
||||
"jour*"
|
||||
"jour"
|
||||
#elif L==5
|
||||
"día*" // Okoteve traducción
|
||||
"día" // Okoteve traducción
|
||||
#elif L==6
|
||||
"giorno*"
|
||||
"giorno"
|
||||
#elif L==7
|
||||
"dzień*"
|
||||
"dzień"
|
||||
#elif L==8
|
||||
"dia*"
|
||||
"dia"
|
||||
#endif
|
||||
,
|
||||
#if L==0
|
||||
"dia i hora*"
|
||||
"dia i hora"
|
||||
#elif L==1
|
||||
"Tag und Stunde*"
|
||||
"Tag und Stunde"
|
||||
#elif L==2
|
||||
"day and hour*"
|
||||
"day and hour"
|
||||
#elif L==3
|
||||
"día y hora*"
|
||||
"día y hora"
|
||||
#elif L==4
|
||||
"jour et heure*"
|
||||
"jour et heure"
|
||||
#elif L==5
|
||||
"día y hora*" // Okoteve traducción
|
||||
"día y hora" // Okoteve traducción
|
||||
#elif L==6
|
||||
"giorno e ora*"
|
||||
"giorno e ora"
|
||||
#elif L==7
|
||||
"dzień i godzinę*"
|
||||
"dzień i godzinę"
|
||||
#elif L==8
|
||||
"dia e hora*"
|
||||
"dia e hora"
|
||||
#endif
|
||||
,
|
||||
#if L==0
|
||||
"setmana*"
|
||||
"setmana"
|
||||
#elif L==1
|
||||
"Woche*"
|
||||
"Woche"
|
||||
#elif L==2
|
||||
"week*"
|
||||
"week"
|
||||
#elif L==3
|
||||
"semana*"
|
||||
"semana"
|
||||
#elif L==4
|
||||
"semaine*"
|
||||
"semaine"
|
||||
#elif L==5
|
||||
"arapokõindy*"
|
||||
"arapokõindy"
|
||||
#elif L==6
|
||||
"settimana*"
|
||||
"settimana"
|
||||
#elif L==7
|
||||
"tydzień*"
|
||||
"tydzień"
|
||||
#elif L==8
|
||||
"semana*"
|
||||
"semana"
|
||||
#endif
|
||||
,
|
||||
#if L==0
|
||||
"mes*"
|
||||
"mes"
|
||||
#elif L==1
|
||||
"Monat*"
|
||||
"Monat"
|
||||
#elif L==2
|
||||
"month*"
|
||||
"month"
|
||||
#elif L==3
|
||||
"mes*"
|
||||
"mes"
|
||||
#elif L==4
|
||||
"mois*"
|
||||
"mois"
|
||||
#elif L==5
|
||||
"jasy*"
|
||||
"jasy"
|
||||
#elif L==6
|
||||
"mese*"
|
||||
"mese"
|
||||
#elif L==7
|
||||
"miesiąc*"
|
||||
"miesiąc"
|
||||
#elif L==8
|
||||
"mês*"
|
||||
"mês"
|
||||
#endif
|
||||
,
|
||||
#if L==0
|
||||
"hora*"
|
||||
"hora"
|
||||
#elif L==1
|
||||
"Stunde*"
|
||||
"Stunde"
|
||||
#elif L==2
|
||||
"hour*"
|
||||
"hour"
|
||||
#elif L==3
|
||||
"hora*"
|
||||
"hora"
|
||||
#elif L==4
|
||||
"heure*"
|
||||
"heure"
|
||||
#elif L==5
|
||||
"aravo*"
|
||||
"aravo"
|
||||
#elif L==6
|
||||
"ora*"
|
||||
"ora"
|
||||
#elif L==7
|
||||
"godzina*"
|
||||
"godzina"
|
||||
#elif L==8
|
||||
"hora*"
|
||||
"hora"
|
||||
#endif
|
||||
,
|
||||
#if L==0
|
||||
"minut*"
|
||||
"minut"
|
||||
#elif L==1
|
||||
"Minute*"
|
||||
"Minute"
|
||||
#elif L==2
|
||||
"minute*"
|
||||
"minute"
|
||||
#elif L==3
|
||||
"minuto*"
|
||||
"minuto"
|
||||
#elif L==4
|
||||
"minute*"
|
||||
"minute"
|
||||
#elif L==5
|
||||
"aravo'i*"
|
||||
"aravo'i"
|
||||
#elif L==6
|
||||
"minuto*"
|
||||
"minuto"
|
||||
#elif L==7
|
||||
"minutę*"
|
||||
"minutę"
|
||||
#elif L==8
|
||||
"minuto*"
|
||||
"minuto"
|
||||
#endif
|
||||
,
|
||||
#if L==0
|
||||
|
@ -35358,123 +35358,123 @@ const char *Txt_STAT_CLICKS_GROUPED_BY[Sta_NUM_CLICKS_GROUPED_BY] =
|
|||
#endif
|
||||
,
|
||||
#if L==0
|
||||
"dia*"
|
||||
"dia"
|
||||
#elif L==1
|
||||
"Tag*"
|
||||
"Tag"
|
||||
#elif L==2
|
||||
"day*"
|
||||
"day"
|
||||
#elif L==3
|
||||
"día*"
|
||||
"día"
|
||||
#elif L==4
|
||||
"jour*"
|
||||
"jour"
|
||||
#elif L==5
|
||||
"día*" // Okoteve traducción
|
||||
"día" // Okoteve traducción
|
||||
#elif L==6
|
||||
"giorno*"
|
||||
"giorno"
|
||||
#elif L==7
|
||||
"dzień*"
|
||||
"dzień"
|
||||
#elif L==8
|
||||
"dia*"
|
||||
"dia"
|
||||
#endif
|
||||
,
|
||||
#if L==0
|
||||
"dia i hora*"
|
||||
"dia i hora"
|
||||
#elif L==1
|
||||
"Tag und Stunde*"
|
||||
"Tag und Stunde"
|
||||
#elif L==2
|
||||
"day and hour*"
|
||||
"day and hour"
|
||||
#elif L==3
|
||||
"día y hora*"
|
||||
"día y hora"
|
||||
#elif L==4
|
||||
"jour et heure*"
|
||||
"jour et heure"
|
||||
#elif L==5
|
||||
"día y hora*" // Okoteve traducción
|
||||
"día y hora" // Okoteve traducción
|
||||
#elif L==6
|
||||
"giorno e ora*"
|
||||
"giorno e ora"
|
||||
#elif L==7
|
||||
"dzień i godzinę*"
|
||||
"dzień i godzinę"
|
||||
#elif L==8
|
||||
"dia e hora*"
|
||||
"dia e hora"
|
||||
#endif
|
||||
,
|
||||
#if L==0
|
||||
"setmana*"
|
||||
"setmana"
|
||||
#elif L==1
|
||||
"Woche*"
|
||||
"Woche"
|
||||
#elif L==2
|
||||
"week*"
|
||||
"week"
|
||||
#elif L==3
|
||||
"semana*"
|
||||
"semana"
|
||||
#elif L==4
|
||||
"semaine*"
|
||||
"semaine"
|
||||
#elif L==5
|
||||
"arapokõindy*"
|
||||
"arapokõindy"
|
||||
#elif L==6
|
||||
"settimana*"
|
||||
"settimana"
|
||||
#elif L==7
|
||||
"tydzień*"
|
||||
"tydzień"
|
||||
#elif L==8
|
||||
"semana*"
|
||||
"semana"
|
||||
#endif
|
||||
,
|
||||
#if L==0
|
||||
"mes*"
|
||||
"mes"
|
||||
#elif L==1
|
||||
"Monat*"
|
||||
"Monat"
|
||||
#elif L==2
|
||||
"month*"
|
||||
"month"
|
||||
#elif L==3
|
||||
"mes*"
|
||||
"mes"
|
||||
#elif L==4
|
||||
"mois*"
|
||||
"mois"
|
||||
#elif L==5
|
||||
"jasy*"
|
||||
"jasy"
|
||||
#elif L==6
|
||||
"mese*"
|
||||
"mese"
|
||||
#elif L==7
|
||||
"miesiąc*"
|
||||
"miesiąc"
|
||||
#elif L==8
|
||||
"mês*"
|
||||
"mês"
|
||||
#endif
|
||||
,
|
||||
#if L==0
|
||||
"hora*"
|
||||
"hora"
|
||||
#elif L==1
|
||||
"Stunde*"
|
||||
"Stunde"
|
||||
#elif L==2
|
||||
"hour*"
|
||||
"hour"
|
||||
#elif L==3
|
||||
"hora*"
|
||||
"hora"
|
||||
#elif L==4
|
||||
"heure*"
|
||||
"heure"
|
||||
#elif L==5
|
||||
"aravo*"
|
||||
"aravo"
|
||||
#elif L==6
|
||||
"ora*"
|
||||
"ora"
|
||||
#elif L==7
|
||||
"godzina*"
|
||||
"godzina"
|
||||
#elif L==8
|
||||
"hora*"
|
||||
"hora"
|
||||
#endif
|
||||
,
|
||||
#if L==0
|
||||
"minut*"
|
||||
"minut"
|
||||
#elif L==1
|
||||
"Minute*"
|
||||
"Minute"
|
||||
#elif L==2
|
||||
"minute*"
|
||||
"minute"
|
||||
#elif L==3
|
||||
"minuto*"
|
||||
"minuto"
|
||||
#elif L==4
|
||||
"minute*"
|
||||
"minute"
|
||||
#elif L==5
|
||||
"aravo'i*"
|
||||
"aravo'i"
|
||||
#elif L==6
|
||||
"minuto*"
|
||||
"minuto"
|
||||
#elif L==7
|
||||
"minutę*"
|
||||
"minutę"
|
||||
#elif L==8
|
||||
"minuto*"
|
||||
"minuto"
|
||||
#endif
|
||||
,
|
||||
#if L==0
|
||||
|
@ -44724,6 +44724,27 @@ const char *Txt_time =
|
|||
"tempo";
|
||||
#endif
|
||||
|
||||
const char *Txt_Time_zone_used_in_the_calculation_of_these_statistics =
|
||||
#if L==0
|
||||
"Zona horària usada en el càlcul d'aquesta estadística";
|
||||
#elif L==1
|
||||
"Zeitzone in die Berechnung dieser Statistik verwendet";
|
||||
#elif L==2
|
||||
"Time zone used in the calculation of these statistics";
|
||||
#elif L==3
|
||||
"Zona horaria usada en el cálculo de esta estadística";
|
||||
#elif L==4
|
||||
"Fuseau horaire utilisé dans le calcul de ces statistiques";
|
||||
#elif L==5
|
||||
"Zona horaria usada en el cálculo de esta estadística"; // Okoteve traducción
|
||||
#elif L==6
|
||||
"Fuso orario utilizzato per il calcolo di queste statistiche";
|
||||
#elif L==7
|
||||
"Strefa czasowa używana w obliczeniach tych statystyk";
|
||||
#elif L==8
|
||||
"Fuso horário utilizado no cálculo dessas estatísticas";
|
||||
#endif
|
||||
|
||||
const char *Txt_TIMETABLE_TYPES[TT_NUM_TIMETABLE_TYPES] =
|
||||
{
|
||||
// TT_COURSE_TIMETABLE
|
||||
|
|
Loading…
Reference in New Issue