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

提交代码

parent 327924bc
......@@ -57,14 +57,14 @@ namespace Edu.Model.Entity.Exam
/// <summary>
/// 问题答案【JSON字符串】
/// </summary>
public string Answer { get; set; }
public string StundetAnswer { get; set; }
/// <summary>
/// 题目得分
/// </summary>
public decimal Score { get; set; }
public decimal StundetScore { get; set; }
/// <summary>
/// 是否阅卷0-否,1-是
......
......@@ -38,5 +38,10 @@ namespace Edu.Model.ViewModel.Exam
/// 创建人
/// </summary>
public string CreateByName { get; set; }
/// <summary>
/// 学生id
/// </summary>
public int GuestId { get; set; }
}
}
......@@ -49,5 +49,6 @@ namespace Edu.Model.ViewModel.Exam
/// 考试状态
/// </summary>
public string ExamStatusStr { get; set; }
}
}
......@@ -450,7 +450,7 @@ namespace Edu.Module.Exam
var newSubPaperId = examination_PaperRepository.Insert(subModel);
subModel.PaperId = newSubPaperId;
flag = newSubPaperId > 0;
if (flag && obj.IsOpenZuJuan == 1 )
if (flag && obj.IsOpenZuJuan == 1)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
......@@ -634,7 +634,7 @@ namespace Edu.Module.Exam
/// <param name="PaperId"></param>
/// <param name="isShowAnswer">是否查询答案</param>
/// <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 标签
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
/// <summary>
/// 学生答题详情仓储类
/// </summary>
public class RB_Examination_StudentDetailsDetailsRepository : BaseRepository<RB_Examination_StudentDetails>
public class RB_Examination_StudentDetailsRepository : BaseRepository<RB_Examination_StudentDetails>
{
/// <summary>
......
......@@ -536,12 +536,13 @@ namespace Edu.WebApi.Controllers.Applet
item.ExamStatusStr = "已开始";
}
}
pageModel.PageData = list.Select(x => new {
pageModel.PageData = list.Select(x => new
{
x.PaperId,
x.Id,
x.PaperName,
x.PublishPic,
ExamStartTime=Common.ConvertHelper.FormatTime(x.ExamStartTime),
ExamStartTime = Common.ConvertHelper.FormatTime(x.ExamStartTime),
ExamEndTime = Common.ConvertHelper.FormatTime(x.ExamEndTime),
x.ExamTimes,
x.ExamStatus,
......@@ -561,9 +562,10 @@ namespace Edu.WebApi.Controllers.Applet
{
var PaperId = base.ParmJObj.GetInt("PaperId");
var Id = base.ParmJObj.GetInt("Id");
var GuestId = base.ParmJObj.GetInt("GuestId", 0);
var modelPublish = paperModule.GetExaminationPublishModule(Id);
var modelPaper = paperModule.GetExaminationPaperModule(PaperId, isShowAnswer: false);
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
}
......
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