From a716f08cda0a322de0933edc7ba2339e35824437 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Sat, 10 Aug 2024 17:51:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Common/Helper/ExamHelper.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Tiobon.Core.Common/Helper/ExamHelper.cs b/Tiobon.Core.Common/Helper/ExamHelper.cs index 9a68ad04..a6ffb480 100644 --- a/Tiobon.Core.Common/Helper/ExamHelper.cs +++ b/Tiobon.Core.Common/Helper/ExamHelper.cs @@ -59,9 +59,10 @@ public class ExamHelper var content = recordAnswers.Where(x => x.ExamRecordDetailId == detail.Id).First().AnswerContent; var count1 = completionAnswers1.Count; - for (int i = 0; i < completionAnswers1.Count; i++) - if (content.IndexOf(completionAnswers1[i].AnswerContent) > -1) - count1--; + if (!content.IsNull()) + for (int i = 0; i < completionAnswers1.Count; i++) + if (content.IndexOf(completionAnswers1[i].AnswerContent) > -1) + count1--; if (count1 == 0) {