From 6bd619398892dd083c42ee622d8e8216d198544d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Tue, 17 Mar 2015 02:40:35 +0100 Subject: [PATCH] Version 14.94.2 --- swad_changelog.h | 3 ++- swad_config.h | 4 ++-- swad_profile.c | 12 ++++++------ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 1a64878ea..3861fde0e 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,11 +103,12 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.94.1 (2015/03/17)" +#define Log_PLATFORM_VERSION "SWAD 14.94.2 (2015/03/17)" // 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 14.94.2: Mar 17, 2015 Fixed bug in ranking. (182668 lines) Version 14.94.1: Mar 17, 2015 Fixed bug in user's profile. (182667 lines) Version 14.94: Mar 17, 2015 Ranking for downloads, forum posts and messages in user's profile. (182666 lines) Version 14.93.4: Mar 17, 2015 Links in user's figures to ranking. (182661 lines) diff --git a/swad_config.h b/swad_config.h index a3e61274b..9356e2c96 100644 --- a/swad_config.h +++ b/swad_config.h @@ -28,9 +28,9 @@ /** Uncomment one of the following installations of SWAD or create your own **/ /*****************************************************************************/ -//#define LOCALHOST_UBUNTU // Comment this line if not applicable +#define LOCALHOST_UBUNTU // Comment this line if not applicable //#define OPENSWAD_ORG // Comment this line if not applicable -#define SWAD_UGR_ES // Comment this line if not applicable +//#define SWAD_UGR_ES // Comment this line if not applicable //#define WWW_CEVUNA_UNA_PY // Comment this line if not applicable /*****************************************************************************/ diff --git a/swad_profile.c b/swad_profile.c index 031ecf813..805fae65f 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -1264,8 +1264,8 @@ static void Prf_GetAndShowRankingFigure (const char *FieldName) fprintf (Gbl.F.Out,""); - for (NumUsr = 0, Rank = 0; - NumUsr < NumUsrs; + for (NumUsr = 1, Rank = 1; + NumUsr <= NumUsrs; NumUsr++) { /***** Get user and number of clicks *****/ @@ -1281,7 +1281,7 @@ static void Prf_GetAndShowRankingFigure (const char *FieldName) if (Figure < FigureHigh) { - Rank++; + Rank = NumUsr; FigureHigh = Figure; } @@ -1405,8 +1405,8 @@ void Prf_GetAndShowRankingClicksPerDay (void) fprintf (Gbl.F.Out,"
"); - for (NumUsr = 0, Rank = 0; - NumUsr < NumUsrs; + for (NumUsr = 1, Rank = 1; + NumUsr <= NumUsrs; NumUsr++) { /***** Get user and number of clicks *****/ @@ -1420,7 +1420,7 @@ void Prf_GetAndShowRankingClicksPerDay (void) NumClicksPerDay = Str_GetFloatNumFromStr (row[1]); if (NumClicksPerDay < NumClicksPerDayHigh) { - Rank++; + Rank = NumUsr; NumClicksPerDayHigh = NumClicksPerDay; }