Commit bd3aa620 authored by 黄奎's avatar 黄奎

页面修改

parent 8549bc41
......@@ -46,8 +46,13 @@ namespace Edu.Model.Entity.Exam
public string QuestionTypeKey { get; set; }
/// <summary>
/// 题目分数
/// 是否回答正确(1-是)
/// </summary>
public decimal Score { get; set; }
public int IsRight { get; set; }
/// <summary>
/// 学生答案
/// </summary>
public string Answer { get; set; }
}
}
......@@ -155,6 +155,7 @@ namespace Edu.Module.Exam
item.WordWrite,
item.ChineseMean,
item.FileUrl,
IsTrue=0,
};
return fillinObj;
}
......@@ -282,6 +283,7 @@ namespace Edu.Module.Exam
item.WordWrite,
item.ChineseMean,
item.FileUrl,
IsTrue = 0,
};
return singleObj;
}
......@@ -511,14 +513,19 @@ namespace Edu.Module.Exam
public bool SubmitStuWordsExamModule(RB_StuWords_Exam_Extend model)
{
bool flag = false;
int rightCount = model?.ExamDetailList?.Where(qitem => qitem.IsRight == 1)?.Count() ?? 0;
int totalCount = model?.ExamDetailList?.Count ?? 0;
model.Score = GetScoreModule(rightCount, totalCount);
var newId = stuWords_ExamRepository.Insert(model);
model.Id = newId;
flag = newId > 0;
if (flag && model.ExamDetailList != null && model.ExamDetailList.Count > 0)
{
foreach (var item in model.ExamDetailList)
{
{
item.DetailId = 0;
item.ExamId = newId;
stuWords_ExamDetailRepository.Insert(item);
}
}
return flag;
......
......@@ -146,7 +146,8 @@ namespace Edu.WebApi.Controllers.Applet
QuestionContent = jobj.GetStringValue("QuestionContent"),
QuestionTypeId = jobj.GetInt("QuestionTypeId"),
QuestionTypeKey=jobj.GetStringValue("QuestionTypeKey"),
Score=jobj.GetDecimal("Score"),
IsRight = jobj.GetInt("IsTrue"),
Answer=jobj.GetStringValue("Answer"),
});
}
}
......
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