Skip to content

Commit

Permalink
SAK-49337 Add format field to lesson endpoint for BREAK type (#11968)
Browse files Browse the repository at this point in the history
  • Loading branch information
stetsche authored Oct 5, 2023
1 parent ec37158 commit 5ade5ef
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,23 @@ public DecoratedResourceFolder(SimplePageItem item) {
}
}
}

@Data
@EqualsAndHashCode(callSuper = false)
public class DecoratedBreak extends DecoratedLesson {


private String format;


public DecoratedBreak(SimplePageItem item) {
super(item);

if (item != null) {
format = item.getFormat();
}
}
}

// For properties related to grading a DecoratedLesson
@NoArgsConstructor
Expand Down Expand Up @@ -1007,6 +1024,9 @@ private LessonBase addItem(SimplePageItem item, List<LessonBase> list, boolean h
LessonBase lesson = null;
//check type
switch (item.getType()) {
case SimplePageItem.BREAK:
lesson = new DecoratedBreak(item);
break;
case SimplePageItem.QUESTION:
if ("multipleChoice".equals(item.getAttribute("questionType"))) {
lesson = new DecoratedMultipleChoiceQuestion(item,
Expand Down

0 comments on commit 5ade5ef

Please sign in to comment.