Tracking Activities in LMS with Airlock SDK
The goal of this guide is to fully synchronize educational processes in your LMS with accreditation requirements in our AMS using the Airlock API and SDK. This ensures your platform meets all compliance rules, helping prevent accreditation loss and student complaints.
Authorization
Students require permanent access to the Woolf Widget throughout their entire learning journey. Failure to comply with this requirement may result in the loss of accreditation.
Steps to Authorize the SDK
-
Generate a User Token: First, generate a user token for the student.
Learn how to generate a user token here.💡 Note: User tokens provide secure communication between your LMS and Woolf AMS. -
Authorize the SDK Instance: Once the token is generated, use it to authorize the SDK instance.
import { Woolf } from "@woolfuniversity/sdk" const woolf = await Woolf.create('userToken') console.log(woolf.user)
By following these steps, you ensure seamless and secure access for students while maintaining compliance. If you encounter any issues, contact Woolf support.
Track Resource Consumption
To enable tracking, add the attribute data-woolf-resource="<ResourceId>" to containers displaying content such as PDFs, videos, or HTML.
<div data-woolf-resource="resourceId">
Markup of accredited content or its sections.
</div>
<div data-woolf-resource="resourceId">
Links to accredited assets such as PDFs, videos, etc.
</div>For links or asset tracking, you can append the resource ID using the woolf-resource URL parameter:
<a href="https://cdn.example?woolf-resource=resourceId">Document</a>
<video src="https://cdn.example?woolf-resource=resourceId"></video>Enable Full Page Tracking
You may implement full page tracking by providing a trackPage function:
const woolf = await Woolf.create('userToken', {
tracker: {
trackPage: (url) => url.pathname.split('/').pop()
}
})Track Submissions and Attendance
Call the SDK methods when students submit assignments or attend meetings:
const submissionId = await woolf.trackSubmission('resourceId')
const attendanceId = await woolf.trackAttendance('resourceId')You must also sync data via the API using the activityId generated above:
Track Grades and Feedback
Use the SDK to track faculty input:
const gradeId = await woolf.trackGrade('resourceId', 'studentId')
const feedbackId = await woolf.trackFeedback('resourceId', 'studentId')Submit the values using API:
Verify Tracked Events
To check which events were logged in the AMS, use the activities query: