SequenceReg
Source: SequenceReg.js:38
This class stores the results of the activities related to an ActivitySequenceElement.
It's main component is an array of ActivityReg elements.
Constructor
new SequenceReg(
ase: module:bags/ActivitySequenceElement.ActivitySequenceElement,
): SequenceRegSequenceReg constructor
Parameters
ase(module:bags/ActivitySequenceElement.ActivitySequenceElement) — The ActivitySequenceElement related to this sequence.
Instance Methods
getData(): object
Builds a complex object with data about the results of the activities done in this sequence
Returns
object
getInfo(): module:report/SequenceReg.SequenceRegInfo
Returns the info element associated to this SequenceReg.
Returns
endSequence()
This method should be called when the current working session finishes.
newActivity(act: module:Activity.Activity)
This method should be invoked when the user starts a new activity
Parameters
act(module:Activity.Activity) — The Activity that has just started
endActivity(score: number, numActions: number, solved: boolean)
This method should be called when the current activity finishes. Data about user's final results
on the activity will then be saved.
Parameters
score(number) — The final score, usually in a 0-100 scale.numActions(number) — The total number of actions done by the user to solve the activitysolved(boolean) —trueif the activity was finally solved,falseotherwise.
newAction(type: string, +: string, +: string, ok: boolean)
Reports a new action done by the user while playing the current activity
Parameters
type(string) — Type of action (click,write,move,select...)+(string) — source - Description of the object on which the action is done.+(string) — dest - Description of the object that acts as a target of the action (used in pairings)ok(boolean) —trueif the action was OK,false,nullorundefinedotherwise
Instance Fields
name: string
The tag member of the associated ActivitySequenceElement
description: string
Optional description given to the ActivitySequenceElement
activities: Array.<module:report/ActivityReg.ActivityReg>
Collection of all the ActivityReg elements done during this sequence.
currentActivity: module:report/ActivityReg.ActivityReg
Registry linked to the Activity that is currently running
totalTime: number
Total time spent on the activities of this sequence
closed: boolean
Flag indicating if the sequence is closed or already available for more activities
info: module:report/SequenceReg.SequenceRegInfo
Object with global information associated to this sequence