CrazyIter_Bin 8 mesi fa
parent
commit
8692c0cf17

+ 204 - 66
TEAMModelOS.Extension/HTEX.Test/Controllers/LessonRecordController.cs

@@ -238,12 +238,19 @@ namespace HTEX.Test.Controllers
             int index = 0;
             lessonBase.student.ForEach(x =>
             {
+                int attend = 0; 
+                var client = lessonBase.report.clientSummaryList.Find(y => y.seatID == x.seatID);
+                if (client!=null) 
+                {
+                    attend=client.attendState;
+                }
                 studentLessonDatas.Add(new StudentLessonData()
                 {
                     id = x.id,
                     index = index,
                     seatID =$"{x.seatID}",
                     groupId = x.groupId,
+                    attend= attend
                 });
                 index++;
             });
@@ -313,11 +320,12 @@ namespace HTEX.Test.Controllers
                         var studentLessonData = studentLessonDatas.Find(x => x.seatID!.Equals($"{mbr}"));
                         if (studentLessonData!=null)
                         {
+                            studentLessonData.attend=1;
                             studentLessonData.interactRecord.interactRecords.Add(new ItemRecord() 
                             {
                                 resultWeight = InteractWeight.TT,
                                 resultType="TT",
-                                interactType = string.IsNullOrWhiteSpace(item.PickupType) ? "PickupResult" : item.PickupType
+                                itemType = string.IsNullOrWhiteSpace(item.PickupType) ? "PickupResult" : item.PickupType
                             });
                         }
                     }
@@ -333,8 +341,9 @@ namespace HTEX.Test.Controllers
             {
                 //检查是否设置正确答案。
                 var answers_q = irsDataPage.question?["exercise"]?["answer"]?.ToJsonString().ToObject<List<string>>();
+                //根据题去找对应的试卷和评测信息
                 var question_id = $"{irsDataPage.question?["id"]}";
-                var xs=  examDatas.Where(x =>x.paper!=null && x.paper.slides.Exists(x =>!string.IsNullOrWhiteSpace(x.url) && x.url.Equals($"{question_id}.json"))).FirstOrDefault();
+                var examData =  examDatas.Where(x =>x.paper!=null && x.paper.slides.Exists(x =>!string.IsNullOrWhiteSpace(x.url) && x.url.Equals($"{question_id}.json"))).FirstOrDefault();
                 List<string> answers = new List<string>();
                 answers_q?.ForEach(x => {
                     if (!string.IsNullOrWhiteSpace(x))
@@ -346,7 +355,7 @@ namespace HTEX.Test.Controllers
                 var scoreNode = irsDataPage.question?["exercise"]?["score"];
                 var _type = irsDataPage.question?["exercise"]?["type"];
                 var _answerType = irsDataPage.question?["exercise"]?["answerType"];//file,audio,text,image
-                double score = 0;
+                double questionScore = 0;
                 bool objective = false;
               
                 if (_objective!=null) { 
@@ -366,7 +375,6 @@ namespace HTEX.Test.Controllers
                     else {
                         objective = false;
                     }
-                   
                 }
 
                 if (_answerType!=null)
@@ -383,7 +391,7 @@ namespace HTEX.Test.Controllers
                 }
                 if (scoreNode!=null)
                 {
-                    double.TryParse(scoreNode.ToString(), out score);
+                    double.TryParse(scoreNode.ToString(), out questionScore);
                 }
                 string interactType = string.Empty;
 
@@ -413,6 +421,19 @@ namespace HTEX.Test.Controllers
                     {
                         for (int index = 0; index< clientAnswers[0].Count; index++)
                         {
+                            var student = studentLessonDatas[index];
+                            double studentScore = 0 ;
+                            if (examData!=null &&  examData.examClassResult.IsNotEmpty()) {
+                                var examResultIndex =  examData.examClassResult.First().studentIds.IndexOf(student.id);
+                                var questionIndex = examData.paper.slides.Select(x => x.url).ToList().IndexOf($"{question_id}.json");
+                                if (examResultIndex>=0 
+                                    &&  examData.examClassResult.First().studentScores.Count>=(examResultIndex+1) //防止索引越界
+                                    && examData.examClassResult.First().studentScores[examResultIndex].Count>=(questionIndex+1)) //防止索引越界
+                                {
+                                    //获取index学生在questionIndex题的分数
+                                    studentScore =  examData.examClassResult.First().studentScores[examResultIndex][questionIndex];
+                                }
+                            }
                             //index  代表学生下标
                             List<ItemRecord> interactRecords = new List<ItemRecord>();
                             if (clientAnswers.Count==1)
@@ -420,12 +441,14 @@ namespace HTEX.Test.Controllers
                                 //即问即答
                                 interactType = "PopQuesLoad";
                                 var ans0 = clientAnswers[0][index];
-                                var IS0 = GetInteractResultHasAnswer(answers, ans0, objective,type);
+                                var IS0 = GetInteractResultHasAnswer(answers, ans0, objective,type,questionScore, studentScore);
                                 interactRecords.Add(new ItemRecord()
                                 {
                                     resultWeight = IS0.weight,
                                     resultType=IS0.reultType,
-                                    interactType= interactType
+                                    itemType= interactType,
+                                    criterion= questionScore,
+                                    itemScore= IS0.interactScore
                                 });
                             }
                             if (clientAnswers.Count==2)
@@ -433,12 +456,14 @@ namespace HTEX.Test.Controllers
                                 //二次作答
                                 interactType="ReAtmpAnsStrt";
                                 var ans1 = clientAnswers[1][index];
-                                var IS1 = GetInteractResultHasAnswer(answers, ans1, objective,type);
+                                var IS1 = GetInteractResultHasAnswer(answers, ans1, objective,type,questionScore,studentScore);
                                 interactRecords.Add(new ItemRecord()
                                 {
                                     resultWeight = IS1.weight,
                                     resultType=IS1.reultType,
-                                    interactType= interactType
+                                    itemType= interactType,
+                                    criterion= questionScore,
+                                    itemScore= IS1.interactScore
                                 });
                             }
                             if (clientAnswers.Count>2)
@@ -446,15 +471,20 @@ namespace HTEX.Test.Controllers
                                 //三次作答
                                 interactType="TeAtmpAnsStrt";
                                 var ans2 = clientAnswers[2][index];
-                                var IS2 = GetInteractResultHasAnswer(answers, ans2, objective,type);
+                                var IS2 = GetInteractResultHasAnswer(answers, ans2, objective, type, questionScore, studentScore);
                                 interactRecords.Add(new ItemRecord()
                                 {
                                     resultWeight = IS2.weight,
                                     resultType=IS2.reultType,
-                                    interactType= interactType
+                                    itemType= interactType,
+                                    criterion= questionScore,
+                                    itemScore= IS2.interactScore
                                 });
                             }
-                            studentLessonDatas[index].interactRecord.interactRecords.AddRange(interactRecords);
+                            if (studentLessonDatas[index].attend==1)
+                            { 
+                                studentLessonDatas[index].interactRecord.interactRecords.AddRange(interactRecords);
+                            }
                         }
 
                     }
