|
@@ -277,17 +277,27 @@ namespace TEAMModelOS.Controllers
|
|
|
//}
|
|
|
//else {
|
|
|
//}
|
|
|
+ List<EducationScore> intelligenceScore = new List<EducationScore>();
|
|
|
+ if (schoolSetting.overallEducationSetting.examTypes.IsNotEmpty())
|
|
|
+ {
|
|
|
+ var datas = item.intelligence.FindAll(z => !string.IsNullOrWhiteSpace(z.examType) && schoolSetting.overallEducationSetting.examTypes.Contains(z.examType));
|
|
|
+ if (datas.IsNotEmpty()) {
|
|
|
+ intelligenceScore.AddRange(datas);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ intelligenceScore.AddRange(item.intelligence);
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
- double sumScore = item.intelligence.Average(x => x.sumScore);
|
|
|
- double totalScore = item.intelligence.Average(x => x.totalScore);
|
|
|
+ double sumScore = intelligenceScore.Average(x => x.sumScore);
|
|
|
+ double totalScore = intelligenceScore.Average(x => x.totalScore);
|
|
|
if (totalScore > 0)
|
|
|
{
|
|
|
intelligence = Math.Round(sumScore * 1.0 / totalScore * 100, 2);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- intelligence = Math.Round(sumScore * 1.0 / item.intelligence.Count, 2);
|
|
|
+ intelligence = Math.Round(sumScore * 1.0 / intelligenceScore.Count, 2);
|
|
|
}
|
|
|
dimensionScoreDefault.intelligence=1;
|
|
|
dimensionScoreDefault.exam=1;
|