From a4a65a131668156dac1099c8344adab414f8bee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Mon, 9 Mar 2015 00:28:57 +0100 Subject: [PATCH] Version 14.80.3 --- swad_changelog.h | 3 ++- swad_main.c | 1 - swad_statistic.c | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index c495acb1d..2a5f9a592 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,11 +103,12 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.80.2 (2015/03/09)" +#define Log_PLATFORM_VERSION "SWAD 14.80.3 (2015/03/09)" // 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 | tail -1 /* + Version 14.80.3: Mar 09, 2015 Scope country for statistic of theme. (178948 lines) Version 14.80.2: Mar 09, 2015 Scope country for statistic of layout. (178936 lines) Version 14.80.1: Mar 09, 2015 Scope country for statistic of language. (178923 lines) Version 14.80: Mar 09, 2015 New statistic for privacy. (178909 lines) diff --git a/swad_main.c b/swad_main.c index 16e4c9795..d9ca53608 100644 --- a/swad_main.c +++ b/swad_main.c @@ -70,7 +70,6 @@ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS]; int main (int argc, char *argv[]) { extern const char *Txt_You_dont_have_permission_to_perform_this_action; - FILE *FileLock; /* "touch swad.lock" in CGI directory if you want to disable SWAD diff --git a/swad_statistic.c b/swad_statistic.c index 30b043ae2..d66efea19 100644 --- a/swad_statistic.c +++ b/swad_statistic.c @@ -6807,6 +6807,18 @@ static void Sta_GetAndShowNumUsrsPerTheme (void) " WHERE Theme='%s'", The_ThemeId[Theme]); break; + case Sco_SCOPE_CTY: + sprintf (Query,"SELECT COUNT(DISTINCT usr_data.UsrCod)" + " FROM institutions,centres,degrees,courses,crs_usr,usr_data" + " WHERE institutions.CtyCod='%ld'" + " AND institutions.InsCod=centres.InsCod" + " AND centres.CtrCod=degrees.CtrCod" + " AND degrees.DegCod=courses.DegCod" + " AND courses.CrsCod=crs_usr.CrsCod" + " AND crs_usr.UsrCod=usr_data.UsrCod" + " AND usr_data.Theme='%s'", + Gbl.CurrentCty.Cty.CtyCod,The_ThemeId[Theme]); + break; case Sco_SCOPE_INS: sprintf (Query,"SELECT COUNT(DISTINCT usr_data.UsrCod)" " FROM centres,degrees,courses,crs_usr,usr_data"