|
@@ -511,10 +511,13 @@ namespace TEAMModelOS.Controllers
|
|
|
tasks.Add(_azureStorage.UploadFileByContainer(school.ToString(), ans.ToJsonString(), "exam", builder.ToString(), false));
|
|
|
result.studentAnswers[newIndex].Add(builder.ToString());
|
|
|
//}
|
|
|
+ //List<(int index ,string content, double count)> acount = new List<(int index,string content, double count)>();
|
|
|
for (int i = 0; i < ans.Count; i++)
|
|
|
{
|
|
|
var ac = ans[i].Count;
|
|
|
var sc = standard[i].Count;
|
|
|
+ //记录次数
|
|
|
+ int n = 0;
|
|
|
//result.studentAnswers[index][i] = ans[i];
|
|
|
//算分处理
|
|
|
if (sc > 0)
|
|
@@ -523,7 +526,6 @@ namespace TEAMModelOS.Controllers
|
|
|
{
|
|
|
foreach (string right in ans[i])
|
|
|
{
|
|
|
-
|
|
|
if (standard[i].Contains(right))
|
|
|
{
|
|
|
result.studentScores[newIndex][i] = points[i];
|
|
@@ -651,7 +653,7 @@ namespace TEAMModelOS.Controllers
|
|
|
{
|
|
|
ExamInfo exam = await client.GetContainer("TEAMModelOS", "Common").ReadItemAsync<ExamInfo>(id.ToString(), new PartitionKey($"{scode}"));
|
|
|
result.progress = true;
|
|
|
- //标记单科单班总得分
|
|
|
+ /*//标记单科单班总得分
|
|
|
double score = 0;
|
|
|
//标准差
|
|
|
double powSum = 0;
|
|
@@ -665,7 +667,7 @@ namespace TEAMModelOS.Controllers
|
|
|
|
|
|
}
|
|
|
result.standard = Math.Round(scount > 0 ? Math.Pow(powSum / scount, 0.5) : 0, 2);
|
|
|
- result.average = scount > 0 ? Math.Round(score / scount, 2) : 0;
|
|
|
+ result.average = scount > 0 ? Math.Round(score / scount, 2) : 0;*/
|
|
|
exam.subjects.ForEach(s =>
|
|
|
{
|
|
|
if (s.id.Equals(subjectId.ToString()))
|
|
@@ -754,7 +756,7 @@ namespace TEAMModelOS.Controllers
|
|
|
{
|
|
|
ExamInfo exam = await client.GetContainer("TEAMModelOS", "Common").ReadItemAsync<ExamInfo>(id.ToString(), new PartitionKey($"Exam-{school}"));
|
|
|
result.progress = true;
|
|
|
- //标记单科单班总得分
|
|
|
+ /*//标记单科单班总得分
|
|
|
double score = 0;
|
|
|
//标准差
|
|
|
double powSum = 0;
|
|
@@ -770,7 +772,7 @@ namespace TEAMModelOS.Controllers
|
|
|
|
|
|
}
|
|
|
result.standard = Math.Round(scount > 0 ? Math.Pow(powSum / scount, 0.5) : 0, 2);
|
|
|
- result.average = scount > 0 ? Math.Round(score / scount, 2) : 0;
|
|
|
+ result.average = scount > 0 ? Math.Round(score / scount, 2) : 0;*/
|
|
|
exam.subjects.ForEach(s =>
|
|
|
{
|
|
|
if (s.id.Equals(subjectId.ToString()))
|