|
@@ -19,6 +19,7 @@ using TEAMModelOS.SDK.Models.Dtos;
|
|
|
using static TEAMModelOS.SDK.CoreAPIHttpService;
|
|
|
using Microsoft.Azure.Cosmos;
|
|
|
using System.Collections;
|
|
|
+using TEAMModelOS.SDK.Models.Cosmos.OpenEntity;
|
|
|
namespace TEAMModelOS.SDK.Models.Service
|
|
|
{
|
|
|
public static class SystemService
|
|
@@ -47,7 +48,26 @@ IES早间报告:{tmdname}您好,以下是您发布过的作业任务汇总
|
|
|
static string cn_examTitle = "评测任务提交详情:";
|
|
|
static string cn_lessonTitle = "课堂教学出席详情:";
|
|
|
static string cn_groupTitle = "个人课程名单变化详情:";
|
|
|
+
|
|
|
+ static string cn_lessonDetail = @"名称:{name},开课时间:{time},时长{duration}
|
|
|
+1.本节课名单{count}人,分成{groupCount}组,出席人数:{attendCount}人,缺席:{absentCount}人,出席率{attendRate}%<br>
|
|
|
+2.学习参与度指数平均:{engagementIndexAverge} <br>
|
|
|
+分组参与度:{grpEngagement}G1(94),G2(94),G3(94),G4(94) <br>
|
|
|
+参与较多者:{highRankEngagement}S5(94),S1(94),S6(94),S2(94),S15(94)<br>
|
|
|
+3.记分:总记分:{totalPoint}分 <br>
|
|
|
+个人记分较多者:{highRankPerPoint}S1(1),S2(1),S3(1),S4(1),S5(1) <br>
|
|
|
+小组记分较多的:{highRankGrpPoint}G1(0),G2(0),G3(0),G4(0)<br>
|
|
|
+4.互动:{interactionCount}题,总互动分:{totalInteractPoint}分<br>
|
|
|
+5.任务:{pushCount}次,作品总数:{collateTaskCount}件<br>
|
|
|
+6.测验:{examCount}次,题数:{examQuizCount}题,平均得分率:{examPointRate}% <br>
|
|
|
+表现较好者:{highRankExam}S12(100),S17(100),S9(100),S11(100),S7(100) <br>
|
|
|
+表现较弱者:{lowRankExam}S21(34),S20(34)<br>
|
|
|
+7.互评:{smartRatingCount}次,合计参与:{clientSmartRatingCount}次,平均:1次/人<br>
|
|
|
+8.协作:{coworkTaskCount}次,作品总数:{coworkGroupCount}件,总操作量:{coworkGroupCount},平均操作量:0.0/人<br>";
|
|
|
+
|
|
|
#endregion
|
|
|
+
|
|
|
+
|
|
|
#region
|
|
|
static string tw_wb = @"
|
|
|
IES晚間報告:{tmdname}您好,以下是您的今日個人IES教學總結報告,截至{sendTime},您已發布{examCount}次測驗任務,{homeworkCount}次作業任務,並使用HiTeach上傳了{lessonCount}節課堂教學活動。
|
|
@@ -71,6 +91,21 @@ IES晨間報告:{tmdname}您好,以下是您曾經發佈過的作業任務
|
|
|
static string tw_examTitle = "測驗任務完成詳情:";
|
|
|
static string tw_lessonTitle = "課堂教學出席詳情:";
|
|
|
static string tw_groupTitle = "個人課程名單變動詳情:";
|
|
|
+ static string tw_lessonDetail = @"名称:{name},開課時間:{time},時長{duration}
|
|
|
+1.本節課名單{count}人,分成{groupCount}組,出席人数:{attendCount}人,缺席:{absentCount}人,出席率{attendRate}%<br>
|
|
|
+2.學習参與度指數平均:{engagementIndexAverge}<br>
|
|
|
+分組参舆度:{grpEngagement}G1(94),G2(94),G3(94),G4(94)<br>
|
|
|
+参與较多者:{highRankEngagement}S5(94),S1(94),S6(94),S2(94),S15(94)<br>
|
|
|
+3.記分:總記分:{totalPoint}分<br>
|
|
|
+個人記分较多者:{highRankPerPoint}S1(1),S2(1),S3(1),S4(1),S5(1)<br>
|
|
|
+小組記分较多的:{highRankGrpPoint}G1(0),G2(0),G3(0),G4(0)<br>
|
|
|
+4.互動:{interactionCount}题,總互動分:{totalInteractPoint}分<br>
|
|
|
+5.任務:{pushCount}次,作品總数:{collateTaskCount}件<br>
|
|
|
+6.測驗:{examCount}次,题數:{examQuizCount}题,平均得分率:{examPointRate}%<br>
|
|
|
+表現较好者:{highRankExam}S12(100),S17(100),S9(100),S11(100),S7(100)<br>
|
|
|
+表現较弱者:{lowRankExam}S21(34),S20(34)<br>
|
|
|
+7.互评:{smartRatingCount}次,合計参與:{clientSmartRatingCount}次,平均:1次/人<br>
|
|
|
+8.協作:{coworkTaskCount}次,作品總數:{coworkGroupCount}件,總操作量:{coworkGroupCount},平均操作量:0.0/人<br>";
|
|
|
#endregion
|
|
|
#region
|
|
|
static string en_wb = @"
|
|
@@ -95,6 +130,21 @@ Hello {tmdname}, here is the summary report of the homework tasks you have poste
|
|
|
static string en_examTitle = "Test task submission details:";
|
|
|
static string en_lessonTitle = "Lesson attendance details:";
|
|
|
static string en_groupTitle = "Personal course list change details:";
|
|
|
+ static string en_lessonDetail = @"name:{name},start time:{time},duration{duration}
|
|
|
+1.This class has a roster of {count} people, divided into {groupCount} groups, with {attendCount} attendees, {absentCount} absences, and an attendance rate of {attendRate}%.<br>
|
|
|
+2.The average learning engagement index is {engagementIndexAverge}. <br>
|
|
|
+Group engagement: {grpEngagement}G1(94), G2(94), G3(94), G4(94). <br>
|
|
|
+Most engaged participants: {highRankEngagement}S5(94), S1(94), S6(94), S2(94), S15(94).<br>
|
|
|
+3.Scoring: Total points scored: {totalPoint}. <br>
|
|
|
+Top individual scorers: {highRankPerPoint}S1(1), S2(1), S3(1), S4(1), S5(1). <br>
|
|
|
+Top group scorers: {highRankGrpPoint}G1(0), G2(0), G3(0), G4(0).<br>
|
|
|
+4.Interaction: {interactionCount} questions, Total interaction points: {totalInteractPoint}.<br>
|
|
|
+5.Tasks: {pushCount} times, Total number of works: {collateTaskCount}.<br>
|
|
|
+6.Tests: {examCount} times, Number of questions: {examQuizCount}, Average score rate: {examPointRate}%. <br>
|
|
|
+Top performers: {highRankExam}S12(100), S17(100), S9(100), S11(100), S7(100). <br>
|
|
|
+Lower performers: {lowRankExam}S21(34), S20(34).<br>
|
|
|
+7.Peer reviews: {smartRatingCount} times, Total participation: {clientSmartRatingCount} times, Average: 1 time per person.<br>
|
|
|
+8.Collaboration: {coworkTaskCount} times, Total number of works: {coworkGroupCount}, Total operation count: {coworkGroupCount}, Average operation count per person: 0.0.<br>";
|
|
|
#endregion
|
|
|
|
|
|
|
|
@@ -186,7 +236,7 @@ Hello {tmdname}, here is the summary report of the homework tasks you have poste
|
|
|
/// <param name="am"></param>
|
|
|
/// <param name="pm"></param>
|
|
|
/// <returns></returns>
|
|
|
- public static async Task<List<CodeValue> > AccumulateDaily(IConfiguration _configuration,AzureRedisFactory _azureRedis,AzureCosmosFactory _azureCosmos,
|
|
|
+ public static async Task<List<CodeValue> > AccumulateDaily(IConfiguration _configuration,AzureRedisFactory _azureRedis,AzureCosmosFactory _azureCosmos,AzureStorageFactory _azureStorage,
|
|
|
CoreAPIHttpService coreAPIHttpService, DingDing dingDing,HttpClient _httpClient, SnowflakeId _snowflakeId,string notifyUrl, int am=0 ,int pm=0)
|
|
|
{
|
|
|
DateTimeOffset now = DateTimeOffset.Now;
|
|
@@ -452,6 +502,7 @@ Hello {tmdname}, here is the summary report of the homework tasks you have poste
|
|
|
}
|
|
|
}
|
|
|
StringBuilder lessonSB = new StringBuilder();
|
|
|
+ StringBuilder lessonDetailSB = new StringBuilder();
|
|
|
foreach (var lesson in lessoncreate)
|
|
|
{
|
|
|
string[] ks = lesson.Key.Split("::");
|
|
@@ -467,12 +518,27 @@ Hello {tmdname}, here is the summary report of the homework tasks you have poste
|
|
|
var teahcerResult = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher).GetList<LessonRecord>(sql, "LessonRecord");
|
|
|
lessons.AddRange(schoolResult.list);
|
|
|
lessons.AddRange(teahcerResult.list);
|
|
|
- foreach(var lessonRecord in lessons)
|
|
|
+ foreach (var lessonRecord in lessons)
|
|
|
{
|
|
|
+ LessonBase lessonBase = null;
|
|
|
+ try
|
|
|
+ {
|
|
|
+ string owner = lessonRecord.scope.Equals("school") ? lessonRecord.school : lessonRecord.tmdid;
|
|
|
+ BlobDownloadResult baseblobDownload = await _azureStorage.GetBlobContainerClient(owner).GetBlobClient($"/records/{lessonRecord.id}/IES/base.json").DownloadContentAsync();
|
|
|
+ string basejson = baseblobDownload.Content.ToString().Replace("\"Uncall\"", "0").Replace("Uncall", "0");
|
|
|
+ lessonBase = basejson.ToObject<LessonBase>();
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ }
|
|
|
lessonCount++;
|
|
|
switch (lang)
|
|
|
{
|
|
|
case "zh-cn":
|
|
|
+ if (lessonBase!=null)
|
|
|
+ {
|
|
|
+ //cn_lessonDetail.Replace("{name}", lessonRecord)
|
|
|
+ }
|
|
|
lessonSB.Append(cn_lessonList.Replace("{lessonName}", lessonRecord.name).Replace("{memberCount}", $"{lessonRecord.clientCount}").Replace("{attendCount}", $"{lessonRecord.attendCount}")).Replace("{attendRate}", $"{lessonRecord.attendRate}");
|
|
|
break;
|
|
|
case "zh-tw":
|