Skip to content

Commit

Permalink
fix: survey clone error
Browse files Browse the repository at this point in the history
  • Loading branch information
astappiev committed Nov 7, 2023
1 parent e767434 commit 338007d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/de/l3s/learnweb/resource/survey/SurveyPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public SurveyPage(SurveyPage other) {
setOrder(other.order);

for (SurveyQuestion question : other.getQuestions()) {
questions.add(new SurveyQuestion(question));
getQuestions().add(new SurveyQuestion(question));
}
}

Expand Down Expand Up @@ -125,10 +125,10 @@ public void setOrder(int order) {
public List<SurveyQuestion> getQuestions() {
if (null == questions) {
if (getId() == 0) {
return new ArrayList<>();
questions = new ArrayList<>();
} else {
questions = Learnweb.dao().getSurveyDao().findQuestionsAndOptionsByResourceId(getResourceId(), getId());
}

questions = Learnweb.dao().getSurveyDao().findQuestionsAndOptionsByResourceId(getResourceId(), getId());
}
return questions;
}
Expand Down

0 comments on commit 338007d

Please sign in to comment.