Exam shall be shown even if quiz data cannot be get from LMS
This commit is contained in:
parent
87be4f4696
commit
fb11423cce
1 changed files with 5 additions and 9 deletions
|
@ -796,10 +796,6 @@ public class ExamDAOImpl implements ExamDAO {
|
||||||
final ExamRecord record,
|
final ExamRecord record,
|
||||||
final QuizData quizData) {
|
final QuizData quizData) {
|
||||||
|
|
||||||
if (quizData == null) {
|
|
||||||
return Result.ofRuntimeError("No quizData found for exam: " + record);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Result.tryCatch(() -> {
|
return Result.tryCatch(() -> {
|
||||||
|
|
||||||
final Collection<String> supporter = (StringUtils.isNotBlank(record.getSupporter()))
|
final Collection<String> supporter = (StringUtils.isNotBlank(record.getSupporter()))
|
||||||
|
@ -819,11 +815,11 @@ public class ExamDAOImpl implements ExamDAO {
|
||||||
record.getInstitutionId(),
|
record.getInstitutionId(),
|
||||||
record.getLmsSetupId(),
|
record.getLmsSetupId(),
|
||||||
record.getExternalId(),
|
record.getExternalId(),
|
||||||
quizData.name,
|
(quizData != null) ? quizData.name : "[Failed to load quiz data]",
|
||||||
quizData.description,
|
(quizData != null) ? quizData.description : "[Failed to load quiz data]",
|
||||||
quizData.startTime,
|
(quizData != null) ? quizData.startTime : null,
|
||||||
quizData.endTime,
|
(quizData != null) ? quizData.endTime : null,
|
||||||
quizData.startURL,
|
(quizData != null) ? quizData.startURL : Constants.EMPTY_NOTE,
|
||||||
ExamType.valueOf(record.getType()),
|
ExamType.valueOf(record.getType()),
|
||||||
record.getOwner(),
|
record.getOwner(),
|
||||||
supporter,
|
supporter,
|
||||||
|
|
Loading…
Reference in a new issue