@@ -470,25 +500,28 @@ namespace HTEX.Test.Controllers
                         var studentData = studentLessonDatas.Find(x => x.seatID!.Equals(buzzParticipant));
                         if (studentData != null)
                         {
-                            buzzParticipants[buzzParticipant]=new ItemRecord() { resultWeight = InteractWeight.T1, interactType= interactType };
+                            buzzParticipants[buzzParticipant]=new ItemRecord() { resultWeight = InteractWeight.T1, itemType= interactType };
                         }
                     }
                     //处理抢权成功的
                     foreach (var buzzClient in irsDataPage.buzzClients)
                     {
-                        buzzParticipants[buzzClient]=new ItemRecord() { resultWeight = InteractWeight.TT, interactType= interactType };
+                        buzzParticipants[buzzClient]=new ItemRecord() { resultWeight = InteractWeight.TT, itemType= interactType };
                     }
                     foreach (var studentLessonData in studentLessonDatas)
                     {
                         if (buzzParticipants.ContainsKey(studentLessonData.seatID!))
                         {
                             //处理已经有抢权结果的数据
+                            studentLessonData.attend=1;
                             studentLessonData.interactRecord.interactRecords.Add(buzzParticipants[studentLessonData.seatID!]);
                         }
                         else
                         {
-                            //处理未参与抢权的
-                            studentLessonData.interactRecord.interactRecords.Add(new ItemRecord() { resultWeight = InteractWeight.T0, interactType = interactType });
+                            if (studentLessonData.attend==1) {
+                                //处理未参与抢权的
+                                studentLessonData.interactRecord.interactRecords.Add(new ItemRecord() { resultWeight = InteractWeight.T0, itemType = interactType });
+                            }
                         }
                     }
                 }
@@ -497,7 +530,7 @@ namespace HTEX.Test.Controllers
             return studentLessonDatas;
         }
 
-        private static (double weight,string reultType) GetInteractResultHasAnswer(List<string>? answers, List<string> ans0 , bool objective,string type)
+        private static (double weight,string reultType,double interactScore) GetInteractResultHasAnswer(List<string>? answers, List<string> ans0 , bool objective,string type, double questionScore, double studentScore)
         {
             //List<string> ans0 = new List<string>();
             //ans?.ForEach(x => {
@@ -509,6 +542,7 @@ namespace HTEX.Test.Controllers
             //});
             double weight = InteractWeight.T0;
             string reultType = InteractReultType.T0;
+            double interactScore = 0;
             if (answers.IsNotEmpty())
             {
                 if (ans0.IsNotEmpty())
@@ -523,12 +557,14 @@ namespace HTEX.Test.Controllers
                                 //完全正确
                                 weight= InteractWeight.TT;
                                 reultType= InteractReultType.TT;
+                                interactScore= studentScore==0 ? questionScore : studentScore;
                             }
                             else
                             {
                                 //作答错误
                                 weight= InteractWeight.T1;
                                 reultType = InteractReultType.T1;
+                                interactScore= studentScore;
                             }
                         }
                         //标准答案比作答的结果多
