HKQuiz
@objc
public class HKQuiz : NSObject
HKQuiz object represents metadata and display data for a BioDigital interactive quiz Some content may contain a quiz and if so this class will provide an interface to the questions, answers, user responses, and scoring
Since
Since SDK 134.1-
enabled is true when the interactive anatomy includes a quiz
Declaration
Swift
@objc public var enabled: Bool -
active is true when the quiz has been entered
Declaration
Swift
@objc public var active: Bool -
locked may be set to prevent the user from taking the embedded quiz Use set() to updated this setting
Declaration
Swift
@objc public var locked: Bool -
The question number to start the quiz Use set() to updated this setting
Declaration
Swift
@objc public var startNumber: Int -
The question number to end the quiz Use set() to updated this setting
Declaration
Swift
@objc public var endNumber: Int -
Set this to false to hide the quiz summary Use set() to updated this setting
Declaration
Swift
@objc public var showSummary: Bool -
Set this to false to hide the answer explanations Use set() to updated this setting
Declaration
Swift
@objc public var showExplanation: Bool -
Set this to false to hide the quiz submit button Use set() to updated this setting
Declaration
Swift
@objc public var showSubmit: Bool -
Set this to false to hide the quiz progress indicator Use set() to updated this setting
Declaration
Swift
@objc public var showProgress: Bool -
Map of IDs to Quiz Questions
Declaration
Swift
@objc public var questions: [String : HKQuizQuestion] -
Array of user responses to the questions
Declaration
Swift
@objc public var submissions: [HKQuizSubmission] -
ID of the current question
Declaration
Swift
@objc public var activeQuestionId: String -
Current question object
Declaration
Swift
@objc public var currentQuestion: HKQuizQuestion? -
Current user response object
Declaration
Swift
@objc public var currentSubmission: HKQuizSubmission? -
Current set of answerIds
Declaration
Swift
@objc public var currentAnswers: [String] -
completed is set by the SDK when the quiz has been finished by the user
Declaration
Swift
@objc public var completed: Bool -
score is set by the SDK when the quiz has been finished by the user
Declaration
Swift
@objc public var score: Double -
total is set by the SDK when the quiz has been finished by the user
Declaration
Swift
@objc public var total: Int -
scorableTotal is set by the SDK when the quiz has been finished by the user
Declaration
Swift
@objc public var scorableTotal: Int -
correctTotal is set by the SDK when the quiz has been finished by the user
Declaration
Swift
@objc public var correctTotal: Int -
incorrectTotal is set by the SDK when the quiz has been finished by the user
Declaration
Swift
@objc public var incorrectTotal: Int -
Start a quiz if one exists in the currently loaded content
Declaration
Swift
@objc public func enter() -
End a quiz if one is in progress without completing the quiz
Declaration
Swift
@objc public func exit() -
Submit a set of answers to a question
Declaration
Swift
@objc public func submit(questionId: String, answerIds: [String]) -
Move to the next question
Declaration
Swift
@objc public func nextQuestion() -
Move to the previous question
Declaration
Swift
@objc public func previousQuestion() -
Reset the quiz to its original settings
Declaration
Swift
@objc public func reset() -
Use this function to lock the quiz or change other settings
Declaration
Swift
@objc public func set()