SCORM API

SCORM API

mod_scorm_get_scorm_user_data

This function retrieves detailed user tracking data for a specific attempt on a SCORM package.

Let's review the POST parameters for this function:

  1. Required Parameters:
    • scormid= int (Required: The numeric instance ID of the SCORM activity.)
    • attempt= int (Required: The specific attempt number to retrieve data for, e.g., 1 for the first attempt.)
  2. Important Note:
    • This function retrieves data for the user whose API token is making the request. To get data for a different user, you would need to use a token associated with that user or an admin token with the appropriate permissions.

cURL Command Example (Getting SCORM User Data):

curl "https://courses.yoursite.com/webservice/rest/server.php?wstoken=XXXXXXXXXXXXXXX" \
-d "wsfunction=mod_scorm_get_scorm_user_data" \
-d "scormid=654" \
-d "attempt=1"