Forum Discussion
Changing Course Behavior Based On Previous Completion
We have a number of courses that we require employees to take year over year from a compliance standpoint. We’re moving to allow employees to test out in years 2 and beyond.
I’d love to keep this as a single course rather than building out two versions. I'd like to use Javascript to query the LMS and references past course completions to determine whether to give the learner a pre-test or not.
I've been able to successfully access completion status of the current session (basically have you completed this course or not), but not previous completions. I'm working in Saba. Am I way off base? Is this something that's possible?
4 Replies
Hi Dblatt I don't have any ideas right off the bat, but JeffreyRiley-9e HustonBrown or rbray might be able to offer some insight.
- JeffreyRiley-9eCommunity Member
I like your idea of being able to test out. I wish I could get my clients to do the same. If you can't trust the quiz, then it needs to be changed, don't penalize the employee. Anyway, we still rely on our LMS and reports to track repeating training.
I agree with the idea of taking courses over after a time period, but tracking can be a pain. If you are using Javascript, I would be interested to see what you have figured out and it it can apply to more than one LMS.
The other challenge is getting the client to keep their information current in the courses. It does no good to training on out of date information and can even be dangerous.
- DblattCommunity Member
This is an internal client, so that makes a lot of the buy-in and maintenance easier.
I have only the most rudimentary understanding of Javascript, so I've relied on Co-Pilot and Gemini to provide me with the code. This is what they've come up with. This is very good at identifying the completion state of the current attempt, but it doesn't check for historical completions that took place before the current attempt.
I should add that this is built for SCORM 1.2, which is what we've historically used in our LMS (Saba -- for the next year)function getAPI() { var win = window; var attempts = 0; while (attempts < 10) { if (win.API) return win.API; if (win.parent && win.parent != win) { attempts++; win = win.parent; } else { break; } } // also try the opener if (window.opener && window.opener.API) { return window.opener.API; } return null; } var api = getAPI(); /******************************* * Read completion status *******************************/ var status = null; if (api) { status = api.LMSGetValue("cmi.core.lesson_status"); console.log("Status from LMS:", status); } else { console.warn("SCORM API not found."); } /******************************* * Set Storyline variable *******************************/ var player = GetPlayer(); var IsCourseComplete = false; // SCORM 1.2 considers completed or passed as "done" if (status === "completed" || status === "passed") { IsCourseComplete = true; } player.SetVar("IsCourseComplete", IsCourseComplete); - HustonBrownCommunity Member
I was where I was referenced regarding this question. Unfortunately, we stopped investigating in Saba because we are changing to Workday Learning this year. Sorry.
Related Content
- 1 month ago
- 1 year ago