zhouj1203@hotmail.com 2 năm trước cách đây
mục cha
commit
3a3aa486dc
1 tập tin đã thay đổi với 11 bổ sung2 xóa
  1. 11 2
      TEAMModelOS/Controllers/Common/AreaController.cs

+ 11 - 2
TEAMModelOS/Controllers/Common/AreaController.cs

@@ -1491,8 +1491,13 @@ namespace TEAMModelOS.Controllers
                         });
                         //该知识点平均得分
                         double sc = exam.studentIds.Count > 0 ? Math.Round(scores * 1.0 / (cInfo.range[1] - cInfo.range[0] + 1), 2) : 0;
+                        double average = sc * 1.5;
+                        if (average > OnePoint)
+                        {
+                            average = sc;
+                        }
                         //知识点班级得分率
-                        double persent = Math.Round(OnePoint > 0 ? sc / OnePoint : 0, 2);                      
+                        double persent = Math.Round(OnePoint > 0 ? average / OnePoint : 0, 2);                      
                         pointScore.Add((knowledgeName[k], OnePoint));
                         /*var kno = knoledge.Where(s => s.subId.Equals(exam.subjectId) && s.ptype.Equals(type)).FirstOrDefault().knos;
                         List<(string name, double score)> blockScore = new();
@@ -1667,8 +1672,12 @@ namespace TEAMModelOS.Controllers
 
                 //该知识点平均得分
                 double sc = exam.studentIds.Count > 0 ? Math.Round(scores * 1.0 / exam.studentIds.Count, 2) : 0;
+                double average = sc * 1.5;
+                if (average > OnePoint) {
+                    average = sc;
+                }
                 //知识点占比
-                double persent = Math.Round(OnePoint > 0 ? sc / OnePoint : 0, 2);
+                double persent = Math.Round(OnePoint > 0 ? average / OnePoint : 0, 2);
                 per.Add(persent.ToString("0.00"));
                 //单个知识点所有学生得分率
                 pointTScore.Add((knowledgeName[k], persent));