From 2dd7a998231b402458624fa8830022339e453f09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Fri, 26 May 2017 00:48:42 +0200 Subject: [PATCH] Version 16.225.1 --- swad_changelog.h | 3 ++- swad_user.c | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 8a978adbe..d1eccd705 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -237,13 +237,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.225 (2017-05-25)" +#define Log_PLATFORM_VERSION "SWAD 16.225.1 (2017-05-26)" #define CSS_FILE "swad16.222.css" #define JS_FILE "swad16.206.3.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.225.1: May 26, 2017 Fixed bug related with new role. (220580 lines) Version 16.225: May 25, 2017 Changes and bug fixing related with new role. (220580 lines) Version 16.224.2: May 25, 2017 Button to show big list of users/courses integrated in alert. (220465 lines) Version 16.224.1: May 25, 2017 User lists are shown when changing type of listing. (220463 lines) diff --git a/swad_user.c b/swad_user.c index 4947eb8f1..b0229e8ae 100644 --- a/swad_user.c +++ b/swad_user.c @@ -8310,11 +8310,10 @@ unsigned Usr_GetTotalNumberOfUsersInCourses (Sco_Scope_t Scope,unsigned Roles) if (Roles & (1 << Role)) { sprintf (UnsignedStr,"%u",(unsigned) Role); - if (!FirstRole) // Not the first role - { - Str_Concat (SubQueryRoles,",",Usr_MAX_BYTES_SUBQUERY_ROLES); + if (FirstRole) // Not the first role FirstRole = false; - } + else + Str_Concat (SubQueryRoles,",",Usr_MAX_BYTES_SUBQUERY_ROLES); Str_Concat (SubQueryRoles,UnsignedStr,Usr_MAX_BYTES_SUBQUERY_ROLES); } Str_Concat (SubQueryRoles,")",Usr_MAX_BYTES_SUBQUERY_ROLES); @@ -8421,6 +8420,7 @@ unsigned Usr_GetTotalNumberOfUsersInCourses (Sco_Scope_t Scope,unsigned Roles) Lay_ShowErrorAndExit ("Wrong scope."); break; } + return (unsigned) DB_QueryCOUNT (Query,"can not get number of users"); }