Skip to content

Commit 33c5e75

Browse files
committed
document the objects in Numbas.storage.inputWidgetStorage
1 parent 258f9cc commit 33c5e75

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

runtime/scripts/storage.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,18 @@ storage.partTypeStorage = {
737737
}
738738
}
739739
};
740+
741+
/** @typedef inputWidgetStorage
742+
* @memberof Numbas.storage
743+
* @property {function} interaction_type - Return the SCORM interaction type identifier for the given part.
744+
* @property {function} correct_answer - Return a JSON-serialisable object representing the correct answer for the given part.
745+
* @property {function} student_answer - Return a JSON-serialisable object representing the student's answer to the given part.
746+
* @property {function} load - Given arguments `part` and `data`, load the student's answer to the given part from the suspend data.
747+
*/
748+
749+
/** @type {Object.<inputWidgetStorage>}
750+
* @memberof Numbas.storage
751+
*/
740752
storage.inputWidgetStorage = {
741753
'string': {
742754
interaction_type: function(part) { return 'fill-in'; },

0 commit comments

Comments
 (0)