mirror of https://github.com/acanas/swad-core.git
Version 14.80.12
This commit is contained in:
parent
eaaef84c9c
commit
b95f78957f
|
@ -103,11 +103,12 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 14.80.11 (2015/03/09)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 14.80.12 (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.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)
|
||||
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)
|
||||
|
|
72
swad_test.c
72
swad_test.c
|
@ -5520,6 +5520,28 @@ static unsigned Tst_GetNumTstQuestions (Sco_Scope_t Scope,Tst_AnswerType_t AnsTy
|
|||
" WHERE AnsType='%s'",
|
||||
Tst_StrAnswerTypesDB[AnsType]);
|
||||
break;
|
||||
case Sco_SCOPE_CTY:
|
||||
if (AnsType == Tst_ANS_ALL)
|
||||
sprintf (Query,"SELECT COUNT(*),SUM(NumHits),SUM(Score)"
|
||||
" FROM institutions,centres,degrees,courses,tst_questions"
|
||||
" WHERE institutions.CtyCod='%ld'"
|
||||
" AND institutions.InsCod=centres.InsCod"
|
||||
" AND centres.CtrCod=degrees.CtrCod"
|
||||
" AND degrees.DegCod=courses.DegCod"
|
||||
" AND courses.CrsCod=tst_questions.CrsCod",
|
||||
Gbl.CurrentCty.Cty.CtyCod);
|
||||
else
|
||||
sprintf (Query,"SELECT COUNT(*),SUM(NumHits),SUM(Score)"
|
||||
" FROM institutions,centres,degrees,courses,tst_questions"
|
||||
" WHERE institutions.CtyCod='%ld'"
|
||||
" AND institutions.InsCod=centres.InsCod"
|
||||
" AND centres.CtrCod=degrees.CtrCod"
|
||||
" AND degrees.DegCod=courses.DegCod"
|
||||
" AND courses.CrsCod=tst_questions.CrsCod"
|
||||
" AND tst_questions.AnsType='%s'",
|
||||
Gbl.CurrentCty.Cty.CtyCod,
|
||||
Tst_StrAnswerTypesDB[AnsType]);
|
||||
break;
|
||||
case Sco_SCOPE_INS:
|
||||
if (AnsType == Tst_ANS_ALL)
|
||||
sprintf (Query,"SELECT COUNT(*),SUM(NumHits),SUM(Score)"
|
||||
|
@ -5646,6 +5668,28 @@ static unsigned Tst_GetNumCoursesWithTstQuestions (Sco_Scope_t Scope,Tst_AnswerT
|
|||
" WHERE AnsType='%s'",
|
||||
Tst_StrAnswerTypesDB[AnsType]);
|
||||
break;
|
||||
case Sco_SCOPE_CTY:
|
||||
if (AnsType == Tst_ANS_ALL)
|
||||
sprintf (Query,"SELECT COUNT(DISTINCT (tst_questions.CrsCod))"
|
||||
" FROM institutions,centres,degrees,courses,tst_questions"
|
||||
" WHERE institutions.CtyCod='%ld'"
|
||||
" AND institutions.InsCod=centres.InsCod"
|
||||
" AND centres.CtrCod=degrees.CtrCod"
|
||||
" AND degrees.DegCod=courses.DegCod"
|
||||
" AND courses.CrsCod=tst_questions.CrsCod",
|
||||
Gbl.CurrentCty.Cty.CtyCod);
|
||||
else
|
||||
sprintf (Query,"SELECT COUNT(DISTINCT (tst_questions.CrsCod))"
|
||||
" FROM institutions,centres,degrees,courses,tst_questions"
|
||||
" WHERE institutions.CtyCod='%ld'"
|
||||
" AND institutions.InsCod=centres.InsCod"
|
||||
" AND centres.CtrCod=degrees.CtrCod"
|
||||
" AND degrees.DegCod=courses.DegCod"
|
||||
" AND courses.CrsCod=tst_questions.CrsCod"
|
||||
" AND tst_questions.AnsType='%s'",
|
||||
Gbl.CurrentCty.Cty.CtyCod,
|
||||
Tst_StrAnswerTypesDB[AnsType]);
|
||||
break;
|
||||
case Sco_SCOPE_INS:
|
||||
if (AnsType == Tst_ANS_ALL)
|
||||
sprintf (Query,"SELECT COUNT(DISTINCT (tst_questions.CrsCod))"
|
||||
|
@ -5763,6 +5807,34 @@ static unsigned Tst_GetNumCoursesWithPluggableTstQuestions (Sco_Scope_t Scope,Ts
|
|||
Tst_StrAnswerTypesDB[AnsType],
|
||||
Tst_PluggableDB[Tst_PLUGGABLE_YES]);
|
||||
break;
|
||||
case Sco_SCOPE_CTY:
|
||||
if (AnsType == Tst_ANS_ALL)
|
||||
sprintf (Query,"SELECT COUNT(DISTINCT (tst_questions.CrsCod))"
|
||||
" FROM institutions,centres,degrees,courses,tst_questions,tst_config"
|
||||
" WHERE institutions.CtyCod='%ld'"
|
||||
" AND institutions.InsCod=centres.InsCod"
|
||||
" AND centres.CtrCod=degrees.CtrCod"
|
||||
" AND degrees.DegCod=courses.DegCod"
|
||||
" AND courses.CrsCod=tst_questions.CrsCod"
|
||||
" AND tst_questions.CrsCod=tst_config.CrsCod"
|
||||
" AND tst_config.pluggable='%s'",
|
||||
Gbl.CurrentCty.Cty.CtyCod,
|
||||
Tst_PluggableDB[Tst_PLUGGABLE_YES]);
|
||||
else
|
||||
sprintf (Query,"SELECT COUNT(DISTINCT (tst_questions.CrsCod))"
|
||||
" FROM institutions,centres,degrees,courses,tst_questions,tst_config"
|
||||
" WHERE institutions.CtyCod='%ld'"
|
||||
" AND institutions.InsCod=centres.InsCod"
|
||||
" AND centres.CtrCod=degrees.CtrCod"
|
||||
" AND degrees.DegCod=courses.DegCod"
|
||||
" AND courses.CrsCod=tst_questions.CrsCod"
|
||||
" AND tst_questions.AnsType='%s'"
|
||||
" AND tst_questions.CrsCod=tst_config.CrsCod"
|
||||
" AND tst_config.pluggable='%s'",
|
||||
Gbl.CurrentCty.Cty.CtyCod,
|
||||
Tst_StrAnswerTypesDB[AnsType],
|
||||
Tst_PluggableDB[Tst_PLUGGABLE_YES]);
|
||||
break;
|
||||
case Sco_SCOPE_INS:
|
||||
if (AnsType == Tst_ANS_ALL)
|
||||
sprintf (Query,"SELECT COUNT(DISTINCT (tst_questions.CrsCod))"
|
||||
|
|
Loading…
Reference in New Issue