mirror of https://github.com/acanas/swad-core.git
Version 16.6.3
This commit is contained in:
parent
39dc2ec844
commit
44de356aab
|
@ -143,13 +143,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.6.2 (2016-10-02)"
|
#define Log_PLATFORM_VERSION "SWAD 16.6.3 (2016-10-02)"
|
||||||
#define CSS_FILE "swad15.229.css"
|
#define CSS_FILE "swad15.229.css"
|
||||||
#define JS_FILE "swad15.238.1.js"
|
#define JS_FILE "swad15.238.1.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 16.6.3: Oct 02, 2016 Current time in user's usage report. (205559 lines)
|
||||||
Version 16.6.2: Oct 02, 2016 Message translated. (205456 lines)
|
Version 16.6.2: Oct 02, 2016 Message translated. (205456 lines)
|
||||||
Version 16.6.1: Oct 02, 2016 Message translated. (205454 lines)
|
Version 16.6.1: Oct 02, 2016 Message translated. (205454 lines)
|
||||||
Version 16.6: Oct 02, 2016 Hits in historic courses in user's usage report. (205432 lines)
|
Version 16.6: Oct 02, 2016 Hits in historic courses in user's usage report. (205432 lines)
|
||||||
|
|
|
@ -128,7 +128,8 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
extern const char *Txt_Country;
|
extern const char *Txt_Country;
|
||||||
extern const char *Txt_Institution;
|
extern const char *Txt_Institution;
|
||||||
extern const char *Txt_Figures;
|
extern const char *Txt_Figures;
|
||||||
extern const char *Txt_From_TIME;
|
extern const char *Txt_TIME_Since;
|
||||||
|
extern const char *Txt_TIME_until;
|
||||||
extern const char *Txt_day;
|
extern const char *Txt_day;
|
||||||
extern const char *Txt_days;
|
extern const char *Txt_days;
|
||||||
extern const char *Txt_Clicks;
|
extern const char *Txt_Clicks;
|
||||||
|
@ -152,7 +153,13 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
char CtyName[Cty_MAX_BYTES_COUNTRY_NAME+1];
|
char CtyName[Cty_MAX_BYTES_COUNTRY_NAME+1];
|
||||||
struct Institution Ins;
|
struct Institution Ins;
|
||||||
struct UsrFigures UsrFigures;
|
struct UsrFigures UsrFigures;
|
||||||
|
time_t CurrentTime;
|
||||||
|
struct tm tm_CurrentTime;
|
||||||
struct tm tm_FirstClickTime;
|
struct tm tm_FirstClickTime;
|
||||||
|
char StrCurrentDate[10+1]; // Example: 2016-10-02
|
||||||
|
// 1234567890
|
||||||
|
char StrCurrentTime[8+1]; // Example: 19:03:49
|
||||||
|
// 12345678
|
||||||
unsigned NumFiles;
|
unsigned NumFiles;
|
||||||
unsigned NumPublicFiles;
|
unsigned NumPublicFiles;
|
||||||
Rol_Role_t Role;
|
Rol_Role_t Role;
|
||||||
|
@ -161,14 +168,40 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
/***** Get client time zone *****/
|
/***** Get client time zone *****/
|
||||||
Dat_GetBrowserTimeZone (BrowserTimeZone);
|
Dat_GetBrowserTimeZone (BrowserTimeZone);
|
||||||
|
|
||||||
|
/***** Get current date-time *****/
|
||||||
|
time (&CurrentTime);
|
||||||
|
if ((gmtime_r (&CurrentTime,&tm_CurrentTime)) != NULL)
|
||||||
|
{
|
||||||
|
sprintf (StrCurrentDate,"%04d-%02d-%02d",
|
||||||
|
1900 + tm_CurrentTime.tm_year, // year
|
||||||
|
1 + tm_CurrentTime.tm_mon, // month
|
||||||
|
tm_CurrentTime.tm_mday); // day of the month
|
||||||
|
sprintf (StrCurrentTime,"%02d:%02d:%02d",
|
||||||
|
tm_CurrentTime.tm_hour, // hours
|
||||||
|
tm_CurrentTime.tm_min, // minutes
|
||||||
|
tm_CurrentTime.tm_sec); // seconds
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
StrCurrentDate[0] = '\0';
|
||||||
|
StrCurrentTime[0] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
/***** Start frame *****/
|
/***** Start frame *****/
|
||||||
if (SeeOrPrint == Rep_SEE)
|
if (SeeOrPrint == Rep_SEE)
|
||||||
Lay_StartRoundFrame (NULL,Txt_Report_of_use_of_the_platform,
|
Lay_StartRoundFrame (NULL,Txt_Report_of_use_of_the_platform,
|
||||||
Rep_PutIconToPrintMyUsageReport);
|
Rep_PutIconToPrintMyUsageReport);
|
||||||
fprintf (Gbl.F.Out,"<div class=\"LEFT_TOP\" style=\"margin:10px;\">");
|
fprintf (Gbl.F.Out,"<div class=\"LEFT_TOP\" style=\"margin:10px;\">");
|
||||||
|
|
||||||
|
/***** Head *****/
|
||||||
|
fprintf (Gbl.F.Out,"<h1>%s</h1>",Txt_Report_of_use_of_the_platform);
|
||||||
|
fprintf (Gbl.F.Out,"<h2>%s",Gbl.Usrs.Me.UsrDat.FullName);
|
||||||
|
if (StrCurrentDate[0])
|
||||||
|
fprintf (Gbl.F.Out,", %s",StrCurrentDate);
|
||||||
|
fprintf (Gbl.F.Out,"</h2>");
|
||||||
|
|
||||||
/***** Personal information *****/
|
/***** Personal information *****/
|
||||||
fprintf (Gbl.F.Out,"<h2>%s</h2>"
|
fprintf (Gbl.F.Out,"<h3>%s</h3>"
|
||||||
"<ul>",
|
"<ul>",
|
||||||
Txt_Personal_information);
|
Txt_Personal_information);
|
||||||
|
|
||||||
|
@ -211,15 +244,15 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
fprintf (Gbl.F.Out,"</ul>");
|
fprintf (Gbl.F.Out,"</ul>");
|
||||||
|
|
||||||
/***** Figures *****/
|
/***** Figures *****/
|
||||||
fprintf (Gbl.F.Out,"<h2>%s</h2>"
|
fprintf (Gbl.F.Out,"<h3>%s</h3>"
|
||||||
"<ul>",
|
"<ul>",
|
||||||
Txt_Figures);
|
Txt_Figures);
|
||||||
|
|
||||||
/***** Get figures *****/
|
/***** Get figures *****/
|
||||||
Prf_GetUsrFigures (Gbl.Usrs.Me.UsrDat.UsrCod,&UsrFigures);
|
Prf_GetUsrFigures (Gbl.Usrs.Me.UsrDat.UsrCod,&UsrFigures);
|
||||||
|
|
||||||
/***** Time since first click *****/
|
/***** Time since first click until now *****/
|
||||||
fprintf (Gbl.F.Out,"<li>%s: ",Txt_From_TIME);
|
fprintf (Gbl.F.Out,"<li>%s ",Txt_TIME_Since);
|
||||||
if (UsrFigures.FirstClickTimeUTC)
|
if (UsrFigures.FirstClickTimeUTC)
|
||||||
{
|
{
|
||||||
if ((gmtime_r (&UsrFigures.FirstClickTimeUTC,&tm_FirstClickTime)) != NULL)
|
if ((gmtime_r (&UsrFigures.FirstClickTimeUTC,&tm_FirstClickTime)) != NULL)
|
||||||
|
@ -231,6 +264,9 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
tm_FirstClickTime.tm_hour, // hours
|
tm_FirstClickTime.tm_hour, // hours
|
||||||
tm_FirstClickTime.tm_min, // minutes
|
tm_FirstClickTime.tm_min, // minutes
|
||||||
tm_FirstClickTime.tm_sec); // seconds
|
tm_FirstClickTime.tm_sec); // seconds
|
||||||
|
if (StrCurrentDate[0])
|
||||||
|
fprintf (Gbl.F.Out," %s %s %s UTC",
|
||||||
|
Txt_TIME_until,StrCurrentDate,StrCurrentTime);
|
||||||
if (UsrFigures.NumDays > 0)
|
if (UsrFigures.NumDays > 0)
|
||||||
fprintf (Gbl.F.Out," (%d %s)",
|
fprintf (Gbl.F.Out," (%d %s)",
|
||||||
UsrFigures.NumDays,
|
UsrFigures.NumDays,
|
||||||
|
@ -239,7 +275,11 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Time of first click is unknown
|
else // Time of first click is unknown
|
||||||
|
{
|
||||||
fprintf (Gbl.F.Out,"?");
|
fprintf (Gbl.F.Out,"?");
|
||||||
|
if (StrCurrentDate[0])
|
||||||
|
fprintf (Gbl.F.Out," - %s %s UTC",StrCurrentDate,StrCurrentTime);
|
||||||
|
}
|
||||||
fprintf (Gbl.F.Out,"</li>");
|
fprintf (Gbl.F.Out,"</li>");
|
||||||
|
|
||||||
/***** Number of clicks *****/
|
/***** Number of clicks *****/
|
||||||
|
@ -336,9 +376,11 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
fprintf (Gbl.F.Out,"</ul>");
|
fprintf (Gbl.F.Out,"</ul>");
|
||||||
|
|
||||||
/***** Current courses *****/
|
/***** Current courses *****/
|
||||||
fprintf (Gbl.F.Out,"<h2>%s (actuales)</h2>" // TODO: Need translation!!!
|
fprintf (Gbl.F.Out,"<h3>%s",Txt_Courses);
|
||||||
"<ul>",
|
if (StrCurrentDate[0])
|
||||||
Txt_Courses);
|
fprintf (Gbl.F.Out," (%s)",StrCurrentDate);
|
||||||
|
fprintf (Gbl.F.Out,"</h3>"
|
||||||
|
"<ul>");
|
||||||
|
|
||||||
/* Number of courses in which the user is student/teacher */
|
/* Number of courses in which the user is student/teacher */
|
||||||
MaxHitsPerYear = Rep_GetMaxHitsPerYear (BrowserTimeZone,UsrFigures.FirstClickTimeUTC);
|
MaxHitsPerYear = Rep_GetMaxHitsPerYear (BrowserTimeZone,UsrFigures.FirstClickTimeUTC);
|
||||||
|
@ -354,7 +396,7 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
fprintf (Gbl.F.Out,"</ul>");
|
fprintf (Gbl.F.Out,"</ul>");
|
||||||
|
|
||||||
/***** Historic courses *****/
|
/***** Historic courses *****/
|
||||||
fprintf (Gbl.F.Out,"<h2>%s (histórico)</h2>" // TODO: Need translation!!!
|
fprintf (Gbl.F.Out,"<h3>%s (histórico)</h3>" // TODO: Need translation!!!
|
||||||
"<ul>",
|
"<ul>",
|
||||||
Txt_Courses);
|
Txt_Courses);
|
||||||
|
|
||||||
|
@ -371,7 +413,7 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
fprintf (Gbl.F.Out,"</ul>");
|
fprintf (Gbl.F.Out,"</ul>");
|
||||||
|
|
||||||
/***** Global hits *****/
|
/***** Global hits *****/
|
||||||
fprintf (Gbl.F.Out,"<h2>%s</h2>",Txt_Hits);
|
fprintf (Gbl.F.Out,"<h3>%s</h3>",Txt_Hits);
|
||||||
Rep_ShowMyHitsPerYear (true,-1L,Rol_UNKNOWN,
|
Rep_ShowMyHitsPerYear (true,-1L,Rol_UNKNOWN,
|
||||||
BrowserTimeZone,
|
BrowserTimeZone,
|
||||||
UsrFigures.FirstClickTimeUTC,
|
UsrFigures.FirstClickTimeUTC,
|
||||||
|
|
65
swad_text.c
65
swad_text.c
|
@ -31006,7 +31006,28 @@ const char *Txt_Reply_message = // "Reply" as a noun, not as a verb
|
||||||
#elif L==9
|
#elif L==9
|
||||||
"Mensagem de resposta";
|
"Mensagem de resposta";
|
||||||
#endif
|
#endif
|
||||||
|
/*
|
||||||
|
const char *Txt_Report =
|
||||||
|
#if L==1
|
||||||
|
"Informe";
|
||||||
|
#elif L==2
|
||||||
|
"Nutzungsbericht";
|
||||||
|
#elif L==3
|
||||||
|
"Report";
|
||||||
|
#elif L==4
|
||||||
|
"Informe";
|
||||||
|
#elif L==5
|
||||||
|
"Rapport";
|
||||||
|
#elif L==6
|
||||||
|
"Informe"; // Okoteve traducción
|
||||||
|
#elif L==7
|
||||||
|
"Rapporto";
|
||||||
|
#elif L==8
|
||||||
|
"Raport";
|
||||||
|
#elif L==9
|
||||||
|
"Relatório";
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
const char *Txt_Report_of_use_of_the_platform =
|
const char *Txt_Report_of_use_of_the_platform =
|
||||||
#if L==1
|
#if L==1
|
||||||
"Informe d'ús de la plataforma";
|
"Informe d'ús de la plataforma";
|
||||||
|
@ -47063,6 +47084,48 @@ const char *Txt_threads =
|
||||||
"threads";
|
"threads";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_TIME_Since =
|
||||||
|
#if L==1
|
||||||
|
"Des de";
|
||||||
|
#elif L==2
|
||||||
|
"Seit dem";
|
||||||
|
#elif L==3
|
||||||
|
"Since";
|
||||||
|
#elif L==4
|
||||||
|
"Desde";
|
||||||
|
#elif L==5
|
||||||
|
"Depuis";
|
||||||
|
#elif L==6
|
||||||
|
"Desde"; // Okoteve traducción
|
||||||
|
#elif L==7
|
||||||
|
"Dal";
|
||||||
|
#elif L==8
|
||||||
|
"Od";
|
||||||
|
#elif L==9
|
||||||
|
"Desde";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_TIME_until =
|
||||||
|
#if L==1
|
||||||
|
"fins al";
|
||||||
|
#elif L==2
|
||||||
|
"bis zum";
|
||||||
|
#elif L==3
|
||||||
|
"until";
|
||||||
|
#elif L==4
|
||||||
|
"hasta";
|
||||||
|
#elif L==5
|
||||||
|
"jusqu'au";
|
||||||
|
#elif L==6
|
||||||
|
"hasta"; // Okoteve traducción
|
||||||
|
#elif L==7
|
||||||
|
"al";
|
||||||
|
#elif L==8
|
||||||
|
"do";
|
||||||
|
#elif L==9
|
||||||
|
"até";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_time =
|
const char *Txt_time =
|
||||||
#if L==1
|
#if L==1
|
||||||
"temps";
|
"temps";
|
||||||
|
|
Loading…
Reference in New Issue