Picture of Soren Andersen
Adapt Learning Persistence
by Soren Andersen - Tuesday, 5 July 2016, 3:26 PM
 

I am looking for a method to load and store bookmarks, progress, and completion that is not using SCORM/Spoor. This is because we want to persist (load/store) the bookmarks, progress, and completion in our own web-server, but without implementing the SCORM interface.

My current thoughts are that I need to replace the Spoor extension with my own extension. I have looked in the Spoor extension, and found that by extending the Adapt.offlineStorage I can intercept the get and set calls, and then handle the persistence that way:

Adapt.offlineStorage.initialize( {get: function(name) {..},set: function(name,value) {..} }

The problem is that I need to do an AJAX call to the server to load the initial data. 

Is there someway I can delay the "initialization" of the Adapt frame work, so I can make sure "Addapt.offlineStorage.get" is only called after my AJAX call have completed?

Or maybe there is a much better way to do this kind of custom persistence?

Thanks,
Søren

Picture of Matt Leathes
Re: Adapt Learning Persistence
by Matt Leathes - Wednesday, 6 July 2016, 9:35 AM
 

Hi Soren

First of all just to say that what's you're doing sounds just right.

Unfortunately Adapt is not (yet) well set up to be able to hand asynchronous calls, however we are looking to remedy that with this change. Obviously that's a work-in-progress but it's worth giving it a try - and it would certainly help us to have some extra testing done on this change!

Picture of Soren Andersen
Re: Adapt Learning Persistence
by Soren Andersen - Wednesday, 6 July 2016, 11:35 AM
 

Thanks for the answer.

The 'plugin:beginWait' and 'plugin:endWait' does look like something that would be quite use-full for what I am trying to do. I will see if I can get it to work.