adaptlearning / adapt-contrib-xapi

TinCan/xAPI extension for the Adapt Framework
GNU General Public License v3.0
12 stars 28 forks source link

Issue/23 - Improvement - Ability to block content when LRS connection fails #25

Closed barry-mckay closed 6 years ago

barry-mckay commented 6 years ago

Added an ErrorView which is displayed to the user whenever the xAPI wrapper initialisation fails, or when a 'sendState()' or 'sendStatement()' call fails.

The display of this view is configurable as 'don't show', 'show and allow continue', 'show'. The second option allows the user to continue with the course, ignoring the LRS issues.

The text for this view is configurable using globals - the default text warns the user that their progress will not be saved.

The error view also features an 'Exit course' button.

Also implemented an ADL launch wrapper for local testing without an LRS. This includes and makes use of the 'js-cookie' library to cache state for testing purposes

brian-learningpool commented 6 years ago

@barry-learningpool, the dedicated view seems a bit opinionated. What was the reasoning for not using an alert the same way Spoor does?

barry-mckay commented 6 years ago

@brian-learningpool are you referring to the 'SCORM log' window that appears when '_showDebugWindow' is enabled?

brian-learningpool commented 6 years ago

No, just the standard alert or confirm popups, e.g. "Could not connect to LMS"

ryan-lynch commented 6 years ago

Just to clarify, the title/description of this PR is no longer correct since the new view has been removed, it now does not blocks content and instead just displays an alert?

barry-mckay commented 6 years ago

@ryan-lynch yeah, it just uses the core Notify alert functionality now, which doesn't block the user.