Closed chucklorenz closed 4 years ago
I think I can offer a solution to this (I'll link a PR shortly) If the loading of the adapt-offlineStorage-xapi is moved to within the index initialize instead of being kicked off on import in the index, then we can avoid the problem with Adapt.offlineStorage.initialize setting the ready status to false and never being re-set to true
Hi @chucklorenz, Cahir's PR resolves the issue for us.
Would it be possible for you to test https://github.com/adaptlearning/adapt-contrib-xapi/archive/offlineStorageLanguageIssue.zip to confirm it resolves it for you?
@brian-learningpool @cahirodoherty-learningpool I couldn't get it to work for my situation. I tested locally; sorry, can't test on my client's server. I reverted to xapi v0.8.2 to verify the original problem. Then replaced xapi with this offlineStorage version. Cleaned the build; rebuilt, and served. Received pop-up that I'm not connected to LRS. Selected English from the language picker. Entered first menu item. Selected the change language icon in the navbar. Selected espanol from drawer. Confirmed the selection in the pop-up, but English remains after the pop-up cleared.
Happy to try again. If you see an issue in my steps, pls advise.
@brian-learningpool @cahirodoherty-learningpool Ah, looks like there is a console error. Hold on, pls
@brian-learningpool @cahirodoherty-learningpool Console errors are focused on the xapi query string (actor, endpoint, etc) provided to me by the client months back. The testing account may have been disabled. Getting a 404 error now. I'm not skilled enough to figure out a work around.
Hi @chucklorenz, thanks for testing. How are you passing in the actor? SCORM Cloud (https://cloud.scorm.com/) is a good platform to test this on.
Hi @chucklorenz The PR for this (https://github.com/adaptlearning/adapt-contrib-xapi/pull/86/files?w=1) has been updated again now. Could you take a look when you get a chance to confirm it resolves the issue for you? Thanks
@cahirodoherty-learningpool @brian-learningpool Yes, Cahir, this new version works in my situation, resolving my issue. I tested locally as mentioned above and the language picker worked as expected; languages switched as expected. 👍
should be fixed in v0.8.3
[FW v3.3.0; xapi v0.8.2; language picker v2.0.0]
While xAPI is enabled, the course in unable to switch to another language.
To replicate:
Expected behaviour: After last popup closes, one expects the new language to load. Actual behaviour: After last popup closes, the original language remains in place. (Pls note, icons have disappeared from the navbar, and inspection reveals that the lang attribute in the html tag has updated to the new language.)
The code gets stuck on a wait that doesn't end, so
triggerDataReady(newLanguage)
is never called.This seems to be the result of a mismatch of
on
andonce
in some code: