|
@@ -393,15 +393,23 @@ namespace Hotline.Application.Exam.Service.ExamManages
|
|
|
|
|
|
if (examManage.ExamStatus== EExamStatus.NoStart)
|
|
|
{
|
|
|
- examManage.ExamStatus = EExamStatus.Executing;
|
|
|
- await _examManageRepository.UpdateWithValidateAsync(examManage,cancellationToken);
|
|
|
+ await UpdateExamStatus(examManage, cancellationToken);
|
|
|
}
|
|
|
|
|
|
- startExamViewResponse.TimeSpan = examManage?.TimeSpan ?? 0;
|
|
|
+ startExamViewResponse.TimeSpan = examManage?.TimeSpan ?? 0;
|
|
|
startExamViewResponse.StartTime = examManage?.StartTime;
|
|
|
return startExamViewResponse;
|
|
|
}
|
|
|
|
|
|
+ private async Task UpdateExamStatus(ExamManage? examManage, CancellationToken cancellationToken)
|
|
|
+ {
|
|
|
+ examManage.ExamStatus = EExamStatus.Executing;
|
|
|
+
|
|
|
+ examManage.ToUpdate(_sessionContext);
|
|
|
+
|
|
|
+ await _examManageRepository.UpdateWithValidateAsync(examManage, cancellationToken);
|
|
|
+ }
|
|
|
+
|
|
|
private StartExamViewResponse AddCheckValidateCountStrategy(ExamUserExam examUserExam, ExamManage examManage, StartExamViewResponse startExamViewResponse, List<IExamStrategy> examStrategys)
|
|
|
{
|
|
|
if (examManage.ExamType == Share.Enums.Exams.EExamType.Simulate)
|