Skip to content
Snippets Groups Projects
Commit 85d4ac24 authored by Lukas Maximilian Kimpel's avatar Lukas Maximilian Kimpel
Browse files

Merge branch '109-content-types-classes' into 'master'

Resolve "content types (classes)"

Closes #109

See merge request swtp-block-ws17/arsnova-angular-frontend!83
parents 6797340f f1c40240
1 merge request!83Resolve "content types (classes)"
Pipeline #13445 passed with stage
in 33 seconds
export class AnswerOption { export class AnswerOption {
constructor(label: string, points: string) {
this.label = label;
this.points = points;
}
label: string; label: string;
points: string; points: string;
} }
import { AnswerOption } from './answer-option'; import { AnswerOption } from './answer-option';
import { Content, Format } from './content';
export class ChoiceContent { export class ChoiceContent extends Content {
constructor(roomId: string, subject: string, body: string, options: AnswerOption[], correctOptionIndexes: number[], multiple: boolean) {
super();
this.revision = '1';
this.roomId = roomId;
this.subject = subject;
this.body = body;
this.round = 1;
this.format = Format.CHOICE;
this.options = options;
this.correctOptionIndexes = correctOptionIndexes;
this.multiple = multiple;
}
options: AnswerOption[]; options: AnswerOption[];
correctOtionIndexes: number[]; correctOptionIndexes: number[];
multiple: boolean; multiple: boolean;
} }
import { Content, Format } from './content';
export class TextContent extends Content {
constructor(roomId: string, subject: string, body: string) {
super();
this.revision = '1';
this.roomId = roomId;
this.subject = subject;
this.body = body;
this.round = 1;
this.format = Format.TEXT;
this.formatAttributes.clear(); // API: formatAttributes = Map.empty();
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment