瀏覽代碼

处理总分异常

zhouj1203@hotmail.com 4 年之前
父節點
當前提交
04b587e5c4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      TEAMModelOS/Controllers/Common/ExamController.cs

+ 1 - 1
TEAMModelOS/Controllers/Common/ExamController.cs

@@ -503,7 +503,7 @@ namespace TEAMModelOS.Controllers
                         });
                         await client.GetContainer("TEAMModelOS", "Common").ReplaceItemAsync(exam, id.ToString(), new PartitionKey($"Exam-{school}"));
                     }
-                    result.sum[index] = result.studentScores[index].Sum();
+                    result.sum[newIndex] = result.studentScores[newIndex].Sum();
                     classResult = await client.GetContainer("TEAMModelOS", "Common").ReplaceItemAsync(result, result.id, new PartitionKey($"{result.code}"));
                 }