Version 14.80.7

This commit is contained in:
Antonio Cañas Vargas 2015-03-09 00:45:35 +01:00
parent 07e5793732
commit 13391d3ce8
2 changed files with 24 additions and 1 deletions

View File

@ -108,7 +108,7 @@
// 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.7: Mar 09, 2015 Scope country for statistic of surveys. (179021 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)

View File

@ -3591,6 +3591,16 @@ unsigned Svy_GetNumSurveys (Sco_Scope_t Scope,unsigned *NumNotif)
" FROM surveys"
" WHERE CrsCod>'0'");
break;
case Sco_SCOPE_CTY:
sprintf (Query,"SELECT COUNT(*),SUM(surveys.NumNotif)"
" 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.CurrentCty.Cty.CtyCod);
break;
case Sco_SCOPE_INS:
sprintf (Query,"SELECT COUNT(*),SUM(surveys.NumNotif)"
" FROM centres,degrees,courses,surveys"
@ -3669,6 +3679,19 @@ float Svy_GetNumQstsPerSurvey (Sco_Scope_t Scope)
" AND surveys.SvyCod=svy_questions.SvyCod"
" GROUP BY svy_questions.SvyCod) AS NumQstsTable");
break;
case Sco_SCOPE_CTY:
sprintf (Query,"SELECT AVG(NumQsts) FROM"
" (SELECT COUNT(svy_questions.QstCod) AS NumQsts"
" FROM institutions,centres,degrees,courses,surveys,svy_questions"
" WHERE institutions.CtyCod='%ld'"
" AND institutions.InsCod=centres.InsCod"
" AND centres.CtrCod=degrees.CtrCod"
" AND degrees.DegCod=courses.DegCod"
" AND courses.CrsCod=surveys.CrsCod"
" AND surveys.SvyCod=svy_questions.SvyCod"
" GROUP BY svy_questions.SvyCod) AS NumQstsTable",
Gbl.CurrentCty.Cty.CtyCod);
break;
case Sco_SCOPE_INS:
sprintf (Query,"SELECT AVG(NumQsts) FROM"
" (SELECT COUNT(svy_questions.QstCod) AS NumQsts"