report/SequenceReg. SequenceReg

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)

SequenceReg constructor

Parameters:
NameTypeDescription
asemodule:bags/ActivitySequenceElement.ActivitySequenceElement

The ActivitySequenceElement related to this sequence.

Members

activities :Array.<module:report/ActivityReg.ActivityReg>

Collection of all the ActivityReg elements done during this sequence.

closed :boolean

Flag indicating if the sequence is closed or already available for more activities

Type:
  • boolean

currentActivity :module:report/ActivityReg.ActivityReg

Registry linked to the Activity that is currently running

description :string

Optional description given to the ActivitySequenceElement

Type:
  • string

info :module:report/SequenceReg.SequenceRegInfo

Object with global information associated to this sequence

name :string

The tag member of the associated ActivitySequenceElement

Type:
  • string

totalTime :number

Total time spent on the activities of this sequence

Type:
  • number

Methods

endActivity(score, numActions, solved)

This method should be called when the current activity finishes. Data about user's final results
on the activity will then be saved.

Parameters:
NameTypeDescription
scorenumber

The final score, usually in a 0-100 scale.

numActionsnumber

The total number of actions done by the user to solve the activity

solvedboolean

true if the activity was finally solved, false otherwise.

endSequence()

This method should be called when the current working session finishes.

getData() → {object}

Builds a complex object with data about the results of the activities done in this sequence

Returns:
  • The sequence results
Type: 
object

getInfo() → {module:report/SequenceReg.SequenceRegInfo}

Returns the info element associated to this SequenceReg.

newAction(type, +, +, ok)

Reports a new action done by the user while playing the current activity

Parameters:
NameTypeDescription
typestring

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)

okboolean

true if the action was OK, false, null or undefined otherwise

newActivity(act)

This method should be invoked when the user starts a new activity

Parameters:
NameTypeDescription
actmodule:Activity.Activity

The Activity that has just started