-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue/2747 Added questionModel attemptStates API #2748
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, should be quite easy to also store incomplete question attempts by listening to a change of _isSubmitted
.
I realised that the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code 👓
@tomgreenfield if you could re-review this one is ready to go in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎈
#2747
To keep the previous question attempt states for use in plugins.
Requires #192 spoor pr to be saved and restored across sessions.
Added
trackableType
property throughout to list the type of thetrackable
attributesquestionModel.getAttemptState
Returns the raw state of the component in a format for spoor to storequestionModel.getAttemptObject
Returns a formatted state object which can be passed through toquestionModel.set
questionModel.setAttemptObject
Sets the current state of the component from a state objectquestionModel.addAttemptObject
Adds an attempt object to the attemptStates storequestionModel.getAttemptObjects
Returns an array of the component attempt state objects_spoor._tracking._shouldStoreAttempts
toconfig.json
Testing
_isResetOnRevisit: "soft"
_spoor._tracking._shouldStoreResponses
and_spoor._tracking._shouldStoreAttempts
inconfig.json