offline - Methods - Questions API

Questions API Methods

offline()

Returns an object, containing two methods: getSession and push.

Note This method can only be used in Local Device Assessment.

Examples

const offlineMethods = LearnosityApp.offline();

Arguments

None.

Return value

Type object

  • push function

    Synchronize the unsynchronized local device assessment responses stored inside the current device's indexedDB based on the provided sessionId argument.

    LearnosityApp.offline().push(securityObject, '73b93d80-481d-4c50-b2ed-6596c49e037a')
                        .then(() => console.log('Synchronization completed'));
                    
  • getSession function

    Return responses stored inside the current device's indexedDB based on the provided sessionId argument.

    LearnosityApp.offline().getSession(securityObject, '73b93d80-481d-4c50-b2ed-6596c49e037a')
                        .then((data) => console.log('session responses data', data));
                    
Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.