Commit 62862732 authored by 黄奎's avatar 黄奎

页面修改

parent 73ad67db
...@@ -1329,47 +1329,24 @@ namespace Edu.Module.Exam ...@@ -1329,47 +1329,24 @@ namespace Edu.Module.Exam
foreach (var sItem in stuTempList) foreach (var sItem in stuTempList)
{ {
var questionModel = gItem?.DetailsList.Where(qitem => qitem.Id == sItem.DetailsId)?.FirstOrDefault(); var questionModel = gItem?.DetailsList.Where(qitem => qitem.Id == sItem.DetailsId)?.FirstOrDefault();
ExamScore += questionModel.Score; if (questionModel != null)
var QuestionContentObj = new object();
if (isShowAnswer)
{ {
QuestionContentObj = analysisQuestion.ParsingQuestion(questionModel.QuestionTypeKey, questionModel.QuestionContent, isEdit: true); ExamScore += questionModel.Score;
} var QuestionContentObj = new object();
else if (isShowAnswer)
{
QuestionContentObj = analysisQuestion.ParsingQuestion(questionModel.QuestionTypeKey, sItem.StudentContent, isEdit: true);
}
List<object> answerList = new List<object>();
List<object> quesAnswerList = new List<object>();
//填空题、分录题、资料题
if (questionModel.QuestionTypeKey == "fill-in" || questionModel.QuestionTypeKey == "entry-problem" || questionModel.QuestionTypeKey == "data-question")
{
var tempList = sItem.StundetAnswer.Split('★');
if (tempList != null && tempList.Count() > 0)
{ {
foreach (var tItem in tempList) QuestionContentObj = analysisQuestion.ParsingQuestion(questionModel.QuestionTypeKey, questionModel.QuestionContent, isEdit: true);
{
answerList.Add(tItem);
}
} }
} else
//完型填空
else if (questionModel.QuestionTypeKey == "cloze")
{
if (!string.IsNullOrEmpty(questionModel.Answer.ToString()))
{ {
var qAnsList = Common.Plugin.JsonHelper.DeserializeObject<List<SubAnswerItem>>(questionModel.Answer.ToString()); QuestionContentObj = analysisQuestion.ParsingQuestion(questionModel.QuestionTypeKey, sItem.StudentContent, isEdit: true);
if (qAnsList != null && qAnsList.Count() > 0)
{
foreach (var tItem in qAnsList)
{
quesAnswerList.Add(tItem);
}
}
} }
if (!string.IsNullOrEmpty(sItem.StundetAnswer.ToString())) List<object> answerList = new List<object>();
List<object> quesAnswerList = new List<object>();
//填空题、分录题、资料题
if (questionModel.QuestionTypeKey == "fill-in" || questionModel.QuestionTypeKey == "entry-problem" || questionModel.QuestionTypeKey == "data-question")
{ {
var tempList = JsonHelper.DeserializeObject<List<SubAnswerItem>>(sItem.StundetAnswer.ToString()); var tempList = sItem.StundetAnswer.Split('★');
if (tempList != null && tempList.Count() > 0) if (tempList != null && tempList.Count() > 0)
{ {
foreach (var tItem in tempList) foreach (var tItem in tempList)
...@@ -1378,50 +1355,76 @@ namespace Edu.Module.Exam ...@@ -1378,50 +1355,76 @@ namespace Edu.Module.Exam
} }
} }
} }
} //完型填空
else if (questionModel.QuestionTypeKey == "reading-comprehensio" || questionModel.QuestionTypeKey == "listening") else if (questionModel.QuestionTypeKey == "cloze")
{
if (!string.IsNullOrEmpty(questionModel.Answer.ToString()))
{ {
var qAnsList = Common.Plugin.JsonHelper.DeserializeObject<List<SubAnswerItem>>(questionModel.Answer.ToString()); if (!string.IsNullOrEmpty(questionModel.Answer.ToString()))
if (qAnsList != null && qAnsList.Count() > 0)
{ {
foreach (var tItem in qAnsList) var qAnsList = Common.Plugin.JsonHelper.DeserializeObject<List<SubAnswerItem>>(questionModel.Answer.ToString());
if (qAnsList != null && qAnsList.Count() > 0)
{ {
quesAnswerList.Add(tItem); foreach (var tItem in qAnsList)
{
quesAnswerList.Add(tItem);
}
}
}
if (!string.IsNullOrEmpty(sItem.StundetAnswer.ToString()))
{
var tempList = JsonHelper.DeserializeObject<List<SubAnswerItem>>(sItem.StundetAnswer.ToString());
if (tempList != null && tempList.Count() > 0)
{
foreach (var tItem in tempList)
{
answerList.Add(tItem);
}
} }
} }
} }
if (!string.IsNullOrEmpty(sItem.StundetAnswer.ToString())) else if (questionModel.QuestionTypeKey == "reading-comprehensio" || questionModel.QuestionTypeKey == "listening")
{ {
var qList = JsonHelper.DeserializeObject<List<SubAnswerItem>>(sItem.StundetAnswer.ToString()); if (!string.IsNullOrEmpty(questionModel.Answer.ToString()))
foreach (var mItem in qList)
{ {
answerList.Add(mItem); var qAnsList = Common.Plugin.JsonHelper.DeserializeObject<List<SubAnswerItem>>(questionModel.Answer.ToString());
if (qAnsList != null && qAnsList.Count() > 0)
{
foreach (var tItem in qAnsList)
{
quesAnswerList.Add(tItem);
}
}
}
if (!string.IsNullOrEmpty(sItem.StundetAnswer.ToString()))
{
var qList = JsonHelper.DeserializeObject<List<SubAnswerItem>>(sItem.StundetAnswer.ToString());
foreach (var mItem in qList)
{
answerList.Add(mItem);
}
} }
} }
var qObj = new
{
PaperDetailsId = sItem.DetailsId,//试卷问题编号
StundetDetailsId = sItem.Id,//考生答题编号
sItem.PaperId,
questionModel.Title,
questionModel.ShowTitle,
QuestionContentObj,
questionModel.QuestionTypeId,
questionModel.QuestionTypeKey,
questionModel.DifficultyType,
questionModel.Score,
Answer = isShowAnswer ? questionModel.Answer : sItem.StundetAnswer,
sItem.StundetAnswer,
QuestionAnswerList = quesAnswerList,
AnswerList = isShowAnswer ? answerList : new List<object>(),
questionModel.AnswerParse,
sItem.StudentScore,
sItem.IsMarking
};
questionList.Add(qObj);
} }
var qObj = new
{
PaperDetailsId = sItem.DetailsId,//试卷问题编号
StundetDetailsId = sItem.Id,//考生答题编号
sItem.PaperId,
questionModel.Title,
questionModel.ShowTitle,
QuestionContentObj,
questionModel.QuestionTypeId,
questionModel.QuestionTypeKey,
questionModel.DifficultyType,
questionModel.Score,
Answer = isShowAnswer ? questionModel.Answer : sItem.StundetAnswer,
sItem.StundetAnswer,
QuestionAnswerList = quesAnswerList,
AnswerList = isShowAnswer ? answerList : new List<object>(),
questionModel.AnswerParse,
sItem.StudentScore,
sItem.IsMarking
};
questionList.Add(qObj);
} }
} }
else else
......
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