|
|
|
@ -873,14 +873,15 @@ public class Ghre_QuestionServices : BaseServices<Ghre_Question, Ghre_QuestionDt |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!dt.Columns.Contains("正确答案(必填)")) |
|
|
|
|
{ |
|
|
|
|
comments.Add("未查询到【正确答案(必填)】列!"); |
|
|
|
|
data.ErrorCount++; |
|
|
|
|
dt.Rows[i]["Comments"] = string.Join(";", comments.Select(a => a)); |
|
|
|
|
isExistError = true; |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
if (questionType != "Completion" && questionType != "ShortAnswer") |
|
|
|
|
if (!dt.Columns.Contains("正确答案(必填)")) |
|
|
|
|
{ |
|
|
|
|
comments.Add("未查询到【正确答案(必填)】列!"); |
|
|
|
|
data.ErrorCount++; |
|
|
|
|
dt.Rows[i]["Comments"] = string.Join(";", comments.Select(a => a)); |
|
|
|
|
isExistError = true; |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!dt.Columns.Contains("课程(必填)")) |
|
|
|
|
{ |
|
|
|
@ -1026,7 +1027,7 @@ public class Ghre_QuestionServices : BaseServices<Ghre_Question, Ghre_QuestionDt |
|
|
|
|
int index = questionContent.IndexOf("()"); |
|
|
|
|
if (index > -1) |
|
|
|
|
{ |
|
|
|
|
if (questionContent.Length > index + 2) |
|
|
|
|
if (questionContent.Length > index + 4) |
|
|
|
|
{ |
|
|
|
|
if (questionContent.Substring(index + 2, 2) == "()") |
|
|
|
|
questionContent = questionContent.Substring(0, index) + "____、" + questionContent.Substring(index + 2); |
|
|
|
@ -1083,7 +1084,7 @@ public class Ghre_QuestionServices : BaseServices<Ghre_Question, Ghre_QuestionDt |
|
|
|
|
data.SuccessCount++; |
|
|
|
|
id = await base.Add(insert); |
|
|
|
|
insertAnswers.ForEach(x => x.QuestionId = id); |
|
|
|
|
//await _ghre_QuestionAnswerServices.Add(insertAnswers); |
|
|
|
|
await _ghre_QuestionAnswerServices.Add(insertAnswers); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|