From 9cf699ff3d99afb813677e1d8571d4e31a144486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Tue, 4 Oct 2016 00:30:46 +0200 Subject: [PATCH] Version 16.11.2 --- swad_changelog.h | 3 ++- swad_report.c | 26 ++++++++++++++++---------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 65f99574f..b7c1e8368 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -143,13 +143,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.11.1 (2016-10-04)" +#define Log_PLATFORM_VERSION "SWAD 16.11.2 (2016-10-04)" #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.11.2: Oct 04, 2016 Code refactoring in user's usage report. (205829 lines) Version 16.11.1: Oct 04, 2016 Code refactoring in user's usage report. (205824 lines) Version 16.11: Oct 03, 2016 Created permalinks to report files. (205793 lines) 1 change necessary in database: diff --git a/swad_report.c b/swad_report.c index 26485c1ba..0a853b1c3 100644 --- a/swad_report.c +++ b/swad_report.c @@ -83,6 +83,7 @@ static void Rep_CreateMyUsageReport (struct CurrentTimeUTC *CurrentTimeUTC, char *Permalink); static void Rep_PutLinkToMyUsageReport (struct CurrentTimeUTC *CurrentTimeUTC, const char *Permalink); +static void Req_TitleReport (struct CurrentTimeUTC *CurrentTimeUTC); static void Rep_WriteHeader (struct CurrentTimeUTC *CurrentTimeUTC, const char *Permalink); @@ -144,11 +145,7 @@ void Rep_ReqMyUsageReport (void) Lay_StartRoundFrame (NULL,Gbl.Title,NULL); /***** Header *****/ - fprintf (Gbl.F.Out,"
" - "%s",Gbl.Usrs.Me.UsrDat.FullName); - if (CurrentTimeUTC.StrDate[0]) - fprintf (Gbl.F.Out,"
%s",CurrentTimeUTC.StrDate); - fprintf (Gbl.F.Out,"
"); + Req_TitleReport (&CurrentTimeUTC); /***** Send button and end frame *****/ Lay_EndRoundFrameWithButton (Lay_CONFIRM_BUTTON,Txt_Generate_report); @@ -267,11 +264,7 @@ static void Rep_PutLinkToMyUsageReport (struct CurrentTimeUTC *CurrentTimeUTC, Lay_StartRoundFrame (NULL,Gbl.Title,NULL); /***** Header *****/ - fprintf (Gbl.F.Out,"
" - "%s",Gbl.Usrs.Me.UsrDat.FullName); - if (CurrentTimeUTC->StrDate[0]) - fprintf (Gbl.F.Out,"
%s",CurrentTimeUTC->StrDate); - fprintf (Gbl.F.Out,"
"); + Req_TitleReport (CurrentTimeUTC); /***** Put anchor and report filename *****/ fprintf (Gbl.F.Out,"
"); @@ -294,6 +287,19 @@ static void Rep_PutLinkToMyUsageReport (struct CurrentTimeUTC *CurrentTimeUTC, Lay_EndRoundFrame (); } +/*****************************************************************************/ +/********************* Write title of user's usage report ********************/ +/*****************************************************************************/ + +static void Req_TitleReport (struct CurrentTimeUTC *CurrentTimeUTC) + { + fprintf (Gbl.F.Out,"
" + "%s",Gbl.Usrs.Me.UsrDat.FullName); + if (CurrentTimeUTC->StrDate[0]) + fprintf (Gbl.F.Out,"
%s",CurrentTimeUTC->StrDate); + fprintf (Gbl.F.Out,"
"); + } + /*****************************************************************************/ /******************** Write header of user's usage report ********************/ /*****************************************************************************/