Commit 62862732 authored by 黄奎's avatar 黄奎

页面修改

parent 73ad67db
......@@ -1329,47 +1329,24 @@ namespace Edu.Module.Exam
foreach (var sItem in stuTempList)
{
var questionModel = gItem?.DetailsList.Where(qitem => qitem.Id == sItem.DetailsId)?.FirstOrDefault();
ExamScore += questionModel.Score;
var QuestionContentObj = new object();
if (isShowAnswer)
if (questionModel != null)
{
QuestionContentObj = analysisQuestion.ParsingQuestion(questionModel.QuestionTypeKey, questionModel.QuestionContent, isEdit: true);
}
else
{
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)
ExamScore += questionModel.Score;
var QuestionContentObj = new object();
if (isShowAnswer)
{
foreach (var tItem in tempList)
{
answerList.Add(tItem);
}
QuestionContentObj = analysisQuestion.ParsingQuestion(questionModel.QuestionTypeKey, questionModel.QuestionContent, isEdit: true);
}
}
//完型填空
else if (questionModel.QuestionTypeKey == "cloze")
{
if (!string.IsNullOrEmpty(questionModel.Answer.ToString()))
else
{
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);
}
}
QuestionContentObj = analysisQuestion.ParsingQuestion(questionModel.QuestionTypeKey, sItem.StudentContent, isEdit: true);
}
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)
{
foreach (var tItem in tempList)
......@@ -1378,50 +1355,76 @@ namespace Edu.Module.Exam
}
}
}
}
else if (questionModel.QuestionTypeKey == "reading-comprehensio" || questionModel.QuestionTypeKey == "listening")
{
if (!string.IsNullOrEmpty(questionModel.Answer.ToString()))
//完型填空
else if (questionModel.QuestionTypeKey == "cloze")
{
var qAnsList = Common.Plugin.JsonHelper.DeserializeObject<List<SubAnswerItem>>(questionModel.Answer.ToString());
if (qAnsList != null && qAnsList.Count() > 0)
if (!string.IsNullOrEmpty(questionModel.Answer.ToString()))
{
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());
foreach (var mItem in qList)
if (!string.IsNullOrEmpty(questionModel.Answer.ToString()))
{
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
......
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