Commit 9654af12 authored by 黄奎's avatar 黄奎

页面修改

parent 2418eb5d
...@@ -726,28 +726,42 @@ namespace Edu.Module.Exam ...@@ -726,28 +726,42 @@ namespace Edu.Module.Exam
{ {
if (!string.IsNullOrEmpty(sItem.Answer.ToString())) if (!string.IsNullOrEmpty(sItem.Answer.ToString()))
{ {
var qAnsList = Common.Plugin.JsonHelper.DeserializeObject<List<SubAnswerItem>>(sItem.Answer.ToString()); try
if (qAnsList != null && qAnsList.Count() > 0)
{ {
foreach (var tItem in qAnsList) var qAnsList = Common.Plugin.JsonHelper.DeserializeObject<List<SubAnswerItem>>(sItem.Answer.ToString());
if (qAnsList != null && qAnsList.Count() > 0)
{ {
quesAnswerList.Add(tItem); foreach (var tItem in qAnsList)
{
quesAnswerList.Add(tItem);
}
} }
} }
catch (Exception ex)
{
Common.Plugin.LogHelper.Write(ex, "GetExaminationPaperModule:" + string.Format("PaperId_{0}:DetailsId:{1}", PaperId, sItem.Id));
}
} }
} }
else if (sItem.QuestionTypeKey == "reading-comprehensio" || sItem.QuestionTypeKey == "listening") else if (sItem.QuestionTypeKey == "reading-comprehensio" || sItem.QuestionTypeKey == "listening")
{ {
if (!string.IsNullOrEmpty(sItem.Answer.ToString())) if (!string.IsNullOrEmpty(sItem.Answer.ToString()))
{ {
var qAnsList = Common.Plugin.JsonHelper.DeserializeObject<List<SubAnswerItem>>(sItem.Answer.ToString()); try
if (qAnsList != null && qAnsList.Count() > 0)
{ {
foreach (var tItem in qAnsList) var qAnsList = Common.Plugin.JsonHelper.DeserializeObject<List<SubAnswerItem>>(sItem.Answer.ToString());
if (qAnsList != null && qAnsList.Count() > 0)
{ {
quesAnswerList.Add(tItem); foreach (var tItem in qAnsList)
{
quesAnswerList.Add(tItem);
}
} }
} }
catch (Exception ex)
{
Common.Plugin.LogHelper.Write(ex, "GetExaminationPaperModule:" + string.Format("PaperId_{0}:DetailsId:{1}", PaperId, sItem.Id));
}
} }
} }
sItem.QuestionAnswerList = quesAnswerList; sItem.QuestionAnswerList = quesAnswerList;
......
...@@ -107,7 +107,7 @@ WHERE 1=1 AND `Status`=0 ...@@ -107,7 +107,7 @@ WHERE 1=1 AND `Status`=0
SELECT A.*,IFNULL(B.`Name` ,'') AS QuestionTypeName SELECT A.*,IFNULL(B.`Name` ,'') AS QuestionTypeName
FROM RB_Question AS A LEFT JOIN RB_Question_Type B ON A.QuestionTypeId=B.QId FROM RB_Question AS A LEFT JOIN RB_Question_Type B ON A.QuestionTypeId=B.QId
INNER JOIN rb_question_bank AS C ON A.BankId=C.BankId INNER JOIN rb_question_bank AS C ON A.BankId=C.BankId
WHERE 1=1 AND C.Status=0 WHERE 1=1
"); ");
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Question_ViewModel.Status), (int)DateStateEnum.Normal); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Question_ViewModel.Status), (int)DateStateEnum.Normal);
if (query == null) if (query == null)
......
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