CrazyIter_Bin 7 hónapja
szülő
commit
14181e9472

+ 19 - 1
HTEX.DataETL/Controllers/LessonRecordController.cs

@@ -3,6 +3,7 @@ using HTEX.Lib.ETL.Lesson;
 using MathNet.Numerics.Distributions;
 using Microsoft.AspNetCore.Mvc;
 using Microsoft.Azure.Cosmos;
+using StackExchange.Redis;
 using System.Text.Json;
 using System.Xml;
 using TEAMModelOS.SDK;
@@ -40,6 +41,23 @@ namespace HTEX.DataETL.Controllers
             _azureRedis = azureRedis;
 
         }
+        [HttpPost("redis-key")]
+        public async Task<IActionResult> RedisKey(JsonElement json) 
+        {
+            //List<string > keys= new List<string>();
+            var  server=  _azureRedis.GetRedisClient(8);
+
+            // 使用Keys方法获取所有匹配前缀的key
+            var pattern = "LessonWeek*";
+            // 获取所有匹配的keys
+            List<string> keys = server.ScriptEvaluate("return redis.call('keys', ARGV[1])", keys: new RedisKey[] { pattern })
+                .ToString()
+                .Split(',') // 注意:这种方式在生产环境中可能存在问题,如果key数量过多,可能导致返回不完整
+                .ToList();
+
+            return Ok(keys);
+        }
+
         [HttpPost("process-local")]
         public async Task<IActionResult> ProcessLocal(JsonElement json)
         {
@@ -209,7 +227,7 @@ namespace HTEX.DataETL.Controllers
             }
             long stime = 1690819200000;//2023-08-01 00:00:00
             var resultSchool = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School)
-                 .GetList<LessonRecord>($"SELECT value c FROM   c  where c.startTime>{stime} and   c.expire<=0  and c.status<>404  and c.duration>300 and c.pk='LessonRecord' ", $"LessonRecord-hbcn");
+                 .GetList<LessonRecord>($"SELECT value c FROM   c  where c.startTime>{stime} and   c.expire<=0  and c.status<>404  and c.duration>300 and c.pk='LessonRecord' ", $"LessonRecord-ydzt");
             List<string> ignore = new List<string>() { "PgJump", "PgRcv", "PgAdd" };
             int index = 0;
             if (resultSchool.list.IsNotEmpty())

+ 53 - 14
TEAMModelOS.Extension/HTEX.Lib/ETL/Lesson/LessonETLService.cs

@@ -606,10 +606,7 @@ namespace HTEX.Lib.ETL.Lesson
             {
                 string scope = lessonRecord.scope;
                 string owner = lessonRecord.scope.Equals("school") ? lessonRecord.school : lessonRecord.tmdid;
-                if (localIds.Contains(lessonRecord.id))
-                {
-                    continue;
-                }
+             
                 string yearMonthPath = DateTimeOffset.FromUnixTimeMilliseconds(lessonRecord.startTime).ToString("yyyyMM");
                 LessonLocal lessonLocal = new LessonLocal { lessonRecord=lessonRecord };
                 if (System.IO.File.Exists($"{pathLessons}\\MM{yearMonthPath}\\{lessonRecord.id}-local.json"))
@@ -1595,9 +1592,21 @@ namespace HTEX.Lib.ETL.Lesson
                 }
                 var order = studentLessonDatas.Where(x => x.attend==1).OrderByDescending(x => x.coworkRecord.itemRecords[p].itemScore);
                 var maxItems = studentLessonDatas.FindAll(x => x.attend==1&& x.coworkRecord.itemRecords[p].itemScore==order.First().coworkRecord.itemRecords[p].itemScore);
