minor fix with quit password change in Exam

This commit is contained in:
anhefti 2024-02-28 11:07:01 +01:00
parent 55501c36d4
commit fa5d3fed24

View file

@ -707,6 +707,9 @@ public class ExamAdministrationController extends EntityController<Exam, Exam> {
examSessionService.hasActiveSEBClientConnections(exam.id)) {
final Exam oldExam = this.examDAO.byPK(exam.id).getOrThrow();
final CharSequence pwd = cryptor.decrypt(oldExam.quitPassword).getOr(oldExam.quitPassword);
if (StringUtils.isBlank(pwd) && StringUtils.isBlank(exam.quitPassword)) {
return exam;
}
if (!Objects.equals(pwd, exam.quitPassword)) {
throw new APIMessageException(APIMessage.fieldValidationError(
new FieldError(