mirror of https://github.com/acanas/swad-core.git
Version 16.7.7
This commit is contained in:
parent
c47492ceb7
commit
717b14aab8
|
@ -143,13 +143,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.7.6 (2016-10-03)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.7.7 (2016-10-03)"
|
||||
#define CSS_FILE "swad15.229.css"
|
||||
#define JS_FILE "swad15.238.1.js"
|
||||
|
||||
// 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 16.7.7: Oct 03, 2016 Code refactoring in user's usage report. (205609 lines)
|
||||
Version 16.7.6: Oct 03, 2016 Code refactoring in user's usage report. (205591 lines)
|
||||
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)
|
||||
|
|
|
@ -84,6 +84,8 @@ static void Rep_WriteSectionUsrFigures (struct UsrFigures *UsrFigures,
|
|||
struct tm *tm_FirstClickTime,
|
||||
const char *StrCurrentDate,
|
||||
const char *StrCurrentTime);
|
||||
static void Rep_WriteSectionGlobalHits (struct UsrFigures *UsrFigures,
|
||||
struct tm *tm_FirstClickTime);
|
||||
|
||||
static unsigned long Rep_GetMaxHitsPerYear (time_t FirstClickTimeUTC);
|
||||
static void Rep_GetAndWriteCurrentCrssOfAUsr (const struct UsrData *UsrDat,Rol_Role_t Role,
|
||||
|
@ -125,7 +127,6 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
|||
extern const char *Txt_Report;
|
||||
extern const char *Txt_Courses;
|
||||
extern const char *Txt_historical_log;
|
||||
extern const char *Txt_Hits;
|
||||
struct UsrFigures UsrFigures;
|
||||
time_t CurrentTime;
|
||||
struct tm tm_CurrentTime;
|
||||
|
@ -180,11 +181,7 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint)
|
|||
StrCurrentDate,StrCurrentTime);
|
||||
|
||||
/***** Global hits *****/
|
||||
fprintf (Gbl.F.Out,"<h3>%s</h3>",Txt_Hits);
|
||||
Rep_ShowMyHitsPerYear (true,-1L,Rol_UNKNOWN,
|
||||
UsrFigures.FirstClickTimeUTC,
|
||||
&tm_FirstClickTime,
|
||||
0);
|
||||
Rep_WriteSectionGlobalHits (&UsrFigures,&tm_FirstClickTime);
|
||||
|
||||
/***** Current courses *****/
|
||||
fprintf (Gbl.F.Out,"<h3>%s",Txt_Courses);
|
||||
|
@ -509,6 +506,31 @@ static void Rep_WriteSectionUsrFigures (struct UsrFigures *UsrFigures,
|
|||
"</section>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******** Write section for user's global hits in user's usage report ********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rep_WriteSectionGlobalHits (struct UsrFigures *UsrFigures,
|
||||
struct tm *tm_FirstClickTime)
|
||||
{
|
||||
extern const char *Txt_Hits;
|
||||
|
||||
/***** Start of section *****/
|
||||
fprintf (Gbl.F.Out,"<section>"
|
||||
"<h3>%s</h3>",
|
||||
Txt_Hits);
|
||||
|
||||
/***** Global (in any course) hits per year *****/
|
||||
Rep_ShowMyHitsPerYear (true,-1L, // Any course
|
||||
Rol_UNKNOWN, // Any role
|
||||
UsrFigures->FirstClickTimeUTC,
|
||||
tm_FirstClickTime,
|
||||
0); // MaxHitsPerYear not passed as an argument but computed inside the function
|
||||
|
||||
/***** End of section *****/
|
||||
fprintf (Gbl.F.Out,"</section>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************ Get the maximum number of hits per course-year-role ************/
|
||||
/*****************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue