Commit f3c08132 authored by 黄奎's avatar 黄奎

页面修改

parent edba8fbe
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
using Edu.Repository.Exam; using Edu.Repository.Exam;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text; using System.Text;
namespace Edu.Module.Exam namespace Edu.Module.Exam
...@@ -18,15 +19,20 @@ namespace Edu.Module.Exam ...@@ -18,15 +19,20 @@ namespace Edu.Module.Exam
private readonly RB_Examination_StudentDetailsRepository examination_StudentDetailsRepository = new RB_Examination_StudentDetailsRepository(); private readonly RB_Examination_StudentDetailsRepository examination_StudentDetailsRepository = new RB_Examination_StudentDetailsRepository();
/// <summary> /// <summary>
/// 自动阅卷处理类 /// 自动阅卷方法
/// </summary> /// </summary>
/// <param name="PaperId">试卷编号</param> /// <param name="PaperId">试卷编号</param>
/// <param name="PublishId">发布编号</param> /// <param name="PublishId">发布编号</param>
/// <param name="GuestId">学员编号</param> /// <param name="GuestId">学员编号</param>
/// <returns></returns> /// <returns></returns>
public bool AutoReviewPaperModule(int PaperId,int PublishId,int GuestId) public bool AutoReviewPaperModule(int PaperId, int PublishId, int GuestId)
{ {
bool flag = false; bool flag = false;
var paperConfig = examination_PublishRepository.GetEntity(PublishId);
//多选题未选全是否给一半的分
var IsHalfScore = paperConfig?.IsHalfScore ?? 0;
List<RB_Examination_StudentDetails_ViewModel> answerList = new List<RB_Examination_StudentDetails_ViewModel>();
//试卷题目 //试卷题目
var sourceQuestionList = examination_DetailsRepository.GetExaminationDetailsListRepository(new RB_Examination_Details_ViewModel() { PaperId = PaperId }); var sourceQuestionList = examination_DetailsRepository.GetExaminationDetailsListRepository(new RB_Examination_Details_ViewModel() { PaperId = PaperId });
//学员提交答案列表 //学员提交答案列表
...@@ -40,84 +46,123 @@ namespace Edu.Module.Exam ...@@ -40,84 +46,123 @@ namespace Edu.Module.Exam
{ {
foreach (var sItem in sourceQuestionList) foreach (var sItem in sourceQuestionList)
{ {
switch (sItem.QuestionTypeKey) var answerModel = stuQuesList?.Where(qitem => qitem.DetailsId == sItem.Id)?.FirstOrDefault();
if (answerModel != null && answerModel.Id > 0)
{ {
//单选题 switch (sItem.QuestionTypeKey)
case "single": {
//单选题
break; case "single":
//多选题 if (sItem.Answer == answerModel.StundetAnswer)
case "multiple": {
answerList.Add(new RB_Examination_StudentDetails_ViewModel()
break; {
//填空题 Id = answerModel.Id,
case "fill-in": StundetScore = sItem.Score
});
break; }
//判断题 break;
case "judge": //多选题
case "multiple":
break;
//简答题 break;
case "short-answer": //填空题
case "fill-in":
break;
//名词解释 break;
case "noun-explanation": //判断题
case "judge":
break; if (sItem.Answer == answerModel.StundetAnswer)
//论述题 {
case "essay-question": answerList.Add(new RB_Examination_StudentDetails_ViewModel()
{
break; Id = answerModel.Id,
//计算题 StundetScore = sItem.Score
case "calculation": });
}
break; break;
//分录题 //简答题
case "entry-problem": case "short-answer":
break; break;
//资料题 //名词解释
case "data-question": case "noun-explanation":
break; break;
//连线题 //论述题
case "matching": case "essay-question":
break; break;
//排序题 //计算题
case "sorting-problem": case "calculation":
break; break;
//完型填空 //分录题
case "cloze": case "entry-problem":
break; break;
//阅读理解 //资料题
case "reading-comprehensio": case "data-question":
break; break;
//口语题 //连线题
case "spoken": case "matching":
if (sItem.Answer == answerModel.StundetAnswer)
break; {
//听力题 answerList.Add(new RB_Examination_StudentDetails_ViewModel()
case "listening": {
Id = answerModel.Id,
break; StundetScore = sItem.Score
//公用选项题 });
case "sharing-choose": }
break;
break; //排序题
//其它题 case "sorting-problem":
case "other": if (sItem.Answer == answerModel.StundetAnswer)
{
break; answerList.Add(new RB_Examination_StudentDetails_ViewModel()
//单选题-数字 {
case "single-number": Id = answerModel.Id,
StundetScore = sItem.Score
break; });
}
break;
//完型填空
case "cloze":
break;
//阅读理解
case "reading-comprehensio":
break;
//口语题
case "spoken":
break;
//听力题
case "listening":
break;
//公用选项题
case "sharing-choose":
break;
//其它题
case "other":
break;
//单选题-数字
case "single-number":
if (sItem.Answer == answerModel.StundetAnswer)
{
answerList.Add(new RB_Examination_StudentDetails_ViewModel()
{
Id = answerModel.Id,
StundetScore = sItem.Score
});
}
break;
}
} }
} }
} }
......
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