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

页面修改

parent c04d9a6b
......@@ -69,5 +69,10 @@ namespace Edu.Model.Entity.Exam
/// 学生选项内容
/// </summary>
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
public string StundetAnswer { get; set; }
/// <summary>
/// 学生答案详情id
/// 学生答案详情id(关联RB_Examination_StudentDetails表中的Id)
/// </summary>
public int StundetDetailsId { get; set; }
/// <summary>
/// 学生得分
/// 题目类型分组编号(关联rb_examination_group表中的GId)
/// </summary>
public decimal StundetScore { get; set; }
public int StuPaperGroupId { get; set; }
/// <summary>
/// 知识点
......
This diff is collapsed.
......@@ -1248,24 +1248,25 @@ namespace Edu.Module.Exam
//学生答题详问题列表
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 QuestionContentObj = analysisQuestion.ParsingQuestion(sItem.QuestionTypeKey, tempModel.StudentContent);
var questionModel = gItem.DetailsList.Where(qitem => qitem.Id == sItem.DetailsId)?.FirstOrDefault();
var QuestionContentObj = analysisQuestion.ParsingQuestion(questionModel.QuestionTypeKey, sItem.StudentContent,isEdit:true);
var qObj = new
{
PaperDetailsId= sItem.Id,//试卷问题编号
StundetDetailsId = tempModel.Id,//考生答题编号
PaperDetailsId= sItem.DetailsId,//试卷问题编号
StundetDetailsId = sItem.Id,//考生答题编号
sItem.PaperId,
sItem.Title,
sItem.ShowTitle,
questionModel.Title,
questionModel.ShowTitle,
QuestionContentObj,
sItem.QuestionTypeId,
sItem.QuestionTypeKey,
sItem.DifficultyType,
sItem.Score,
Answer =tempModel.StundetAnswer,
tempModel.StundetAnswer,
questionModel.QuestionTypeId,
questionModel.QuestionTypeKey,
questionModel.DifficultyType,
questionModel.Score,
Answer =sItem.StundetAnswer,
sItem.StundetAnswer,
AnswerParse = "",
StundetScore = 0,
};
......@@ -1384,6 +1385,7 @@ namespace Edu.Module.Exam
StundetScore = 0,
IsMarking = 0,
StudentContent = item.QuestionContent,
StuPaperGroupId=item.StuPaperGroupId,
};
if (model.Id > 0)
{
......
......@@ -15,7 +15,7 @@ namespace Edu.Module.Question
/// 字母选项数组
/// </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" };
/// <summary>
/// 问题解析
/// </summary>
......@@ -23,19 +23,20 @@ namespace Edu.Module.Question
/// <param name="data">选项内容</param>
/// <param name="isNoAnswer">是否去掉答案</param>
/// <param name="isOptionRandom">是否选项随机(1-随机选项)</param>
/// <param name="isEdit">是否选项随机(编辑状态)</param>
/// <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();
switch (key)
{
//单选题
case "single":
obj = GetChooseOptionList(data, isOptionRandom, isNoAnswer);
obj = GetChooseOptionList(data, isOptionRandom, isNoAnswer, isEdit: isEdit);
break;
//多选题
case "multiple":
obj= GetChooseOptionList(data, isOptionRandom, isNoAnswer);
obj= GetChooseOptionList(data, isOptionRandom, isNoAnswer, isEdit: isEdit);
break;
//填空题
case "fill-in":
......@@ -171,7 +172,7 @@ namespace Edu.Module.Question
break;
//单选题(数字)
case "single-number":
obj = GetChooseOptionList(data, isOptionRandom, isNoAnswer,isSingleNum:true);
obj = GetChooseOptionList(data, isOptionRandom, isNoAnswer,isSingleNum:true,isEdit:isEdit);
break;
}
return obj;
......@@ -184,15 +185,18 @@ namespace Edu.Module.Question
/// <param name="isOptionRandom"></param>
/// <param name="isNoAnswer"></param>
/// <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 singleList = Common.Plugin.JsonHelper.DeserializeObject<List<optionItem>>(data);
var newList = new List<optionItem>();
singleList.ForEach(item =>
if (!isEdit)
{
item.ShowName = item.Name;
});
singleList.ForEach(item =>
{
item.ShowName = item.Name;
});
}
//选项随机
if (isOptionRandom == 1)
{
......
......@@ -608,6 +608,7 @@ namespace Edu.WebApi.Controllers.Applet
StundetDetailsId = sObj.GetInt("StundetDetailsId"),
LevelType = (LevelTypeEnum)sObj.GetInt("LevelType"),
Answer=sObj.GetStringValue("Answer"),
StuPaperGroupId= jobj.GetInt("GId"),
};
paperDetailsList.Add(detailModel);
}
......
......@@ -100,7 +100,7 @@ namespace Edu.WebApi.Timers
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.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