CrazyIter_Bin 3 maanden geleden
bovenliggende
commit
179b937fa7

+ 18 - 18
TEAMModelOS.Extension/IES.Exam/IES.ExamServer/Controllers/ManageController.cs

@@ -244,8 +244,8 @@ namespace IES.ExamServer.Controllers
             }
 
             //数据,文件,页面 0 没有更新,1 有更新
-            int data = 0, blob = 0, webview = 0, groupList = 0, status = 0;
-            long dataSize = 0, blobSize = 0, webviewSize = 0, studentCount = 0;
+            int data = 0, blob = 0, groupList = 0, status = 0;
+            long dataSize = 0, blobSize = 0, studentCount = 0;
             if (evaluationLocal== null && evaluationCloud==null)
             {
                 //线上线下没有数据
@@ -297,7 +297,7 @@ namespace IES.ExamServer.Controllers
                 evaluationLocal= evaluationCloud;
                 blob=1;
                 data=1;
-                webview=1;
+               // webview=1;
                 groupList=1;
                 blobSize=evaluationCloud.blobSize;
                 dataSize=evaluationCloud.dataSize;
@@ -529,18 +529,18 @@ namespace IES.ExamServer.Controllers
                             content=$"检查到评测试卷需要更新。[{blobSize}]"
                         });
                 }
-                if (webview==1)
-                {
-                    await _signalRExamServerHub.SendMessage(_memoryCache, _logger, deviceId, Constant._Message_grant_type_check_file,
-                        new MessageContent
-                        {
-                            dataId=evaluationLocal.id,
-                            dataName=evaluationLocal.name,
-                            messageType=Constant._Message_type_message,
-                            status=Constant._Message_status_warning,
-                            content=$"检查到评测作答页面需要更新。[{webviewSize}]"
-                        });
-                }
+                //if (webview==1)
+                //{
+                //    await _signalRExamServerHub.SendMessage(_memoryCache, _logger, deviceId, Constant._Message_grant_type_check_file,
+                //        new MessageContent
+                //        {
+                //            dataId=evaluationLocal.id,
+                //            dataName=evaluationLocal.name,
+                //            messageType=Constant._Message_type_message,
+                //            status=Constant._Message_status_warning,
+                //            content=$"检查到评测作答页面需要更新。[{webviewSize}]"
+                //        });
+                //}
                 if (groupList==1)
                 {
                     await _signalRExamServerHub.SendMessage(_memoryCache, _logger, deviceId, Constant._Message_grant_type_check_file,
@@ -578,10 +578,10 @@ namespace IES.ExamServer.Controllers
                 evaluation = evaluationLocal,
                 data,
                 blob,
-                webview,
+               // webview,
                 dataSize,
                 blobSize,
-                webviewSize,
+                //webviewSize,
                 status,
                 groupList,
                 studentCount,
@@ -635,7 +635,7 @@ namespace IES.ExamServer.Controllers
         /// </summary>
         /// <param name="json"></param>
         /// <returns></returns>
-        [HttpPost("list-local-c")]
+        [HttpPost("list-local-evaluation")]
         [AuthToken("admin", "teacher", "visitor")]
         public IActionResult ListLocalEvaluation(JsonNode json) 
         {

+ 3 - 1
TEAMModelOS/Controllers/Both/EvaluationSyncInfoController.cs

@@ -281,7 +281,9 @@ namespace TEAMModelOS.Controllers.Both
                     infos.Add(syncInfo);
                 }
             }
-            return Ok(new {code=200, infos });
+
+
+            return Ok(new {code=200, infos, success=infos.Where(x=>!string.IsNullOrWhiteSpace(x.shortCode)).Count(), failed= infos.Where(x => string.IsNullOrWhiteSpace(x.shortCode)).Count() });
         }
     }
 }

+ 1 - 1
TEAMModelOS/Filter/AuthTokenAttribute.cs

@@ -170,7 +170,7 @@ namespace TEAMModelOS.Filter
                         context.HttpContext.Items.Add("School", school);
                         context.HttpContext.Items.Add("Standard", standard);
                         context.HttpContext.Items.Add("Roles", _role);
-                        context.HttpContext.Items.Add("c", scope);
+                        context.HttpContext.Items.Add("Scope", scope);
                         context.HttpContext.Items.Add("Website", website);
                         context.HttpContext.Items.Add("Area", area);
                         context.HttpContext.Items.Add("Permissions", _permission);