Skip to content

Commit

Permalink
SAK-49337 Add format field to lesson endpoint for BREAK type (sakaipr…
Browse files Browse the repository at this point in the history
  • Loading branch information
stetsche committed Oct 6, 2023
1 parent 93e7ed4 commit 0c1868a
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 0c1868a

Please sign in to comment.