fixed minor in quiz data update for empty descriptions

This commit is contained in:
anhefti 2023-01-09 10:31:59 +01:00
parent b5cb387061
commit 0fb7581acc
2 changed files with 3 additions and 1 deletions

View file

@ -761,6 +761,8 @@ public class ExamDAOImpl implements ExamDAO {
final Map<String, String> additionalAttributes = new HashMap<>(quizData.getAdditionalAttributes());
if (StringUtils.isNotBlank(quizData.description)) {
additionalAttributes.put(QuizData.QUIZ_ATTR_DESCRIPTION, quizData.description);
} else {
additionalAttributes.put(QuizData.QUIZ_ATTR_DESCRIPTION, StringUtils.EMPTY);
}
if (StringUtils.isNotBlank(quizData.startURL)) {
additionalAttributes.put(QuizData.QUIZ_ATTR_START_URL, quizData.startURL);

View file

@ -393,7 +393,7 @@ class ExamUpdateHandler {
if (attempts >= this.recoverAttempts) {
if (log.isDebugEnabled()) {
log.debug("Skip recovering quiz due to too many attempts: {}", exam.getModelId());
log.debug("Skip recovering quiz due to too many attempts for exam: {}", exam.getModelId());
throw new RuntimeException("Recover attempts reached");
}
}