-                var max = studentLessonDatas.FindAll(x => x.attend==1&& x.coworkRecord.itemRecords[p].itemScore==order.First().coworkRecord.itemRecords[p].itemScore).First().coworkRecord.itemRecords[p].itemScore;
-                var min = studentLessonDatas.FindAll(x => x.attend==1&& x.coworkRecord.itemRecords[p].itemScore==order.Last().coworkRecord.itemRecords[p].itemScore).First().coworkRecord.itemRecords[p].itemScore;
-                var sum = studentLessonDatas.Where(x => x.attend==1).Sum(x => x.coworkRecord.itemRecords[p].itemScore);
+                double max = 0;
+                if (studentLessonDatas.FindAll(x => x.attend==1&& x.coworkRecord.itemRecords[p].itemScore==order.First().coworkRecord.itemRecords[p].itemScore).IsNotEmpty()) 
+                {
+                    max=studentLessonDatas.FindAll(x => x.attend==1&& x.coworkRecord.itemRecords[p].itemScore==order.First().coworkRecord.itemRecords[p].itemScore).First().coworkRecord.itemRecords[p].itemScore;
+                }
+                double min = 0;
+                if (studentLessonDatas.FindAll(x => x.attend==1&& x.coworkRecord.itemRecords[p].itemScore==order.Last().coworkRecord.itemRecords[p].itemScore).IsNotEmpty()) 
+                {
+                    min=   studentLessonDatas.FindAll(x => x.attend==1&& x.coworkRecord.itemRecords[p].itemScore==order.Last().coworkRecord.itemRecords[p].itemScore).First().coworkRecord.itemRecords[p].itemScore;
+                }
+                double sum = 0;
+                if (studentLessonDatas.FindAll(x => x.attend==1).IsNotEmpty())
+                {
+                  sum=   studentLessonDatas.FindAll(x => x.attend==1).Sum(x => x.coworkRecord.itemRecords[p].itemScore);
+                }
                 foreach (var student in studentLessonDatas)
                 {
                     if (student.attend==1  && student.coworkRecord.itemRecords.Count>=p+1 &&  student.coworkRecord.itemRecords[p].itemScore>0)
@@ -1763,9 +1772,22 @@ namespace HTEX.Lib.ETL.Lesson
                         var meteor_VoteSummary = smartRatingData.smartRateSummary!.meteor_VoteSummary[key];
                         var order = meteor_VoteSummary.OrderByDescending(x => x.result);
                         var maxItems = meteor_VoteSummary.FindAll(x => x.result==order.First().result);
-                        var max = meteor_VoteSummary.FindAll(x => x.result==order.First().result).First().result;
-                        var min = meteor_VoteSummary.FindAll(x => x.result==order.Last().result).First().result;
-                        var sum = meteor_VoteSummary.Sum(x => x.result);
+                        double max = 0;
+                        if (maxItems.IsNotEmpty())
+                        {
+                              max = meteor_VoteSummary.FindAll(x => x.result==order.First().result).First().result;
+                        }
+                        double min = 0;
+                        if (meteor_VoteSummary.FindAll(x => x.result==order.Last().result).IsNotEmpty()) 
+                        {
+                              min = meteor_VoteSummary.FindAll(x => x.result==order.Last().result).First().result;
+                        }
+                        double sum = 0;
+                        if (meteor_VoteSummary.IsNotEmpty())
+                        {
+                            sum = meteor_VoteSummary.Sum(x => x.result);
+                        }
+                        
                         //排名指数计算=( 当前值分数- 298) / (9992 - 298) * (99 - 60) + 60
                         //将每个人的积分转化为60-100
                         //排名 = (积分 - 最低积分) / (最高积分 - 最低积分) * (最大排名 - 最小排名) + 最小排名
@@ -1837,8 +1859,17 @@ namespace HTEX.Lib.ETL.Lesson
                     if (order.Count()>0)
                     {
                         var maxItems = smartRatingData.smartRateSummary.meteor_ScoreSummary.FindAll(x => x.result==order.First().result);
-                        var max = smartRatingData.smartRateSummary.meteor_ScoreSummary.FindAll(x => x.result==order.First().result).First().result;
-                        var min = smartRatingData.smartRateSummary.meteor_ScoreSummary.FindAll(x => x.result==order.Last().result).First().result;
+                        double max = 0;
+                        if (maxItems.IsNotEmpty())
+                        {
+                            max = smartRatingData.smartRateSummary.meteor_ScoreSummary.FindAll(x => x.result==order.First().result).First().result;
+                        }
+                        double min = 0;
+                        if (smartRatingData.smartRateSummary.meteor_ScoreSummary.FindAll(x => x.result==order.Last().result).IsNotEmpty())
+                        {
+                            min = smartRatingData.smartRateSummary.meteor_ScoreSummary.FindAll(x => x.result==order.Last().result).First().result;
+                        }
+                         
                         var sum = smartRatingData.smartRateSummary.meteor_ScoreSummary.Sum(x => x.result);
 
                         foreach (var meteor_ScoreSummary in smartRatingData.smartRateSummary.meteor_ScoreSummary)
@@ -1907,8 +1938,16 @@ namespace HTEX.Lib.ETL.Lesson
                     }
                     var order = smartRatingData.smartRateSummary.mutualSummary.mutualResults.Where(x => x.result>0).OrderByDescending(x => x.result);
                     var maxItems = smartRatingData.smartRateSummary.mutualSummary.mutualResults.FindAll(x => x.result==order.First().result);
-                    var max = smartRatingData.smartRateSummary.mutualSummary.mutualResults.FindAll(x => x.result==order.First().result).First().result;
-                    var min = smartRatingData.smartRateSummary.mutualSummary.mutualResults.FindAll(x => x.result==order.Last().result).First().result;
+                    double max =  0; 
+                    if (maxItems.IsNotEmpty()) 
+                    {
+                          max = smartRatingData.smartRateSummary.mutualSummary.mutualResults.FindAll(x => x.result==order.First().result).First().result;
+                    }
+                    double min = 0;
+                    if (smartRatingData.smartRateSummary.mutualSummary.mutualResults.FindAll(x => x.result==order.Last().result).IsNotEmpty())
+                    {                    
+                          min = smartRatingData.smartRateSummary.mutualSummary.mutualResults.FindAll(x => x.result==order.Last().result).First().result;
+                    }
                     var sum = smartRatingData.smartRateSummary.mutualSummary.mutualResults.Sum(x => x.result);
                     foreach (var mutualResult in smartRatingData.smartRateSummary.mutualSummary.mutualResults)
                     {

+ 14 - 1
TEAMModelOS.Function/IESTimerTrigger.cs

@@ -7,6 +7,8 @@ using TEAMModelOS.SDK.DI;
 using TEAMModelOS.SDK;
 using TEAMModelOS.SDK.Extension;
 using TEAMModelOS.SDK.Models.Service.BI;
+using System.Globalization;
+using TEAMModelOS.SDK.Models;
 
 namespace TEAMModelOS.Function
 {
@@ -42,8 +44,19 @@ namespace TEAMModelOS.Function
             _configuration= configuration;
         }
 
+        //0 0 20 * * 0
+        [Function("WeeklyReport")]
+        public async Task WeeklyReport([TimerTrigger("0 0 20 * * 0")] TimerInfo myTimer) 
+        {
+            // 使用当前文化设置的日历
+            CultureInfo cultureInfo = CultureInfo.CurrentCulture;
+            Calendar calendar = cultureInfo.Calendar;
+            //表示如果一年的第一个星期至少有4天在同一年,则该星期被视为第一周,DayOfWeek.Monday和DayOfWeek.Sunday分别表示一周的第一天是星期一或星期日。
 
-
+            var week = calendar.GetWeekOfYear(DateTime.Now, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);
+            string key = $"LessonWeek:school::{DateTime.Now.Year}-{week}";
+            _azureRedis.GetRedisClient(8).HashScanAsync("LessonWeek:school:*");
+        }
         /// <summary>
         /// //0 1 * * * * 一天中每小时的第 1 分钟
         ///0 */10 * * * *  每五分钟一次

+ 14 - 0
TEAMModelOS.SDK/DI/AzureRedis/AzureRedisFactory.cs

@@ -30,6 +30,20 @@ namespace TEAMModelOS.SDK.DI
             _logger = logger;
         }
 
+        public IServer GetGetServer(int dbnum = -1, string name = "Default")
+        {
+            try
+            {
+                var cm = ConnectionMultiplexers.GetOrAdd(name, x => ConnectionMultiplexer.Connect(_optionsMonitor.Get(name).RedisConnectionString));
+               return cm.GetServer(cm.GetEndPoints()[0]);
+            }
+            catch (OptionsValidationException e)
+            {
+                _logger?.LogWarning(e, e.Message);
+                return null;
+            }
+        }
+
         public IDatabase GetRedisClient( int dbnum = -1,string name = "Default")
         {           
             try

+ 149 - 147
TEAMModelOS.SDK/Models/Service/SystemService.cs

@@ -49,21 +49,21 @@ IES早间报告:{tmdname}您好,以下是您发布过的作业任务汇总
         static string cn_lessonTitle = "课堂教学出席详情:";
         static string cn_groupTitle = "个人课程名单变化详情:";
 
-        static string cn_lessonDetail = @"</br>课例名称:{name},开课时间:{time},时长:{duration}
-1.本节课名单{count}人,分成{groupCount}组,出席人数:{attendCount}人,缺席:{absentCount}人,出席率{attendRate}%<br>
-2.学习参与度指数平均:{engagementIndexAverge} <br>
-    分组参与度:{grpEngagement}<br>
-    参与较多者:{highRankEngagement}<br>
-3.记分:总记分:{totalPoint}分 <br>
-    个人记分较多者:{highRankPerPoint}<br>
-    小组记分较多的:{highRankGrpPoint}<br>
-4.互动:{interactionCount}题,总互动分:{totalInteractPoint}分<br>
-5.任务:{pushCount}次,作品总数:{collateTaskCount}件<br>
-6.测验:{examCount}次,题数:{examQuizCount}题,平均得分率:{examPointRate}% <br>
-    表现较好者:{highRankExam}<br>
-    表现较弱者:{lowRankExam}<br>
-7.互评:{smartRatingCount}次,合计参与:{clientSmartRatingCount}次<br>
-8.协作:{coworkTaskCount}次,作品总数:{coworkGroupCount}件,总操作量:{coworkGroupCount}<br>";
+        static string cn_lessonDetail = @"</br>课例名称:{name},开课时间:{time},时长:{duration}分钟</br>
+1.本节课名单{count}人,分成{groupCount}组,出席人数:{attendCount}人,缺席:{absentCount}人,出席率{attendRate}%</br>
+2.学习参与度指数平均:{engagementIndexAverge} </br>
+    分组参与度:{grpEngagement}</br>
+    参与较多者:{highRankEngagement}</br>
+3.记分:总记分:{totalPoint}分 </br>
+    个人记分较多者:{highRankPerPoint}</br>
+    小组记分较多的:{highRankGrpPoint}</br>
+4.互动:{interactionCount}题,总互动分:{totalInteractPoint}分</br>
+5.任务:{pushCount}次,作品总数:{collateTaskCount}件</br>
+6.测验:{examCount}次,题数:{examQuizCount}题,平均得分率:{examPointRate}% </br>
+    表现较好者:{highRankExam}</br>
+    表现较弱者:{lowRankExam}</br>
+7.互评:{smartRatingCount}次,合计参与:{clientSmartRatingCount}次</br>
+8.协作:{coworkTaskCount}次,作品总数:{coworkGroupCount}件,总操作量:{coworkGroupCount}</br>";
 
         #endregion
 
@@ -91,21 +91,21 @@ IES晨間報告:{tmdname}您好,以下是您曾經發佈過的作業任務
         static string tw_examTitle = "測驗任務完成詳情:";
         static string tw_lessonTitle = "課堂教學出席詳情:";
         static string tw_groupTitle = "個人課程名單變動詳情:";
-        static string tw_lessonDetail = @"</br>课例名称:{name},開課時間:{time},時長:{duration}<br>
-1.本節課名單{count}人,分成{groupCount}組,出席人数:{attendCount}人,缺席:{absentCount}人,出席率{attendRate}%<br>
-2.學習参與度指數平均:{engagementIndexAverge}<br>
-    分組参舆度:{grpEngagement}<br>
-    参與较多者:{highRankEngagement}<br>
-3.記分:總記分:{totalPoint}分<br>
-    個人記分较多者:{highRankPerPoint}<br>
-    小組記分较多的:{highRankGrpPoint}<br>
-4.互動:{interactionCount}题,總互動分:{totalInteractPoint}分<br>
-5.任務:{pushCount}次,作品總数:{collateTaskCount}件<br>
-6.測驗:{examCount}次,题數:{examQuizCount}题,平均得分率:{examPointRate}%<br>
-    表現较好者:{highRankExam}<br>
-    表現较弱者:{lowRankExam}<br>
-7.互评:{smartRatingCount}次,合計参與:{clientSmartRatingCount}次<br>
-8.協作:{coworkTaskCount}次,作品總數:{coworkGroupCount}件,總操作量:{coworkGroupCount}<br>";
+        static string tw_lessonDetail = @"</br>课例名称:{name},開課時間:{time},時長:{duration}分鐘</br>
+1.本節課名單{count}人,分成{groupCount}組,出席人数:{attendCount}人,缺席:{absentCount}人,出席率{attendRate}%</br>
+2.學習参與度指數平均:{engagementIndexAverge}</br>
+    分組参舆度:{grpEngagement}</br>
+    参與较多者:{highRankEngagement}</br>
+3.記分:總記分:{totalPoint}分</br>
+    個人記分较多者:{highRankPerPoint}</br>
+    小組記分较多的:{highRankGrpPoint}</br>
+4.互動:{interactionCount}题,總互動分:{totalInteractPoint}分</br>
+5.任務:{pushCount}次,作品總数:{collateTaskCount}件</br>
+6.測驗:{examCount}次,题數:{examQuizCount}题,平均得分率:{examPointRate}%</br>
+    表現较好者:{highRankExam}</br>
+    表現较弱者:{lowRankExam}</br>
+7.互评:{smartRatingCount}次,合計参與:{clientSmartRatingCount}次</br>
+8.協作:{coworkTaskCount}次,作品總數:{coworkGroupCount}件,總操作量:{coworkGroupCount}</br>";
         #endregion
         #region
         static string en_wb = @"
@@ -130,44 +130,44 @@ 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 = @"</br>Lesson Name: {name}, Start time: {time}, Duration: {duration}<br>
-1. There are  {count} people in this course, divided into {groupCount} groups, attendance:  {attendCount} people, absences: 0 people, attendance rate {attendRate}%<br>
-2. Learning Engagement : {engagementIndexAverge}<br>
-	Engagement per group: {grpEngagement}<br>
-	More engaged students: {highRankEngagement}<br>
-3. Total Points: {totalPoint} points<br>
-	Persons with more points: {highRankPerPoint}<br>
-	Groups with more points: {highRankGrpPoint}<br>
-4. IRS Interaction: {interactionCount} questions, total IRS interaction score: {totalInteractPoint} points<br>
-5. Tasks: {pushCount} times, total number of collected works: {collateTaskCount} <br>
-6. Test/Exam: {examCount} times, number of questions: {examQuizCount} questions, average scoring rate:  {examPointRate}%<br>
-	Better performers: {highRankExam}<br>
-	Weaker performers: {lowRankExam}<br>
-7. Smart Rating: {smartRatingCount} times, total participation: {clientSmartRatingCount}  times<br>
-8. Collaboration: {coworkTaskCount} times, total number of works: {coworkGroupCount}, total operation: {coworkGroupCount}<br>";
+        static string en_lessonDetail = @"</br>Lesson Name: {name}, Start time: {time}, Duration: {duration} Minutes</br>
+1. There are  {count} people in this course, divided into {groupCount} groups, attendance:  {attendCount} people, absences: 0 people, attendance rate {attendRate}%</br>
+2. Learning Engagement : {engagementIndexAverge}</br>
+	Engagement per group: {grpEngagement}</br>
+	More engaged students: {highRankEngagement}</br>
+3. Total Points: {totalPoint} points</br>
+	Persons with more points: {highRankPerPoint}</br>
+	Groups with more points: {highRankGrpPoint}</br>
+4. IRS Interaction: {interactionCount} questions, total IRS interaction score: {totalInteractPoint} points</br>
+5. Tasks: {pushCount} times, total number of collected works: {collateTaskCount} </br>
+6. Test/Exam: {examCount} times, number of questions: {examQuizCount} questions, average scoring rate:  {examPointRate}%</br>
+	Better performers: {highRankExam}</br>
+	Weaker performers: {lowRankExam}</br>
+7. Smart Rating: {smartRatingCount} times, total participation: {clientSmartRatingCount}  times</br>
+8. Collaboration: {coworkTaskCount} times, total number of works: {coworkGroupCount}, total operation: {coworkGroupCount}</br>";
         #endregion
 
 
         //        #region
         //        static string cn_wb = @"
-        //IES晚间报告:<br>{tmdname}您好,以下是您的今日个人IES教学汇总报告,截至{sendTime}时,您已发布{examCount}次评测任务,{homeworkCount}次作业任务,并使用HiTeach教师端开设了{lessonCount}节课堂教学活动。
-        //<br>&nbsp;&nbsp;&nbsp;以下是报告的具体详细信息。
-        //<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{cn_examTitle}<br>{cn_examList}
-        //<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{cn_lessonTitle}<br>{cn_lessonList}
-        //<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{cn_groupTitle}<br>{cn_groupList}
-        //<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如有布置作业任务,将于次日8点通过早报方式发送。
+        //IES晚间报告:</br>{tmdname}您好,以下是您的今日个人IES教学汇总报告,截至{sendTime}时,您已发布{examCount}次评测任务,{homeworkCount}次作业任务,并使用HiTeach教师端开设了{lessonCount}节课堂教学活动。
+        //</br>&nbsp;&nbsp;&nbsp;以下是报告的具体详细信息。
+        //</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{cn_examTitle}</br>{cn_examList}
+        //</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{cn_lessonTitle}</br>{cn_lessonList}
+        //</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{cn_groupTitle}</br>{cn_groupList}
+        //</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如有布置作业任务,将于次日8点通过早报方式发送。
         //";
-        //        static string cn_examList = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;【{examName}】已经有{submitCount}位学生提交,仍有{unsubmitCount}位学生未提交。<br>";
-        //        static string cn_lessonList = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;【{lessonName}】课例应出席人数{memberCount},实际出席人数{attendCount},出席率{attendRate}%。<br>";
-        //        static string cn_groupListJoin = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;【{grouplistName}】已有总人数{memberCount}位,有{joinCount}位加入。<br>";
-        //        static string cn_groupListLeave = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;【{grouplistName}】已有总人数{memberCount}位,有{joinCount}位离开。<br>";
+        //        static string cn_examList = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;【{examName}】已经有{submitCount}位学生提交,仍有{unsubmitCount}位学生未提交。</br>";
+        //        static string cn_lessonList = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;【{lessonName}】课例应出席人数{memberCount},实际出席人数{attendCount},出席率{attendRate}%。</br>";
+        //        static string cn_groupListJoin = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;【{grouplistName}】已有总人数{memberCount}位,有{joinCount}位加入。</br>";
+        //        static string cn_groupListLeave = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;【{grouplistName}】已有总人数{memberCount}位,有{joinCount}位离开。</br>";
 
         //        static string cn_zb = @"
-        //IES早间报告:<br>{tmdname}您好,以下是您发布过的作业任务汇总报告。
-        //<br>&nbsp;&nbsp;&nbsp;以下是报告的具体详细信息。
-        //<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{cn_homeworkTitle}<br>{cn_homeworkList}
+        //IES早间报告:</br>{tmdname}您好,以下是您发布过的作业任务汇总报告。
+        //</br>&nbsp;&nbsp;&nbsp;以下是报告的具体详细信息。
+        //</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{cn_homeworkTitle}</br>{cn_homeworkList}
         //";
-        //        static string cn_homeworkList = "【{homeworkName}】已经有{submitCount}位学生提交,仍有{unsubmitCount}位学生未提交。<br>";
+        //        static string cn_homeworkList = "【{homeworkName}】已经有{submitCount}位学生提交,仍有{unsubmitCount}位学生未提交。</br>";
         //        static string cn_homeworkTitle = "作业任务提交详情:";
         //        static string cn_examTitle = "评测任务提交详情:";
         //        static string cn_lessonTitle = "课堂教学出席详情:";
@@ -175,23 +175,23 @@ Hello {tmdname}, here is the summary report of the homework tasks you have poste
         //        #endregion
         //        #region
         //        static string tw_wb = @"
-        //IES晚間報告:<br>{tmdname}您好,以下是您的今日個人IES教學總結報告,截至{sendTime},您已發布{examCount}次測驗任務,{homeworkCount}次作業任務,並使用HiTeach上傳了{lessonCount}節課堂教學活動。
-        //<br>&nbsp;&nbsp;&nbsp;以下是詳細資訊。
-        //<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{tw_examTitle}<br>{tw_examList}
-        //<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{tw_lessonTitle}<br>{tw_lessonList}
-        //<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{tw_groupTitle}<br>{tw_groupList}
-        //<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如有佈署作業任務,將於隔天早上8點透過晨間報告方式發送。
+        //IES晚間報告:</br>{tmdname}您好,以下是您的今日個人IES教學總結報告,截至{sendTime},您已發布{examCount}次測驗任務,{homeworkCount}次作業任務,並使用HiTeach上傳了{lessonCount}節課堂教學活動。
+        //</br>&nbsp;&nbsp;&nbsp;以下是詳細資訊。
+        //</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{tw_examTitle}</br>{tw_examList}
+        //</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{tw_lessonTitle}</br>{tw_lessonList}
+        //</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{tw_groupTitle}</br>{tw_groupList}
+        //</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如有佈署作業任務,將於隔天早上8點透過晨間報告方式發送。
         //";
-        //        static string tw_examList = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;【{examName}】已經有{submitCount}位學生繳交,仍有{unsubmitCount}位學生未繳交。<br>";
-        //        static string tw_lessonList = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;【{lessonName}】課堂應出席人數{memberCount},實際出席人數{attendCount},出席率{attendRate}%。<br>";
-        //        static string tw_groupListJoin = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;【{grouplistName}】已有總人數{memberCount}位,有{joinCount}位加入。<br>";
-        //        static string tw_groupListLeave = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;【{grouplistName}】已有總人數{memberCount}位,有{joinCount}位離開。<br>";
+        //        static string tw_examList = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;【{examName}】已經有{submitCount}位學生繳交,仍有{unsubmitCount}位學生未繳交。</br>";
+        //        static string tw_lessonList = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;【{lessonName}】課堂應出席人數{memberCount},實際出席人數{attendCount},出席率{attendRate}%。</br>";
+        //        static string tw_groupListJoin = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;【{grouplistName}】已有總人數{memberCount}位,有{joinCount}位加入。</br>";
+        //        static string tw_groupListLeave = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;【{grouplistName}】已有總人數{memberCount}位,有{joinCount}位離開。</br>";
         //        static string tw_zb = @"
-        //IES晨間報告:<br>{tmdname}您好,以下是您曾經發佈過的作業任務總結報告。
-        //<br>&nbsp;&nbsp;&nbsp;以下是具體詳細資訊。
-        //<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{tw_homeworkTitle}<br>{tw_homeworkList}
+        //IES晨間報告:</br>{tmdname}您好,以下是您曾經發佈過的作業任務總結報告。
+        //</br>&nbsp;&nbsp;&nbsp;以下是具體詳細資訊。
+        //</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{tw_homeworkTitle}</br>{tw_homeworkList}
         //";
-        //        static string tw_homeworkList = "【{homeworkName}】已經有{submitCount}位學生繳交,仍有{unsubmitCount}位學生未繳交。<br>";
+        //        static string tw_homeworkList = "【{homeworkName}】已經有{submitCount}位學生繳交,仍有{unsubmitCount}位學生未繳交。</br>";
         //        static string tw_homeworkTitle = "作業任務繳交詳情:";
         //        static string tw_examTitle = "測驗任務完成詳情:";
         //        static string tw_lessonTitle = "課堂教學出席詳情:";
@@ -199,23 +199,23 @@ Hello {tmdname}, here is the summary report of the homework tasks you have poste
         //        #endregion
         //        #region
         //        static string en_wb = @"
-        //IES Evening Report:<br>Hello {tmdname}, here is your personal IES teaching summary report for today. As of {sendTime}, you have published {examCount} test tasks, {homeworkCount} homework tasks, and uploaded {lessonCount} HiTeach lesson activity records.
-        //<br>&nbsp;&nbsp;&nbsp;The following are the specific details.
-        //<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{en_examTitle}<br>{en_examList}
-        //<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{en_lessonTitle}<br>{en_lessonList}
-        //<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{en_groupTitle}<br>{en_groupList}
-        //<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If there are homework tasks assigned, they will be sent through the morning report at 8 am the next day.
+        //IES Evening Report:</br>Hello {tmdname}, here is your personal IES teaching summary report for today. As of {sendTime}, you have published {examCount} test tasks, {homeworkCount} homework tasks, and uploaded {lessonCount} HiTeach lesson activity records.
+        //</br>&nbsp;&nbsp;&nbsp;The following are the specific details.
+        //</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{en_examTitle}</br>{en_examList}
+        //</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{en_lessonTitle}</br>{en_lessonList}
+        //</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{en_groupTitle}</br>{en_groupList}
+        //</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If there are homework tasks assigned, they will be sent through the morning report at 8 am the next day.
         //";
-        //        static string en_examList = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ {examName} ] has {submitCount} students submitted, and there are still {unsubmitCount} students who have not submitted.<br>";
-        //        static string en_lessonList = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ {lessonName} ] lesson should have {memberCount} attendees, actual attendees {attendCount}, attendance rate {attendRate}%.<br>";
-        //        static string en_groupListJoin = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ {grouplistName} ] has a total of {memberCount}, {joinCount} joined.<br>";
-        //        static string en_groupListLeave = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ {grouplistName} ] has a total of {memberCount}, {joinCount} left.<br>";
+        //        static string en_examList = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ {examName} ] has {submitCount} students submitted, and there are still {unsubmitCount} students who have not submitted.</br>";
+        //        static string en_lessonList = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ {lessonName} ] lesson should have {memberCount} attendees, actual attendees {attendCount}, attendance rate {attendRate}%.</br>";
+        //        static string en_groupListJoin = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ {grouplistName} ] has a total of {memberCount}, {joinCount} joined.</br>";
+        //        static string en_groupListLeave = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ {grouplistName} ] has a total of {memberCount}, {joinCount} left.</br>";
         //        static string en_zb = @"
         //IES Morning Report:
-        //<br>&nbsp;&nbsp;&nbsp;Hello {tmdname}, here is the summary report of the homework tasks you have posted.
-        //<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{en_homeworkTitle}<br>{en_homeworkList}
+        //</br>&nbsp;&nbsp;&nbsp;Hello {tmdname}, here is the summary report of the homework tasks you have posted.
+        //</br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{en_homeworkTitle}</br>{en_homeworkList}
         //";
-        //        static string en_homeworkList = "[ {homeworkName} ] has {submitCount} students submitted, and there are still {unsubmitCount} students who have not submitted.<br>";
+        //        static string en_homeworkList = "[ {homeworkName} ] has {submitCount} students submitted, and there are still {unsubmitCount} students who have not submitted.</br>";
         //        static string en_homeworkTitle = "Homework Submission Details:";
         //        static string en_examTitle = "Test task submission details:";
         //        static string en_lessonTitle = "Lesson attendance details:";
@@ -527,71 +527,73 @@ Hello {tmdname}, here is the summary report of the homework tasks you have poste
                                     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>();
+                                    lessonCount++;
+                                    var grpEngagement = string.Join(",", lessonBase.summary?.grpEngagement.Select((x, index) => $"G{index+1}({x})"));
+                                    var highRankEngagement = string.Join(",", lessonBase.summary?.highRankEngagement?.Select((x, index) => $"S{index+1}({x})"));
+
+                                    var highRankPerPoint = string.Join(",", lessonBase.summary?.highRankPerPoint?.Select((x, index) => $"S{index+1}({x})"));
+                                    var highRankGrpPoint = string.Join(",", lessonBase.summary?.highRankGrpPoint?.Select((x, index) => $"S{index+1}({x})"));
+                                    var highRankExam = string.Join(",", lessonBase.summary?.highRankExam?.Select((x, index) => $"S{index+1}({x})"));
+                                    var lowRankExam = string.Join(",", lessonBase.summary?.lowRankExam?.Select((x, index) => $"S{index+1}({x})"));
+                                    switch (lang)
+                                    {
+                                        case "zh-cn":
+                                            if (lessonBase!=null)
+                                            {
+
+                                                lessonDetailSB.Append(cn_lessonDetail.Replace("{name}", lessonRecord.name).Replace("{groupCount}",$"{lessonBase.group.Count()}").Replace("{time}", DateTimeOffset.FromUnixTimeMilliseconds(lessonRecord.startTime).ToString("yyyy-MM-dd HH:mm:ss"))
+                                                    .Replace("{duration}", $"{Math.Round(lessonRecord.duration/60, 2)}").Replace("{count}", $"{lessonRecord.clientCount}").Replace("{attendCount}", $"{lessonRecord.attendCount}")
+                                                    .Replace("{absentCount}", $"{lessonRecord.clientCount-lessonRecord.attendCount}").Replace("{attendRate}", $"{lessonRecord.attendRate}").Replace("{engagementIndexAverge}", $"{lessonBase.summary?.engagementIndexAverge}")
+                                                    .Replace("{grpEngagement}", grpEngagement).Replace("{highRankEngagement}", highRankEngagement).Replace("{totalPoint}", $"{lessonBase.summary.totalPoint}").Replace("{highRankPerPoint}", highRankPerPoint)
+                                                    .Replace("{highRankGrpPoint}", highRankGrpPoint).Replace("{interactionCount}", $"{lessonBase.summary.interactionCount}").Replace("{totalInteractPoint}", $"{lessonBase.summary.totalInteractPoint}")
+                                                    .Replace("{pushCount}", $"{lessonBase.summary.pushCount}").Replace("{collateTaskCount}", $"{lessonBase.summary.collateTaskCount}").Replace("{examCount}", $"{lessonBase.summary.examCount}")
+                                                    .Replace("{examQuizCount}", $"{lessonBase.summary.examQuizCount}").Replace("{examPointRate}", $"{lessonBase.summary.examPointRate}").Replace("{highRankExam}", $"{highRankExam}")
+                                                    .Replace("{lowRankExam}", $"{lowRankExam}").Replace("{smartRatingCount}", $"{lessonBase.summary.smartRatingCount}").Replace("{clientSmartRatingCount}", $"{lessonBase.summary.clientSmartRatingCount}")
+                                                    .Replace("{coworkTaskCount}", $"{lessonBase.summary.coworkTaskCount}").Replace("{coworkGroupCount}", $"{lessonBase.summary.coworkGroupCount}").Replace("{coworkGroupCount}", $"{lessonBase.summary.coworkGroupCount}")
+                                                    .Replace("{avgcoworkGroupCount}", lessonRecord.attendCount>0 ? $"{lessonBase.summary.coworkGroupCount/lessonRecord.attendCount}" : "0"));
+                                            }
+                                            lessonSB.Append(cn_lessonList.Replace("{lessonName}", lessonRecord.name).Replace("{memberCount}", $"{lessonRecord.clientCount}").Replace("{attendCount}", $"{lessonRecord.attendCount}")).Replace("{attendRate}", $"{lessonRecord.attendRate}");
+                                            break;
+                                        case "zh-tw":
+                                            if (lessonBase!=null)
+                                            {
+                                                lessonDetailSB.Append(tw_lessonDetail.Replace("{name}", lessonRecord.name).Replace("{groupCount}", $"{lessonBase.group.Count()}").Replace("{time}", DateTimeOffset.FromUnixTimeMilliseconds(lessonRecord.startTime).ToString("yyyy-MM-dd HH:mm:ss"))
+                                                    .Replace("{duration}", $"{Math.Round(lessonRecord.duration/60, 2)}").Replace("{count}", $"{lessonRecord.clientCount}").Replace("{attendCount}", $"{lessonRecord.attendCount}")
+                                                    .Replace("{absentCount}", $"{lessonRecord.clientCount-lessonRecord.attendCount}").Replace("{attendRate}", $"{lessonRecord.attendRate}").Replace("{engagementIndexAverge}", $"{lessonBase.summary?.engagementIndexAverge}")
+                                                    .Replace("{grpEngagement}", grpEngagement).Replace("{highRankEngagement}", highRankEngagement).Replace("{totalPoint}", $"{lessonBase.summary.totalPoint}").Replace("{highRankPerPoint}", highRankPerPoint)
+                                                    .Replace("{highRankGrpPoint}", highRankGrpPoint).Replace("{interactionCount}", $"{lessonBase.summary.interactionCount}").Replace("{totalInteractPoint}", $"{lessonBase.summary.totalInteractPoint}")
+                                                    .Replace("{pushCount}", $"{lessonBase.summary.pushCount}").Replace("{collateTaskCount}", $"{lessonBase.summary.collateTaskCount}").Replace("{examCount}", $"{lessonBase.summary.examCount}")
+                                                    .Replace("{examQuizCount}", $"{lessonBase.summary.examQuizCount}").Replace("{examPointRate}", $"{lessonBase.summary.examPointRate}").Replace("{highRankExam}", $"{highRankExam}")
+                                                    .Replace("{lowRankExam}", $"{lowRankExam}").Replace("{smartRatingCount}", $"{lessonBase.summary.smartRatingCount}").Replace("{clientSmartRatingCount}", $"{lessonBase.summary.clientSmartRatingCount}")
+                                                    .Replace("{coworkTaskCount}", $"{lessonBase.summary.coworkTaskCount}").Replace("{coworkGroupCount}", $"{lessonBase.summary.coworkGroupCount}").Replace("{coworkGroupCount}", $"{lessonBase.summary.coworkGroupCount}")
+                                                    .Replace("{avgcoworkGroupCount}", lessonRecord.attendCount>0 ? $"{lessonBase.summary.coworkGroupCount/lessonRecord.attendCount}" : "0"));
+                                            }
+                                            lessonSB.Append(tw_lessonList.Replace("{lessonName}", lessonRecord.name).Replace("{memberCount}", $"{lessonRecord.clientCount}").Replace("{attendCount}", $"{lessonRecord.attendCount}")).Replace("{attendRate}", $"{lessonRecord.attendRate}");
+                                            break;
+                                        case "en-us":
+                                            if (lessonBase!=null)
+                                            {
+
+                                                lessonDetailSB.Append(en_lessonDetail.Replace("{name}", lessonRecord.name).Replace("{groupCount}", $"{lessonBase.group.Count()}").Replace("{time}", DateTimeOffset.FromUnixTimeMilliseconds(lessonRecord.startTime).ToString("yyyy-MM-dd HH:mm:ss"))
+                                                    .Replace("{duration}", $"{Math.Round(lessonRecord.duration/60, 2)}").Replace("{count}", $"{lessonRecord.clientCount}").Replace("{attendCount}", $"{lessonRecord.attendCount}")
+                                                    .Replace("{absentCount}", $"{lessonRecord.clientCount-lessonRecord.attendCount}").Replace("{attendRate}", $"{lessonRecord.attendRate}").Replace("{engagementIndexAverge}", $"{lessonBase.summary?.engagementIndexAverge}")
+                                                    .Replace("{grpEngagement}", grpEngagement).Replace("{highRankEngagement}", highRankEngagement).Replace("{totalPoint}", $"{lessonBase.summary.totalPoint}").Replace("{highRankPerPoint}", highRankPerPoint)
+                                                    .Replace("{highRankGrpPoint}", highRankGrpPoint).Replace("{interactionCount}", $"{lessonBase.summary.interactionCount}").Replace("{totalInteractPoint}", $"{lessonBase.summary.totalInteractPoint}")
+                                                    .Replace("{pushCount}", $"{lessonBase.summary.pushCount}").Replace("{collateTaskCount}", $"{lessonBase.summary.collateTaskCount}").Replace("{examCount}", $"{lessonBase.summary.examCount}")
+                                                    .Replace("{examQuizCount}", $"{lessonBase.summary.examQuizCount}").Replace("{examPointRate}", $"{lessonBase.summary.examPointRate}").Replace("{highRankExam}", $"{highRankExam}")
+                                                    .Replace("{lowRankExam}", $"{lowRankExam}").Replace("{smartRatingCount}", $"{lessonBase.summary.smartRatingCount}").Replace("{clientSmartRatingCount}", $"{lessonBase.summary.clientSmartRatingCount}")
+                                                    .Replace("{coworkTaskCount}", $"{lessonBase.summary.coworkTaskCount}").Replace("{coworkGroupCount}", $"{lessonBase.summary.coworkGroupCount}").Replace("{coworkGroupCount}", $"{lessonBase.summary.coworkGroupCount}")
+                                                    .Replace("{avgcoworkGroupCount}", lessonRecord.attendCount>0 ? $"{lessonBase.summary.coworkGroupCount/lessonRecord.attendCount}" : "0"));
+                                            }
+                                            lessonSB.Append(en_lessonList.Replace("{lessonName}", lessonRecord.name).Replace("{memberCount}", $"{lessonRecord.clientCount}").Replace("{attendCount}", $"{lessonRecord.attendCount}")).Replace("{attendRate}", $"{lessonRecord.attendRate}");
+                                            break;
+                                    }
                                 }
                                 catch (Exception ex)
                                 {
+                                    
                                 }
-                                lessonCount++;
-                                var grpEngagement = string.Join(",", lessonBase.summary.grpEngagement.Select((x, index) => $"G{index+1}({x})"));
-                                var highRankEngagement = string.Join(",", lessonBase.summary.highRankEngagement.Select((x, index) => $"S{index+1}({x})"));
-
-                                var highRankPerPoint = string.Join(",", lessonBase.summary.highRankPerPoint.Select((x, index) => $"S{index+1}({x})"));
-                                var highRankGrpPoint = string.Join(",", lessonBase.summary.highRankGrpPoint.Select((x, index) => $"S{index+1}({x})"));
-                                var highRankExam = string.Join(",", lessonBase.summary.highRankExam.Select((x, index) => $"S{index+1}({x})"));
-                                var lowRankExam = string.Join(",", lessonBase.summary.lowRankExam.Select((x, index) => $"S{index+1}({x})"));
-                                switch (lang)
-                                {
-                                    case "zh-cn":
-                                        if (lessonBase!=null) 
-                                        {
-                                            
-                                            lessonDetailSB.Append(cn_lessonDetail.Replace("{name}", lessonRecord.name).Replace("{time}", DateTimeOffset.FromUnixTimeMilliseconds(lessonRecord.startTime).ToString("yyyy-MM-dd HH:mm:ss"))
-                                                .Replace("{duration}", $"{Math.Round(lessonRecord.duration/60, 2)}").Replace("{count}", $"{lessonRecord.clientCount}").Replace("{attendCount}", $"{lessonRecord.attendCount}")
-                                                .Replace("{absentCount}", $"{lessonRecord.clientCount-lessonRecord.attendCount}").Replace("{attendRate}", $"{lessonRecord.attendRate}").Replace("{engagementIndexAverge}", $"{lessonBase.summary?.engagementIndexAverge}")
-                                                .Replace("{grpEngagement}", grpEngagement).Replace("{highRankEngagement}", highRankEngagement).Replace("{totalPoint}", $"{lessonBase.summary.totalPoint}").Replace("{highRankPerPoint}", highRankPerPoint)
-                                                .Replace("{highRankGrpPoint}", highRankGrpPoint).Replace("{interactionCount}", $"{lessonBase.summary.interactionCount}").Replace("{totalInteractPoint}", $"{lessonBase.summary.totalInteractPoint}")
-                                                .Replace("{pushCount}", $"{lessonBase.summary.pushCount}").Replace("{collateTaskCount}", $"{lessonBase.summary.collateTaskCount}").Replace("{examCount}", $"{lessonBase.summary.examCount}")
-                                                .Replace("{examQuizCount}", $"{lessonBase.summary.examQuizCount}").Replace("{examPointRate}", $"{lessonBase.summary.examPointRate}").Replace("{highRankExam}", $"{highRankExam}")
-                                                .Replace("{lowRankExam}", $"{lowRankExam}").Replace("{smartRatingCount}", $"{lessonBase.summary.smartRatingCount}").Replace("clientSmartRatingCount", $"{lessonBase.summary.clientSmartRatingCount}")
-                                                .Replace("{coworkTaskCount}", $"{lessonBase.summary.coworkTaskCount}").Replace("{coworkGroupCount}", $"{lessonBase.summary.coworkGroupCount}").Replace("{coworkGroupCount}", $"{lessonBase.summary.coworkGroupCount}")
-                                                .Replace("{avgcoworkGroupCount}", lessonRecord.attendCount>0 ? $"{lessonBase.summary.coworkGroupCount/lessonRecord.attendCount}" : "0"));
-                                        }
-                                        lessonSB.Append(cn_lessonList.Replace("{lessonName}", lessonRecord.name).Replace("{memberCount}", $"{lessonRecord.clientCount}").Replace("{attendCount}", $"{lessonRecord.attendCount}")).Replace("{attendRate}", $"{lessonRecord.attendRate}");
-                                        break;
-                                    case "zh-tw":
-                                        if (lessonBase!=null)
-                                        {
-                                            lessonDetailSB.Append(tw_lessonDetail.Replace("{name}", lessonRecord.name).Replace("{time}", DateTimeOffset.FromUnixTimeMilliseconds(lessonRecord.startTime).ToString("yyyy-MM-dd HH:mm:ss"))
-                                                .Replace("{duration}", $"{Math.Round(lessonRecord.duration/60,2)}").Replace("{count}", $"{lessonRecord.clientCount}").Replace("{attendCount}", $"{lessonRecord.attendCount}")
-                                                .Replace("{absentCount}", $"{lessonRecord.clientCount-lessonRecord.attendCount}").Replace("{attendRate}", $"{lessonRecord.attendRate}").Replace("{engagementIndexAverge}", $"{lessonBase.summary?.engagementIndexAverge}")
-                                                .Replace("{grpEngagement}", grpEngagement).Replace("{highRankEngagement}", highRankEngagement).Replace("{totalPoint}", $"{lessonBase.summary.totalPoint}").Replace("{highRankPerPoint}", highRankPerPoint)
-                                                .Replace("{highRankGrpPoint}", highRankGrpPoint).Replace("{interactionCount}", $"{lessonBase.summary.interactionCount}").Replace("{totalInteractPoint}", $"{lessonBase.summary.totalInteractPoint}")
-                                                .Replace("{pushCount}", $"{lessonBase.summary.pushCount}").Replace("{collateTaskCount}", $"{lessonBase.summary.collateTaskCount}").Replace("{examCount}", $"{lessonBase.summary.examCount}")
-                                                .Replace("{examQuizCount}", $"{lessonBase.summary.examQuizCount}").Replace("{examPointRate}", $"{lessonBase.summary.examPointRate}").Replace("{highRankExam}", $"{highRankExam}")
-                                                .Replace("{lowRankExam}", $"{lowRankExam}").Replace("{smartRatingCount}", $"{lessonBase.summary.smartRatingCount}").Replace("clientSmartRatingCount", $"{lessonBase.summary.clientSmartRatingCount}")
-                                                .Replace("{coworkTaskCount}", $"{lessonBase.summary.coworkTaskCount}").Replace("{coworkGroupCount}", $"{lessonBase.summary.coworkGroupCount}").Replace("{coworkGroupCount}", $"{lessonBase.summary.coworkGroupCount}")
-                                                .Replace("{avgcoworkGroupCount}", lessonRecord.attendCount>0 ? $"{lessonBase.summary.coworkGroupCount/lessonRecord.attendCount}" : "0"));
-                                        }
-                                        lessonSB.Append(tw_lessonList.Replace("{lessonName}", lessonRecord.name).Replace("{memberCount}", $"{lessonRecord.clientCount}").Replace("{attendCount}", $"{lessonRecord.attendCount}")).Replace("{attendRate}", $"{lessonRecord.attendRate}");
-                                        break;
-                                    case "en-us":
-                                        if (lessonBase!=null)
-                                        {
-                                           
-                                            lessonDetailSB.Append(en_lessonDetail.Replace("{name}", lessonRecord.name).Replace("{time}", DateTimeOffset.FromUnixTimeMilliseconds(lessonRecord.startTime).ToString("yyyy-MM-dd HH:mm:ss"))
-                                                .Replace("{duration}", $"{Math.Round(lessonRecord.duration/60, 2)}").Replace("{count}", $"{lessonRecord.clientCount}").Replace("{attendCount}", $"{lessonRecord.attendCount}")
-                                                .Replace("{absentCount}", $"{lessonRecord.clientCount-lessonRecord.attendCount}").Replace("{attendRate}", $"{lessonRecord.attendRate}").Replace("{engagementIndexAverge}", $"{lessonBase.summary?.engagementIndexAverge}")
-                                                .Replace("{grpEngagement}", grpEngagement).Replace("{highRankEngagement}", highRankEngagement).Replace("{totalPoint}", $"{lessonBase.summary.totalPoint}").Replace("{highRankPerPoint}", highRankPerPoint)
-                                                .Replace("{highRankGrpPoint}", highRankGrpPoint).Replace("{interactionCount}", $"{lessonBase.summary.interactionCount}").Replace("{totalInteractPoint}", $"{lessonBase.summary.totalInteractPoint}")
-                                                .Replace("{pushCount}", $"{lessonBase.summary.pushCount}").Replace("{collateTaskCount}", $"{lessonBase.summary.collateTaskCount}").Replace("{examCount}", $"{lessonBase.summary.examCount}")
-                                                .Replace("{examQuizCount}", $"{lessonBase.summary.examQuizCount}").Replace("{examPointRate}", $"{lessonBase.summary.examPointRate}").Replace("{highRankExam}", $"{highRankExam}")
-                                                .Replace("{lowRankExam}", $"{lowRankExam}").Replace("{smartRatingCount}", $"{lessonBase.summary.smartRatingCount}").Replace("clientSmartRatingCount", $"{lessonBase.summary.clientSmartRatingCount}")
-                                                .Replace("{coworkTaskCount}", $"{lessonBase.summary.coworkTaskCount}").Replace("{coworkGroupCount}", $"{lessonBase.summary.coworkGroupCount}").Replace("{coworkGroupCount}", $"{lessonBase.summary.coworkGroupCount}")
-                                                .Replace("{avgcoworkGroupCount}", lessonRecord.attendCount>0 ? $"{lessonBase.summary.coworkGroupCount/lessonRecord.attendCount}" : "0"));
-                                        }
-                                        lessonSB.Append(en_lessonList.Replace("{lessonName}", lessonRecord.name).Replace("{memberCount}", $"{lessonRecord.clientCount}").Replace("{attendCount}", $"{lessonRecord.attendCount}")).Replace("{attendRate}", $"{lessonRecord.attendRate}");
-                                        break;
-                                }
+                                
                             }
 
                         }

+ 1 - 0
TEAMModelOS/Controllers/Both/LessonRecordController.cs

@@ -25,6 +25,7 @@ using TEAMModelOS.SDK.Models.Service;
 using Azure.Storage.Sas;
 using TEAMModelOS.SDK.Models.Dtos;
 
+
 namespace TEAMModelOS.Controllers
 {
     /// <summary>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 28 - 28
TEAMModelOS/appsettings.Development.json