new BlankStorage()
A blank storage object which does nothing.
Any real storage object needs to implement all of this object's methods.
Methods
(abstract) adviceDisplayed(question)
Rcord that the student displayed question advice.
Parameters:
Name | Type | Description |
---|---|---|
question |
Numbas.Question |
(abstract) answerRevealed(question)
Record that the student revealed the answers to a question.
Parameters:
Name | Type | Description |
---|---|---|
question |
Numbas.Question |
(abstract) changeQuestion(question)
Call this when the student moves to a different question.
Parameters:
Name | Type | Description |
---|---|---|
question |
Numbas.Question |
diagnosticSuspendData() → {object}
Create suspend data to do with diagnostic mode.
Returns:
Type | Description |
---|---|
object |
(abstract) end()
Call this when the exam ends (Numbas.Exam#end
).
examSuspendData() → {object}
Suspend data for the exam - all the other stuff that doesn't fit into the standard SCORM data model.
Returns:
Type | Description |
---|---|
object |
(abstract) getDurationExtension() → {object}
Get an externally-set extension to the exam duration.
Returns:
Type | Description |
---|---|
object |
(abstract) getEntry() → {string}
Get entry state: ab-initio
, or resume
.
Returns:
Type | Description |
---|---|
string |
(abstract) getMode() → {string}
Get viewing mode:
browse
- see exam info, not questions;normal
- sit exam;review
- look at completed exam.
Returns:
Type | Description |
---|---|
string |
getPartStorage(p) → {Numbas.storage.partTypeStorage}
Get the relevant part storage methods for the given part.
Parameters:
Name | Type | Description |
---|---|---|
p |
Numbas.parts.Part |
Returns:
Type | Description |
---|---|
Numbas.storage.partTypeStorage |
(abstract) get_initial_seed() → {string}
Get the initial seed value.
Returns:
Type | Description |
---|---|
string |
(abstract) get_student_name()
Load student's name and ID.
init(exam)
Initialise the SCORM data model and this storage object.
Parameters:
Name | Type | Description |
---|---|---|
exam |
Numbas.Exam |
(abstract) initQuestion(q)
Initialise a question.
Parameters:
Name | Type | Description |
---|---|---|
q |
Numbas.Question |
(abstract) load(exam) → {Numbas.storage.exam_suspend_data}
Get suspended exam info.
Parameters:
Name | Type | Description |
---|---|---|
exam |
Numbas.Exam |
Returns:
Type | Description |
---|---|
Numbas.storage.exam_suspend_data |
(abstract) loadExtensionPart(part) → {Numbas.storage.part_suspend_data}
Load a Numbas.parts.ExtensionPart
.
Parameters:
Name | Type | Description |
---|---|---|
part |
Numbas.parts.Part |
Returns:
Type | Description |
---|---|
Numbas.storage.part_suspend_data |
(abstract) loadJMEPart(part) → {Numbas.storage.part_suspend_data}
Load a Numbas.parts.JMEPart
.
Parameters:
Name | Type | Description |
---|---|---|
part |
Numbas.parts.Part |
Returns:
Type | Description |
---|---|
Numbas.storage.part_suspend_data |
(abstract) loadMatrixEntryPart(part) → {Numbas.storage.part_suspend_data}
Load a Numbas.parts.MatrixEntryPart
.
Parameters:
Name | Type | Description |
---|---|---|
part |
Numbas.parts.Part |
Returns:
Type | Description |
---|---|
Numbas.storage.part_suspend_data |
(abstract) loadMultipleResponsePart(part) → {Numbas.storage.part_suspend_data}
Parameters:
Name | Type | Description |
---|---|---|
part |
Numbas.parts.Part |
Returns:
Type | Description |
---|---|
Numbas.storage.part_suspend_data |
(abstract) loadNumberEntryPart(part) → {Numbas.storage.part_suspend_data}
Load a Numbas.parts.NumberEntryPart
.
Parameters:
Name | Type | Description |
---|---|---|
part |
Numbas.parts.Part |
Returns:
Type | Description |
---|---|
Numbas.storage.part_suspend_data |
(abstract) loadPart(part) → {Numbas.storage.part_suspend_data}
Get suspended info for a part.
Parameters:
Name | Type | Description |
---|---|---|
part |
Numbas.parts.Part |
Returns:
Type | Description |
---|---|
Numbas.storage.part_suspend_data |
(abstract) loadPatternMatchPart(part) → {Numbas.storage.part_suspend_data}
Load a Numbas.parts.PatternMatchPart
.
Parameters:
Name | Type | Description |
---|---|---|
part |
Numbas.parts.Part |
Returns:
Type | Description |
---|---|
Numbas.storage.part_suspend_data |
(abstract) loadQuestion(question) → {Numbas.storage.question_suspend_data}
Get suspended info for a question.
Parameters:
Name | Type | Description |
---|---|---|
question |
Numbas.Question |
Returns:
Type | Description |
---|---|
Numbas.storage.question_suspend_data |
loadVariables(vobj, scope) → {Object.<Numbas.jme.token>}
Load a dictionary of JME variables.
Parameters:
Name | Type | Description |
---|---|---|
vobj |
Object.<JME> | |
scope |
Numbas.jme.Scope |
Returns:
Type | Description |
---|---|
Object.<Numbas.jme.token> |
(abstract) partAnswered(part)
Call this when a part is answered.
Parameters:
Name | Type | Description |
---|---|---|
part |
Numbas.parts.Part |
partSuspendData(part) → {Numbas.storage.part_suspend_data}
Create suspend data object for a part.
Parameters:
Name | Type | Description |
---|---|---|
part |
Numbas.parts.Part |
Returns:
Type | Description |
---|---|
Numbas.storage.part_suspend_data |
(abstract) pause()
Call this when the exam is paused (Numbas.Exam#pause
).
(abstract) questionSubmitted(question)
Record that a question has been submitted.
Parameters:
Name | Type | Description |
---|---|---|
question |
Numbas.Question |
questionSuspendData(question) → {Numbas.storage.question_suspend_data}
Create suspend data object for a question.
Parameters:
Name | Type | Description |
---|---|---|
question |
Numbas.Question |
Returns:
Type | Description |
---|---|
Numbas.storage.question_suspend_data |
(abstract) resume()
Call this when the exam is resumed (Numbas.Exam#resume
).
(abstract) save()
Save SCORM data - call the SCORM commit method to make sure the data model is saved to the server/backing store.
(abstract) saveExam(exam)
Save exam-level details.
Parameters:
Name | Type | Description |
---|---|---|
exam |
Numbas.Exam |
(abstract) start()
Call this when the exam is started (when Numbas.Exam#begin
runs, not when the page loads).
(abstract) stepsHidden(part)
Record that the student hid the steps for a part.
Parameters:
Name | Type | Description |
---|---|---|
part |
Numbas.parts.Part |
(abstract) stepsShown(part)
Record that the student showed the steps for a part.
Parameters:
Name | Type | Description |
---|---|---|
part |
Numbas.parts.Part |
(abstract) storeStagedAnswer(part)
Save the staged answer for a part. Note: this is not part of the SCORM standard, so can't rely on this being saved.
Parameters:
Name | Type | Description |
---|---|---|
part |
Numbas.parts.Part |
variablesSuspendData(variables, scope) → {Object.<JME>}
Create suspend data object for a dictionary of JME variables.
Parameters:
Name | Type | Description |
---|---|---|
variables |
Object.<Numbas.jme.token> | |
scope |
Numbas.jme.Scope |
Returns:
Type | Description |
---|---|
Object.<JME> |