Constructor
new SessionReg(project, codeopt)
SessionReg constructor
Name | Type | Attributes | Description |
---|---|---|---|
project | module:project/JClicProject. | The JClicProject referenced by this session. | |
code | string | <optional> | Optional code to be used by this SessionReg |
- Source
Members
actNames :Array.<string>
Array with unique names of the activities being reported in this session
- Array.<string>
- Source
code :string
Optional code to be used with this session
- string
- Source
currentSequence :module:report/SequenceReg.SequenceReg
The sequence currently active
- Source
info :module:report/SessionReg.SessionRegInfo
Current session info
- Source
projectName :string
Name of the JClicProject
associated to this session
- string
- Source
reportableActs :number
Number of activities suitable to be reported in this session
- number
- Source
sequences :Array.<module:report/SequenceReg.SequenceReg>
List of sequences done in this session
- Source
started :external:Date
Starting date and time of this session
- Source
Methods
end()
Closes this session
- Source
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.
Name | Type | Description |
---|---|---|
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 |
|
- Source
endSequence()
This method should be called when the current working session finishes.
- Source
getCurrentSequenceInfo() → {module:report/SequenceReg.SequenceRegInfo}
Gets information about the current sequence
- Source
getCurrentSequenceTag() → {string}
Gets the name of the current sequence
- Source
- Type:
- string
getData(recalcInfo, includeEmpty) → {object}
Builds a complex object with the results of all activities done during this working session
Name | Type | Description |
---|---|---|
recalcInfo | boolean | When |
includeEmpty | boolean | When |
- Source
- An object containing the full session data
- Type:
- object
getInfo() → {module:report/SessionReg.SessionRegInfo}
Returns the info
element associated to this SessionReg.
- Source
newAction(type, +, +, ok)
Reports a new action done by the user while playing the current activity
Name | Type | Description |
---|---|---|
type | string | Type of action ( |
+ | 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 |
|
- Source
newActivity(act)
This method should be invoked when the user starts a new activity
Name | Type | Description |
---|---|---|
act | module:Activity. | The |
- Source
newSequence(ase)
This method should be invoked when a new sequence starts
Name | Type | Description |
---|---|---|
ase | module:bags/ActivitySequenceElement. | The |
- Source