CrazyIter_Bin há 3 meses atrás
pai
commit
ac4ffab179

+ 5 - 3
TEAMModelOS.Extension/IES.Exam/IES.ExamServer/Controllers/StudentController.cs

@@ -139,8 +139,10 @@ namespace IES.ExamServer.Controllers
             if (studentResult!=null)
             if (studentResult!=null)
             {
             {
                 //标记开始作答
                 //标记开始作答
-                studentResult.finished=1;
-
+                if (studentResult.finished<1)
+                {
+                    studentResult.finished=1;
+                }
                 if (studentResult.startTime<=0) 
                 if (studentResult.startTime<=0) 
                 {
                 {
                     studentResult.startTime=DateTimeOffset.Now.ToUnixTimeMilliseconds();
                     studentResult.startTime=DateTimeOffset.Now.ToUnixTimeMilliseconds();
@@ -189,7 +191,7 @@ namespace IES.ExamServer.Controllers
                         {
                         {
                             if (evaluationId.Equals(member.evaluationId))
                             if (evaluationId.Equals(member.evaluationId))
                             {
                             {
-                                string x_auth_token = JwtAuthExtension.CreateAuthToken("www.teammodel.cn", studentId, studentName, picture: string.Empty, ExamConstant.JwtSecretKey, ExamConstant.ScopeVisitor, 8, schoolID: school?.id, new string[] { "student" }, expire: 1);
+                                string x_auth_token = JwtAuthExtension.CreateAuthToken("www.teammodel.cn", studentId, studentName, picture: string.Empty, ExamConstant.JwtSecretKey, ExamConstant.ScopeStudent, 8, schoolID: school?.id, new string[] { "student" }, expire: 1);
                                 return Ok(new { code = 200, x_auth_token = x_auth_token });
                                 return Ok(new { code = 200, x_auth_token = x_auth_token });
                             }
                             }
                             else
                             else