Recapp Code Reference
    Preparing search index...

    Actor representing the comments of a single quiz. This will be started as a child of the corresponding quiz actor

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    collectionName: string
    connector: DbClient = ...
    state: State = ...

    Methods

    • Parameters

      • from: ActorRef

      Returns Promise<
          [
              UserRole: AccessRole,
              UserID: string & BRAND<"UID">,
              IsTemporaryAccount: boolean,
          ],
      >

    • Parameters

      • uid: string & BRAND<"UID">

      Returns Promise<
          MaybeBase<
              | {
                  answers: string[];
                  archived?: Timestamp;
                  created: Timestamp;
                  groupName: string;
                  maximumParticipants: number;
                  participants: number;
                  questionId: string & BRAND<"UID">;
                  quizId: string & BRAND<"UID">;
                  tag: "TextElementStatistics";
                  uid: string & BRAND<"UID">;
                  updated: Timestamp;
                  wrong: number;
              }
              | {
                  answers: number[];
                  archived?: Timestamp;
                  created: Timestamp;
                  groupName: string;
                  maximumParticipants: number;
                  participants: number;
                  passed: number;
                  questionId: string & BRAND<"UID">;
                  quizId: string & BRAND<"UID">;
                  tag: "ChoiceElementStatistics";
                  uid: string & BRAND<"UID">;
                  updated: Timestamp;
                  wrong: number;
              },
          >,
      >

    • Abstract method that handles all incoming messages

      Parameters

      • from: ActorRef

        actor that has send the message

      • message:
            | { StatisticsActorMessages: "Update" } & {
                value: TextAnswer | ChoiceAnswer;
            }
            | { StatisticsActorMessages: "SubscribeToCollection" } & { value: {} }
            | { StatisticsActorMessages: "UnsubscribeFromCollection" } & { value: {} }
            | { StatisticsActorMessages: "Clear" } & { value: {} }
            | { StatisticsActorMessages: "GetForQuestion" } & {
                value: string & BRAND<"UID">;
            }
            | { StatisticsActorMessages: "GetForGroup" } & { value: string }
            | { StatisticsActorMessages: "GetForQuiz" } & { value: {} }
            | { StatisticsActorMessages: "ExportQuizStats" } & { value: {} }
            | { StatisticsActorMessages: "ExportQuestionStats" } & { value: {} }

        message type

      Returns Promise<ResultType>

      promised return value. If the caller used ask, this value will be returned to the calling actor

    • Parameters

      • entity:
            | {
                answers: string[];
                archived?: Timestamp;
                created: Timestamp;
                groupName: string;
                maximumParticipants: number;
                participants: number;
                questionId: string & BRAND<"UID">;
                quizId: string & BRAND<"UID">;
                tag: "TextElementStatistics";
                uid: string & BRAND<"UID">;
                updated: Timestamp;
                wrong: number;
            }
            | {
                answers: number[];
                archived?: Timestamp;
                created: Timestamp;
                groupName: string;
                maximumParticipants: number;
                participants: number;
                passed: number;
                questionId: string & BRAND<"UID">;
                quizId: string & BRAND<"UID">;
                tag: "ChoiceElementStatistics";
                uid: string & BRAND<"UID">;
                updated: Timestamp;
                wrong: number;
            }

      Returns Promise<
          | {
              answers: string[];
              archived?: Timestamp;
              created: Timestamp;
              groupName: string;
              maximumParticipants: number;
              participants: number;
              questionId: string & BRAND<"UID">;
              quizId: string & BRAND<"UID">;
              tag: "TextElementStatistics";
              uid: string & BRAND<"UID">;
              updated: Timestamp;
              wrong: number;
          }
          | {
              answers: number[];
              archived?: Timestamp;
              created: Timestamp;
              groupName: string;
              maximumParticipants: number;
              participants: number;
              passed: number;
              questionId: string & BRAND<"UID">;
              quizId: string & BRAND<"UID">;
              tag: "ChoiceElementStatistics";
              uid: string & BRAND<"UID">;
              updated: Timestamp;
              wrong: number;
          },
      >

    • Parameters

      • _draft: State
      • _quiz:
            | {
                answers: string[];
                archived?: Timestamp;
                created: Timestamp;
                groupName: string;
                maximumParticipants: number;
                participants: number;
                questionId: string & BRAND<"UID">;
                quizId: string & BRAND<"UID">;
                tag: "TextElementStatistics";
                uid: string & BRAND<"UID">;
                updated: Timestamp;
                wrong: number;
            }
            | {
                answers: number[];
                archived?: Timestamp;
                created: Timestamp;
                groupName: string;
                maximumParticipants: number;
                participants: number;
                passed: number;
                questionId: string & BRAND<"UID">;
                quizId: string & BRAND<"UID">;
                tag: "ChoiceElementStatistics";
                uid: string & BRAND<"UID">;
                updated: Timestamp;
                wrong: number;
            }

      Returns void