@@ -539,12 +575,15 @@ namespace HTEX.Test.Controllers
                                 //部分正确
                                 weight= InteractWeight.TP;
                                 reultType = InteractReultType.TP;
+                                //                                                                     2 *  0.3 * 10= 6                             
+                                interactScore= studentScore==0 ? 1/(InteractWeight.TT-InteractWeight.T1) * (InteractWeight.TP-InteractWeight.T1) * questionScore : studentScore;
                             }
                             else
                             {
                                 //作答错误
                                 weight= InteractWeight.T1;
                                 reultType = InteractReultType.T1;
+                                interactScore= studentScore;
                             }
                         }
                         //标准答案比作答结果少
@@ -553,6 +592,7 @@ namespace HTEX.Test.Controllers
                             //作答错误
                             weight= InteractWeight.T1;
                             reultType = InteractReultType.T1;
+                            interactScore= studentScore;
                         }
                     }
                     else
@@ -577,24 +617,29 @@ namespace HTEX.Test.Controllers
                                 //完全正确
                                 weight= InteractWeight.TT;
                                 reultType = InteractReultType.TT;
+                                interactScore= studentScore==0 ? questionScore : studentScore;
                             }
                             else if (hasT && hasF)
                             {
                                 //部分正确
                                 weight= InteractWeight.TP;
                                 reultType = InteractReultType.TP;
+                                //                                                                     2 *  0.3 * 10= 6                             
+                                interactScore= studentScore==0 ? 1/(InteractWeight.TT-InteractWeight.T1) * (InteractWeight.TP-InteractWeight.T1) * questionScore : studentScore;
                             }
                             else if (!hasT && hasF)
                             {
                                 //没有正确的,但有错误的,代表参与了
                                 weight= InteractWeight.T1;
                                 reultType = InteractReultType.T1;
+                                interactScore= studentScore;
                             }
                             else if (!hasT && !hasF)
                             {
                                 //没有正确的,也没有错误的,代表没有作答
                                 weight= InteractWeight.T0;
                                 reultType = InteractReultType.T0;
+                                interactScore= studentScore;
                             }
                         }
                         else
@@ -605,6 +650,7 @@ namespace HTEX.Test.Controllers
                                 //完全正确
                                 weight= InteractWeight.TT;
                                 reultType = InteractReultType.TT;
+                                interactScore= studentScore==0 ? questionScore : studentScore;
                             }
                             else
                             {   // 使用LINQ查询来判断是否有匹配的答案
@@ -614,43 +660,74 @@ namespace HTEX.Test.Controllers
                                     //主观题回答正确即为完全正确
                                     weight= InteractWeight.TT;
                                     reultType = InteractReultType.TT;
+                                    interactScore= studentScore==0 ? questionScore : studentScore;
                                 }
                                 else
                                 {
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
-                                    //
                                     //优先根据得分与标准分的占比算出得分率,如果没有得分率,如果是直接从互动,不知道是评测的 需要先去评测找作答得分。,则采用Levenshtein距离来评估两个字符串的相似度
                                     //没有匹配上答案,则采用Levenshtein距离来评估两个字符串的相似度
-                                    var sc = CalculateSimilarity(answers![0], ans0[0]) * 1.0/100 *(InteractWeight.TT-InteractWeight.T1);
-                                    weight = sc;
-                                    reultType = InteractReultType.TP;
+                                    if (questionScore>0)
+                                    {
+                                        if (studentScore>0)
+                                        {
+                                            weight = studentScore * 1.0  / questionScore* (InteractWeight.TT-InteractWeight.T1);
+                                            if (weight==InteractWeight.T1)
+                                            {
+                                                reultType = InteractReultType.T1;
+                                                interactScore=studentScore;
+                                            }
+                                            else if (weight>InteractWeight.TT)
+                                            {
+                                                reultType = InteractReultType.TT;
+                                                interactScore=studentScore==0? questionScore:studentScore;
+                                            }
+                                            else
+                                            {
+                                                reultType = InteractReultType.TP;
+                                                //                                                                     2 *  0.3 * 10= 6                             
+                                                interactScore= studentScore==0 ? 1/(InteractWeight.TT-InteractWeight.T1) * (InteractWeight.TP-InteractWeight.T1) * questionScore : studentScore;
+                                            }
+                                        }
+                                        else 
+                                        {
+                                            weight=InteractWeight.T1+(CalculateSimilarity(answers![0], ans0[0])  *(InteractWeight.TT-InteractWeight.T1));
+                                            if (weight==InteractWeight.T1)
+                                            {
+                                                reultType = InteractReultType.T1;
+                                                interactScore=studentScore;
+                                            }
+                                            else if (weight>InteractWeight.TT)
+                                            {
+                                                reultType = InteractReultType.TT;
+                                                interactScore=studentScore==0? questionScore:studentScore;
+                                            }
+                                            else
+                                            {
+                                                reultType = InteractReultType.TP;
+                                                //                                                                     2 *  0.3 * 10= 6                             
+                                                interactScore= studentScore==0 ? 1/(InteractWeight.TT-InteractWeight.T1) * (InteractWeight.TP-InteractWeight.T1) * questionScore : studentScore;
+                                            }
+                                        }
+                                    }
+                                    else { 
+                                        
+                                        weight=InteractWeight.T1+(CalculateSimilarity(answers![0], ans0[0])  *(InteractWeight.TT-InteractWeight.T1));
+                                        if (weight==InteractWeight.T1)
+                                        {
+                                            reultType = InteractReultType.T1;
+                                            interactScore=studentScore;
+                                        }
+                                        else if (weight>InteractWeight.TT)
+                                        {
+                                            reultType = InteractReultType.TT;
+                                            interactScore=studentScore==0? questionScore:studentScore;
+                                        }
+                                        else {
+                                            reultType = InteractReultType.TP;
+                                            //                                                                     2 *  0.3 * 10= 6                             
+                                            interactScore= studentScore==0 ? 1/(InteractWeight.TT-InteractWeight.T1) * (InteractWeight.TP-InteractWeight.T1) * questionScore : studentScore;
+                                        }
+                                    }
                                 }
                             }
                         }
