I am trying to show xApi AU (assignable unit) content using HTML iFrame in our portal (custom LMS - Learning Management System). HTML Iframe would pass LRS (Learning Record Store) parameters like below to launch AU which is working.
<URL to AU> ?endpoint=<URL to LMS Listener> &fetch=<Fetch URL for the Authorization Token> &actor=<Actor> ®istration=<Registration ID> &activityId=<AU activity ID>
I am trying to figure out how to know that user has finished viewing content (preferably using JavaScript) so parent page knows user has finished AU and can be redirected back to List page. I would like list page to show Completed status for that viewed contents.
In the past (SCORM days), we have added button on top of iframed content "I have completed, Take me back" or similar but users just click that and mark content completed without actually completing.
Is querying LRS constantly the only option possibly?
Thanks