Parameters
- from: ActorRef
- message:
| { QuizActorMessage: "Create" } & {
value: Omit<
{
allowedQuestionTypesSettings: Partial<
Record<"SINGLE" | "MULTIPLE" | "TEXT", boolean>,
>;
archived?: Timestamp;
comments: (string & BRAND<"UID">)[];
created: Timestamp;
createdBy?: string & BRAND<"UID">;
description: string;
groups: {
name: string;
questions: (string & BRAND<"UID">)[];
statistics?: {
answers: number[];
correctAnswers: number[];
groupName: string;
maximumParticipants: number;
questionIds: ((...) & (...))[];
quizId: string & BRAND<(...)>;
wrongAnswers: number[];
};
}[];
hideComments: boolean;
lastExport?: Timestamp;
previewers?: (string & BRAND<"UID">)[];
runOptions?: { runningEntity?: string & BRAND<"UID"> };
shuffleAnswers: boolean;
shuffleQuestions: boolean;
state: "EDITING" | "ACTIVE" | "STARTED" | "STOPPED";
statistics?: {
answers: number[];
correctAnswers: number[];
groupName: string;
maximumParticipants: number;
questionIds: (string & BRAND<"UID">)[];
quizId: string & BRAND<"UID">;
wrongAnswers: number[];
};
studentComments: boolean;
studentParticipationSettings: Partial<
Record<"NAME" | "NICKNAME" | "ANONYMOUS", boolean>,
>;
studentQuestions: boolean;
students: (string & BRAND<"UID">)[];
studentsCanSeeStatistics?: boolean;
teachers: (string & BRAND<"UID">)[];
title: string;
uid: string & BRAND<"UID">;
uniqueLink: string;
updated: Timestamp;
},
"uid"
| "uniqueLink",
>;
}
| { QuizActorMessage: "Update" } & {
value: Partial<
{
allowedQuestionTypesSettings: Partial<
Record<"SINGLE" | "MULTIPLE" | "TEXT", boolean>,
>;
archived?: Timestamp;
comments: (string & BRAND<"UID">)[];
created: Timestamp;
createdBy?: string & BRAND<"UID">;
description: string;
groups: {
name: string;
questions: (string & BRAND<(...)>)[];
statistics?: {
answers: (...)[];
correctAnswers: (...)[];
groupName: string;
maximumParticipants: number;
questionIds: (...)[];
quizId: (...) & (...);
wrongAnswers: (...)[];
};
}[];
hideComments: boolean;
lastExport?: Timestamp;
previewers?: (string & BRAND<"UID">)[];
runOptions?: { runningEntity?: string & BRAND<(...)> };
shuffleAnswers: boolean;
shuffleQuestions: boolean;
state: "EDITING" | "ACTIVE" | "STARTED" | "STOPPED";
statistics?: {
answers: number[];
correctAnswers: number[];
groupName: string;
maximumParticipants: number;
questionIds: (string & BRAND<(...)>)[];
quizId: string & BRAND<"UID">;
wrongAnswers: number[];
};
studentComments: boolean;
studentParticipationSettings: Partial<
Record<"NAME" | "NICKNAME" | "ANONYMOUS", boolean>,
>;
studentQuestions: boolean;
students: (string & BRAND<"UID">)[];
studentsCanSeeStatistics?: boolean;
teachers: (string & BRAND<"UID">)[];
title: string;
uid: string & BRAND<"UID">;
uniqueLink: string;
updated: Timestamp;
},
> & { uid: string & BRAND<"UID"> };
}
| { QuizActorMessage: "Delete" } & { value: string & BRAND<"UID"> }
| { QuizActorMessage: "GetAll" } & { value: {} }
| { QuizActorMessage: "SubscribeToCollection" } & { value: string[] }
| { QuizActorMessage: "UnsubscribeFromCollection" } & { value: {} }
| { QuizActorMessage: "Get" } & { value: string & BRAND<"UID"> }
| { QuizActorMessage: "Import" } & {
value: {
filename: string;
titlePrefix: string | undefined;
userId: string & BRAND<"UID"> | undefined;
userRole: "STUDENT" | "TEACHER" | "ADMIN" | undefined;
};
}
| { QuizActorMessage: "Has" } & { value: string & BRAND<"UID"> }
| { QuizActorMessage: "AddTeacher" } & {
value: { quiz: string & BRAND<"UID">; teacher: string & BRAND<"UID"> };
}
| { QuizActorMessage: "AddStudent" } & {
value: { quiz: string & BRAND<"UID">; student: string & BRAND<"UID"> };
}
| { QuizActorMessage: "RemoveUser" } & {
value: { quiz: string & BRAND<"UID">; user: string & BRAND<"UID"> };
}
| { QuizActorMessage: "SubscribeTo" } & { value: string & BRAND<"UID"> }
| { QuizActorMessage: "UnsubscribeFrom" } & {
value: string & BRAND<"UID">;
}
| { QuizActorMessage: "Export" } & { value: string & BRAND<"UID"> }
| { QuizActorMessage: "Duplicate" } & { value: string & BRAND<"UID"> }
| { QuizActorMessage: "GetUserRun" } & {
value: {
quizId: string & BRAND<"UID">;
studentId: string & BRAND<"UID">;
};
}
Returns Promise<any>
promised return value. If the caller used ask, this value will be returned to the calling actor
Actor representing a quiz. Will also start a child actors for quiz comments