@@ -661,11 +738,12 @@ namespace HTEX.Test.Controllers
                     //没有作答
                     weight= InteractWeight.T0;
                     reultType = InteractReultType.T0;
+                    interactScore=studentScore;
                 }
             }
             else 
             {
-                //没有答案的情况
+                //没有标准答案的情况
                 if (ans0.IsNotEmpty()) 
                 {
                     bool hasAns = false;
@@ -679,22 +757,45 @@ namespace HTEX.Test.Controllers
                         //作答了
                         weight= InteractWeight.T1;
                         reultType = InteractReultType.T1;
+                        interactScore=studentScore;
                     }
                     else {
                         //没有作答
                         weight= InteractWeight.T0;
                         reultType = InteractReultType.T0;
+                        interactScore=studentScore;
                     }
-                   
                 }
                 else
                 {
                     //没有作答
                     weight= InteractWeight.T0;
                     reultType = InteractReultType.T0;
+                    interactScore=studentScore;
+                }
+                //如果教师手动给了分或AI评分
+                if (questionScore>0  && studentScore>0)
+                {
+                    weight = studentScore * 1.0  / questionScore* (InteractWeight.TT-InteractWeight.T1);
+                    if (weight==InteractWeight.T1)
+                    {
+                        reultType = InteractReultType.T1;
+                        interactScore=studentScore;
+                    }
+                    else if (weight>InteractWeight.TT)
+                    {
+                        reultType = InteractReultType.TT;
+                        interactScore=studentScore==0 ? questionScore : studentScore;
+                    }
+                    else
+                    {
+                        reultType = InteractReultType.TP;
+                        //                                                                     2 *  0.3 * 10= 6                             
+                        interactScore= studentScore==0 ? 1/(InteractWeight.TT-InteractWeight.T1) * (InteractWeight.TP-InteractWeight.T1) * questionScore : studentScore;
+                    }
                 }
             }
-            return (weight,reultType);
+            return (weight,reultType,interactScore);
         }
         #region C# 代码 如何判断两句话是否一个意思,非机器学习的算法。使用Levenshtein距离来评估两个字符串的相似度,但是不能判断它们是否表达了同一个意思,后续借助AI实现
         public static double CalculateSimilarity(string s1, string s2)
@@ -721,7 +822,7 @@ namespace HTEX.Test.Controllers
                 }
             }
 
-            return (1.0 - ((double)d[n, m] / Math.Max(s1.Length, s2.Length))) * 100;
+            return (1.0 - ((double)d[n, m] / Math.Max(s1.Length, s2.Length))) ;
         }
 
          
@@ -782,9 +883,8 @@ namespace HTEX.Test.Controllers
 
                             var student =  studentLessonDatas.Find(x => x.id!.Equals(item.studentIds[index]));
                         
