diff --git a/projects/editor/src/app/services/unit.service.ts b/projects/editor/src/app/services/unit.service.ts index 16c8e6bb51b5b55028c47233f92469d3ba0c3aca..8efbad2f27ca3dff82eec4da51af811c9235429b 100644 --- a/projects/editor/src/app/services/unit.service.ts +++ b/projects/editor/src/app/services/unit.service.ts @@ -51,8 +51,15 @@ export class UnitService { UnitService.readIDs(this.unit); } - private static readIDs(unit: Unit): void { // TODO likert and cloze children + private static readIDs(unit: Unit): void { UnitUtils.findUIElements(unit).forEach(element => { + if (element.type === 'likert') { + (element as LikertElement).rows.forEach(row => IdService.getInstance().addID(row.id)); + } + if (element.type === 'cloze') { + ClozeUtils.getClozeChildElements((element as ClozeElement).document) + .forEach(child => IdService.getInstance().addID(child.id)); + } IdService.getInstance().addID(element.id); }); }