Commit cc77d858 authored by 黄奎's avatar 黄奎

页面修改

parent e2ade831
......@@ -60,5 +60,10 @@ namespace Edu.Model.ViewModel.Exam
/// 知识点
/// </summary>
public List<RB_Question_Point_ViewModel> QuestionPointList { get; set; }
/// <summary>
/// 阅读理解、听力、完型,答案列表
/// </summary>
public List<object> QuestionAnswerList { get; set; }
}
}
......@@ -681,8 +681,41 @@ namespace Edu.Module.Exam
if (gItem.DetailsList != null && gItem.DetailsList.Count > 0)
{
gItem.GScore = gItem?.DetailsList?.Sum(qitem => qitem.Score) ?? 0;
foreach (var sItem in gItem.DetailsList)
{
List<object> quesAnswerList = new List<object>();
//完型填空
if (sItem.QuestionTypeKey == "cloze")
{
if (!string.IsNullOrEmpty(sItem.Answer.ToString()))
{
var qAnsList = Common.Plugin.JsonHelper.DeserializeObject<List<SubAnswerItem>>(sItem.Answer.ToString());
if (qAnsList != null && qAnsList.Count() > 0)
{
foreach (var tItem in qAnsList)
{
quesAnswerList.Add(tItem);
}
}
}
}
else if (sItem.QuestionTypeKey == "reading-comprehensio" || sItem.QuestionTypeKey == "listening")
{
if (!string.IsNullOrEmpty(sItem.Answer.ToString()))
{
var qAnsList = Common.Plugin.JsonHelper.DeserializeObject<List<SubAnswerItem>>(sItem.Answer.ToString());
if (qAnsList != null && qAnsList.Count() > 0)
{
foreach (var tItem in qAnsList)
{
quesAnswerList.Add(tItem);
}
}
}
}
sItem.QuestionAnswerList = quesAnswerList;
sItem.QuestionPointList = pointList?.Where(qitem => sItem.Knowledge.Contains(qitem.PointId.ToString()))?.ToList() ?? new List<RB_Question_Point_ViewModel>();
sItem.QuestionContentObj = analysisQuestion.ParsingQuestion(sItem.QuestionTypeKey, sItem.QuestionContent);
string newTitle = sItem.Title;
......@@ -1500,7 +1533,7 @@ namespace Edu.Module.Exam
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Examination_Student_ViewModel.ExamEndTime), DateTime.Now},
{nameof(RB_Examination_Student_ViewModel.ExamStatus ), ExamTestStatusEnum.FinishTest},
{nameof(RB_Examination_Student_ViewModel.ExamStatus ), (int)ExamTestStatusEnum.FinishTest},
};
List<WhereHelper> wheres = new List<WhereHelper>()
{
......
......@@ -116,6 +116,10 @@ namespace Edu.WebApi.Controllers.Applet
{
item.ExamStatusStr = "未开始";
}
else if (item.ExamStartTime < System.DateTime.Now && item.ExamEndTime > System.DateTime.Now)
{
item.ExamStatusStr = "已开始";
}
else if (item.ExamEndTime > System.DateTime.Now)
{
if (item.ExamStatus == 2)
......@@ -127,15 +131,9 @@ namespace Edu.WebApi.Controllers.Applet
item.ExamStatusStr = "完成";
}
}
else if (item.ExamStartTime < System.DateTime.Now && item.ExamEndTime > System.DateTime.Now)
{
item.ExamStatusStr = "已开始";
}
}
}
}
#endregion
var result = new
......
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