Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Description: Lesson location as string.

GetSCOSuspendData (coursePath, SCOId, studentId) - TODO update Description

Inputs: coursePath -> course path,
            SCOId -> identificator
            studentId -> student Guid
Returns: Get the store SCO Entry data

Description

GetSCOComments (coursePath, SCOId, studentId) - TODO update Description

Inputs: coursePath -> course path,
            SCOId -> identificator
            studentId -> student Guid
Returns: The comments for the SCO course

Description:

SetUsersTotal (coursePath, shortId, newScore)

Inputs: coursePath -> course path,
            shortId -> identificator
            newScore - UsersTotal (cmi.core.score.raw) 
Returns: true if correctly stored otherwise false

Description: Assessment Short Id = SCO.Id + "-Score", stored in the UsersTotal property of the student result audit state

SetLessonStatus(coursePath, shortId, status)

Inputs: coursePath -> course path,
            shortId -> identificator
            status ->  The current status of the SCO Entry (see description)
Returns: true if correctly stored otherwise false

Description: Assessment Short Id = SCO.Id + "-Status", stored in the UsersTotal property of the student result audit state.  Statuses:

0 - Failed
1 - Not Attempted
2 - Browsed
3 - Incomplete
4 - Completed
5 - Passed

SetOutOf(coursePath, shortId, outOf)

Inputs: coursePath -> course path,
            shortId -> identificator
            outOf - OutOf value (cmi.core.score.max)
Returns: true if correctly stored otherwise false

Description: Assessment name = SCO.Id + "-Score", stored in the OutOf property of the student result audit state.

SetLessonLocation(coursePath, SCOId, studentId, value)

Inputs: coursePath -> course path,
            SCOId -> identificator
            studentId -> student Guid
            value - lesson location
Returns: true if correctly stored otherwise false

Description: Sets location of a lesson (cmi.core.lesson_location) 

SetSCOSuspendData (coursePath, SCOId, studentId, value)

Inputs: coursePath -> course path,
             SCOId -> identificator
             studentId -> student Guid
             value - The data to set 
Returns: true if correctly stored otherwise false

Description: Sets SuspendData (cmi.suspend_data)

SetSCOExit (coursePath, SCOId, studentId, value)

Inputs: coursePath -> course path,
             SCOId -> identificator
             studentId -> student Guid
             value - The data to set 
Returns: true if correctly stored otherwise false

Description: Sets exit (cmi.core.exit)

SetSCOSessionTime (coursePath, SCOId, studentId, value)

Inputs: coursePath -> course path,
             SCOId -> identificator
             studentId -> student Guid
             value - The data to set 
Returns: true if correctly stored otherwise false

Description: Sets session time (cmi.core.session_time) 

SetSCOComments (coursePath, SCOId, studentId, value)

Inputs: coursePath -> course path,
             SCOId -> identificator
             studentId -> student Guid
             value - The comments to set
Returns: true if correctly stored otherwise false

Description: Sets comments (cmi.core.comments) 

callServer(url, method, hasBoolResult, params)

Inputs: url - API url,
            method - GET or POST,
            hasBoolResult - if the caller wants to a 'true' or 'false' return, or a result or an empty string?? 
            params - object that represents parameters that need to be sent to server
Returns: response or empty string '' if error happend

Description: calls server API methods (wrapper for Jquery ajax call)

parseCmi(cmiElementName, value)

Inputs: cmiElementName - cmi name
             value - value to be set
Returns: true if correctly stored otherwise false
Description: Parse cmiElementName to be able to define shortId. (Specs:

Jira Legacy
serverSystem JIRA
serverId23f523ea-1678-3ca2-a1e8-2de53fd3b74a
keyCOREDEV-1219
) Regular expressions is used for getting group name and modify cmi string for switch statement because the cmi contains value of 'n' variable.

storeId(storeName, shortId)

Inputs: storeName - storage name
             shortId - server side shortId that contains information about id and 'n' variable
Returns: undefined

Description: Stores id / 'n' combinations for preventing too many server requests. There can be multiple storages (objectives, interactions).

parseShortId(shortId)

Inputs: shortId - shortId that contains id/n
Returns: object that constains property: id, n

Description: Parses shortId string to get property: id & n

findId(storeName, n)

Inputs: storeName - storage name
            'n' variable
Returns: undefined

Description: Tries to find id/n combination by 'n' variable in specific local storage (Can be multiple, for example interactions or objectives).

getChildrenFromServerResults(results)

Inputs: results - data array from server
Returns: SCORM definition of children objects (always returns "id,score,status")

Description: Map server children objects to SCORM children objects