removed quit password from exam. Not used yet

This commit is contained in:
anhefti 2020-05-05 08:54:57 +02:00
parent 7f50993420
commit 4c40af3584
5 changed files with 3 additions and 21 deletions

View file

@ -46,7 +46,6 @@ public final class Exam implements GrantEntity {
ExamType.UNDEFINED, ExamType.UNDEFINED,
null, null,
null, null,
null,
ExamStatus.FINISHED, ExamStatus.FINISHED,
// Boolean.FALSE, // Boolean.FALSE,
null, null,
@ -104,9 +103,6 @@ public final class Exam implements GrantEntity {
@NotNull @NotNull
public final ExamType type; public final ExamType type;
@JsonProperty(EXAM.ATTR_QUIT_PASSWORD)
public final String quitPassword;
@JsonProperty(EXAM.ATTR_OWNER) @JsonProperty(EXAM.ATTR_OWNER)
public final String 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_END_TIME) final DateTime endTime,
@JsonProperty(QuizData.QUIZ_ATTR_START_URL) final String startURL, @JsonProperty(QuizData.QUIZ_ATTR_START_URL) final String startURL,
@JsonProperty(EXAM.ATTR_TYPE) final ExamType type, @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_OWNER) final String owner,
@JsonProperty(EXAM.ATTR_SUPPORTER) final Collection<String> supporter, @JsonProperty(EXAM.ATTR_SUPPORTER) final Collection<String> supporter,
@JsonProperty(EXAM.ATTR_STATUS) final ExamStatus status, @JsonProperty(EXAM.ATTR_STATUS) final ExamStatus status,
@ -156,7 +151,6 @@ public final class Exam implements GrantEntity {
this.endTime = endTime; this.endTime = endTime;
this.startURL = startURL; this.startURL = startURL;
this.type = type; this.type = type;
this.quitPassword = quitPassword;
this.owner = owner; this.owner = owner;
this.status = (status != null) ? status : getStatusFromDate(startTime, endTime); this.status = (status != null) ? status : getStatusFromDate(startTime, endTime);
this.browserExamKeys = browserExamKeys; this.browserExamKeys = browserExamKeys;
@ -180,7 +174,6 @@ public final class Exam implements GrantEntity {
this.endTime = quizData.endTime; this.endTime = quizData.endTime;
this.startURL = quizData.startURL; this.startURL = quizData.startURL;
this.type = mapper.getEnum(EXAM.ATTR_TYPE, ExamType.class, ExamType.UNDEFINED); 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.owner = mapper.getString(EXAM.ATTR_OWNER);
this.status = mapper.getEnum( this.status = mapper.getEnum(
EXAM.ATTR_STATUS, EXAM.ATTR_STATUS,
@ -208,7 +201,6 @@ public final class Exam implements GrantEntity {
this.endTime = null; this.endTime = null;
this.startURL = null; this.startURL = null;
this.type = null; this.type = null;
this.quitPassword = null;
this.owner = null; this.owner = null;
this.status = (status != null) ? status : getStatusFromDate(this.startTime, this.endTime); this.status = (status != null) ? status : getStatusFromDate(this.startTime, this.endTime);
this.browserExamKeys = null; this.browserExamKeys = null;
@ -300,10 +292,6 @@ public final class Exam implements GrantEntity {
return this.startURL; return this.startURL;
} }
public String getQuitPassword() {
return this.quitPassword;
}
public ExamStatus getStatus() { public ExamStatus getStatus() {
return this.status; return this.status;
} }
@ -339,8 +327,6 @@ public final class Exam implements GrantEntity {
builder.append(this.startURL); builder.append(this.startURL);
builder.append(", type="); builder.append(", type=");
builder.append(this.type); builder.append(this.type);
builder.append(", quitPassword=");
builder.append(this.quitPassword);
builder.append(", owner="); builder.append(", owner=");
builder.append(this.owner); builder.append(this.owner);
builder.append(", supporter="); builder.append(", supporter=");

View file

@ -224,7 +224,7 @@ public class ExamDAOImpl implements ExamDAO {
(exam.type != null) (exam.type != null)
? exam.type.name() ? exam.type.name()
: null, : null,
exam.quitPassword, null,
exam.browserExamKeys, exam.browserExamKeys,
(exam.status != null) (exam.status != null)
? exam.status.name() ? exam.status.name()
@ -769,11 +769,9 @@ public class ExamDAOImpl implements ExamDAO {
(quizData != null) ? quizData.endTime : null, (quizData != null) ? quizData.endTime : null,
(quizData != null) ? quizData.startURL : Constants.EMPTY_NOTE, (quizData != null) ? quizData.startURL : Constants.EMPTY_NOTE,
ExamType.valueOf(record.getType()), ExamType.valueOf(record.getType()),
record.getQuitPassword(),
record.getOwner(), record.getOwner(),
supporter, supporter,
status, status,
// BooleanUtils.toBooleanObject((quizData != null) ? record.getLmsSebRestriction() : null),
record.getBrowserKeys(), record.getBrowserKeys(),
BooleanUtils.toBooleanObject((quizData != null) ? record.getActive() : null), BooleanUtils.toBooleanObject((quizData != null) ? record.getActive() : null),
record.getLastupdate()); record.getLastupdate());

View file

@ -131,7 +131,7 @@ public class SebRestrictionServiceImpl implements SebRestrictionService {
final Collection<String> browserExamKeys = sebRestriction.getBrowserExamKeys(); final Collection<String> browserExamKeys = sebRestriction.getBrowserExamKeys();
final Exam newExam = new Exam( final Exam newExam = new Exam(
exam.id, 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.supporter,
exam.status, exam.status,
(browserExamKeys != null && !browserExamKeys.isEmpty()) (browserExamKeys != null && !browserExamKeys.isEmpty())

View file

@ -806,7 +806,7 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
newExam.endTime, newExam.endTime,
newExam.startURL, newExam.startURL,
ExamType.MANAGED, ExamType.MANAGED,
null, null, null,
Utils.immutableCollectionOf(userId), Utils.immutableCollectionOf(userId),
ExamStatus.RUNNING, ExamStatus.RUNNING,
null, null,

View file

@ -61,7 +61,6 @@ public class ExamAPITest extends AdministrationAPIIntegrationTester {
exam.endTime, exam.endTime,
exam.startURL, exam.startURL,
exam.type, exam.type,
exam.quitPassword,
exam.owner, exam.owner,
Arrays.asList("user5"), Arrays.asList("user5"),
null, null,
@ -92,7 +91,6 @@ public class ExamAPITest extends AdministrationAPIIntegrationTester {
exam.endTime, exam.endTime,
exam.startURL, exam.startURL,
exam.type, exam.type,
exam.quitPassword,
exam.owner, exam.owner,
Arrays.asList("user2"), Arrays.asList("user2"),
null, null,