LessonRecordController.cs 64 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169
  1. using Azure.Storage.Blobs.Models;
  2. using Microsoft.AspNetCore.Mvc;
  3. using System.Text.Json;
  4. using TEAMModelOS.SDK;
  5. using TEAMModelOS.SDK.DI;
  6. using TEAMModelOS.SDK.Models;
  7. using TEAMModelOS.SDK.Extension;
  8. using StackExchange.Redis;
  9. using System.Text.RegularExpressions;
  10. using System.Linq;
  11. using static TEAMModelOS.SDK.Models.Cosmos.Student.StudentAnalysis;
  12. namespace HTEX.Test.Controllers
  13. {
  14. [ApiController]
  15. [Route("lesson-record")]
  16. public class LessonRecordController : ControllerBase
  17. {
  18. private readonly ILogger<LessonRecordController> _logger;
  19. private readonly AzureCosmosFactory _azureCosmos;
  20. private readonly AzureStorageFactory _azureStorage;
  21. private readonly List<string> objectiveTypes=new List<string>(){ "single", "multiple", "sortmultiple" , "judge" };
  22. public LessonRecordController(ILogger<LessonRecordController> logger, AzureCosmosFactory azureCosmos, AzureStorageFactory azureStorage)
  23. {
  24. _logger = logger;
  25. _azureCosmos = azureCosmos;
  26. _azureStorage = azureStorage;
  27. }
  28. [HttpPost("read")]
  29. public async Task<IActionResult> Read(JsonElement json)
  30. {
  31. string m = await System.IO.File.ReadAllTextAsync("C:\\Users\\CrazyIter\\Downloads\\m.json");
  32. string p = await System.IO.File.ReadAllTextAsync("C:\\Users\\CrazyIter\\Downloads\\p.json");
  33. List<ItemInfo> mlist=m.ToObject<List<ItemInfo>>();
  34. List<ItemInfo> plist=p.ToObject<List<ItemInfo>>();
  35. var km = mlist.Where(x=> x.knowledge.IsNotEmpty()).SelectMany(x => x.knowledge).Distinct();
  36. var kp = plist.Where(x=> x.knowledge.IsNotEmpty()).SelectMany(x => x.knowledge).Distinct();
  37. List<CodeLong> cp = new List<CodeLong>();
  38. foreach (var item in kp)
  39. {
  40. var count = plist.Where(x => x.knowledge.Contains(item)).Count();
  41. cp.Add(new CodeLong() { code = item, value = count });
  42. }
  43. List<CodeLong> cm = new List<CodeLong>();
  44. foreach (var item in km)
  45. {
  46. var count = mlist.Where(x => x.knowledge.Contains(item)).Count();
  47. cm.Add(new CodeLong() { code = item, value = count });
  48. }
  49. return Ok(new { cm,cp });
  50. }
  51. [HttpPost("process-history")]
  52. public async Task<IActionResult> ProcessHistory(JsonElement json)
  53. {
  54. //1709222400000 2024.3.1
  55. var result = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School)
  56. .GetList<LessonRecord>($"SELECT value c FROM School AS c where c.startTime>1709222400000 and c.expire<=0 and c.status<>404",
  57. $"LessonRecord-{json.GetProperty("schoolId")}", pageSize: 20);
  58. if (result.list.IsNotEmpty())
  59. {
  60. foreach (var item in result.list)
  61. {
  62. //读取TimeLine.json
  63. TimeLineData? timeLineData = null;
  64. try
  65. {
  66. BlobDownloadResult timeLineBlobDownload = await _azureStorage.GetBlobContainerClient(item.school).GetBlobClient($"/records/{item.id}/IES/TimeLine.json").DownloadContentAsync();
  67. timeLineData = timeLineBlobDownload.Content.ToObjectFromJson<TimeLineData>();
  68. }
  69. catch (Exception ex)
  70. {
  71. if (!ex.Message.Contains("The specified blob does not exist"))
  72. {
  73. _logger.LogError(ex, $"文件不存在:/records/{item.id}/IES/TimeLine.json");
  74. }
  75. }
  76. //读取基础Base信息
  77. //base.json
  78. LessonBase? lessonBase = null;
  79. List<StudentLessonData> studentLessonDatas = new List<StudentLessonData>();
  80. //名单出席率低于30%的 不纳入计算。
  81. try
  82. {
  83. BlobDownloadResult baseblobDownload = await _azureStorage.GetBlobContainerClient(item.school).GetBlobClient($"/records/{item.id}/IES/base.json").DownloadContentAsync();
  84. string basejson = baseblobDownload.Content.ToString().Replace("\"Uncall\"", "0").Replace("Uncall", "0");
  85. lessonBase = basejson.ToObject<LessonBase>();
  86. var data = GetBaseData(item, lessonBase);
  87. studentLessonDatas=data.studentLessonDatas;
  88. }
  89. catch (Exception ex)
  90. {
  91. if (!ex.Message.Contains("The specified blob does not exist"))
  92. {
  93. _logger.LogError(ex, $"文件不存在:/records/{item.id}/IES/base.json");
  94. }
  95. }
  96. //读取Task.json
  97. ///Event 过滤类型 : 'WrkSpaceLoad'作品收集, 'WrkCmp' 作品贴上 文件:Task.json 根据clientWorks 中的seatID 匹配base.json 中的 student
  98. List<TaskData> taskDatas = new List<TaskData>();
  99. try
  100. {
  101. BlobDownloadResult taskBlobDownload = await _azureStorage.GetBlobContainerClient(item.school).GetBlobClient($"/records/{item.id}/IES/Task.json").DownloadContentAsync();
  102. taskDatas = taskBlobDownload.Content.ToObjectFromJson<List<TaskData>>();
  103. }
  104. catch (Exception ex)
  105. {
  106. if (!ex.Message.Contains("The specified blob does not exist"))
  107. {
  108. _logger.LogError(ex, $"文件不存在:/records/{item.id}/IES/Task.json");
  109. }
  110. }
  111. //读取互评信息
  112. //Event 过滤类型 'RatingStart'
  113. //smartRateSummary.mutualSummary.mutualType 互评【All(每人多件评分) Two(随机分配互评) Self(自评)】 smartRateSummary.meteor_VoteSummary 投票
  114. //读取SmartRating.json
  115. List<SmartRatingData> smartRatingDatas = new List<SmartRatingData>();
  116. try
  117. {
  118. BlobDownloadResult smartRatingBlobDownload = await _azureStorage.GetBlobContainerClient(item.school).GetBlobClient($"/records/{item.id}/IES/SmartRating.json").DownloadContentAsync();
  119. smartRatingDatas = smartRatingBlobDownload.Content.ToObjectFromJson<List<SmartRatingData>>();
  120. }
  121. catch (Exception ex)
  122. {
  123. if (!ex.Message.Contains("The specified blob does not exist"))
  124. {
  125. _logger.LogError(ex, $"文件不存在:/records/{item.id}/IES/SmartRating.json");
  126. }
  127. }
  128. //读取互动信息
  129. //Event 过滤类型 'PopQuesLoad', 'ReAtmpAnsStrt', 'BuzrAns','BuzrLoad'
  130. //TimeLine.json 中找到对应类型,根据Pgid 去 IRS.json 中找到对应数据,从clientAnswers 的下标对应 base.json 中的 student 找到对应学生信息 clientAnswers.length > 1 则表示有二次作答
  131. //读取IRS.json
  132. List<IRSData> irsDatas = new List<IRSData>();
  133. try
  134. {
  135. BlobDownloadResult irsBlobDownload = await _azureStorage.GetBlobContainerClient(item.school).GetBlobClient($"/records/{item.id}/IES/IRS.json").DownloadContentAsync();
  136. irsDatas = irsBlobDownload.Content.ToObjectFromJson<List<IRSData>>();
  137. }
  138. catch (Exception ex)
  139. {
  140. if (!ex.Message.Contains("The specified blob does not exist"))
  141. {
  142. _logger.LogError(ex, $"文件不存在:/records/{item.id}/IES/IRS.json");
  143. }
  144. }
  145. //读取协作信息
  146. ///Event 过滤类型 'CoworkLoad', "CoworkType":"CoworkGroup",类型
  147. //Cowork.json 中找到对应类型,根据Pgid 去 Cowork.json 中找到对应数据
  148. List<CoworkData> coworkDatas = new List<CoworkData>();
  149. try
  150. {
  151. BlobDownloadResult irsBlobDownload = await _azureStorage.GetBlobContainerClient(item.school).GetBlobClient($"/records/{item.id}/IES/Cowork.json").DownloadContentAsync();
  152. coworkDatas = irsBlobDownload.Content.ToObjectFromJson<List<CoworkData>>();
  153. }
  154. catch (Exception ex)
  155. {
  156. if (!ex.Message.Contains("The specified blob does not exist"))
  157. {
  158. _logger.LogError(ex, $"文件不存在:/records/{item.id}/IES/Cowork.json");
  159. }
  160. }
  161. //读取ExamData
  162. List<ExamData> examDatas = new List<ExamData>();
  163. try {
  164. var examPages = timeLineData?.events.Where(x => string.IsNullOrWhiteSpace(x.ExamId));
  165. if (examDatas!=null && examDatas.Count>0)
  166. {
  167. var examsFiles = await _azureStorage.GetBlobContainerClient(item.school).List($"/records/{item.id}/Exam/");
  168. var paperFiles = await _azureStorage.GetBlobContainerClient(item.school).List($"/records/{item.id}/ExamPaper/");
  169. foreach (var examsFile in examsFiles)
  170. {
  171. if (examsFile.EndsWith("Exam.json"))
  172. {
  173. ExamData? examData = null;
  174. try {
  175. BlobDownloadResult examDataDownload = await _azureStorage.GetBlobContainerClient(item.school).GetBlobClient(examsFile).DownloadContentAsync();
  176. examData = examDataDownload.Content.ToObjectFromJson<ExamData>();
  177. } catch (Exception ex)
  178. {
  179. if (!ex.Message.Contains("The specified blob does not exist"))
  180. {
  181. _logger.LogError(ex, $"文件不存在:{examsFile}");
  182. }
  183. }
  184. if (examData!=null && examData.exam.papers.IsNotEmpty())
  185. {
  186. string paperId= examData.exam.papers.First().id;
  187. if (_azureStorage.GetBlobContainerClient(item.school).GetBlobClient($"/records/{item.id}/ExamPaper/{paperId}/index.json").Exists())
  188. {
  189. LessonPaper lessonPaper = null;
  190. try {
  191. BlobDownloadResult paperblobDownload = await _azureStorage.GetBlobContainerClient(item.school).GetBlobClient($"/records/{item.id}/ExamPaper/{paperId}/index.json").DownloadContentAsync();
  192. lessonPaper = paperblobDownload.Content.ToObjectFromJson<LessonPaper>();
  193. examData.paper = lessonPaper;
  194. } catch (Exception ex) {
  195. if (!ex.Message.Contains("The specified blob does not exist"))
  196. {
  197. _logger.LogError(ex, $"文件不存在:/records/{item.id}/ExamPaper/{paperId}/index.json");
  198. }
  199. }
  200. }
  201. examDatas.Add(examData);
  202. }
  203. }
  204. }
  205. }
  206. }
  207. catch (Exception ex)
  208. {
  209. _logger.LogError(ex,ex.Message);
  210. }
  211. }
  212. }
  213. return Ok("Lesson records");
  214. }
  215. /// <summary>
  216. /// 处理base.json的数据
  217. /// </summary>
  218. /// <param name="lessonRecord"></param>
  219. /// <param name="lessonBase"></param>
  220. /// <returns></returns>
  221. private (LessonBase lessonBase, List<StudentLessonData> studentLessonDatas) GetBaseData(LessonRecord lessonRecord, LessonBase lessonBase)
  222. {
  223. //处理学生定位数据
  224. List<StudentLessonData> studentLessonDatas = new List<StudentLessonData>();
  225. int index = 0;
  226. lessonBase.student.ForEach(x =>
  227. {
  228. int attend = 0;
  229. var client = lessonBase.report.clientSummaryList.Find(y => y.seatID == x.seatID);
  230. if (client!=null)
  231. {
  232. attend=client.attendState;
  233. }
  234. studentLessonDatas.Add(new StudentLessonData()
  235. {
  236. id = x.id,
  237. index = index,
  238. seatID =$"{x.seatID}",
  239. groupId = x.groupId,
  240. attend= attend
  241. });
  242. index++;
  243. });
  244. return (lessonBase, studentLessonDatas);
  245. }
  246. /// <summary>
  247. ///读取互动信息
  248. ///Event 过滤类型 'PopQuesLoad', 'ReAtmpAnsStrt', 'BuzrAns','BuzrLoad'
  249. /// 在IRS.json处理 'PopQuesLoad'互动问答 , 'ReAtmpAnsStrt' 二次作答 , 'BuzrAns' 抢权(新), 'BuzrLoad'抢权(旧), PickupResult 挑人算不算互动?? 读取PickupMemberId "[\r\n 35\r\n]"
  250. ///TimeLine.json 中找到对应类型,根据Pgid 去 IRS.json 中找到对应数据,从clientAnswers 的下标对应 base.json 中的 student 找到对应学生信息 clientAnswers.length > 1 则表示有二次作答
  251. ///读取IRS.json
  252. /// </summary>
  253. /// <param name="lessonRecord"></param>
  254. /// <param name="lessonBase"></param>
  255. /// <param name="irsDatas"></param>
  256. /// <returns></returns>
  257. private List<StudentLessonData> GetIRSData(LessonRecord lessonRecord, LessonBase lessonBase, TimeLineData timeLineData, List<IRSData> irsDatas, List<StudentLessonData> studentLessonDatas,List<ExamData> examDatas)
  258. {
  259. List<string> interactTypes = new List<string>() { "PopQuesLoad", "ReAtmpAnsStrt", "BuzrAns", "BuzrLoad", "PickupResult" };
  260. //去重页面
  261. var enventsInteract = timeLineData.events.Where(x => interactTypes.Contains(x.Event)).GroupBy(x => x.Pgid) .Select(x => new { key = x.Key, list = x.ToList() });
  262. if (enventsInteract!= null)
  263. {
  264. var keys = enventsInteract.Select(x => x.key).ToList();
  265. foreach (var item in enventsInteract)
  266. {
  267. ProcessIRSPageData(irsDatas, studentLessonDatas,examDatas, item);
  268. }
  269. //处理其他,评测类型的互动,因为有可能不会记录在TimeLine.json中
  270. var envents_other = timeLineData.events.Where(x => !keys.Contains(x.Pgid)).GroupBy(x => x.Pgid) .Select(x => new { key = x.Key, list = x.ToList() });
  271. if (envents_other!=null)
  272. {
  273. foreach (var item in envents_other)
  274. {
  275. ProcessIRSPageData(irsDatas, studentLessonDatas,examDatas, item);
  276. }
  277. }
  278. }
  279. else
  280. {
  281. //处理其他,评测类型的互动,因为有可能不会记录在TimeLine.json中
  282. var envents_other = timeLineData.events.GroupBy(x => x.Pgid) .Select(x => new { key = x.Key, list = x.ToList() });
  283. if (envents_other!=null)
  284. {
  285. foreach (var item in envents_other)
  286. {
  287. ProcessIRSPageData(irsDatas, studentLessonDatas,examDatas, item);
  288. }
  289. }
  290. }
  291. //单独处理挑人的逻辑
  292. //是否从小组里面挑人。
  293. //不需要去重页面,直接获取挑人大类 PickupResult
  294. //小类处理:PickupRight , PickupOption , PickupNthGrp ,PickupEachGrp ,PickupDiff
  295. var enventsPickup = timeLineData.events.Where(x => x.Event.Equals("PickupResult"));
  296. if (enventsPickup.IsNotEmpty())
  297. {
  298. foreach (var item in enventsPickup)
  299. {
  300. List<int> mbrs = item.PickupMemberId.ToObject<List<int>>();
  301. foreach (var mbr in mbrs)
  302. {
  303. var studentLessonData = studentLessonDatas.Find(x => x.seatID!.Equals($"{mbr}"));
  304. if (studentLessonData!=null)
  305. {
  306. studentLessonData.attend=1;
  307. studentLessonData.interactRecord.interactRecords.Add(new ItemRecord()
  308. {
  309. resultWeight = InteractWeight.TT,
  310. resultType="TT",
  311. itemType = string.IsNullOrWhiteSpace(item.PickupType) ? "PickupResult" : item.PickupType
  312. });
  313. }
  314. }
  315. }
  316. }
  317. return studentLessonDatas;
  318. }
  319. private static List<StudentLessonData> ProcessIRSPageData(List<IRSData> irsDatas, List<StudentLessonData> studentLessonDatas, List<ExamData> examDatas, dynamic item)
  320. {
  321. var irsDataPages = irsDatas.Where(y => item.key.Equals(y.pageID));
  322. foreach (var irsDataPage in irsDataPages)
  323. {
  324. //检查是否设置正确答案。
  325. var answers_q = irsDataPage.question?["exercise"]?["answer"]?.ToJsonString().ToObject<List<string>>();
  326. //根据题去找对应的试卷和评测信息
  327. var question_id = $"{irsDataPage.question?["id"]}";
  328. var examData = examDatas.Where(x =>x.paper!=null && x.paper.slides.Exists(x =>!string.IsNullOrWhiteSpace(x.url) && x.url.Equals($"{question_id}.json"))).FirstOrDefault();
  329. List<string> answers = new List<string>();
  330. answers_q?.ForEach(x => {
  331. if (!string.IsNullOrWhiteSpace(x))
  332. {
  333. answers.Add(x);
  334. }
  335. });
  336. var _objective = irsDataPage.question?["exercise"]?["objective"];
  337. var scoreNode = irsDataPage.question?["exercise"]?["score"];
  338. var _type = irsDataPage.question?["exercise"]?["type"];
  339. var _answerType = irsDataPage.question?["exercise"]?["answerType"];//file,audio,text,image
  340. double questionScore = 0;
  341. bool objective = false;
  342. if (_objective!=null) {
  343. objective = _objective.GetValue<bool>();
  344. }
  345. //题型
  346. string type= string.Empty;
  347. if (_type!=null)
  348. {
  349. //题型
  350. type = _type.GetValue<string>();
  351. List<string> types = new List<string>() { "single", "multiple" , "judge" , "sortmultiple" };
  352. if (types.Contains(type))
  353. {
  354. objective = true;
  355. }
  356. else {
  357. objective = false;
  358. }
  359. }
  360. if (_answerType!=null)
  361. {
  362. _answerType.GetValue<string>();
  363. //暂不处理,可能存在依然传文字的情况
  364. //不是文本作答的处理,题目不是客观题,答案不记录
  365. //if (!_answerType.Equals("text"))
  366. //{
  367. // objective=false;
  368. // answers=new List<string>();
  369. //}
  370. }
  371. if (scoreNode!=null)
  372. {
  373. double.TryParse(scoreNode.ToString(), out questionScore);
  374. }
  375. string interactType = string.Empty;
  376. if (irsDataPage.clientAnswers.IsNotEmpty())
  377. {
  378. //第一个list是几轮,一次作答,二次作答, 第二个list是学生的下标, 第三个list是 答案
  379. List<List<List<string>>> clientAnswers = new List<List<List<string>>>();
  380. foreach (var key in irsDataPage.clientAnswers.Keys)
  381. {
  382. clientAnswers.Add(irsDataPage.clientAnswers[key]);
  383. }
  384. // 获取第一个列表的长度作为比较基准
  385. int firstListLength = clientAnswers.First().Count;
  386. bool isSameLength = true;
  387. // 遍历剩余的列表并检查它们的长度是否与第一个列表相同
  388. foreach (var innerList in clientAnswers.Skip(1))
  389. {
  390. if (innerList.Count != firstListLength)
  391. {
  392. isSameLength = false;
  393. break;
  394. }
  395. }
  396. //并检查学生集合的长度是否与第一个列表相同
  397. if (!isSameLength && studentLessonDatas.Count()==firstListLength)
  398. {
  399. for (int index = 0; index< clientAnswers[0].Count; index++)
  400. {
  401. var student = studentLessonDatas[index];
  402. double studentScore = 0 ;
  403. if (examData!=null && examData.examClassResult.IsNotEmpty()) {
  404. var examResultIndex = examData.examClassResult.First().studentIds.IndexOf(student.id);
  405. var questionIndex = examData.paper.slides.Select(x => x.url).ToList().IndexOf($"{question_id}.json");
  406. if (examResultIndex>=0
  407. && examData.examClassResult.First().studentScores.Count>=(examResultIndex+1) //防止索引越界
  408. && examData.examClassResult.First().studentScores[examResultIndex].Count>=(questionIndex+1)) //防止索引越界
  409. {
  410. //获取index学生在questionIndex题的分数
  411. studentScore = examData.examClassResult.First().studentScores[examResultIndex][questionIndex];
  412. }
  413. }
  414. //index 代表学生下标
  415. List<ItemRecord> interactRecords = new List<ItemRecord>();
  416. if (clientAnswers.Count==1)
  417. {
  418. //即问即答
  419. interactType = "PopQuesLoad";
  420. var ans0 = clientAnswers[0][index];
  421. var IS0 = GetInteractResultHasAnswer(answers, ans0, objective,type,questionScore, studentScore);
  422. interactRecords.Add(new ItemRecord()
  423. {
  424. resultWeight = IS0.weight,
  425. resultType=IS0.reultType,
  426. itemType= interactType,
  427. criterion= questionScore,
  428. itemScore= IS0.interactScore
  429. });
  430. }
  431. if (clientAnswers.Count==2)
  432. {
  433. //二次作答
  434. interactType="ReAtmpAnsStrt";
  435. var ans1 = clientAnswers[1][index];
  436. var IS1 = GetInteractResultHasAnswer(answers, ans1, objective,type,questionScore,studentScore);
  437. interactRecords.Add(new ItemRecord()
  438. {
  439. resultWeight = IS1.weight,
  440. resultType=IS1.reultType,
  441. itemType= interactType,
  442. criterion= questionScore,
  443. itemScore= IS1.interactScore
  444. });
  445. }
  446. if (clientAnswers.Count>2)
  447. {
  448. //三次作答
  449. interactType="TeAtmpAnsStrt";
  450. var ans2 = clientAnswers[2][index];
  451. var IS2 = GetInteractResultHasAnswer(answers, ans2, objective, type, questionScore, studentScore);
  452. interactRecords.Add(new ItemRecord()
  453. {
  454. resultWeight = IS2.weight,
  455. resultType=IS2.reultType,
  456. itemType= interactType,
  457. criterion= questionScore,
  458. itemScore= IS2.interactScore
  459. });
  460. }
  461. if (studentLessonDatas[index].attend==1)
  462. {
  463. studentLessonDatas[index].interactRecord.interactRecords.AddRange(interactRecords);
  464. }
  465. }
  466. }
  467. }
  468. //是否抢权作答的模式
  469. if (irsDataPage.isBuzz)
  470. {
  471. interactType = "BuzrAns";
  472. //处理参与抢权的
  473. Dictionary<string, ItemRecord> buzzParticipants = new Dictionary<string, ItemRecord>();
  474. foreach (var buzzParticipant in irsDataPage.buzzParticipants)
  475. {
  476. var studentData = studentLessonDatas.Find(x => x.seatID!.Equals(buzzParticipant));
  477. if (studentData != null)
  478. {
  479. buzzParticipants[buzzParticipant]=new ItemRecord() { resultWeight = InteractWeight.T1, itemType= interactType };
  480. }
  481. }
  482. //处理抢权成功的
  483. foreach (var buzzClient in irsDataPage.buzzClients)
  484. {
  485. buzzParticipants[buzzClient]=new ItemRecord() { resultWeight = InteractWeight.TT, itemType= interactType };
  486. }
  487. foreach (var studentLessonData in studentLessonDatas)
  488. {
  489. if (buzzParticipants.ContainsKey(studentLessonData.seatID!))
  490. {
  491. //处理已经有抢权结果的数据
  492. studentLessonData.attend=1;
  493. studentLessonData.interactRecord.interactRecords.Add(buzzParticipants[studentLessonData.seatID!]);
  494. }
  495. else
  496. {
  497. if (studentLessonData.attend==1) {
  498. //处理未参与抢权的
  499. studentLessonData.interactRecord.interactRecords.Add(new ItemRecord() { resultWeight = InteractWeight.T0, itemType = interactType });
  500. }
  501. }
  502. }
  503. }
  504. }
  505. return studentLessonDatas;
  506. }
  507. private static (double weight,string reultType,double interactScore) GetInteractResultHasAnswer(List<string>? answers, List<string> ans0 , bool objective,string type, double questionScore, double studentScore)
  508. {
  509. //List<string> ans0 = new List<string>();
  510. //ans?.ForEach(x => {
  511. // if (!string.IsNullOrWhiteSpace(x))
  512. // {
  513. // ans0.Add(x);
  514. // }
  515. // else { ans.Add("");}
  516. //});
  517. double weight = InteractWeight.T0;
  518. string reultType = InteractReultType.T0;
  519. double interactScore = 0;
  520. if (answers.IsNotEmpty())
  521. {
  522. if (ans0.IsNotEmpty())
  523. {
  524. if (objective) //客观题
  525. {
  526. //标准答案等于作答的结果
  527. if (answers!.Count == ans0.Count)
  528. {
  529. if (answers.All(item => ans0.Contains(item)))
  530. {
  531. //完全正确
  532. weight= InteractWeight.TT;
  533. reultType= InteractReultType.TT;
  534. interactScore= studentScore==0 ? questionScore : studentScore;
  535. }
  536. else
  537. {
  538. //作答错误
  539. weight= InteractWeight.T1;
  540. reultType = InteractReultType.T1;
  541. interactScore= studentScore;
  542. }
  543. }
  544. //标准答案比作答的结果多
  545. else if (answers!.Count > ans0.Count)
  546. {
  547. if (ans0.All(item => answers.Contains(item)))
  548. {
  549. //部分正确
  550. weight= InteractWeight.TP;
  551. reultType = InteractReultType.TP;
  552. // 2 * 0.3 * 10= 6
  553. interactScore= studentScore==0 ? 1/(InteractWeight.TT-InteractWeight.T1) * (InteractWeight.TP-InteractWeight.T1) * questionScore : studentScore;
  554. }
  555. else
  556. {
  557. //作答错误
  558. weight= InteractWeight.T1;
  559. reultType = InteractReultType.T1;
  560. interactScore= studentScore;
  561. }
  562. }
  563. //标准答案比作答结果少
  564. else
  565. {
  566. //作答错误
  567. weight= InteractWeight.T1;
  568. reultType = InteractReultType.T1;
  569. interactScore= studentScore;
  570. }
  571. }
  572. else
  573. {
  574. //填空题
  575. if ("complete".Equals(type) && answers!.Count==ans0.Count)
  576. {
  577. bool hasT = false;
  578. bool hasF = false;
  579. for (int i = 0; i < answers!.Count; i++)
  580. {
  581. if (answers[i].Equals(ans0[i]))
  582. {
  583. hasT=true;
  584. }
  585. else {
  586. hasF=true;
  587. }
  588. }
  589. if (hasT && !hasF)
  590. {
  591. //完全正确
  592. weight= InteractWeight.TT;
  593. reultType = InteractReultType.TT;
  594. interactScore= studentScore==0 ? questionScore : studentScore;
  595. }
  596. else if (hasT && hasF)
  597. {
  598. //部分正确
  599. weight= InteractWeight.TP;
  600. reultType = InteractReultType.TP;
  601. // 2 * 0.3 * 10= 6
  602. interactScore= studentScore==0 ? 1/(InteractWeight.TT-InteractWeight.T1) * (InteractWeight.TP-InteractWeight.T1) * questionScore : studentScore;
  603. }
  604. else if (!hasT && hasF)
  605. {
  606. //没有正确的,但有错误的,代表参与了
  607. weight= InteractWeight.T1;
  608. reultType = InteractReultType.T1;
  609. interactScore= studentScore;
  610. }
  611. else if (!hasT && !hasF)
  612. {
  613. //没有正确的,也没有错误的,代表没有作答
  614. weight= InteractWeight.T0;
  615. reultType = InteractReultType.T0;
  616. interactScore= studentScore;
  617. }
  618. }
  619. else
  620. {
  621. //主观题,完全匹配的
  622. if (answers!.All(item => ans0.Contains(item)))
  623. {
  624. //完全正确
  625. weight= InteractWeight.TT;
  626. reultType = InteractReultType.TT;
  627. interactScore= studentScore==0 ? questionScore : studentScore;
  628. }
  629. else
  630. { // 使用LINQ查询来判断是否有匹配的答案
  631. bool hasMatchingAnswer = answers!.Intersect(ans0).Any();
  632. if (hasMatchingAnswer)
  633. {
  634. //主观题回答正确即为完全正确
  635. weight= InteractWeight.TT;
  636. reultType = InteractReultType.TT;
  637. interactScore= studentScore==0 ? questionScore : studentScore;
  638. }
  639. else
  640. {
  641. //优先根据得分与标准分的占比算出得分率,如果没有得分率,如果是直接从互动,不知道是评测的 需要先去评测找作答得分。,则采用Levenshtein距离来评估两个字符串的相似度
  642. //没有匹配上答案,则采用Levenshtein距离来评估两个字符串的相似度
  643. if (questionScore>0)
  644. {
  645. if (studentScore>0)
  646. {
  647. weight = studentScore * 1.0 / questionScore* (InteractWeight.TT-InteractWeight.T1);
  648. if (weight==InteractWeight.T1)
  649. {
  650. reultType = InteractReultType.T1;
  651. interactScore=studentScore;
  652. }
  653. else if (weight>InteractWeight.TT)
  654. {
  655. reultType = InteractReultType.TT;
  656. interactScore=studentScore==0? questionScore:studentScore;
  657. }
  658. else
  659. {
  660. reultType = InteractReultType.TP;
  661. // 2 * 0.3 * 10= 6
  662. interactScore= studentScore==0 ? 1/(InteractWeight.TT-InteractWeight.T1) * (InteractWeight.TP-InteractWeight.T1) * questionScore : studentScore;
  663. }
  664. }
  665. else
  666. {
  667. weight=InteractWeight.T1+(CalculateSimilarity(answers![0], ans0[0]) *(InteractWeight.TT-InteractWeight.T1));
  668. if (weight==InteractWeight.T1)
  669. {
  670. reultType = InteractReultType.T1;
  671. interactScore=studentScore;
  672. }
  673. else if (weight>InteractWeight.TT)
  674. {
  675. reultType = InteractReultType.TT;
  676. interactScore=studentScore==0? questionScore:studentScore;
  677. }
  678. else
  679. {
  680. reultType = InteractReultType.TP;
  681. // 2 * 0.3 * 10= 6
  682. interactScore= studentScore==0 ? 1/(InteractWeight.TT-InteractWeight.T1) * (InteractWeight.TP-InteractWeight.T1) * questionScore : studentScore;
  683. }
  684. }
  685. }
  686. else {
  687. weight=InteractWeight.T1+(CalculateSimilarity(answers![0], ans0[0]) *(InteractWeight.TT-InteractWeight.T1));
  688. if (weight==InteractWeight.T1)
  689. {
  690. reultType = InteractReultType.T1;
  691. interactScore=studentScore;
  692. }
  693. else if (weight>InteractWeight.TT)
  694. {
  695. reultType = InteractReultType.TT;
  696. interactScore=studentScore==0? questionScore:studentScore;
  697. }
  698. else {
  699. reultType = InteractReultType.TP;
  700. // 2 * 0.3 * 10= 6
  701. interactScore= studentScore==0 ? 1/(InteractWeight.TT-InteractWeight.T1) * (InteractWeight.TP-InteractWeight.T1) * questionScore : studentScore;
  702. }
  703. }
  704. }
  705. }
  706. }
  707. }
  708. }
  709. else
  710. {
  711. //没有作答
  712. weight= InteractWeight.T0;
  713. reultType = InteractReultType.T0;
  714. interactScore=studentScore;
  715. }
  716. }
  717. else
  718. {
  719. //没有标准答案的情况
  720. if (ans0.IsNotEmpty())
  721. {
  722. bool hasAns = false;
  723. ans0.ForEach(x => {
  724. if (!string.IsNullOrWhiteSpace(x)) {
  725. hasAns = true;
  726. }
  727. });
  728. if (hasAns)
  729. {
  730. //作答了
  731. weight= InteractWeight.T1;
  732. reultType = InteractReultType.T1;
  733. interactScore=studentScore;
  734. }
  735. else {
  736. //没有作答
  737. weight= InteractWeight.T0;
  738. reultType = InteractReultType.T0;
  739. interactScore=studentScore;
  740. }
  741. }
  742. else
  743. {
  744. //没有作答
  745. weight= InteractWeight.T0;
  746. reultType = InteractReultType.T0;
  747. interactScore=studentScore;
  748. }
  749. //如果教师手动给了分或AI评分
  750. if (questionScore>0 && studentScore>0)
  751. {
  752. weight = studentScore * 1.0 / questionScore* (InteractWeight.TT-InteractWeight.T1);
  753. if (weight==InteractWeight.T1)
  754. {
  755. reultType = InteractReultType.T1;
  756. interactScore=studentScore;
  757. }
  758. else if (weight>InteractWeight.TT)
  759. {
  760. reultType = InteractReultType.TT;
  761. interactScore=studentScore==0 ? questionScore : studentScore;
  762. }
  763. else
  764. {
  765. reultType = InteractReultType.TP;
  766. // 2 * 0.3 * 10= 6
  767. interactScore= studentScore==0 ? 1/(InteractWeight.TT-InteractWeight.T1) * (InteractWeight.TP-InteractWeight.T1) * questionScore : studentScore;
  768. }
  769. }
  770. }
  771. return (weight,reultType,interactScore);
  772. }
  773. #region C# 代码 如何判断两句话是否一个意思,非机器学习的算法。使用Levenshtein距离来评估两个字符串的相似度,但是不能判断它们是否表达了同一个意思,后续借助AI实现
  774. public static double CalculateSimilarity(string s1, string s2)
  775. {
  776. int n = s1.Length;
  777. int m = s2.Length;
  778. int[,] d = new int[n + 1, m + 1];
  779. for (int i = 0; i <= n; i++)
  780. {
  781. d[i, 0] = i;
  782. }
  783. for (int j = 0; j <= m; j++)
  784. {
  785. d[0, j] = j;
  786. }
  787. for (int i = 1; i <= n; i++)
  788. {
  789. for (int j = 1; j <= m; j++)
  790. {
  791. int cost = (s1[i - 1] == s2[j - 1]) ? 0 : 1;
  792. d[i, j] = Math.Min(Math.Min(d[i - 1, j] + 1, d[i, j - 1] + 1), d[i - 1, j - 1] + cost);
  793. }
  794. }
  795. return (1.0 - ((double)d[n, m] / Math.Max(s1.Length, s2.Length))) ;
  796. }
  797. #endregion
  798. /// <summary>
  799. /// 获取课中评测数据
  800. /// </summary>
  801. /// <param name="lessonRecord"></param>
  802. /// <param name="lessonBase"></param>
  803. /// <param name="timeLineData"></param>
  804. /// <param name="coworkDatas"></param>
  805. /// <param name="studentLessonDatas"></param>
  806. /// <returns></returns>
  807. private List<StudentLessonData> GetExamData(LessonRecord lessonRecord, LessonBase lessonBase, TimeLineData timeLineData, List<ExamData> examDatas, List<StudentLessonData> studentLessonDatas)
  808. {
  809. foreach (var examData in examDatas)
  810. {
  811. //直接取第一个元素的试卷,因为在HiTeach中,只会是一个试卷(一个科目),一个班参与。
  812. var allocation= examData?.exam?.papers?.FirstOrDefault()?.point?.Sum();
  813. var answersStd = examData?.exam?.papers?.FirstOrDefault()?.answers;
  814. List<List<string>> answers= new List<List<string>>();
  815. if (answersStd!=null)
  816. {
  817. answersStd.ForEach(x => //去除[""]此种类型的标准答案,转为[]
  818. {
  819. List<string> ans = new List<string>();
  820. if (x.Count!=0)
  821. {
  822. if (x.Count==1)
  823. {
  824. if (string.IsNullOrWhiteSpace(x[0]))
  825. {
  826. answers.Add(ans);
  827. }
  828. else
  829. {
  830. answers.Add(x);
  831. }
  832. }
  833. else
  834. {
  835. answers.Add(x);
  836. }
  837. }
  838. else {
  839. answers.Add(ans);
  840. }
  841. });
  842. }
  843. examData?.examClassResult?.ForEach(item =>{
  844. //学生下标
  845. int index = 0;
  846. if (item.studentAnswersArray.Count()>0
  847. && item.studentAnswersArray.Count() == item.studentIds.Count() //学生作答数量和学生id数量一致
  848. && item.studentScores.Count()==item.studentIds.Count()) //学生分数和学生id数量一致
  849. {
  850. item.studentAnswersArray.ForEach(stu => {
  851. var student = studentLessonDatas.Find(x => x.id!.Equals(item.studentIds[index]));
  852. if (student!=null && student.attend==1)
  853. {
  854. //是否要判断主观题或者客观题, 多套试卷,有主观题的
  855. //,如果没获得结果,
  856. //主观题有回答的:608942756458532864\Clients\18782481024\Ans\27-4341670635487887360-examExchangeAnswerlist
  857. //27 从1开始的学生序号-4341670635487887360评测编号,内容qNo 是从1开始的题号。
  858. if (stu.IsNotEmpty() && answers.Count()==stu.Count && examData.exam.papers[0].type.Count()==answers.Count )
  859. {
  860. StudentExamRecord studentExam = new StudentExamRecord();
  861. var studentScore = item.studentScores[index];
  862. List<ItemRecord> answerRecords = new List<ItemRecord>();
  863. //题目下标
  864. int itemIndex = 0;
  865. stu.ForEach(ans =>
  866. {
  867. bool objective = objectiveTypes.Contains(examData.exam.papers[0].type[itemIndex]);
  868. var questionScore = examData.exam.papers[0].point[itemIndex];
  869. string type = examData.exam.papers[0].type[itemIndex];
  870. var res= GetInteractResultHasAnswer(answers[itemIndex], ans, objective, type, questionScore, studentScore[itemIndex]);
  871. ItemRecord interactRecord = new ItemRecord()
  872. {
  873. itemType="SPQStrt",//类型
  874. resultType=res.reultType,//作答结果类型
  875. resultWeight=res.weight,//得分权重
  876. criterion= questionScore,//标准分
  877. itemScore= studentScore[itemIndex]//得分
  878. };
  879. answerRecords.Add(interactRecord);
  880. });
  881. studentExam.score= answerRecords.Where(x => x.itemScore>=0).Select(x => x.itemScore).Sum();//得分
  882. studentExam.scoreRate= allocation.HasValue && allocation.Value>0 ? studentExam.score * 1.0/allocation.Value : 0;//得分率
  883. studentExam.answerRate= answerRecords.Where(x => x.resultWeight>0).Count()*1.0/studentScore.Count();//作答率
  884. studentExam.examId=examData.exam.id;
  885. studentExam.itemRecords=answerRecords;
  886. student.examRecords.Add(studentExam);
  887. }
  888. }
  889. });
  890. }
  891. });
  892. }
  893. return studentLessonDatas;
  894. }
  895. /// <summary>
  896. /// 协作参与率 态度计算
  897. /// </summary>
  898. /// <param name="lessonRecord"></param>
  899. /// <param name="lessonBase"></param>
  900. /// <param name="timeLineData"></param>
  901. /// <param name="coworkDatas"></param>
  902. /// <param name="studentLessonDatas"></param>
  903. /// <returns></returns>
  904. private List<StudentLessonData> GetCoworkData(LessonRecord lessonRecord, LessonBase lessonBase, TimeLineData timeLineData, List<CoworkData> coworkDatas, List<StudentLessonData> studentLessonDatas)
  905. {
  906. foreach (var coworkData in coworkDatas)
  907. {
  908. var keys = coworkData.participateLevelList.Keys;
  909. foreach (var key in keys)
  910. {
  911. var student = studentLessonDatas.Find(x => x.seatID!.Equals(key));
  912. if (student!=null && student.attend==1)
  913. {
  914. var score = coworkData.participateLevelList[key];//协作得分
  915. var itemRecord = new ItemRecord { criterion=-1, itemType= coworkData.coworkType,itemScore=score };
  916. if (score>0)
  917. {
  918. itemRecord.resultWeight = InteractWeight.T1;
  919. itemRecord.resultType = InteractReultType.T1;
  920. }
  921. else {
  922. itemRecord.resultWeight = InteractWeight.T0;
  923. itemRecord.resultType = InteractReultType.T0;
  924. }
  925. student.coworkRecord.itemRecords.Add(itemRecord);
  926. }
  927. }
  928. }
  929. return studentLessonDatas;
  930. }
  931. /// <summary>
  932. /// 处理学生回推数据,并将回推纳入学习态度计算。
  933. /// </summary>
  934. /// <param name="lessonRecord"></param>
  935. /// <param name="lessonBase"></param>
  936. /// <param name="timeLineData"></param>
  937. /// <param name="taskDatas"></param>
  938. /// <param name="studentLessonDatas"></param>
  939. /// <returns></returns>
  940. private List<StudentLessonData> GetTaskData(LessonRecord lessonRecord, LessonBase lessonBase, TimeLineData timeLineData, List<TaskData> taskDatas, List<StudentLessonData> studentLessonDatas)
  941. {
  942. //协作也算任务的一种,'WrkSpaceLoad' 作品收集, "isGroupItem": false,
  943. int indexTask = 0;
  944. foreach (var taskData in taskDatas)
  945. {
  946. //作品收集是全部人员都要参加
  947. foreach (var student in studentLessonDatas)
  948. {
  949. if (student.attend==1)
  950. {
  951. var work = taskData.clientWorks.Find(x =>$"{x.seatID}".Equals(student.seatID));
  952. if (work!= null)
  953. {
  954. student.taskRecord.itemRecords.Add(new ItemRecord { itemType="WrkSpaceLoad", itemScore=10, resultWeight=InteractWeight.T1, resultType=InteractReultType.T1, isGroup= work.isGroupItem });
  955. }
  956. else
  957. {
  958. student.taskRecord.itemRecords.Add(new ItemRecord { itemType="WrkSpaceLoad", itemScore=0, resultWeight=InteractWeight.T0, resultType=InteractReultType.T0, isGroup= false });
  959. }
  960. }
  961. }
  962. ////////
  963. ///需要处理小组的情况,当前人员没有提交作品,但是有可能是小组其他人员提交了,需要判断一下。
  964. ///
  965. var groupIds = studentLessonDatas.FindAll(x => x.attend==1 && x.taskRecord.itemRecords[indexTask].isGroup==true).GroupBy(x=>x.groupId).Select(x=>x.Key);
  966. foreach (var groupId in groupIds)
  967. {
  968. var groupStudents= studentLessonDatas.FindAll(x => x.attend==1 && !string.IsNullOrWhiteSpace(x.groupId) && x.groupId.Equals(groupId));
  969. foreach (var student in groupStudents)
  970. {
  971. student.taskRecord.itemRecords[indexTask].isGroup=true;
  972. }
  973. }
  974. taskData.clientWorks.Find(x => x.seatID==0 && x.isGroupItem);
  975. indexTask++;
  976. }
  977. return studentLessonDatas;
  978. }
  979. /// <summary>
  980. /// 评分参与率 态度计算
  981. /// //读取互评信息
  982. /// /// 评分相关 在SmartRating.json 处理 'SmartRating' 评分模式,分 投票Voting 和 GrandRating 星光大评分(All每人多件评分,Two随机分配互评, Self自评)
  983. //Event 过滤类型 'RatingStart'
  984. //smartRateSummary.mutualSummary.mutualType 互评【All(每人多件评分) Two(随机分配互评) Self(自评)】 smartRateSummary.meteor_VoteSummary 投票
  985. //读取SmartRating.json
  986. /// </summary>
  987. /// <param name="lessonRecord"></param>
  988. /// <param name="lessonBase"></param>
  989. /// <param name="timeLineData"></param>
  990. /// <param name="smartRatingDatas"></param>
  991. /// <param name="studentLessonDatas"></param>
  992. /// <returns></returns>
  993. private async Task<dynamic> GetSmartRatingData(LessonRecord lessonRecord, LessonBase lessonBase, TimeLineData timeLineData, List<SmartRatingData> smartRatingDatas, List<StudentLessonData> studentLessonDatas)
  994. {
  995. return Ok(lessonRecord);
  996. }
  997. }
  998. /// 互动参与指数(按倍数的权重设计)
  999. /// 无二次作答的互动,且未设置正确答案:1.未作答0
  1000. /// 2.已作答1
  1001. ///
  1002. /// 无二次作答的互动,且设置了正确答案:3.未作答0
  1003. /// 4.已作答1
  1004. /// 5.不完全正确1.3
  1005. /// 6.作答正确1.5
  1006. ///
  1007. ///
  1008. /// 有二次作答的互动,且未设置正确答案:7.第一次未作答0,第二次未作答0=》0
  1009. /// 8.第一次已作答1,第二次未作答0=》1
  1010. /// 9.第一次未作答0,第二次已作答1=》1
  1011. /// 10.第一次已作答1,第二次已作答1=》2
  1012. ///
  1013. /// 有二次作答的互动,且设置了正确答案:(16种可能)
  1014. /// 11.第一次未作答0,第二次未作答0=》0
  1015. /// 12.第一次已作答,不完全正确1.3,第二次未作答0=》1.3
  1016. /// 13.第一次已作答,作答正确1.5,第二次未作答0=》1.5
  1017. /// 14.第一次已作答,作答错误1,第二次未作答0=》1
  1018. /// 15.第一次未作答0,第二次已作答,不完全正确1.3=》1.3
  1019. /// 16.第一次未作答0,第二次已作答,作答正确1.5=》1.5
  1020. /// 17.第一次未作答0,第二次已作答,作答错误1=》1
  1021. /// 18.第一次已作答,作答错误1,第二次已作答,作答错误1=》2
  1022. /// 19.第一次已作答,不完全正确1.3,第二次已作答,作答错误1=》2.3
  1023. /// 20.第一次已作答,作答正确1.5,第二次已作答,作答错误1=》2.5
  1024. /// 21.第一次已作答,作答错误1,第二次已作答,不完全正确1.3=》2.3
  1025. /// 22.第一次已作答,作答错误1,第二次已作答,作答正确1.5=》2.5
  1026. /// 23.第一次已作答,不完全正确1.3,第二次已作答,不完全正确1.3=》2.6
  1027. /// 24.第一次已作答,不完全正确1.3,第二次已作答,作答正确1.5=》2.8
  1028. /// 25.第一次已作答,作答正确1.5,第二次已作答,不完全正确1.3=》2.8
  1029. /// 26.第一次已作答,作答正确1.5,第二次已作答,作答正确1.5=》3
  1030. ///
  1031. /// 抢权模式: 27.未参与抢权 0
  1032. /// 28.参与抢权 1
  1033. /// 29.抢权成功 1.5
  1034. /// 挑人时被挑到 30.被挑到 1.5
  1035. /// 有三次作答的互动,且设置了正确答案:(64种可能)
  1036. /*
  1037. 1 未作答0 未作答0 未作答0 0
  1038. 2 未作答0 未作答0 不完全正确1.3 1.3
  1039. 3 未作答0 未作答0 作答正确1.5 1.5
  1040. 4 未作答0 未作答0 作答错误1 1
  1041. 5 未作答0 不完全正确1.3 未作答0 1.3
  1042. 6 未作答0 不完全正确1.3 不完全正确1.3 2.6
  1043. 7 未作答0 不完全正确1.3 作答正确1.5 2.8
  1044. 8 未作答0 不完全正确1.3 作答错误1 2.3
  1045. 9 未作答0 作答正确1.5 未作答0 1.5
  1046. 10 未作答0 作答正确1.5 不完全正确1.3 2.8
  1047. 11 未作答0 作答正确1.5 作答正确1.5 3
  1048. 12 未作答0 作答正确1.5 作答错误1 2.5
  1049. 13 未作答0 作答错误1 未作答0 1
  1050. 14 未作答0 作答错误1 不完全正确1.3 2.3
  1051. 15 未作答0 作答错误1 作答正确1.5 2.5
  1052. 16 未作答0 作答错误1 作答错误1 2
  1053. 17 已作答错误1 未作答0 未作答0 1
  1054. 18 已作答错误1 未作答0 不完全正确1.3 2.3
  1055. 19 已作答错误1 未作答0 作答正确1.5 2.5
  1056. 20 已作答错误1 未作答0 作答错误1 2
  1057. 21 已作答错误1 不完全正确1.3 未作答0 2.3
  1058. 22 已作答错误1 不完全正确1.3 不完全正确1.3 3.6
  1059. 23 已作答错误1 不完全正确1.3 作答正确1.5 3.8
  1060. 24 已作答错误1 不完全正确1.3 作答错误1 3.3
  1061. 25 已作答错误1 作答正确1.5 未作答0 2.5
  1062. 26 已作答错误1 作答正确1.5 不完全正确1.3 3.8
  1063. 27 已作答错误1 作答正确1.5 作答正确1.5 4
  1064. 28 已作答错误1 作答正确1.5 作答错误1 3.5
  1065. 29 已作答错误1 作答错误1 未作答0 2
  1066. 30 已作答错误1 作答错误1 不完全正确1.3 3.3
  1067. 31 已作答错误1 作答错误1 作答正确1.5 3.5
  1068. 32 已作答错误1 作答错误1 作答错误1 3
  1069. 33 已作答不完全正确1.3 未作答0 未作答0 1.3
  1070. 34 已作答不完全正确1.3 未作答0 不完全正确1.3 2.6
  1071. 35 已作答不完全正确1.3 未作答0 作答正确1.5 2.8
  1072. 36 已作答不完全正确1.3 未作答0 作答错误1 2.3
  1073. 37 已作答不完全正确1.3 不完全正确1.3 未作答0 2.6
  1074. 38 已作答不完全正确1.3 不完全正确1.3 不完全正确1.3 3.9
  1075. 39 已作答不完全正确1.3 不完全正确1.3 作答正确1.5 4.1
  1076. 40 已作答不完全正确1.3 不完全正确1.3 作答错误1 3.6
  1077. 41 已作答不完全正确1.3 作答正确1.5 未作答0 2.8
  1078. 42 已作答不完全正确1.3 作答正确1.5 不完全正确1.3 4.1
  1079. 43 已作答不完全正确1.3 作答正确1.5 作答正确1.5 4.3
  1080. 44 已作答不完全正确1.3 作答正确1.5 作答错误1 3.8
  1081. 45 已作答不完全正确1.3 作答错误1 未作答0 2.3
  1082. 46 已作答不完全正确1.3 作答错误1 不完全正确1.3 3.6
  1083. 47 已作答不完全正确1.3 作答错误1 作答正确1.5 3.8
  1084. 48 已作答不完全正确1.3 作答错误1 作答错误1 3.3
  1085. 49 已作答正确1.5 未作答0 未作答0 1.5
  1086. 50 已作答正确1.5 未作答0 不完全正确1.3 2.8
  1087. 51 已作答正确1.5 未作答0 作答正确1.5 3
  1088. 52 已作答正确1.5 未作答0 作答错误1 2.5
  1089. 53 已作答正确1.5 不完全正确1.3 未作答0 2.8
  1090. 54 已作答正确1.5 不完全正确1.3 不完全正确1.3 4.1
  1091. 55 已作答正确1.5 不完全正确1.3 作答正确1.5 4.3
  1092. 56 已作答正确1.5 不完全正确1.3 作答错误1 3.8
  1093. 57 已作答正确1.5 作答正确1.5 未作答0 3
  1094. 58 已作答正确1.5 作答正确1.5 不完全正确1.3 4.3
  1095. 59 已作答正确1.5 作答正确1.5作答正确1.5 4.5
  1096. 60 已作答正确1.5 作答正确1.5作答错误1 4
  1097. 61 已作答正确1.5 作答错误1 未作答0 2.5
  1098. 62 已作答正确1.5 作答错误1 不完全正确1.3 3.8
  1099. 63 已作答正确1.5 作答错误1 作答正确1.54
  1100. 64 已作答正确1.5 作答错误1 作答错误1 3.5
  1101. */
  1102. /*
  1103. *
  1104. /// 事件
  1105. /// 推送相关 在Push.json处理 DifObjPush 推送给学生 差异化推送 "PushMemberId":[1,4,8,12,17,18,19,23,24,27,32,36] ,FastPgPush 同一推送
  1106. /// 互动相关 在IRS.json处理 'PopQuesLoad'互动问答 , 'ReAtmpAnsStrt' 二次作答 , 'BuzrAns' 抢权(新), 'BuzrLoad'抢权(旧), PickupResult 挑人算不算互动?? 读取PickupMemberId "[\r\n 35\r\n]"
  1107. /// 测验相关 在IRS.json处理 SPQStrt 测验模式
  1108. /// 任务相关 在Task.json处理 'WrkSpaceLoad' 作品收集, 'WrkCmp' 作品贴上 是什么操作
  1109. /// 评分相关 在SmartRating.json 处理 'SmartRating' 评分模式,分 投票Voting 和 GrandRating 星光大评分(All每人多件评分,Two随机分配互评, Self自评)
  1110. /// 协作相关 在Cowork.json 处理 CoworkLoad 协作类型 coworkType All: '全体协作', Group: '分组协作', 其他的为 : '差异化协作',
  1111. 问题汇总:
  1112. TimeLine.json
  1113. 挑人大类 Event= PickupResult 里面 分小类
  1114. PickupType=PickupRight , PickupOption , PickupNthGrp ,PickupEachGrp ,PickupDiff 五种类型分别是什么意思,是否还有其他类型的。
  1115. ,"PickupCount":1,"PickupOption":2 ,"PickupGroup":2 这三个字段是什么意思。
  1116. "PickupMemberId":"[\r\n 1\r\n]" 里面是学生的座号还是数组下标。
  1117. "Event":"PressGood","TargetClass":0,"MemberId":"[\r\n 1\r\n]","Count":1},
  1118. 是代表什么意思。 MemberId 是座号还说下标。
  1119. 8月27日 17:581. Task.json的 clientWorks.isGroupItem bool 类型 false代表什么意思 true代表什么意思
  1120. 2. Cowork.json 的 coworkType All: '全体协作', Group: '分组协作', : '差异化协作', 差异化协作的简码是什么?
  1121. 3. TimeLine.json 的 类型 PickupResult 挑人算不算互动?? 读取PickupMemberId "[\r\n 35\r\n]"
  1122. 4. 小组任务具体详细信息如何获取? 需要精确到 所有小组任务信息和 某一小组的参与情况 用于计算小组任务参与率
  1123. */
  1124. }