Commit 10f5e92b authored by 吴春's avatar 吴春

提交代码

parent 327924bc
...@@ -57,14 +57,14 @@ namespace Edu.Model.Entity.Exam ...@@ -57,14 +57,14 @@ namespace Edu.Model.Entity.Exam
/// <summary> /// <summary>
/// 问题答案【JSON字符串】 /// 问题答案【JSON字符串】
/// </summary> /// </summary>
public string Answer { get; set; } public string StundetAnswer { get; set; }
/// <summary> /// <summary>
/// 题目得分 /// 题目得分
/// </summary> /// </summary>
public decimal Score { get; set; } public decimal StundetScore { get; set; }
/// <summary> /// <summary>
/// 是否阅卷0-否,1-是 /// 是否阅卷0-否,1-是
......
...@@ -38,5 +38,10 @@ namespace Edu.Model.ViewModel.Exam ...@@ -38,5 +38,10 @@ namespace Edu.Model.ViewModel.Exam
/// 创建人 /// 创建人
/// </summary> /// </summary>
public string CreateByName { get; set; } public string CreateByName { get; set; }
/// <summary>
/// 学生id
/// </summary>
public int GuestId { get; set; }
} }
} }
...@@ -49,5 +49,6 @@ namespace Edu.Model.ViewModel.Exam ...@@ -49,5 +49,6 @@ namespace Edu.Model.ViewModel.Exam
/// 考试状态 /// 考试状态
/// </summary> /// </summary>
public string ExamStatusStr { get; set; } public string ExamStatusStr { get; set; }
} }
} }
...@@ -415,7 +415,7 @@ namespace Edu.Module.Exam ...@@ -415,7 +415,7 @@ namespace Edu.Module.Exam
Group_Id = model.Group_Id, Group_Id = model.Group_Id,
}; };
var obj = GetExaminationConfigureModel(configureModel); var obj = GetExaminationConfigureModel(configureModel);
if (paperModel.CreateNum > 0) if (paperModel.CreateNum > 0)
{ {
...@@ -450,7 +450,7 @@ namespace Edu.Module.Exam ...@@ -450,7 +450,7 @@ namespace Edu.Module.Exam
var newSubPaperId = examination_PaperRepository.Insert(subModel); var newSubPaperId = examination_PaperRepository.Insert(subModel);
subModel.PaperId = newSubPaperId; subModel.PaperId = newSubPaperId;
flag = newSubPaperId > 0; flag = newSubPaperId > 0;
if (flag && obj.IsOpenZuJuan == 1 ) if (flag && obj.IsOpenZuJuan == 1)
{ {
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
...@@ -634,7 +634,7 @@ namespace Edu.Module.Exam ...@@ -634,7 +634,7 @@ namespace Edu.Module.Exam
/// <param name="PaperId"></param> /// <param name="PaperId"></param>
/// <param name="isShowAnswer">是否查询答案</param> /// <param name="isShowAnswer">是否查询答案</param>
/// <returns></returns> /// <returns></returns>
public RB_Examination_Paper_ViewModel GetExaminationPaperModule(object PaperId,bool isShowAnswer=true) public RB_Examination_Paper_ViewModel GetExaminationPaperModule(object PaperId, bool isShowAnswer = true, int GuestId = 0, int PublishId = 0)
{ {
// 定义正则表达式用来匹配 img 标签 // 定义正则表达式用来匹配 img 标签
string str = @"<img\b[^<>]*?\bsrc[\s\t\r\n]*=[\s\t\r\n]*[""']?[\s\t\r\n]*(?<imgUrl>[^\s\t\r\n""'<>]*)[^<>]*?/?[\s\t\r\n]*>"; string str = @"<img\b[^<>]*?\bsrc[\s\t\r\n]*=[\s\t\r\n]*[""']?[\s\t\r\n]*(?<imgUrl>[^\s\t\r\n""'<>]*)[^<>]*?/?[\s\t\r\n]*>";
......
...@@ -10,7 +10,7 @@ namespace Edu.Repository.Exam ...@@ -10,7 +10,7 @@ namespace Edu.Repository.Exam
/// <summary> /// <summary>
/// 学生答题详情仓储类 /// 学生答题详情仓储类
/// </summary> /// </summary>
public class RB_Examination_StudentDetailsDetailsRepository : BaseRepository<RB_Examination_StudentDetails> public class RB_Examination_StudentDetailsRepository : BaseRepository<RB_Examination_StudentDetails>
{ {
/// <summary> /// <summary>
......
...@@ -536,15 +536,16 @@ namespace Edu.WebApi.Controllers.Applet ...@@ -536,15 +536,16 @@ namespace Edu.WebApi.Controllers.Applet
item.ExamStatusStr = "已开始"; item.ExamStatusStr = "已开始";
} }
} }
pageModel.PageData = list.Select(x => new { pageModel.PageData = list.Select(x => new
x.PaperId, {
x.Id, x.PaperId,
x.PaperName, x.Id,
x.PaperName,
x.PublishPic, x.PublishPic,
ExamStartTime=Common.ConvertHelper.FormatTime(x.ExamStartTime), ExamStartTime = Common.ConvertHelper.FormatTime(x.ExamStartTime),
ExamEndTime = Common.ConvertHelper.FormatTime(x.ExamEndTime), ExamEndTime = Common.ConvertHelper.FormatTime(x.ExamEndTime),
x.ExamTimes, x.ExamTimes,
x.ExamStatus, x.ExamStatus,
x.ExamStatusStr x.ExamStatusStr
}); });
pageModel.Count = rowsCount; pageModel.Count = rowsCount;
...@@ -561,9 +562,10 @@ namespace Edu.WebApi.Controllers.Applet ...@@ -561,9 +562,10 @@ namespace Edu.WebApi.Controllers.Applet
{ {
var PaperId = base.ParmJObj.GetInt("PaperId"); var PaperId = base.ParmJObj.GetInt("PaperId");
var Id = base.ParmJObj.GetInt("Id"); var Id = base.ParmJObj.GetInt("Id");
var modelPublish = paperModule.GetExaminationPublishModule(Id); var GuestId = base.ParmJObj.GetInt("GuestId", 0);
var modelPaper = paperModule.GetExaminationPaperModule(PaperId, isShowAnswer: false); var modelPublish = paperModule.GetExaminationPublishModule(Id);
return ApiResult.Success(data: new{ Publish= modelPublish, Paper = modelPaper }); var modelPaper = paperModule.GetExaminationPaperModule(PaperId, isShowAnswer: false, GuestId: GuestId, PublishId: Id);
return ApiResult.Success(data: new { Publish = modelPublish, Paper = modelPaper });
} }
#endregion #endregion
} }
......
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