Introduction
This article describes how you can use Learn365 APIs to change the progress of a SCORM content package to Completed.
Get the relevant SCORM data via API
1. Go to https://api.365.systems/ and authorize with the relevant API key. For more information about the authorization process, see this article.
2. For a request to change the completion status of a SCORM content package, you need to get the user's ID, their enrollment ID, and the ID of the relevant SCORM content package.
To get this data:
- Find the Courses section, expand it, find the GET method /odata/v2/Courses with the Returns the list of Courses description, and select Try it out.
- In the $expand field, enter Enrollments, Scorms to allow the response to include data about users' enrollments and SCORM content packages inside courses.
- Select Execute to run the request.
3. Go to the Responses block to see the results.
- Number 2xx (for example, 200) under Code shows that the request worked correctly. You can Download the data from the response to your computer in .JSON format.
- In the Response body field, you can see all the courses of the tenant that contain SCORM content packages, data related to these SCORMs (including their IDs), and data related to users who are enrolled in the courses (including their user ID and enrollment ID). Search for the relevant SCORM or user using Ctrl+F.
4. Get the ID of a SCORM content package next to the Id parameter, under Scorms.
5. Get the ID of the user and their enrollment next to the UserId and Id parameters respectively, under Enrollments.
Complete a SCORM via API
When the required data is collected, you can run a request to set the status of the relevant SCORM content package as completed for the user in question.
- Find the Courses section, expand it, find the GET method /odata/v2/Courses with the Returns the list of Courses description, and select Try it out.
- In the $expand field, enter Enrollments, Scorms to allow the response to include data about users' enrollments and SCORM content packages inside courses.
- Select Execute to run the request.
1. Find the ScormAttempts section, expand it, find the POST method /odata/v2/ScormAttempts with the Creates new scorm attempt description, and select Try it out.
2. Complete the fields, paying attention to the required parameters:
- Id, a required parameter. Replace guid with the ID of the user.
- ScormId, a required parameter. Replace guid with the ID of the SCORM content package.
- EnrollmentId, a required parameter. Replace guid with the user's enrollment ID.
- CompletionStatus, a required parameter in this case. Replace boolean with true to set the SCORM as completed.
- SuccessStatus, a required parameter in this case. Replace boolean with true to set the SCORM as successfully completed.
- Points, an optional parameter. Replace integer with a whole number of points to award to the user. This is displayed in the Score column when viewing learner's details on a content package.
- Scale, an optional parameter. This is the final score of the SCORM. Replace number with the decimal part of a non‐negative real number (for example, 0.89), which Learn365 will multiply by 100 and converted to a percentage (0.89 will become 89%). The same percentage will be displayed in the Score column in the user's progress dashboard and in the Scale column when viewing learner's details on a content package.
- Progress, an optional parameter. This isn't supported by SCORM1.2. Replace number with the relevant status indicator: 1 for not started, 2 for failed, 3 for in progress, or 4 for passed. The progress is displayed as a percentage in the Progress column in the user's progress dashboard.
- AlternateProgress, an optional parameter. This should be used if only SCOs are present in the SCORM. Replace number with a whole number that represents the number of SCOs in the SCORM. The progress is displayed as a percentage in the Progress column in the user's progress dashboard.
- Version, an optional parameter. Replace integer with a whole number that corresponds to the content package version that you want to set as completed for the user.
- CreatedAt, an optional parameter. This defaults to the current date and time, but this can be manually changed.
- ModifiedAt, an optional parameter. This defaults to the current date and time, but this can be manually changed.
- StateDetails, an optional parameter. Here, you can configure details of the user's attempt.
EXAMPLE
{
"Id": "97ff2327-88f4-43c9-b2ec-ccf458cdd211",
"ScormId": "591a8597-ad46-4b49-8340-fe10c41e2c69",
"EnrollmentId": "c5b0f183-21df-4523-b088-0881d0db1797",
"CompletionStatus": "true",
"SuccessStatus": "true",
"Points": "3",
"Progress": "4",
"Version": "1",
"CreatedAt": "2023-03-10T11:57:06Z",
"ModifiedAt": "2023-03-10T11:57:06Z"
}
3. When ready, select Execute to run the request.
4. Go to the Responses block to check the results.
- Number 2xx (for example, 200) under Code shows that the request worked correctly. You can Download the data from the response to your computer in .JSON format.
- In the Response body field, you'll see data about the SCORM completion. You can check the completion of the SCORM for the user in the Learn365 Admin Center > Users > View Learner's Progress > find the relevant course that contains the SCORM, and check the user's progress on it.
Comments
Article is closed for comments.