config.navigation.auto_save - Initialization - Items API

Items API Initialization

auto_save

Configures the automatic saving of session responses during assessment.

You would want to specify this option so that the learner's session data is periodically saved.

By default, this feature will check for any changes to the session responses every 300 seconds and save if changes were found.

Examples

// Enable auto-save with default settings
var initializationOptions = {
    "config": {
        "navigation": {
            "auto_save": true
        }
    }
};

// Enable auto-save with customized settings
var initializationOptions = {
    "config": {
        "navigation": {
            "auto_save": {
                "changed_responses_only": true,
                "save_interval_duration": 120,
                "ui": true,
                "disable_force_save_on_quit": false
            }
        }
    }
};

Values

Attribute path config.navigation.auto_save

Default false

  • Type boolean

    When set to true, enables auto-saving with the default behavior.

  • Type object

    • changed_responses_only boolean

      Only auto-saves when there have been changes to any response.

      When set to false, the auto-save will always save regardless of any changes to any of the responses.

      Default: true

    • save_interval_duration number

      The number of seconds between each auto-save check.

      Default: 300

    • ui boolean

      Specifies whether to show an indicator message that appears on the upper right of the assessment player when an auto-save has occurred.

      Default: false

    • disable_force_save_on_quit boolean

      When auto-save is enabled, the default behavior is to perform a final save before the learner navigates away from the assessment page.

      Setting this value to true will disable the final save functionality when the learner navigates away from the page. In this case, any changes that the learner has made since the last save operation will be lost.

      Default: false

Caveats

The auto-save feature will be paused if there are any active video or audio recordings in progress, and will be resumed once the recordings have stopped and completed uploading. A paused recording is still considered to be an active recording.

Related articles

  • The save() method, used to save the current assessment.
  • The safeToUnload() method, used to check if the current session has been saved successfully.
Was this article helpful?

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