题库导入优化

master
xiaochanghai 3 months ago
parent 465fe206f5
commit f84bd94708
  1. 6
      Tiobon.Core.Services/Ghre/Ghre_QuestionServices.cs

@ -939,8 +939,8 @@ public class Ghre_QuestionServices : BaseServices<Ghre_Question, Ghre_QuestionDt
if (string.IsNullOrWhiteSpace(correctAnswer) && questionType != "Completion" && questionType != "ShortAnswer")
comments.Add("正确答案未标记!");
var questionAnalysis = dt.Rows[i]["解析"].ToString();
if (string.IsNullOrWhiteSpace(difficultyLevel))
comments.Add("难易程度必填!");
//if (string.IsNullOrWhiteSpace(difficultyLevel))
// comments.Add("难易程度必填!");
if (string.IsNullOrWhiteSpace(questionAnalysis))
comments.Add("题目解析必填!");
@ -1153,6 +1153,8 @@ public class Ghre_QuestionServices : BaseServices<Ghre_Question, Ghre_QuestionDt
var question1 = question.FirstOrDefault();
question1.CourseIds = JsonHelper.ObjToJson(coursIds1);
await base.Update(question1, ["CourseIds"]);
data.SuccessCount++;
}
}

Loading…
Cancel
Save