|
@@ -113,6 +113,7 @@ namespace HTEX.Test.Controllers
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
//读取互评信息
|
|
|
//Event 过滤类型 'RatingStart'
|
|
|
//smartRateSummary.mutualSummary.mutualType 互评【All(每人多件评分) Two(随机分配互评) Self(自评)】 smartRateSummary.meteor_VoteSummary 投票
|
|
@@ -150,7 +151,7 @@ namespace HTEX.Test.Controllers
|
|
|
}
|
|
|
}
|
|
|
//读取协作信息
|
|
|
- ///Event 过滤类型 'CoworkLoad'
|
|
|
+ ///Event 过滤类型 'CoworkLoad', "CoworkType":"CoworkGroup",类型
|
|
|
//Cowork.json 中找到对应类型,根据Pgid 去 Cowork.json 中找到对应数据
|
|
|
List<CoworkData> coworkDatas = new List<CoworkData>();
|
|
|
try
|
|
@@ -166,6 +167,43 @@ namespace HTEX.Test.Controllers
|
|
|
_logger.LogError(ex, $"文件不存在:/records/{item.id}/IES/Cowork.json");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //读取ExamData
|
|
|
+ List<ExamData> examDatas = new List<ExamData>();
|
|
|
+
|
|
|
+ try {
|
|
|
+
|
|
|
+ var examPages = timeLineData?.events.Where(x => string.IsNullOrWhiteSpace(x.ExamId));
|
|
|
+ if (examDatas!=null && examDatas.Count>0)
|
|
|
+ {
|
|
|
+ var examsFiles = await _azureStorage.GetBlobContainerClient(item.school).List($"/records/{item.id}/Exam/");
|
|
|
+ var paperFiles = await _azureStorage.GetBlobContainerClient(item.school).List($"/records/{item.id}/ExamPaper/");
|
|
|
+ foreach (var examsFile in examsFiles)
|
|
|
+ {
|
|
|
+ if (examsFile.EndsWith("Exam.json"))
|
|
|
+ {
|
|
|
+ BlobDownloadResult examDataDownload = await _azureStorage.GetBlobContainerClient(item.school).GetBlobClient(examsFile).DownloadContentAsync();
|
|
|
+ ExamData examData = examDataDownload.Content.ToObjectFromJson<ExamData>();
|
|
|
+ if (examData.exam.papers.IsNotEmpty())
|
|
|
+ {
|
|
|
+ string paperId= examData.exam.papers.First().id;
|
|
|
+
|
|
|
+ if (_azureStorage.GetBlobContainerClient(item.school).GetBlobClient($"/records/{item.id}/ExamPaper/{paperId}/index.json").Exists())
|
|
|
+ {
|
|
|
+ BlobDownloadResult paperblobDownload = await _azureStorage.GetBlobContainerClient(item.school).GetBlobClient($"/records/{item.id}/ExamPaper/{paperId}/index.json").DownloadContentAsync();
|
|
|
+ LessonPaper paperIndex = paperblobDownload.Content.ToObjectFromJson<LessonPaper>();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ examDatas.Add(examData);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return Ok("Lesson records");
|
|
@@ -561,6 +599,36 @@ namespace HTEX.Test.Controllers
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //
|
|
|
+ //优先根据得分与标准分的占比算出得分率,如果没有得分率,如果是直接从互动,不知道是评测的 需要先去评测找作答得分。,则采用Levenshtein距离来评估两个字符串的相似度
|
|
|
//没有匹配上答案,则采用Levenshtein距离来评估两个字符串的相似度
|
|
|
var sc = CalculateSimilarity(answers![0], ans0[0]) * 1.0/100 *(InteractWeight.TT-InteractWeight.T1);
|
|
|
weight = sc;
|
|
@@ -715,12 +783,12 @@ namespace HTEX.Test.Controllers
|
|
|
bool objective = objectiveTypes.Contains(examData.exam.papers[0].type[itemIndex]);
|
|
|
var score = 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);
|
|
|
ItemRecord interactRecord = new ItemRecord()
|
|
|
{
|
|
|
interactType="SPQStrt",//类型
|
|
|
- // resultType=res.reultType,//作答结果类型
|
|
|
- //resultWeight=res.weight,//得分权重
|
|
|
+ resultType=res.reultType,//作答结果类型
|
|
|
+ resultWeight=res.weight,//得分权重
|
|
|
criterion= score,//标准分
|
|
|
interactScore= studentScore[itemIndex]//得分
|
|
|
};
|
|
@@ -753,7 +821,26 @@ namespace HTEX.Test.Controllers
|
|
|
{
|
|
|
foreach (var coworkData in coworkDatas)
|
|
|
{
|
|
|
-
|
|
|
+ var keys = coworkData.participateLevelList.Keys;
|
|
|
+ foreach (var key in keys)
|
|
|
+ {
|
|
|
+ var student = studentLessonDatas.Find(x => x.seatID!.Equals(key));
|
|
|
+ if (student!=null)
|
|
|
+ {
|
|
|
+ var score = coworkData.participateLevelList[key];
|
|
|
+ var itemRecord = new ItemRecord { criterion=-1, interactType= coworkData.coworkType,interactScore=score };
|
|
|
+ if (score>0)
|
|
|
+ {
|
|
|
+ itemRecord.resultWeight = InteractWeight.T1;
|
|
|
+ itemRecord.resultType = InteractReultType.T1;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ itemRecord.resultWeight = InteractWeight.T0;
|
|
|
+ itemRecord.resultType = InteractReultType.T0;
|
|
|
+ }
|
|
|
+ student.coworkRecord.itemRecords.Add(itemRecord);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
return studentLessonDatas;
|
|
|
}
|
|
@@ -769,6 +856,7 @@ namespace HTEX.Test.Controllers
|
|
|
/// <returns></returns>
|
|
|
private async Task<dynamic> GetTaskData(LessonRecord lessonRecord, LessonBase lessonBase, TimeLineData timeLineData, List<TaskData> taskDatas, List<StudentLessonData> studentLessonDatas)
|
|
|
{
|
|
|
+ //协作也算任务的一种,'WrkSpaceLoad' 作品收集, "isGroupItem": false,
|
|
|
return Ok(lessonRecord);
|
|
|
}
|
|
|
|
|
@@ -787,9 +875,38 @@ namespace HTEX.Test.Controllers
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+ public class LessonPaper
|
|
|
+ {
|
|
|
+
|
|
|
+ public List<LessonPaperSlide> slides { get; set; }= new List<LessonPaperSlide>();
|
|
|
+ }
|
|
|
+ public class LessonPaperSlide
|
|
|
+ {
|
|
|
+ /// <summary>
|
|
|
+ /// blob 路徑
|
|
|
+ /// </summary>
|
|
|
+ public string? url { get; set; }
|
|
|
+ /// <summary>
|
|
|
+ /// 題型
|
|
|
+ /// </summary>
|
|
|
+ public string? type { get; set; }
|
|
|
+ /// <summary>
|
|
|
+ /// scoring
|
|
|
+ /// </summary>
|
|
|
+ public LessonPaperSlideScoring? scoring { get; set; }
|
|
|
+ }
|
|
|
+ public class LessonPaperSlideScoring
|
|
|
+ {
|
|
|
+ /// <summary>
|
|
|
+ /// knowledge
|
|
|
+ /// </summary>
|
|
|
+ public List<string> knowledge { get; set; } = new List<string>();
|
|
|
+ /// <summary>
|
|
|
+ /// 答案
|
|
|
+ /// </summary>
|
|
|
+ public List<string> ans { get; set; } = new List<string>();
|
|
|
|
|
|
+ }
|
|
|
/// <summary>
|
|
|
/// 学生课中数据
|
|
|
/// </summary>
|
|
@@ -876,7 +993,7 @@ namespace HTEX.Test.Controllers
|
|
|
/// <summary>
|
|
|
/// 协作参与记录
|
|
|
/// </summary>
|
|
|
- public List<ItemRecord> itemRecords /*{ get; set; }*/ = new List<ItemRecord>();
|
|
|
+ public List<ItemRecord> itemRecords { get; set; } = new List<ItemRecord>();
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 学生课中评测记录
|