-                            if (student!=null) 
+                            if (student!=null  && student.attend==1) 
                             {
-                              
                                 //是否要判断主观题或者客观题, 多套试卷,有主观题的
                                 //,如果没获得结果,
                                 //主观题有回答的:608942756458532864\Clients\18782481024\Ans\27-4341670635487887360-examExchangeAnswerlist
@@ -799,20 +899,20 @@ namespace HTEX.Test.Controllers
                                     stu.ForEach(ans =>
                                     {
                                         bool objective = objectiveTypes.Contains(examData.exam.papers[0].type[itemIndex]);
-                                        var score =  examData.exam.papers[0].point[itemIndex];
+                                        var questionScore =  examData.exam.papers[0].point[itemIndex];
                                         string type = examData.exam.papers[0].type[itemIndex]; 
-                                        var res= GetInteractResultHasAnswer(answers[itemIndex], ans, objective, type);
+                                        var res= GetInteractResultHasAnswer(answers[itemIndex], ans, objective, type, questionScore, studentScore[itemIndex]);
                                         ItemRecord interactRecord = new ItemRecord()
                                         {
-                                            interactType="SPQStrt",//类型
+                                            itemType="SPQStrt",//类型
                                             resultType=res.reultType,//作答结果类型
                                             resultWeight=res.weight,//得分权重
-                                            criterion= score,//标准分
-                                            interactScore= studentScore[itemIndex]//得分
+                                            criterion= questionScore,//标准分
+                                            itemScore= studentScore[itemIndex]//得分
                                         };
                                         answerRecords.Add(interactRecord);
                                     });
-                                    studentExam.score= answerRecords.Where(x => x.interactScore>=0).Select(x => x.interactScore).Sum();//得分
+                                    studentExam.score= answerRecords.Where(x => x.itemScore>=0).Select(x => x.itemScore).Sum();//得分
                                     studentExam.scoreRate= allocation.HasValue && allocation.Value>0 ? studentExam.score * 1.0/allocation.Value : 0;//得分率
                                     studentExam.answerRate= answerRecords.Where(x => x.resultWeight>0).Count()*1.0/studentScore.Count();//作答率
                                     studentExam.examId=examData.exam.id;
@@ -843,10 +943,10 @@ namespace HTEX.Test.Controllers
                 foreach (var key in keys) 
                 {
                     var student =  studentLessonDatas.Find(x => x.seatID!.Equals(key));
-                    if (student!=null) 
+                    if (student!=null && student.attend==1) 
                     {
-                        var score = coworkData.participateLevelList[key];
-                        var itemRecord = new ItemRecord {  criterion=-1, interactType= coworkData.coworkType,interactScore=score };
+                        var score = coworkData.participateLevelList[key];//协作得分
+                        var itemRecord = new ItemRecord {  criterion=-1, itemType= coworkData.coworkType,itemScore=score };
                         if (score>0)
                         {
                             itemRecord.resultWeight =  InteractWeight.T1;
@@ -872,14 +972,52 @@ namespace HTEX.Test.Controllers
         /// <param name="taskDatas"></param>
         /// <param name="studentLessonDatas"></param>
         /// <returns></returns>
-        private async Task<dynamic> GetTaskData(LessonRecord lessonRecord, LessonBase lessonBase, TimeLineData timeLineData, List<TaskData> taskDatas, List<StudentLessonData> studentLessonDatas)
+        private List<StudentLessonData>  GetTaskData(LessonRecord lessonRecord, LessonBase lessonBase, TimeLineData timeLineData, List<TaskData> taskDatas, List<StudentLessonData> studentLessonDatas)
         {
             //协作也算任务的一种,'WrkSpaceLoad' 作品收集, "isGroupItem": false,
-            return Ok(lessonRecord);
+            int indexTask = 0;
+            foreach (var taskData in taskDatas)
+            {
+                //作品收集是全部人员都要参加
+                foreach (var student in studentLessonDatas)
+                {
+                    if (student.attend==1) 
+                    {
+                        var work = taskData.clientWorks.Find(x => x.seatID.Equals(student.seatID));
+                        if (work!= null)
+                        {
+                            student.taskRecord.itemRecords.Add(new ItemRecord { itemType="WrkSpaceLoad", itemScore=10, resultWeight=InteractWeight.T1, resultType=InteractReultType.T1, isGroup= work.isGroupItem });
+                        }
+                        else
+                        {
+                            student.taskRecord.itemRecords.Add(new ItemRecord { itemType="WrkSpaceLoad", itemScore=0, resultWeight=InteractWeight.T0, resultType=InteractReultType.T0, isGroup= false });
+                        }
+                    }
+                }
+                ////////
+                ///需要处理小组的情况,当前人员没有提交作品,但是有可能是小组其他人员提交了,需要判断一下。
+                ///
+                var groupIds =  studentLessonDatas.FindAll(x => x.attend==1   &&  x.taskRecord.itemRecords[indexTask].isGroup==true).GroupBy(x=>x.groupId).Select(x=>x.Key);
+                foreach (var groupId in groupIds)
+                {
+                   var groupStudents= studentLessonDatas.FindAll(x => x.attend==1 &&  !string.IsNullOrWhiteSpace(x.groupId) &&  x.groupId.Equals(groupId));
+                    foreach (var student in groupStudents)
+                    {
+                        student.taskRecord.itemRecords[indexTask].isGroup=true;
+                    }
+                }
+                indexTask++;
+            }
+            return studentLessonDatas;
         }
 
         /// <summary>
         /// 评分参与率 态度计算
+        ///  //读取互评信息
+        ///   /// 评分相关 在SmartRating.json 处理 'SmartRating' 评分模式,分 投票Voting 和 GrandRating  星光大评分(All每人多件评分,Two随机分配互评, Self自评)    
+        //Event 过滤类型  'RatingStart'
+        //smartRateSummary.mutualSummary.mutualType 互评【All(每人多件评分)  Two(随机分配互评)  Self(自评)】 smartRateSummary.meteor_VoteSummary 投票 
+        //读取SmartRating.json
         /// </summary>
         /// <param name="lessonRecord"></param>
         /// <param name="lessonBase"></param>

+ 78 - 2
TEAMModelOS.SDK/Models/Cosmos/Common/ArtEvaluation.cs

@@ -8,19 +8,36 @@ using System.Threading.Tasks;
 
 namespace TEAMModelOS.SDK.Models.Cosmos.Common
 {
+    /// <summary>
+    /// 艺术评测基础信息
+    /// </summary>
     public class ArtEvaluation : CosmosEntity
     {
         public ArtEvaluation()
         {
             pk = "Art";           
         }
-
+        /// <summary>
+        /// 评测名称
+        /// </summary>
         public string name { get; set; }
+        /// <summary>
+        /// 学校
+        /// </summary>
         public string school { get; set; }
         //高级设置
         public List<Tasks> settings { get; set; } = new List<Tasks>();
+        /// <summary>
+        /// 创建者
+        /// </summary>
         public string creatorId { get; set; }
+        /// <summary>
+        /// 创建时间
+        /// </summary>
         public long createTime { get; set; }
+        /// <summary>
+        /// 更新时间
+        /// </summary>
         public long updateTime { get; set; }
         //教研类型
         public int type { get; set; } = 0;
@@ -39,8 +56,17 @@ namespace TEAMModelOS.SDK.Models.Cosmos.Common
         /// 发布对象全部信息。由前端操作,用于前端回显发布对象的格式。
         /// </summary>
         public List<JsonElement> targets { get; set; } = new List<JsonElement>();
+        /// <summary>
+        /// 评测进度
+        /// </summary>
         public string progress { get; set; }
+        /// <summary>
+        /// 作业范围
+        /// </summary>
         public string scope { get; set; }
+        /// <summary>
+        /// 评测状态
+        /// </summary>
         public int? status { get; set; } = 0;
         //记录该评测内容下blob大小
         public long? size { get; set; } = 0;
@@ -48,32 +74,82 @@ namespace TEAMModelOS.SDK.Models.Cosmos.Common
         ///发布层级 类型 school  area
         /// </summary>
         public string owner { get; set; }
+        /// <summary>
+        /// 区域id
+        /// </summary>
         public string areaId { get; set; }
         public string pId { get; set; }
+        /// <summary>
+        /// 宣传人
+        /// </summary>
         public string presenter { get; set; }
+        /// <summary>
+        /// 专题
+        /// </summary>
         public string topic { get; set; }
+        /// <summary>
+        /// 评测开始时间
+        /// </summary>
         public long startTime { get; set; }
+        /// <summary>
+        /// 评测结束时间
+        /// </summary>
         public long endTime { get; set; }
+        /// <summary>
+        /// 上传开始时间
+        /// </summary>
         public long uploadSTime { get; set; }
+        /// <summary>
+        /// 上传结束时间
+        /// </summary>
         public long uploadETime { get; set; }
+        /// <summary>
+        /// 上传进度
+        /// </summary>
         public string uploadProgress { get; set; }
+        /// <summary>
+        /// //地址
+        /// </summary>
         public string address { get; set; }
         //培训内容
         public string desc { get; set; }
+        /// <summary>
+        /// 图片
+        /// </summary>
         public string img { get; set; }
 /*        public string workId { get; set; }
         public string surveyId { get; set; }
         public string examId { get; set; }*/
         //发布层级 0校级,1区级
         public int? publish { get; set; } = 0;
+        /// <summary>
+        /// 艺术学科
+        /// </summary>
         public List<ArtSubject> subjects { get; set; } = new List<ArtSubject>();
+        /// <summary>
+        /// 艺术学段
+        /// </summary>
         public ArtPeriod period { get; set; } = new ArtPeriod();
+        /// <summary>
+        /// 学段类型
+        /// </summary>
         public string periodType { get; set; }
+        /// <summary>
+        /// 缺考学生
+        /// </summary>
         public List<LostStudent> lost { get; set; } = new List<LostStudent>();
         //用来判定是否已经处理过缺考人数逻辑标识
+        /// <summary>
+        /// 缺考标识
+        /// </summary>
         public int? pass { get; set; } = 0;
+        /// <summary>
+        /// 缺考学生标识
+        /// </summary>
         public List<int> miss { get; set; } = new List<int>();
-
+        /// <summary>
+        /// 音乐作品
+        /// </summary>
         public List<Zymusicstd> zymusicstds { get; set; } = new List<Zymusicstd>();
     }
     public class Zymusicstd

+ 33 - 3
TEAMModelOS.SDK/Models/Cosmos/Common/LessonRecord.cs

@@ -455,7 +455,7 @@ namespace TEAMModelOS.SDK.Models
         public List<MeteorScoreSummary> meteor_ScoreSummary { get; set; } = new List<MeteorScoreSummary>();
         public Dictionary<string, Dictionary<string, string>> scoreDetailResult { get; set; } = new Dictionary<string, Dictionary<string, string>>();
         public Dictionary<string, MeteorVoteSummary> meteor_VoteSummary { get; set; } = new Dictionary<string, MeteorVoteSummary>();
-        public Dictionary<string , VoteDetailResult> voteDetailResult { get; set; }
+        public Dictionary<string, VoteDetailResult> voteDetailResult { get; set; } = new Dictionary<string, VoteDetailResult>();
         public MutualSummary mutualSummary { get; set; }
         public Dictionary<string, Dictionary<string, string>> mutualDetailSummary { get; set; } = new Dictionary<string, Dictionary<string, string>>();
     }
@@ -465,6 +465,9 @@ namespace TEAMModelOS.SDK.Models
     /// </summary>
     public class StudentLessonData
     {
+
+        //是否出席
+        public int attend { get; set; }
         /// <summary>
         /// 课例id
         /// </summary>
@@ -502,11 +505,19 @@ namespace TEAMModelOS.SDK.Models
         /// 学生评测记录相关
         /// </summary>
         public List<StudentExamRecord> examRecords { get; set; } = new List<StudentExamRecord>();
+        /// <summary>
+        /// 协作记录
+        /// </summary>
         public StudentCoworkRecord coworkRecord { get; set; } = new StudentCoworkRecord();
         /// <summary>
         /// 互动记录
         /// </summary>
         public StudentInteractRecord interactRecord { get; set; } = new StudentInteractRecord();
+        /// <summary>
+        /// 任务记录
+        /// </summary>
+        public StudentTaskRecord taskRecord { get; set; } = new StudentTaskRecord();
+
 
     }
 
@@ -531,6 +542,21 @@ namespace TEAMModelOS.SDK.Models
         public List<ItemRecord> interactRecords { get; set; } = new List<ItemRecord>();
     }
     /// <summary>
+    /// 学生任务记录
+    /// </summary>
+    public class StudentTaskRecord
+    {
+        /// <summary>
+        /// 协作参与率
+        /// </summary>
+        public double taskRate { get; set; }
+        
+        /// <summary>
+        /// 任务参与记录
+        /// </summary>
+        public List<ItemRecord> itemRecords { get; set; } = new List<ItemRecord>();
+    }
+    /// <summary>
     /// 学生协作记录
     /// </summary>
     public class StudentCoworkRecord
@@ -586,7 +612,7 @@ namespace TEAMModelOS.SDK.Models
         /// <summary>
         ///    { "PopQuesLoad", "ReAtmpAnsStrt", "BuzrAns", "BuzrLoad", "PickupResult","SPQStrt" };  //"SPQStrt" 课中评测专用,不参与互动的统计,会重复
         /// </summary>
-        public string? interactType { get; set; }
+        public string? itemType { get; set; }
         /// <summary>
         /// 互动结果权重,纳入学习状态计算
         /// </summary>
@@ -598,11 +624,15 @@ namespace TEAMModelOS.SDK.Models
         /// <summary>
         ///  互动积分,试题评分
         /// </summary>
-        public double interactScore { get; set; }
+        public double itemScore { get; set; }
         /// <summary>
         /// 基准分值
         /// </summary>
         public double criterion { get; set; }
+        /// <summary>
+        /// 是否是小组类型的
+        /// </summary>
+        public bool isGroup { get; set;}
     }
     public static class InteractReultType
     {

+ 1 - 1
TEAMModelOS.SDK/Models/Cosmos/School/Class.cs

@@ -11,7 +11,7 @@ using TEAMModelOS.SDK.DI;
 namespace TEAMModelOS.SDK.Models
 {    
     /// <summary>
-    /// 班级
+    /// 班级信息
     /// </summary>
     public class Class : CosmosEntity
     {

+ 66 - 0
TEAMModelOS.SDK/Models/Cosmos/Student/Student.cs

@@ -28,25 +28,64 @@ namespace TEAMModelOS.SDK.Models
         /// </summary>
         public string imeiType { get; set; }
     }
+    /// <summary>
+    /// 学生
+    /// </summary>
     public class Student : CosmosEntity
     {
+        /// <summary>
+        /// 邮箱
+        /// </summary>
         public string mail { get; set; }
+        /// <summary>
+        /// 手机号
+        /// </summary>
         public string mobile { get; set; }
+        /// <summary>
+        /// 国家
+        /// </summary>
         public string country { get; set; }
+        /// <summary>
+        /// 姓名
+        /// </summary>
         public string name { get; set; }
+        /// <summary>
+        /// 头像
+        /// </summary>
         public string picture { get; set; }
+        /// <summary>
+        /// 学校Id
+        /// </summary>
         public string schoolId { get; set; }
+        /// <summary>
+        /// 密码
+        /// </summary>
         public string pw { get; set; }
+        /// <summary>
+        /// 密码盐值
+        /// </summary>
         public string salt { get; set; }
+        /// <summary>
+        /// 入学年份
+        /// </summary>
         public int year { get; set; }
         //座位号
         public string no { get; set; }   //座位号
+        /// <summary>
+        /// IRS编号
+        /// </summary>
         public string irs { get; set; }
         //绑定班级Id
         public string classId { get; set; }
         //分组信息
         public string groupId { get; set; }
+        /// <summary>
+        /// 分组名称
+        /// </summary>
         public string groupName { get; set; }
+        /// <summary>
+        /// 学段id
+        /// </summary>
         public string periodId { get; set; }
         /// <summary>
         /// 性别 M( male,男) F (female 女)  N(secret 保密) 
@@ -64,6 +103,9 @@ namespace TEAMModelOS.SDK.Models
         /// 创建时间  十位 时间戳
         /// </summary>
         public long createTime { get; set; }
+        /// <summary>
+        /// 学生的监护人信息
+        /// </summary>
         public List<StudentGuardian> guardians { get; set; }= new List<StudentGuardian>();
         /// <summary>
         /// 学生的专业id
@@ -74,6 +116,9 @@ namespace TEAMModelOS.SDK.Models
         /// </summary>
         public string openId { get; set; }
     }
+    /// <summary>
+    /// 监护人
+    /// </summary>
     public class Guardian : CosmosEntity
     {
         //存 Student表
@@ -91,9 +136,21 @@ namespace TEAMModelOS.SDK.Models
         /// 头像
         /// </summary>
         public string picture { get; set; }
+        /// <summary>
+        /// id
+        /// </summary>
         public string tmdid { get; set; }
+        /// <summary>
+        /// 手机号
+        /// </summary>
         public string mobile { get; set; }
+        /// <summary>
+        /// 邮箱
+        /// </summary>
         public string mail { get; set; }
+        /// <summary>
+        /// 学生信息
+        /// </summary>
         public List<GuardianStudent> students { get; set; } = new List<GuardianStudent>();
 
     }
@@ -134,8 +191,17 @@ namespace TEAMModelOS.SDK.Models
         /// 头像
         /// </summary>
         public string picture { get; set; }
+        /// <summary>
+        /// id
+        /// </summary>
         public string tmdid { get; set; }
+        /// <summary>
+        /// 手机号
+        /// </summary>
         public string mobile { get; set; }
+        /// <summary>
+        /// 邮箱
+        /// </summary>
         public string mail { get; set; }
     }
 }

+ 52 - 2
TEAMModelOS.SDK/Models/Cosmos/Teacher/Teacher.cs

@@ -7,12 +7,33 @@ namespace TEAMModelOS.SDK.Models
 {
     public class Teacher : CosmosEntity
     {
+        /// <summary>
+        /// 老師名字
+        /// </summary>
         public string name { get; set; }
+        /// <summary>
+        /// 头像
+        /// </summary>
         public string picture { get; set; }
+        /// <summary>
+        /// 存储大小
+        /// </summary>
         public int size { get; set; }
+        /// <summary>
+        /// 默认学校
+        /// </summary>
         public string defaultSchool { get; set; }
+        /// <summary>
+        /// 默认学段
+        /// </summary>
         public string defaultschoolPeriod { get; set; }
+        /// <summary>
+        ///加入的学校列表
+        /// </summary>
         public List<TeacherSchool> schools { get; set; } = new List<TeacherSchool>();
+        /// <summary>
+        /// 关联区级
+        /// </summary>
         public List<TeacherArea> areas { get; set; } = new List<TeacherArea>();
         public List<ThirdBind> binds { get; set; } = new List<ThirdBind>();
         public int lessonLimit { get; set; } = 0;
@@ -25,10 +46,18 @@ namespace TEAMModelOS.SDK.Models
         /// 保留当天的登录信息
         /// </summary>
         public List<LoginInfo> loginInfos { get; set; } = new List<LoginInfo>();
-
+        /// <summary>
+        /// 语系
+        /// </summary>
         public string lang { get; set; }
+        /// <summary>
+        /// 时区
+        /// </summary>
         public double timezone { get; set; } = 8;
-        public List<string> permission { get; set; } = new List<string>(); //老師個人權限
+        /// <summary>
+        /// 权限
+        /// </summary>
+        public List<string> permission { get; set; } = new List<string>(); 
 
         public class LoginInfo
         {
@@ -47,12 +76,33 @@ namespace TEAMModelOS.SDK.Models
         }
         public class TeacherSchool
         {
+            /// <summary>
+            /// 学校id
+            /// </summary>
             public string schoolId { get; set; }
+            /// <summary>
+            /// 学校名字
+            /// </summary>
             public string name { get; set; }
+            /// <summary>
+            /// 加入状态
+            /// </summary>
             public string status { get; set; }
+            /// <summary>
+            /// 加入时间
+            /// </summary>
             public long time { get; set; }
+            /// <summary>
+            /// 学校logo
+            /// </summary>
             public string picture { get; set; }
+            /// <summary>
+            /// 区域id
+            /// </summary>
             public string areaId { get; set; }
+            /// <summary>
+            /// 角色
+            /// </summary>
             public List<string> roles { get; set; } = new List<string>();
         }
         public class TeacherArea