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

⚠️ Important Requirement: You must authorize the Airlock SDK for every student already added to AMS when they log in to your LMS.

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

  1. 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.
  2. 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

⚠️ Important: The SDK only tracks resources that are submitted to Woolf and correctly tagged in your LMS. All other content is ignored.

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()
  }
})
⚠️ Important: Full page tracking disables data-attribute tracking and works best when one resource is rendered per page.

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:

💡 Note: Most events must be real-time and actor-based. Exceptions (like proctored exams) must be pre-approved and supported with strong evidence.

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:

⚠️ Important: Submitting grades without SDK tracking (e.g., auto-graded quizzes) requires manual confirmation by faculty in AMS.

Verify Tracked Events

To check which events were logged in the AMS, use the activities query:

 

Explore More