mirror of https://github.com/acanas/swad-core.git
Version 16.7.5
This commit is contained in:
parent
3478936cac
commit
07aacdf20c
|
@ -143,13 +143,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.7.4 (2016-10-03)"
|
#define Log_PLATFORM_VERSION "SWAD 16.7.5 (2016-10-03)"
|
||||||
#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.7.5: Oct 03, 2016 Code refactoring in user's usage report. (205570 lines)
|
||||||
Version 16.7.4: Oct 03, 2016 Code refactoring in user's usage report. (205557 lines)
|
Version 16.7.4: Oct 03, 2016 Code refactoring in user's usage report. (205557 lines)
|
||||||
Version 16.7.3: Oct 03, 2016 User's ID is removed from user's usage report. (205533 lines)
|
Version 16.7.3: Oct 03, 2016 User's ID is removed from user's usage report. (205533 lines)
|
||||||
Version 16.7.2: Oct 02, 2016 Change in order of hits in user's usage report. (205546 lines)
|
Version 16.7.2: Oct 02, 2016 Change in order of hits in user's usage report. (205546 lines)
|
||||||
|
|
|
@ -79,6 +79,7 @@ static void Rep_PutIconToPrintMyUsageReport (void);
|
||||||
|
|
||||||
static void Rep_WriteHeader (const char *StrCurrentDate);
|
static void Rep_WriteHeader (const char *StrCurrentDate);
|
||||||
static void Rep_WriteSectionPlatform (void);
|
static void Rep_WriteSectionPlatform (void);
|
||||||
|
static void Rep_WriteSectionUsrInfo (void);
|
||||||
|
|
||||||
static unsigned long Rep_GetMaxHitsPerYear (time_t FirstClickTimeUTC);
|
static unsigned long Rep_GetMaxHitsPerYear (time_t FirstClickTimeUTC);
|
||||||
static void Rep_GetAndWriteCurrentCrssOfAUsr (const struct UsrData *UsrDat,Rol_Role_t Role,
|
static void Rep_GetAndWriteCurrentCrssOfAUsr (const struct UsrData *UsrDat,Rol_Role_t Role,
|
||||||
|
@ -118,11 +119,6 @@ void Rep_PrintMyUsageReport (void)
|
||||||
static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Report;
|
extern const char *Txt_Report;
|
||||||
extern const char *Txt_Name;
|
|
||||||
extern const char *Txt_Personal_information;
|
|
||||||
extern const char *Txt_Email;
|
|
||||||
extern const char *Txt_Country;
|
|
||||||
extern const char *Txt_Institution;
|
|
||||||
extern const char *Txt_Figures;
|
extern const char *Txt_Figures;
|
||||||
extern const char *Txt_TIME_Since;
|
extern const char *Txt_TIME_Since;
|
||||||
extern const char *Txt_TIME_until;
|
extern const char *Txt_TIME_until;
|
||||||
|
@ -145,8 +141,6 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
extern const char *Txt_Courses;
|
extern const char *Txt_Courses;
|
||||||
extern const char *Txt_historical_log;
|
extern const char *Txt_historical_log;
|
||||||
extern const char *Txt_Hits;
|
extern const char *Txt_Hits;
|
||||||
char CtyName[Cty_MAX_BYTES_COUNTRY_NAME+1];
|
|
||||||
struct Institution Ins;
|
|
||||||
struct UsrFigures UsrFigures;
|
struct UsrFigures UsrFigures;
|
||||||
time_t CurrentTime;
|
time_t CurrentTime;
|
||||||
struct tm tm_CurrentTime;
|
struct tm tm_CurrentTime;
|
||||||
|
@ -193,34 +187,7 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
||||||
Rep_WriteSectionPlatform ();
|
Rep_WriteSectionPlatform ();
|
||||||
|
|
||||||
/***** Personal information *****/
|
/***** Personal information *****/
|
||||||
fprintf (Gbl.F.Out,"<h3>%s</h3>"
|
Rep_WriteSectionUsrInfo ();
|
||||||
"<ul>",
|
|
||||||
Txt_Personal_information);
|
|
||||||
|
|
||||||
/* User's name */
|
|
||||||
fprintf (Gbl.F.Out,"<li>%s: <strong>%s</strong></li>",
|
|
||||||
Txt_Name,
|
|
||||||
Gbl.Usrs.Me.UsrDat.FullName);
|
|
||||||
|
|
||||||
/* User's e-mail */
|
|
||||||
fprintf (Gbl.F.Out,"<li>%s: %s</li>",
|
|
||||||
Txt_Email,
|
|
||||||
Gbl.Usrs.Me.UsrDat.Email);
|
|
||||||
|
|
||||||
/* User's country */
|
|
||||||
Cty_GetCountryName (Gbl.Usrs.Me.UsrDat.CtyCod,CtyName);
|
|
||||||
fprintf (Gbl.F.Out,"<li>%s: %s</li>",
|
|
||||||
Txt_Country,
|
|
||||||
CtyName);
|
|
||||||
|
|
||||||
/* User's institution */
|
|
||||||
Ins.InsCod = Gbl.Usrs.Me.UsrDat.InsCod;
|
|
||||||
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
|
||||||
fprintf (Gbl.F.Out,"<li>%s: %s</li>",
|
|
||||||
Txt_Institution,
|
|
||||||
Ins.FullName);
|
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</ul>");
|
|
||||||
|
|
||||||
/***** Figures *****/
|
/***** Figures *****/
|
||||||
fprintf (Gbl.F.Out,"<h3>%s</h3>"
|
fprintf (Gbl.F.Out,"<h3>%s</h3>"
|
||||||
|
@ -472,6 +439,54 @@ static void Rep_WriteSectionPlatform (void)
|
||||||
"</section>");
|
"</section>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/*********** Write section for user's info in user's usage report ************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Rep_WriteSectionUsrInfo (void)
|
||||||
|
{
|
||||||
|
extern const char *Txt_Personal_information;
|
||||||
|
extern const char *Txt_Name;
|
||||||
|
extern const char *Txt_Email;
|
||||||
|
extern const char *Txt_Country;
|
||||||
|
extern const char *Txt_Institution;
|
||||||
|
char CtyName[Cty_MAX_BYTES_COUNTRY_NAME+1];
|
||||||
|
struct Institution Ins;
|
||||||
|
|
||||||
|
/***** Start of section *****/
|
||||||
|
fprintf (Gbl.F.Out,"<section>"
|
||||||
|
"<h3>%s</h3>"
|
||||||
|
"<ul>",
|
||||||
|
Txt_Personal_information);
|
||||||
|
|
||||||
|
/***** User's name *****/
|
||||||
|
fprintf (Gbl.F.Out,"<li>%s: <strong>%s</strong></li>",
|
||||||
|
Txt_Name,
|
||||||
|
Gbl.Usrs.Me.UsrDat.FullName);
|
||||||
|
|
||||||
|
/***** User's e-mail *****/
|
||||||
|
fprintf (Gbl.F.Out,"<li>%s: %s</li>",
|
||||||
|
Txt_Email,
|
||||||
|
Gbl.Usrs.Me.UsrDat.Email);
|
||||||
|
|
||||||
|
/***** User's country *****/
|
||||||
|
Cty_GetCountryName (Gbl.Usrs.Me.UsrDat.CtyCod,CtyName);
|
||||||
|
fprintf (Gbl.F.Out,"<li>%s: %s</li>",
|
||||||
|
Txt_Country,
|
||||||
|
CtyName);
|
||||||
|
|
||||||
|
/***** User's institution *****/
|
||||||
|
Ins.InsCod = Gbl.Usrs.Me.UsrDat.InsCod;
|
||||||
|
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
|
||||||
|
fprintf (Gbl.F.Out,"<li>%s: %s</li>",
|
||||||
|
Txt_Institution,
|
||||||
|
Ins.FullName);
|
||||||
|
|
||||||
|
/***** End of section *****/
|
||||||
|
fprintf (Gbl.F.Out,"</ul>"
|
||||||
|
"</section>");
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************ Get the maximum number of hits per course-year-role ************/
|
/************ Get the maximum number of hits per course-year-role ************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue