Commit 1257b2e8 authored by 黄奎's avatar 黄奎

页面修改

parent c04d9a6b
...@@ -69,5 +69,10 @@ namespace Edu.Model.Entity.Exam ...@@ -69,5 +69,10 @@ namespace Edu.Model.Entity.Exam
/// 学生选项内容 /// 学生选项内容
/// </summary> /// </summary>
public string StudentContent { get; set; } public string StudentContent { get; set; }
/// <summary>
/// 问题分组编号(关联rb_examination_group表中的GId)
/// </summary>
public int StuPaperGroupId { get; set; }
} }
} }
...@@ -37,14 +37,14 @@ namespace Edu.Model.ViewModel.Exam ...@@ -37,14 +37,14 @@ namespace Edu.Model.ViewModel.Exam
public string StundetAnswer { get; set; } public string StundetAnswer { get; set; }
/// <summary> /// <summary>
/// 学生答案详情id /// 学生答案详情id(关联RB_Examination_StudentDetails表中的Id)
/// </summary> /// </summary>
public int StundetDetailsId { get; set; } public int StundetDetailsId { get; set; }
/// <summary> /// <summary>
/// 学生得分 /// 题目类型分组编号(关联rb_examination_group表中的GId)
/// </summary> /// </summary>
public decimal StundetScore { get; set; } public int StuPaperGroupId { get; set; }
/// <summary> /// <summary>
/// 知识点 /// 知识点
......
This diff is collapsed.
...@@ -1248,24 +1248,25 @@ namespace Edu.Module.Exam ...@@ -1248,24 +1248,25 @@ namespace Edu.Module.Exam
//学生答题详问题列表 //学生答题详问题列表
if (studentDetailsList != null && studentDetailsList.Count > 0) if (studentDetailsList != null && studentDetailsList.Count > 0)
{ {
foreach (var sItem in gItem.DetailsList) var stuTempList = studentDetailsList.Where(qitem => qitem.StuPaperGroupId == gItem.GId);
foreach (var sItem in stuTempList)
{ {
var tempModel = studentDetailsList.Where(qitem => qitem.DetailsId == sItem.Id)?.FirstOrDefault(); var questionModel = gItem.DetailsList.Where(qitem => qitem.Id == sItem.DetailsId)?.FirstOrDefault();
var QuestionContentObj = analysisQuestion.ParsingQuestion(sItem.QuestionTypeKey, tempModel.StudentContent); var QuestionContentObj = analysisQuestion.ParsingQuestion(questionModel.QuestionTypeKey, sItem.StudentContent,isEdit:true);
var qObj = new var qObj = new
{ {
PaperDetailsId= sItem.Id,//试卷问题编号 PaperDetailsId= sItem.DetailsId,//试卷问题编号
StundetDetailsId = tempModel.Id,//考生答题编号 StundetDetailsId = sItem.Id,//考生答题编号
sItem.PaperId, sItem.PaperId,
sItem.Title, questionModel.Title,
sItem.ShowTitle, questionModel.ShowTitle,
QuestionContentObj, QuestionContentObj,
sItem.QuestionTypeId, questionModel.QuestionTypeId,
sItem.QuestionTypeKey, questionModel.QuestionTypeKey,
sItem.DifficultyType, questionModel.DifficultyType,
sItem.Score, questionModel.Score,
Answer =tempModel.StundetAnswer, Answer =sItem.StundetAnswer,
tempModel.StundetAnswer, sItem.StundetAnswer,
AnswerParse = "", AnswerParse = "",
StundetScore = 0, StundetScore = 0,
}; };
...@@ -1384,6 +1385,7 @@ namespace Edu.Module.Exam ...@@ -1384,6 +1385,7 @@ namespace Edu.Module.Exam
StundetScore = 0, StundetScore = 0,
IsMarking = 0, IsMarking = 0,
StudentContent = item.QuestionContent, StudentContent = item.QuestionContent,
StuPaperGroupId=item.StuPaperGroupId,
}; };
if (model.Id > 0) if (model.Id > 0)
{ {
......
...@@ -15,7 +15,7 @@ namespace Edu.Module.Question ...@@ -15,7 +15,7 @@ namespace Edu.Module.Question
/// 字母选项数组 /// 字母选项数组
/// </summary> /// </summary>
private static readonly string [] LetterArray= new string[26] { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; private static readonly string [] LetterArray= new string[26] { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" };
/// <summary> /// <summary>
/// 问题解析 /// 问题解析
/// </summary> /// </summary>
...@@ -23,19 +23,20 @@ namespace Edu.Module.Question ...@@ -23,19 +23,20 @@ namespace Edu.Module.Question
/// <param name="data">选项内容</param> /// <param name="data">选项内容</param>
/// <param name="isNoAnswer">是否去掉答案</param> /// <param name="isNoAnswer">是否去掉答案</param>
/// <param name="isOptionRandom">是否选项随机(1-随机选项)</param> /// <param name="isOptionRandom">是否选项随机(1-随机选项)</param>
/// <param name="isEdit">是否选项随机(编辑状态)</param>
/// <returns></returns> /// <returns></returns>
public object ParsingQuestion(string key, string data,bool isNoAnswer=false,int isOptionRandom=0) public object ParsingQuestion(string key, string data,bool isNoAnswer=false,int isOptionRandom=0,bool isEdit=false)
{ {
var obj = new object(); var obj = new object();
switch (key) switch (key)
{ {
//单选题 //单选题
case "single": case "single":
obj = GetChooseOptionList(data, isOptionRandom, isNoAnswer); obj = GetChooseOptionList(data, isOptionRandom, isNoAnswer, isEdit: isEdit);
break; break;
//多选题 //多选题
case "multiple": case "multiple":
obj= GetChooseOptionList(data, isOptionRandom, isNoAnswer); obj= GetChooseOptionList(data, isOptionRandom, isNoAnswer, isEdit: isEdit);
break; break;
//填空题 //填空题
case "fill-in": case "fill-in":
...@@ -171,7 +172,7 @@ namespace Edu.Module.Question ...@@ -171,7 +172,7 @@ namespace Edu.Module.Question
break; break;
//单选题(数字) //单选题(数字)
case "single-number": case "single-number":
obj = GetChooseOptionList(data, isOptionRandom, isNoAnswer,isSingleNum:true); obj = GetChooseOptionList(data, isOptionRandom, isNoAnswer,isSingleNum:true,isEdit:isEdit);
break; break;
} }
return obj; return obj;
...@@ -184,15 +185,18 @@ namespace Edu.Module.Question ...@@ -184,15 +185,18 @@ namespace Edu.Module.Question
/// <param name="isOptionRandom"></param> /// <param name="isOptionRandom"></param>
/// <param name="isNoAnswer"></param> /// <param name="isNoAnswer"></param>
/// <returns></returns> /// <returns></returns>
private object GetChooseOptionList(string data,int isOptionRandom,bool isNoAnswer,bool isSingleNum=false) private object GetChooseOptionList(string data,int isOptionRandom,bool isNoAnswer,bool isSingleNum=false,bool isEdit=false)
{ {
var obj = new object(); var obj = new object();
var singleList = Common.Plugin.JsonHelper.DeserializeObject<List<optionItem>>(data); var singleList = Common.Plugin.JsonHelper.DeserializeObject<List<optionItem>>(data);
var newList = new List<optionItem>(); var newList = new List<optionItem>();
singleList.ForEach(item => if (!isEdit)
{ {
item.ShowName = item.Name; singleList.ForEach(item =>
}); {
item.ShowName = item.Name;
});
}
//选项随机 //选项随机
if (isOptionRandom == 1) if (isOptionRandom == 1)
{ {
......
...@@ -608,6 +608,7 @@ namespace Edu.WebApi.Controllers.Applet ...@@ -608,6 +608,7 @@ namespace Edu.WebApi.Controllers.Applet
StundetDetailsId = sObj.GetInt("StundetDetailsId"), StundetDetailsId = sObj.GetInt("StundetDetailsId"),
LevelType = (LevelTypeEnum)sObj.GetInt("LevelType"), LevelType = (LevelTypeEnum)sObj.GetInt("LevelType"),
Answer=sObj.GetStringValue("Answer"), Answer=sObj.GetStringValue("Answer"),
StuPaperGroupId= jobj.GetInt("GId"),
}; };
paperDetailsList.Add(detailModel); paperDetailsList.Add(detailModel);
} }
......
...@@ -100,7 +100,7 @@ namespace Edu.WebApi.Timers ...@@ -100,7 +100,7 @@ namespace Edu.WebApi.Timers
finishGuest = new System.Timers.Timer() finishGuest = new System.Timers.Timer()
{ {
Interval = (1000 * 60) * (60 * 23) //23小时执行一次 Interval = (1000 * 60) * (60 * 2) //2小时执行一次
}; };
finishGuest.Elapsed += new System.Timers.ElapsedEventHandler(DealGuestFinish); finishGuest.Elapsed += new System.Timers.ElapsedEventHandler(DealGuestFinish);
finishGuest.Enabled = true; finishGuest.Enabled = true;
......
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