From 46d81be88005cb2cbd59228550f37042a21f079f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Tue, 4 Oct 2016 23:57:32 +0200 Subject: [PATCH] Version 16.13.1 --- swad_changelog.h | 3 ++- swad_report.c | 60 ++++++++++++++++++++++++++++++++++-------------- 2 files changed, 45 insertions(+), 18 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 2be2d1d3c..58ef58762 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -143,13 +143,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.13 (2016-10-04)" +#define Log_PLATFORM_VERSION "SWAD 16.13.1 (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.13.1: Oct 04, 2016 Changes in user's usage report. (205906 lines) Version 16.13: Oct 04, 2016 New filename for user's usage report. (205883 lines) Version 16.12: Oct 04, 2016 Code refactoring in user's usage report. (205882 lines) Copy icon/report64x64.png to icon directory diff --git a/swad_report.c b/swad_report.c index 45ea2b1b7..7cdbea445 100644 --- a/swad_report.c +++ b/swad_report.c @@ -235,8 +235,9 @@ static void Rep_CreateMyUsageReport (struct CurrentTimeUTC *CurrentTimeUTC, /***** Start file *****/ Lay_StartHTMLFile (Gbl.F.Rep,FilenameReport); - fprintf (Gbl.F.Rep,"\n"); + fprintf (Gbl.F.Rep,"\n"); /***** Header *****/ Rep_WriteHeader (CurrentTimeUTC,Permalink); @@ -319,10 +320,24 @@ static void Rep_PutLinkToMyUsageReport (struct CurrentTimeUTC *CurrentTimeUTC, 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); + extern const char *Txt_User[Usr_NUM_SEXS]; + extern const char *Txt_Date; + + fprintf (Gbl.F.Out,"
"); + + /***** User *****/ + fprintf (Gbl.F.Out,"%s: %s", + Txt_User[Gbl.Usrs.Me.UsrDat.Sex], + Gbl.Usrs.Me.UsrDat.FullName); + + fprintf (Gbl.F.Out,"
"); + + /***** Report date *****/ + fprintf (Gbl.F.Out,"%s: %s %s UTC", + Txt_Date, + CurrentTimeUTC->StrDate, + CurrentTimeUTC->StrTime); + fprintf (Gbl.F.Out,"
"); } @@ -396,12 +411,18 @@ static void Rep_WriteHeader (struct CurrentTimeUTC *CurrentTimeUTC, CurrentTimeUTC->StrTime); /***** Permalink *****/ - fprintf (Gbl.F.Rep,"
  • %s: %s
  • ", + fprintf (Gbl.F.Rep,"
  • %s: " + "" + "%s" + "" + "
  • ", Txt_Permalink, Permalink,Permalink); /***** End of header *****/ - fprintf (Gbl.F.Rep,"\n"); + fprintf (Gbl.F.Rep,"" + "\n"); } /*****************************************************************************/ @@ -417,7 +438,7 @@ static void Rep_WriteSectionPlatform (void) /***** Start of section *****/ fprintf (Gbl.F.Rep,"
    " - "

    %s

    " + "

    %s

    " "
      ", Txt_Teaching_platform); @@ -427,7 +448,12 @@ static void Rep_WriteSectionPlatform (void) Cfg_PLATFORM_FULL_NAME,Txt_TAGLINE); /***** Server URL *****/ - fprintf (Gbl.F.Rep,"
    • %s: %s
    • ", + fprintf (Gbl.F.Rep,"
    • %s: " + "" + "%s" + "" + "
    • ", Txt_URL,Cfg_URL_SWAD_SERVER,Cfg_URL_SWAD_SERVER); /***** End of section *****/ @@ -451,7 +477,7 @@ static void Rep_WriteSectionUsrInfo (void) /***** Start of section *****/ fprintf (Gbl.F.Rep,"
      " - "

      %s

      " + "

      %s

      " "
        ", Txt_Personal_information); @@ -515,7 +541,7 @@ static void Rep_WriteSectionUsrFigures (struct UsrFigures *UsrFigures, /***** Start of section *****/ fprintf (Gbl.F.Rep,"
        " - "

        %s

        " + "

        %s

        " "
          ", Txt_Figures); @@ -665,7 +691,7 @@ static void Rep_WriteSectionGlobalHits (struct UsrFigures *UsrFigures, /***** Start of section *****/ fprintf (Gbl.F.Rep,"
          " - "

          %s

          ", + "

          %s

          ", Txt_Hits); /***** Global (in any course) hits per year *****/ @@ -693,11 +719,11 @@ static void Rep_WriteSectionCurrentCourses (struct UsrFigures *UsrFigures, /***** Start of section *****/ fprintf (Gbl.F.Rep,"
          " - "

          %s", + "

          %s", Txt_Courses); if (CurrentTimeUTC->StrDate[0]) fprintf (Gbl.F.Rep," (%s)",CurrentTimeUTC->StrDate); - fprintf (Gbl.F.Rep,"

          " + fprintf (Gbl.F.Rep,"" "
            "); /***** Number of courses in which the user is student/teacher *****/ @@ -729,7 +755,7 @@ static void Rep_WriteSectionHistoricCourses (struct UsrFigures *UsrFigures, /***** Start of section *****/ fprintf (Gbl.F.Rep,"
            " - "

            %s (%s)

            ", + "

            %s (%s)

            ", Txt_Courses,Txt_historical_log); fprintf (Gbl.F.Rep,Txt_Only_courses_with_more_than_X_clicks_are_shown, Rep_MIN_CLICKS_CRS); @@ -817,7 +843,7 @@ static void Rep_GetAndWriteCurrentCrssOfAUsr (const struct UsrData *UsrDat,Rol_R Txt_courses); if (NumCrss) { - fprintf (Gbl.F.Rep," (%u %s / %u %s)", + fprintf (Gbl.F.Rep," (%u %s / %u %s):", Usr_GetNumUsrsInCrssOfAUsr (Gbl.Usrs.Me.UsrDat.UsrCod,Role,Rol_TEACHER), Txt_teachers_ABBREVIATION, Usr_GetNumUsrsInCrssOfAUsr (Gbl.Usrs.Me.UsrDat.UsrCod,Role,Rol_STUDENT),