@@ -91,6 +91,9 @@ public class Exam {
private Integer isHidden;
+ //允许考试多少次
+ private Integer examCount;
+
// private List<Question>
public Exam(String examName, String position, List<String> skills, Date startTime, Date endTime, String comment, User user, Course course) {
@@ -37,4 +37,6 @@ public class CreateExamVO {
private Boolean isPublic;
private Integer courseId;
}
@@ -52,6 +52,8 @@ public class ExamServiceImpl implements ExamService {
examVO.getSkills(), examVO.getStartTime(),
examVO.getEndTime(), examVO.getComment(), user, course);
exam.setIsHidden(0);
+ //设置允许考试次数
+ exam.setExamCount(examVO.getExamCount());
// 只有非公开的考试才需要邀请码
if (!examVO.getIsPublic()) {
exam.setIsPublic(0);