Commit 99f9ec08 authored by 黄奎's avatar 黄奎

页面修改

parent b5e9eae8
...@@ -40,11 +40,11 @@ namespace Edu.Model.ViewModel.Exam ...@@ -40,11 +40,11 @@ namespace Edu.Model.ViewModel.Exam
/// <summary> /// <summary>
/// 考试开始时间 /// 考试开始时间
/// </summary> /// </summary>
public DateTime ExamStartTime { get; set; } public DateTime PaperStartTime { get; set; }
/// <summary> /// <summary>
/// 考试结束时间 /// 考试结束时间
/// </summary> /// </summary>
public DateTime EndTime { get; set; } public DateTime PaperEndTime { get; set; }
} }
} }
\ No newline at end of file
...@@ -33,6 +33,7 @@ namespace Edu.Module.Exam ...@@ -33,6 +33,7 @@ namespace Edu.Module.Exam
CourseId = CourseId, CourseId = CourseId,
QChapterIds = ChapterId + "," + NextChapterId QChapterIds = ChapterId + "," + NextChapterId
}); });
List<object> GroupList = new List<object>();
var reviewList = list?.Where(qitem => qitem.ChapterId == ChapterId)?.OrderBy(qitem => Guid.NewGuid())?.ToList(); var reviewList = list?.Where(qitem => qitem.ChapterId == ChapterId)?.OrderBy(qitem => Guid.NewGuid())?.ToList();
var prepList = list?.Where(qitem => qitem.ChapterId == NextChapterId)?.OrderBy(qitem => Guid.NewGuid())?.ToList(); var prepList = list?.Where(qitem => qitem.ChapterId == NextChapterId)?.OrderBy(qitem => Guid.NewGuid())?.ToList();
if (reviewList != null && reviewList.Count > 0) if (reviewList != null && reviewList.Count > 0)
...@@ -41,10 +42,25 @@ namespace Edu.Module.Exam ...@@ -41,10 +42,25 @@ namespace Edu.Module.Exam
{ {
//选择题 //选择题
if (i % 2 == 0) if (i % 2 == 0)
{ {
}
GroupList.Add(new
{
GroupName = "单选题",
QuestionTypeId = 1,
QuestionTypeKey = "single",
});
}
//填空题
else
{
GroupList.Add(new
{
GroupName = "填空题",
QuestionTypeId = 3,
QuestionTypeKey = "fill-in",
});
}
} }
} }
......
...@@ -1634,17 +1634,30 @@ namespace Edu.Module.Exam ...@@ -1634,17 +1634,30 @@ namespace Edu.Module.Exam
/// <returns></returns> /// <returns></returns>
public virtual bool SetStuExamStartTimeModule(int PublishId, int GuestId, int PaperId) public virtual bool SetStuExamStartTimeModule(int PublishId, int GuestId, int PaperId)
{ {
Dictionary<string, object> fileds = new Dictionary<string, object>() bool flag = false;
var model = examination_StudentRepository.GetExaminationStudentListRepository(new RB_Examination_Student_ViewModel()
{ {
{nameof(RB_Examination_Student_ViewModel.ExamStartTime), DateTime.Now}, PaperId = PaperId,
}; PublishId = PublishId,
List<WhereHelper> wheres = new List<WhereHelper>() GuestId = GuestId
})?.FirstOrDefault();
if (model != null)
{ {
new WhereHelper(nameof(RB_Examination_Student_ViewModel.PaperId),PaperId), if (model.ExamStartTime == null)
new WhereHelper(nameof(RB_Examination_Student_ViewModel.PublishId),PublishId), {
new WhereHelper(nameof(RB_Examination_Student_ViewModel.GuestId),GuestId), Dictionary<string, object> fileds = new Dictionary<string, object>()
}; {
bool flag = examination_StudentRepository.Update(fileds, wheres); {nameof(RB_Examination_Student_ViewModel.ExamStartTime), DateTime.Now},
};
List<WhereHelper> wheres = new List<WhereHelper>()
{
new WhereHelper(nameof(RB_Examination_Student_ViewModel.PaperId),PaperId),
new WhereHelper(nameof(RB_Examination_Student_ViewModel.PublishId),PublishId),
new WhereHelper(nameof(RB_Examination_Student_ViewModel.GuestId),GuestId),
};
flag = examination_StudentRepository.Update(fileds, wheres);
}
}
return flag; return flag;
} }
......
...@@ -24,7 +24,7 @@ namespace Edu.Repository.Exam ...@@ -24,7 +24,7 @@ namespace Edu.Repository.Exam
{ {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" builder.AppendFormat(@"
SELECT A.*,IFNULL(B.GuestName,'') AS GuestName,c.ClassName,b.Mobile,s.StuIcon,p.ExamStartTime ,p.ExamEndTime AS EndTime SELECT A.*,IFNULL(B.GuestName,'') AS GuestName,c.ClassName,b.Mobile,s.StuIcon,p.ExamStartTime AS PaperStartTime,p.ExamEndTime AS PaperEndTime
FROM RB_Examination_Student AS A LEFT JOIN rb_order_guest AS B ON A.GuestId=B.Id FROM RB_Examination_Student AS A LEFT JOIN rb_order_guest AS B ON A.GuestId=B.Id
LEFT JOIN rb_class as c on c.ClassId=a.ClassId LEFT JOIN rb_class as c on c.ClassId=a.ClassId
LEFT JOIN rb_student_orderguest as sog on sog.GuestId=a.GuestId LEFT JOIN rb_student_orderguest as sog on sog.GuestId=a.GuestId
......
...@@ -110,7 +110,7 @@ namespace Edu.WebApi.Controllers.Applet ...@@ -110,7 +110,7 @@ namespace Edu.WebApi.Controllers.Applet
classModel = new Model.ViewModel.Grade.RB_Class_Time_Extend(); classModel = new Model.ViewModel.Grade.RB_Class_Time_Extend();
} }
#region 我的试卷 #region 我的试卷
List<Model.ViewModel.Exam.RB_Examination_Publish_ViewModel> examinationPublishList = new List<Model.ViewModel.Exam.RB_Examination_Publish_ViewModel>(); List<RB_Examination_Publish_ViewModel> examinationPublishList = new List<RB_Examination_Publish_ViewModel>();
if (studentModel != null && studentModel.GuestId > 0) if (studentModel != null && studentModel.GuestId > 0)
{ {
examinationPublishList = paperModule.GetGuestExaminationPublishPage(1, 5, out long rowsCount, examinationPublishList = paperModule.GetGuestExaminationPublishPage(1, 5, out long rowsCount,
......
...@@ -854,18 +854,18 @@ namespace Edu.WebApi.Controllers.Exam ...@@ -854,18 +854,18 @@ namespace Edu.WebApi.Controllers.Exam
var list = paperModule.GetExaminationStudentPageRepository(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query); var list = paperModule.GetExaminationStudentPageRepository(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
foreach (var item in list) foreach (var item in list)
{ {
if (item.ExamStartTime > System.DateTime.Now) if (item.PaperStartTime > System.DateTime.Now)
{ {
item.ExamStatus = ExamTestStatusEnum.NotStarted; item.ExamStatus = ExamTestStatusEnum.NotStarted;
} }
else if (item.ExamStartTime < System.DateTime.Now && item.EndTime > System.DateTime.Now) else if (item.PaperStartTime < System.DateTime.Now && item.PaperEndTime > System.DateTime.Now)
{ {
if (item.ExamStatus != ExamTestStatusEnum.FinishTest && item.ExamStatus != ExamTestStatusEnum.FinishScoring) if (item.ExamStatus != ExamTestStatusEnum.FinishTest && item.ExamStatus != ExamTestStatusEnum.FinishScoring)
{ {
item.ExamStatus = ExamTestStatusEnum.FinishStarted; item.ExamStatus = ExamTestStatusEnum.FinishStarted;
} }
} }
else if (item.EndTime < System.DateTime.Now) else if (item.PaperEndTime < System.DateTime.Now)
{ {
if (item.ExamStatus != ExamTestStatusEnum.FinishTest && item.ExamStatus != ExamTestStatusEnum.FinishScoring) if (item.ExamStatus != ExamTestStatusEnum.FinishTest && item.ExamStatus != ExamTestStatusEnum.FinishScoring)
{ {
...@@ -888,8 +888,10 @@ namespace Edu.WebApi.Controllers.Exam ...@@ -888,8 +888,10 @@ namespace Edu.WebApi.Controllers.Exam
CreateByName = UserReidsCache.GetUserLoginInfo(item.CreateBy)?.AccountName ?? "", CreateByName = UserReidsCache.GetUserLoginInfo(item.CreateBy)?.AccountName ?? "",
item.ExamStatus, item.ExamStatus,
ExamStatusName = item.ExamStatus.ToName(), ExamStatusName = item.ExamStatus.ToName(),
ExamStartTime = Common.ConvertHelper.FormatTime(item.ExamStartTime), ExamStartTime= Common.ConvertHelper.FormatTime(item.ExamStartTime),
EndTime = Common.ConvertHelper.FormatTime(item.EndTime), ExamEndTime = Common.ConvertHelper.FormatTime(item.ExamEndTime),
PaperStartTime = Common.ConvertHelper.FormatTime(item.PaperStartTime),
PaperEndTime = Common.ConvertHelper.FormatTime(item.PaperEndTime),
}; };
result.Add(obj); result.Add(obj);
} }
......
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