Automating Attendance
Hello - I think it would be great if the attendance had an automatic feature of tracking. Currently, our instructors take manual attendance for students that are in class and we are able to mark that.
What we do is record these sessions and upload them to the LMS. The students can then watch the recording for their attendance. It would be great to add a feature that records attendance as "yes" when the students reach a certain threshold in the recording.
In addition to that, an automatic trigger to notify students when they missed more than a certain number of classes would be nice. I think a "button" feature to notify the students of the amount of classes they have missed and which ones specifically.
-
Official comment
Hi Alexa,
Thanks for your post. I understand what you are trying to do with marking attendance based on the students watching a certain resource. Whilst this is not available in the platform today, you can do exactly what you are looking to do by using our webhooks. I've posted what it would take down below:
To automate the process of marking learners' attendance when they engage with a resource in the LMS, you can use webhooks and APIs. Follow the steps below to set up the necessary components and implement the automation.
-
Query Webhook Types:
-
Use the following GraphQL query to find the webhook type you need:
-
query webhookTypes { webhookTypes( filters: [ { field: trigger, operation: eq, value: "automatic" } { field: name, operation: like, value: "%learner%"} ] ) { edges { node { id name description } } } }
-
This query will retrieve a list of webhook types that are relevant to marking learners' attendance.
-
Find the Webhook Type:
-
Identify the webhook type that matches your specific use case.
-
In this example, we’ll include two use cases:
-
Recording learner's attendance when they engage with or start an LMS resource.
-
Recording learner's attendance when they complete an LMS resource.
-
-
Take note of the ID for the appropriate webhook type for your use case.
-
-
Set up the Webhook:
-
Use the following mutation to create a webhook that will be triggered when the desired event occurs:
-
mutation { webhooks{ create(input:{ webhookTypeId: "WEBHOOK_TYPE_ID" name: "Learner started a video" query: "query test($objectid: ID!){ node(id: $objectid) { id ... on Event{ code }}}" url: "<https://test.example.com"> emailAddress: "test@example.com" }) { webhook{ id lifecycleState } errors{ label message value } } } }
-
Replace "WEBHOOK_TYPE_ID" with the ID of the webhook type you identified earlier.
-
Adjust the name, query, URL, and email address according to your requirements.
-
The query parameter defines the GraphQL query that will be sent to your script when the webhook is triggered.
3. Activate the Webhook
mutation activate{ webhooks{ update(input:{ webhookId: "T3V0Ym91bmRIb29rOjM=" lifecycleState: active }) { webhook{ id lifecycleState } errors{ label message value } } } }
-
Implement the Logic:
-
Set up a script or endpoint at the provided URL (e.g., "https://test.example.com") that will receive the webhook payload.
-
In your script, implement the necessary logic to automatically mark learners' attendance based on the webhook payload.
-
-
Further Resources:
-
To learn more about using the Administrate API and explore additional features, refer to the Developer Experience portal.
-
Comment actions -
-
For the second part of your query, this can also be achieved using webhooks:
Query Webhook Types to find the webhook you need
query webhookTypes { webhookTypes( filters: [ { field: trigger, operation: eq, value: "automatic" } { field: name, operation: like, value: "%learner%"} ] ) { edges { node { id name description } } } }
Find the Webhook Type you need according to your usecase. In this example, I’ll include two different use cases:
-
Record Learner's attendance when they engage with or start an LMS resource
-
Record Learner's attendance when they complete an LMS resource
For the first use case, you will need to look for “Learner Started LMS Resource” Webhook and take note of the ID.
For the second use case, you will need to look for “Learner LMS Resource Completed”
Next, we need to setup the webhook so that when it’s triggered it fires off and calls the script that you’ve setupmutation { webhooks{ create(input:{ webhookTypeId: "V2ViaG9va1R5cGU6bGVhcm5lcl9sbXNfcmVzb3VyY2Vfc3RhcnRlZA==" name: "Learner started a video" query: "query test($objectid: ID!){ node(id: $objectid) { id ... on Event{ code }}}" url: "https://test.example.com" emailAddress: "test@example.com" }) { webhook{ id lifecycleState } errors{ label message value } } } }
After this has been setup, whenever the event happens, the webhook will trigger and call your script, where you will have built the logic that handles auto marking learners attendance based on the engagement of resources such as SCORM, Videos, etc.
Many thanks
-
Please sign in to leave a comment.
Comments
2 comments