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, ): SequenceReg

SequenceReg constructor

Parameters


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

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 activity
  • solved (boolean) — true if the activity was finally solved, false otherwise.

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) — true if the action was OK, false, null or undefined otherwise

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