LearnDash Integration Concept Guide
Overview
The LearnDash integration for Bright enables the following:
- you can use a course hosted in SCORM Cloud, and connected to Bright, as your LearnDash content.
- you can configure your LearnDash lesson or topic to be "linked" to the completion of this SCORM Cloud course, so as opposed to the learner marking themselves complete, they are marked complete when they've met the completion criteria of the SCORM package itself.
- if you are using the BuddyBoss theme, we attempt to set lesson/topic completion before the course menu renders, so as to make sure a SCORM Cloud completion is shown on the next page request.
Linking Your LearnDash Topic or Lesson to One or More Bright/SCORM Cloud Courses
Linking your lesson or topic to a Bright/SCORM Cloud Course is identical to linking a WooCommerce product, as described here:
Controlling How The Course Appears
Controlling how your course or courses appears in the LearnDash lesson or topic is identical to the method described here:
Adding A Bright Template to a WordPress Page or Post
Please note that embedding the course is different then linking the course. That's something that may change at some point in the future.
It does mean that you can link a lesson to each of the SCORM Cloud courses of all the child topics, with no visual elements, and thereby automatically complete the lesson when
all the SCORM Cloud courses related to the topics are completed.
Removing The 'Mark Complete' Button
When you are using a Bright/SCORM Cloud course as LearnDash Lesson or Topic, it's normal to want to remove the "Mark Complete" button and let the SCORM status determine completion.
This example shows how to use a learndash filter to remove the builtin 'Mark Complete' button wherever a Bright course is linked.
add_filter('learndash_mark_complete', function($return, $post) {
$post_id = $post->ID;
$course_id = get_post_meta($post_id,'bright_course_id',true);
if (!empty($course_id)) {
return '<div class="ld-status ld-status-progress ld-primary-background">Launch And Complete Your Course To Complete This Topic</div>';
}
return $return;
}, 10, 2);
Interaction With The LearnDash Database
Please see this document for more information on the LearnDash data model.
Roadmap
Things that will be added shortly.
Pass/Fail as Completion Criteria
The ability to mark a LearnDash lesson or topic complete if the SCORM course is "passed", as opposed to just completed.
Single Step Linking
Currently, there's a two step process to set up a typically LearnDash learning element:
- linking the course(s)
- inserting the visualization template [the launcher]
This may be condensed at a future date.