From 07e579373269703760bc69417a064cd4232368d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Mon, 9 Mar 2015 00:40:29 +0100 Subject: [PATCH] Version 14.80.7 --- swad_changelog.h | 3 ++- swad_survey.c | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/swad_changelog.h b/swad_changelog.h index 96c39c071..c6c081f89 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,11 +103,12 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.80.6 (2015/03/09)" +#define Log_PLATFORM_VERSION "SWAD 14.80.7 (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.7: Mar 09, 2015 Scope country for statistic of surveys. (178998 lines) Version 14.80.6: Mar 09, 2015 Scope country for statistic of columns. (178987 lines) Version 14.80.5: Mar 09, 2015 Scope country for statistic of menu. (178974 lines) Version 14.80.4: Mar 09, 2015 Scope country for statistic of icon set. (178961 lines) diff --git a/swad_survey.c b/swad_survey.c index b7d65f510..73a5d4f86 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -3513,6 +3513,16 @@ unsigned Svy_GetNumCoursesWithSurveys (Sco_Scope_t Scope) " FROM surveys" " WHERE CrsCod>'0'"); break; + case Sco_SCOPE_CTY: + sprintf (Query,"SELECT COUNT(DISTINCT (surveys.CrsCod))" + " FROM institutions,centres,degrees,courses,surveys" + " WHERE institutions.CtyCod='%ld'" + " AND institutions.InsCod=centres.InsCod" + " AND centres.CtrCod=degrees.CtrCod" + " AND degrees.DegCod=courses.DegCod" + " AND courses.CrsCod=surveys.CrsCod", + Gbl.CurrentIns.Ins.InsCod); + break; case Sco_SCOPE_INS: sprintf (Query,"SELECT COUNT(DISTINCT (surveys.CrsCod))" " FROM centres,degrees,courses,surveys"