Send a lesson "completed" statement using xAPI

Using templates

If you use one of SmartBuilder’s Master Navigation templates, the template has logic to detect when all the pages in the lesson have been viewed (using the built-in menu) and will send an xAPI statement indicating that the lesson has been completed.

Similarly, the Quizzing templates have an option in the Template Wizard to send a completed statement as well.

edit template lms settings

However, you can also use different triggers to send the "completed" statement (see below).

To use one of SmartBuilder’s master page templates:

  1. Click the Templates menu.
    apply template drop down
  2. From the Master Templates > Navigation category, select a template, then click Apply to Page.
    apply navigation template

(Optional) If want to check that your statements are being sent properly, you can preview xAPI statements while you’re still authoring your lesson.

Custom actions

To send the "completed" statement using a trigger other than all pages viewed condition used by the master page templates, you can create a custom xAPI statement. For example, if you wanted to send a "completed" statement when the last page is viewed, regardless of whether or not all other pages have been viewed, you would do the following:

  1. Create a trigger. In this example, the action is on the last page, and the trigger is when the page loads
    onPageLoad action block
  2. From the Advanced > xAPI action block category, add the completed block to the canvas.
    advanced xAPI blocks
  3. From the Advanced > xAPI action block category, grab the xAPI: lesson activity block (which returns the lesson activity id of your lesson) and place it into the activity socket.
    completed true action block
  4. Snap your completed block into your When block.
    xAPI action blocks