Interface IH5PQuestionType

interface IH5PQuestionType {
    getAnswerGiven(): boolean;
    getMaxScore(): number;
    getScore(): number;
    getXAPIData(): XAPIData;
    resetTask(): void;
    showSolutions(): void;
}

Methods

  • Checks if answers for this task has been given, and the program can proceed to calculate scores. Should return false if the user can not proceed yet.

    Returns boolean

    True if answers has been given

  • Calculates the user's score for this task, for example correct answers subtracted by wrong answers.

    Returns number

    User's score for this task

    If the task has 5 questions, and the user has answered 3 correctly,
    the score is 3.