diff --git a/swad_changelog.h b/swad_changelog.h index ab05ec71b..7a6591860 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -135,13 +135,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.250.6 (2016-09-11)" +#define Log_PLATFORM_VERSION "SWAD 15.250.7 (2016-09-11)" #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.250.7: Sep 11, 2016 Number of posts in forums in user's usage report. (204235 lines) Version 15.250.6: Sep 11, 2016 Number of downloads in user's usage report. (204207 lines) Version 15.250.5: Sep 11, 2016 Number of clicks in user's usage report. (204189 lines) Version 15.250.4: Sep 11, 2016 Time of first click in user's usage report. (204171 lines) diff --git a/swad_report.c b/swad_report.c index aeeea28bd..11ccf3004 100644 --- a/swad_report.c +++ b/swad_report.c @@ -99,6 +99,11 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint) extern const char *Txt_files; extern const char *Txt_public_FILES; extern const char *Txt_Downloads; + extern const char *Txt_download; + extern const char *Txt_downloads; + extern const char *Txt_Forum_posts; + extern const char *Txt_post; + extern const char *Txt_posts; unsigned NumID; char CtyName[Cty_MAX_BYTES_COUNTRY_NAME+1]; struct Institution Ins; @@ -214,7 +219,10 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint) fprintf (Gbl.F.Out,"
  • %s: ",Txt_Downloads); if (UsrFigures.NumFileViews >= 0) { - fprintf (Gbl.F.Out,"%ld",UsrFigures.NumFileViews); + fprintf (Gbl.F.Out,"%ld %s", + UsrFigures.NumFileViews, + (UsrFigures.NumFileViews == 1) ? Txt_download : + Txt_downloads); if (UsrFigures.NumDays > 0) { fprintf (Gbl.F.Out," ("); @@ -227,6 +235,26 @@ static void Rep_ShowOrPrintMyUsageReport (Rep_SeeOrPrint_t SeeOrPrint) fprintf (Gbl.F.Out,"?"); fprintf (Gbl.F.Out,"
  • "); + /***** Number of posts in forums *****/ + fprintf (Gbl.F.Out,"
  • %s: ",Txt_Forum_posts); + if (UsrFigures.NumForPst >= 0) + { + fprintf (Gbl.F.Out,"%ld %s", + UsrFigures.NumForPst, + (UsrFigures.NumForPst == 1) ? Txt_post : + Txt_posts); + if (UsrFigures.NumDays > 0) + { + fprintf (Gbl.F.Out," ("); + Str_WriteFloatNum ((float) UsrFigures.NumForPst / + (float) UsrFigures.NumDays); + fprintf (Gbl.F.Out,"/%s)",Txt_day); + } + } + else // Number of forum posts is unknown + fprintf (Gbl.F.Out,"?"); + fprintf (Gbl.F.Out,"
  • "); + fprintf (Gbl.F.Out,""); /***** Show details of user's profile *****/