From eba99ccff3184de80d9f0217cee2e610be0a5129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Mon, 9 Mar 2015 11:15:45 +0100 Subject: [PATCH] Version 14.80.14 --- swad_changelog.h | 3 ++- swad_statistic.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/swad_changelog.h b/swad_changelog.h index 933f8e4df..e65ab7e20 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,11 +103,12 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.80.13 (2015/03/09)" +#define Log_PLATFORM_VERSION "SWAD 14.80.14 (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.14: Mar 09, 2015 Scope country for statistic of OERs. (179379 lines) Version 14.80.13: Mar 09, 2015 Scope country for statistic of assignments. (179362 lines) Version 14.80.12: Mar 09, 2015 Scope country for statistic of tests. (179340 lines) Version 14.80.11: Mar 09, 2015 Scope country for statistic of notifications. (179267 lines) diff --git a/swad_statistic.c b/swad_statistic.c index 1f27b35c6..e9775f360 100644 --- a/swad_statistic.c +++ b/swad_statistic.c @@ -5410,6 +5410,22 @@ static void Sta_GetNumberOfOERsFromDB (Sco_Scope_t Scope,Brw_License_t License,u " GROUP BY Public", (unsigned) License); break; + case Sco_SCOPE_CTY: + sprintf (Query,"SELECT files.Public,COUNT(*)" + " FROM institutions,centres,degrees,courses,files" + " WHERE institutions.CtyCod='%ld'" + " AND institutions.InsCod=centres.InsCod" + " AND centres.CtrCod=degrees.CtrCod" + " AND degrees.DegCod=courses.DegCod" + " AND courses.CrsCod=files.Cod" + " AND files.FileBrowser IN ('%u','%u')" + " AND files.License='%u'" + " GROUP BY files.Public", + Gbl.CurrentCty.Cty.CtyCod, + (unsigned) Brw_ADMI_DOCUM_CRS, + (unsigned) Brw_ADMI_SHARE_CRS, + (unsigned) License); + break; case Sco_SCOPE_INS: sprintf (Query,"SELECT files.Public,COUNT(*)" " FROM centres,degrees,courses,files"