|
@@ -977,7 +977,6 @@ namespace TEAMModelOS.FunctionV4
|
|
|
knowledgeName.Remove(knowledgeName[k]);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
foreach (ExamClassResult classResult in classResults)
|
|
|
{
|
|
|
if (classResult.subjectId.Equals(subject.id))
|
|
@@ -992,17 +991,18 @@ namespace TEAMModelOS.FunctionV4
|
|
|
{
|
|
|
//初始化单个知识点得分
|
|
|
double score = 0;
|
|
|
- double allScore = 0;
|
|
|
int n = 0;
|
|
|
int phCount = 0;
|
|
|
int plCount = 0;
|
|
|
int pCount = 0;
|
|
|
+ double classScore = 0;
|
|
|
+
|
|
|
foreach (List<string> str in info.papers[no].knowledge)
|
|
|
{
|
|
|
if (str.Contains(knowledgeName[i]))
|
|
|
{
|
|
|
var itemPersent = str.Count > 0 ? 1 / Convert.ToDouble(str.Count) : 0;
|
|
|
- allScore += info.papers[no].point.Count > 0 ? info.papers[no].point[n] * itemPersent : 0;
|
|
|
+ classScore += info.papers[no].point.Count > 0 ? info.papers[no].point[n] * itemPersent : 0;
|
|
|
foreach (string id in classResult.studentIds)
|
|
|
{
|
|
|
int index = classResult.studentIds.IndexOf(id);
|
|
@@ -1044,7 +1044,7 @@ namespace TEAMModelOS.FunctionV4
|
|
|
ph.Add(phCount);
|
|
|
pl.Add(plCount);
|
|
|
double per = classResult.studentIds.Count - lostStu > 0 ? Math.Round(score / (classResult.studentIds.Count - lostStu), 2) : 0;
|
|
|
- persent.Add(allScore > 0 ? Math.Round(per / allScore, 2) : 0);
|
|
|
+ persent.Add(classScore > 0 ? Math.Round(per / classScore, 2) : 0);
|
|
|
}
|
|
|
classResult.phc = ph;
|
|
|
classResult.plc = pl;
|
|
@@ -1058,6 +1058,14 @@ namespace TEAMModelOS.FunctionV4
|
|
|
double score = 0;
|
|
|
double allScore = 0;
|
|
|
int count = 0;
|
|
|
+ int m = 0;
|
|
|
+ foreach (List<string> str in info.papers[no].knowledge) {
|
|
|
+ if (str.Contains(k)) {
|
|
|
+ var itemPersent = str.Count > 0 ? 1 / Convert.ToDouble(str.Count) : 0;
|
|
|
+ allScore += info.papers[no].point.Count > 0 ? info.papers[no].point[m] * itemPersent : 0;
|
|
|
+ }
|
|
|
+ m++;
|
|
|
+ }
|
|
|
foreach (ExamClassResult result in classResults)
|
|
|
{
|
|
|
if (result.subjectId.Equals(subject.id))
|
|
@@ -1067,15 +1075,13 @@ namespace TEAMModelOS.FunctionV4
|
|
|
{
|
|
|
if (str.Contains(k))
|
|
|
{
|
|
|
- var itemPersent = str.Count > 0 ? 1 / Convert.ToDouble(str.Count) : 0;
|
|
|
- allScore += info.papers[no].point.Count > 0 ? info.papers[no].point[n] * itemPersent : 0;
|
|
|
-
|
|
|
+ var itemPersent = str.Count > 0 ? 1 / Convert.ToDouble(str.Count) : 0;
|
|
|
if (result.studentScores.Count > 0)
|
|
|
{
|
|
|
foreach (List<double> sc in result.studentScores)
|
|
|
{
|
|
|
double tsc = sc[n] == -1 ? 0 : sc[n];
|
|
|
- score += tsc * itemPersent;
|
|
|
+ score += (tsc * itemPersent);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1128,11 +1134,11 @@ namespace TEAMModelOS.FunctionV4
|
|
|
{
|
|
|
//初始化单个知识点得分
|
|
|
double score = 0;
|
|
|
- double allScore = 0;
|
|
|
int n = 0;
|
|
|
int phCount = 0;
|
|
|
int plCount = 0;
|
|
|
int pCount = 0;
|
|
|
+ double classScore = 0;
|
|
|
if (info.papers[no].field.Count > 0)
|
|
|
{
|
|
|
foreach (int str in info.papers[no].field)
|
|
@@ -1140,7 +1146,7 @@ namespace TEAMModelOS.FunctionV4
|
|
|
if (str == knowledgeName[i])
|
|
|
{
|
|
|
var itemPersent = 1;
|
|
|
- allScore += info.papers[no].point.Count > 0 ? info.papers[no].point[n] * itemPersent : 0;
|
|
|
+ classScore += info.papers[no].point.Count > 0 ? info.papers[no].point[n] * itemPersent : 0;
|
|
|
foreach (string id in classResult.studentIds)
|
|
|
{
|
|
|
int index = classResult.studentIds.IndexOf(id);
|
|
@@ -1181,7 +1187,7 @@ namespace TEAMModelOS.FunctionV4
|
|
|
ph.Add(phCount);
|
|
|
pl.Add(plCount);
|
|
|
double per = classResult.studentIds.Count - lostStu > 0 ? Math.Round(score / (classResult.studentIds.Count - lostStu), 2) : 0;
|
|
|
- persent.Add(allScore > 0 ? Math.Round(per / allScore, 2) : 0);
|
|
|
+ persent.Add(classScore > 0 ? Math.Round(per / classScore, 2) : 0);
|
|
|
}
|
|
|
}
|
|
|
classResult.fphc = ph;
|
|
@@ -1191,12 +1197,21 @@ namespace TEAMModelOS.FunctionV4
|
|
|
}
|
|
|
//await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "Common").ReplaceItemAsync(classResult, classResult.id, new Azure.Cosmos.PartitionKey($"{classResult.code}"));
|
|
|
}
|
|
|
+
|
|
|
for (int i = 0; i < knowledgeName.Count; i++)
|
|
|
{
|
|
|
double score = 0;
|
|
|
double allScore = 0;
|
|
|
-
|
|
|
int count = 0;
|
|
|
+ int m = 0;
|
|
|
+ foreach (int str in info.papers[no].field)
|
|
|
+ {
|
|
|
+ if (str == knowledgeName[i]) {
|
|
|
+ var itemPersent = 1;
|
|
|
+ allScore += info.papers[no].point.Count > 0 ? info.papers[no].point[m] * itemPersent : 0;
|
|
|
+ }
|
|
|
+ m++;
|
|
|
+ }
|
|
|
foreach (ExamClassResult result in classResults)
|
|
|
{
|
|
|
if (result.subjectId.Equals(subject.id))
|
|
@@ -1204,11 +1219,9 @@ namespace TEAMModelOS.FunctionV4
|
|
|
int n = 0;
|
|
|
foreach (int str in info.papers[no].field)
|
|
|
{
|
|
|
+ var itemPersent = 1;
|
|
|
if (str == knowledgeName[i])
|
|
|
{
|
|
|
- var itemPersent = 1;
|
|
|
- allScore += info.papers[no].point.Count > 0 ? info.papers[no].point[n] * itemPersent : 0;
|
|
|
-
|
|
|
if (result.studentScores.Count > 0)
|
|
|
{
|
|
|
foreach (List<double> sc in result.studentScores)
|