Commit 6dce3431 authored by 黄奎's avatar 黄奎

页面修改

parent 8479da0b
...@@ -116,5 +116,11 @@ namespace Edu.Model.ViewModel.Question ...@@ -116,5 +116,11 @@ namespace Edu.Model.ViewModel.Question
/// 问题数量 /// 问题数量
/// </summary> /// </summary>
public int QuestionCount { get; set; } public int QuestionCount { get; set; }
/// <summary>
/// 阅读理解、听力、完型,答案列表
/// </summary>
public List<object> QuestionAnswerList { get; set; }
} }
} }
\ No newline at end of file
...@@ -681,6 +681,25 @@ namespace Edu.Module.Question ...@@ -681,6 +681,25 @@ namespace Edu.Module.Question
} }
} }
break; break;
//单选题(数字)
case "single-number":
var singleNumberAnwser = Common.Plugin.JsonHelper.DeserializeObject<List<optionItem>>(item.SubAnwser.ToString());
string singleNumberMessage = CheckChoose(singleNumberAnwser);
resultList.Add(new SubAnswerItem
{
SubQuestionId = Index.ToString(),
SubQuestionKey = item.QuestionKey,
SubAnswer = singleNumberAnwser.Where(qitem => qitem.IsAnswer == true)?.FirstOrDefault()?.Name ?? "",
SubScore = item.SubScore,
});
if (IsRequire)
{
if (!string.IsNullOrEmpty(singleNumberMessage))
{
return singleNumberMessage;
}
}
break;
//多选题 //多选题
case "multiple": case "multiple":
var multipleAnwser = Common.Plugin.JsonHelper.DeserializeObject<List<optionItem>>(item.SubAnwser.ToString()); var multipleAnwser = Common.Plugin.JsonHelper.DeserializeObject<List<optionItem>>(item.SubAnwser.ToString());
......
...@@ -306,10 +306,27 @@ namespace Edu.Module.Question ...@@ -306,10 +306,27 @@ namespace Edu.Module.Question
extModel.QuestionTypeName = question_TypeRepository.GetEntity(extModel.QuestionTypeId)?.Name ?? ""; extModel.QuestionTypeName = question_TypeRepository.GetEntity(extModel.QuestionTypeId)?.Name ?? "";
} }
extModel.QuestionContentObj = ParsingQuestionModule(extModel.QuestionTypeKey, extModel.QuestionContent); extModel.QuestionContentObj = ParsingQuestionModule(extModel.QuestionTypeKey, extModel.QuestionContent);
List<object> questionAnswerList = new List<object>();
if (!string.IsNullOrEmpty(extModel.Knowledge)) if (!string.IsNullOrEmpty(extModel.Knowledge))
{ {
extModel.QuestionPointList = GetPointListModule(new RB_Question_Point_ViewModel() { QPointIds = extModel.Knowledge }); extModel.QuestionPointList = GetPointListModule(new RB_Question_Point_ViewModel() { QPointIds = extModel.Knowledge });
} }
if (extModel.QuestionTypeKey == "reading-comprehensio"|| extModel.QuestionTypeKey == "listening" || extModel.QuestionTypeKey == "cloze")
{
analysisQuestion.CheckQuestion(extModel.QuestionTypeKey, extModel.QuestionContent, extModel.Answer, out string newAnswer,IsRequire:false);
if (!string.IsNullOrEmpty(newAnswer))
{
var qAnsList = Common.Plugin.JsonHelper.DeserializeObject<List<SubAnswerItem>>(newAnswer);
if (qAnsList != null && qAnsList.Count() > 0)
{
foreach (var tItem in qAnsList)
{
questionAnswerList.Add(tItem);
}
}
}
}
extModel.QuestionAnswerList = questionAnswerList;
if (extModel.QuestionTypeKey == "cloze" && !string.IsNullOrEmpty(extModel.Title) && isReplaceClozeTitle == 1) if (extModel.QuestionTypeKey == "cloze" && !string.IsNullOrEmpty(extModel.Title) && isReplaceClozeTitle == 1)
{ {
string categoryRule1 = @"##[1234567890]##"; string categoryRule1 = @"##[1234567890]##";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment