diff --git a/swad_changelog.h b/swad_changelog.h index 166a51f54..0ba594755 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -135,13 +135,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.252.1 (2016-09-12)" +#define Log_PLATFORM_VERSION "SWAD 15.253 (2016-09-12)" #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 15.253: Sep 12, 2016 Changes in layout of hits per month in user's usage report. (204608 lines) Version 15.252.1: Sep 12, 2016 Hits in user's usage report. Not finished. (204619 lines) Version 15.252: Sep 12, 2016 Hits in user's usage report. Not finished. (204589 lines) Version 15.251.2: Sep 11, 2016 Changes in layout of user's usage report. (204465 lines) diff --git a/swad_report.c b/swad_report.c index b7ada7971..885034aae 100644 --- a/swad_report.c +++ b/swad_report.c @@ -42,6 +42,14 @@ /***************************** Private constants *****************************/ /*****************************************************************************/ +#define Rep_MAX_BAR_WIDTH 75 // Maximum width of graphic bar +// #define Rep_BLOCK "═" // HTML code for a block in graphic bar +// #define Rep_BLOCK "▒" // HTML code for a block in graphic bar +// #define Rep_BLOCK "█" // HTML code for a block in graphic bar +// #define Rep_BLOCK "≡" // HTML code for a block in graphic bar +// #define Rep_BLOCK "•" // HTML code for a block in graphic bar +#define Rep_BLOCK "▪" // HTML code for a block in graphic bar + /*****************************************************************************/ /****************************** Internal types *******************************/ /*****************************************************************************/ @@ -73,7 +81,8 @@ static void Rep_GetAndWriteCrssOfAUsr (const struct UsrData *UsrDat,Rol_Role_t R static void Rep_WriteRowCrsData (MYSQL_ROW row); static void Rep_ShowMyHits (time_t FirstClickTimeUTC,struct tm *tm_FirstClickTime); -static void Rep_DrawBarNumHits (char Color,float HitsNum,float HitsMax,unsigned MaxBarWidth); +static void Rep_DrawBarNumHits (float HitsNum,float HitsMax, + unsigned MaxBarWidth); /*****************************************************************************/ /********* Show my usage report (report on my use of the platform) ***********/ @@ -346,13 +355,6 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint) /***** Hits *****/ fprintf (Gbl.F.Out,"
" - "%04u-%02u: " - " | ", - Date.Year,Date.Month); + fprintf (Gbl.F.Out,"%04u-%02u ",Date.Year,Date.Month); - /* Draw bar proportional to number of pages generated */ - Rep_DrawBarNumHits ('c', - M == NumMonthsBetweenLastDateAndCurrentDate ? Hits.Num : + /* Draw bar proportional to number of hits */ + Rep_DrawBarNumHits (M == NumMonthsBetweenLastDateAndCurrentDate ? Hits.Num : 0.0, - Hits.Max,500); + Hits.Max,Rep_MAX_BAR_WIDTH); /* Decrease month */ Dat_GetMonthBefore (&Date,&Date); @@ -581,53 +576,42 @@ static void Rep_ShowMyHits (time_t FirstClickTimeUTC,struct tm *tm_FirstClickTim M++) { /* Write the month */ - fprintf (Gbl.F.Out,"
" - "%04u-%02u" - " | ", - Date.Year,Date.Month); + fprintf (Gbl.F.Out,"%04u-%02u ",Date.Year,Date.Month); - /* Draw bar proportional to number of pages generated */ - Rep_DrawBarNumHits ('c',0.0,Hits.Max,500); + /* Draw bar proportional to number of hits */ + Rep_DrawBarNumHits (0.0,Hits.Max,Rep_MAX_BAR_WIDTH); /* Decrease month */ Dat_GetMonthBefore (&Date,&Date); } - - fprintf (Gbl.F.Out,"