diff --git a/swad_changelog.h b/swad_changelog.h index 8359e7d91..926466560 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,11 +103,12 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.80.9 (2015/03/09)" +#define Log_PLATFORM_VERSION "SWAD 14.80.10 (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.10: Mar 09, 2015 Scope country for statistic of notices. (179211 lines) Version 14.80.9: Mar 09, 2015 Scope country for statistic of messages. (179187 lines) Version 14.80.8: Mar 09, 2015 Scope country for statistic of forums. (179138 lines) Version 14.80.7: Mar 09, 2015 Scope country for statistic of surveys. (179021 lines) diff --git a/swad_notice.c b/swad_notice.c index 55d1df250..a1ead02bc 100644 --- a/swad_notice.c +++ b/swad_notice.c @@ -676,6 +676,18 @@ unsigned Not_GetNumNotices (Sco_Scope_t Scope,Not_Status_t NoticeStatus,unsigned " WHERE Status='%u'", NoticeStatus); break; + case Sco_SCOPE_CTY: + sprintf (Query,"SELECT COUNT(*),SUM(notices.NumNotif)" + " FROM institutions,centres,degrees,courses,notices" + " WHERE institutions.CtyCod='%ld'" + " AND institutions.InsCod=centres.InsCod" + " AND centres.CtrCod=degrees.CtrCod" + " AND degrees.DegCod=courses.DegCod" + " AND courses.CrsCod=notices.CrsCod" + " AND notices.Status='%u'", + Gbl.CurrentCty.Cty.CtyCod, + NoticeStatus); + break; case Sco_SCOPE_INS: sprintf (Query,"SELECT COUNT(*),SUM(notices.NumNotif)" " FROM centres,degrees,courses,notices" @@ -760,6 +772,16 @@ unsigned Not_GetNumNoticesDeleted (Sco_Scope_t Scope,unsigned *NumNotif) sprintf (Query,"SELECT COUNT(*),SUM(NumNotif)" " FROM notices_deleted"); break; + case Sco_SCOPE_CTY: + sprintf (Query,"SELECT COUNT(*),SUM(notices_deleted.NumNotif)" + " FROM institutions,centres,degrees,courses,notices_deleted" + " WHERE institutions.CtyCod='%ld'" + " AND institutions.InsCod=centres.InsCod" + " AND centres.CtrCod=degrees.CtrCod" + " AND degrees.DegCod=courses.DegCod" + " AND courses.CrsCod=notices_deleted.CrsCod", + Gbl.CurrentCty.Cty.CtyCod); + break; case Sco_SCOPE_INS: sprintf (Query,"SELECT COUNT(*),SUM(notices_deleted.NumNotif)" " FROM centres,degrees,courses,notices_deleted"