diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/model/exam/Exam.java b/src/main/java/ch/ethz/seb/sebserver/gbl/model/exam/Exam.java index 8361ce45..a5881ee4 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/model/exam/Exam.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/model/exam/Exam.java @@ -46,7 +46,6 @@ public final class Exam implements GrantEntity { ExamType.UNDEFINED, null, null, - null, ExamStatus.FINISHED, // Boolean.FALSE, null, @@ -104,9 +103,6 @@ public final class Exam implements GrantEntity { @NotNull public final ExamType type; - @JsonProperty(EXAM.ATTR_QUIT_PASSWORD) - public final String quitPassword; - @JsonProperty(EXAM.ATTR_OWNER) public final String owner; @@ -138,7 +134,6 @@ public final class Exam implements GrantEntity { @JsonProperty(QuizData.QUIZ_ATTR_END_TIME) final DateTime endTime, @JsonProperty(QuizData.QUIZ_ATTR_START_URL) final String startURL, @JsonProperty(EXAM.ATTR_TYPE) final ExamType type, - @JsonProperty(EXAM.ATTR_QUIT_PASSWORD) final String quitPassword, @JsonProperty(EXAM.ATTR_OWNER) final String owner, @JsonProperty(EXAM.ATTR_SUPPORTER) final Collection supporter, @JsonProperty(EXAM.ATTR_STATUS) final ExamStatus status, @@ -156,7 +151,6 @@ public final class Exam implements GrantEntity { this.endTime = endTime; this.startURL = startURL; this.type = type; - this.quitPassword = quitPassword; this.owner = owner; this.status = (status != null) ? status : getStatusFromDate(startTime, endTime); this.browserExamKeys = browserExamKeys; @@ -180,7 +174,6 @@ public final class Exam implements GrantEntity { this.endTime = quizData.endTime; this.startURL = quizData.startURL; this.type = mapper.getEnum(EXAM.ATTR_TYPE, ExamType.class, ExamType.UNDEFINED); - this.quitPassword = mapper.getString(EXAM.ATTR_QUIT_PASSWORD); this.owner = mapper.getString(EXAM.ATTR_OWNER); this.status = mapper.getEnum( EXAM.ATTR_STATUS, @@ -208,7 +201,6 @@ public final class Exam implements GrantEntity { this.endTime = null; this.startURL = null; this.type = null; - this.quitPassword = null; this.owner = null; this.status = (status != null) ? status : getStatusFromDate(this.startTime, this.endTime); this.browserExamKeys = null; @@ -300,10 +292,6 @@ public final class Exam implements GrantEntity { return this.startURL; } - public String getQuitPassword() { - return this.quitPassword; - } - public ExamStatus getStatus() { return this.status; } @@ -339,8 +327,6 @@ public final class Exam implements GrantEntity { builder.append(this.startURL); builder.append(", type="); builder.append(this.type); - builder.append(", quitPassword="); - builder.append(this.quitPassword); builder.append(", owner="); builder.append(this.owner); builder.append(", supporter="); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamDAOImpl.java index 40275d18..3194a66d 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamDAOImpl.java @@ -224,7 +224,7 @@ public class ExamDAOImpl implements ExamDAO { (exam.type != null) ? exam.type.name() : null, - exam.quitPassword, + null, exam.browserExamKeys, (exam.status != null) ? exam.status.name() @@ -769,11 +769,9 @@ public class ExamDAOImpl implements ExamDAO { (quizData != null) ? quizData.endTime : null, (quizData != null) ? quizData.startURL : Constants.EMPTY_NOTE, ExamType.valueOf(record.getType()), - record.getQuitPassword(), record.getOwner(), supporter, status, -// BooleanUtils.toBooleanObject((quizData != null) ? record.getLmsSebRestriction() : null), record.getBrowserKeys(), BooleanUtils.toBooleanObject((quizData != null) ? record.getActive() : null), record.getLastupdate()); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/SebRestrictionServiceImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/SebRestrictionServiceImpl.java index 3823c9a4..d312092c 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/SebRestrictionServiceImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/SebRestrictionServiceImpl.java @@ -131,7 +131,7 @@ public class SebRestrictionServiceImpl implements SebRestrictionService { final Collection browserExamKeys = sebRestriction.getBrowserExamKeys(); final Exam newExam = new Exam( exam.id, - null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, exam.supporter, exam.status, (browserExamKeys != null && !browserExamKeys.isEmpty()) diff --git a/src/test/java/ch/ethz/seb/sebserver/gui/integration/UseCasesIntegrationTest.java b/src/test/java/ch/ethz/seb/sebserver/gui/integration/UseCasesIntegrationTest.java index 6bbbd703..da4bcfbe 100644 --- a/src/test/java/ch/ethz/seb/sebserver/gui/integration/UseCasesIntegrationTest.java +++ b/src/test/java/ch/ethz/seb/sebserver/gui/integration/UseCasesIntegrationTest.java @@ -806,7 +806,7 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest { newExam.endTime, newExam.startURL, ExamType.MANAGED, - null, null, + null, Utils.immutableCollectionOf(userId), ExamStatus.RUNNING, null, diff --git a/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/ExamAPITest.java b/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/ExamAPITest.java index bbad5db8..0c84221c 100644 --- a/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/ExamAPITest.java +++ b/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/ExamAPITest.java @@ -61,7 +61,6 @@ public class ExamAPITest extends AdministrationAPIIntegrationTester { exam.endTime, exam.startURL, exam.type, - exam.quitPassword, exam.owner, Arrays.asList("user5"), null, @@ -92,7 +91,6 @@ public class ExamAPITest extends AdministrationAPIIntegrationTester { exam.endTime, exam.startURL, exam.type, - exam.quitPassword, exam.owner, Arrays.asList("user2"), null,