Submit a request
Submit a request

Configuring Behavior in Case of Network Failure & Failed Submission

This article explains how to configure the error message window that appears whenever assessment submissions fail.
 

In the event of an error (i.e. network failure, exception thrown etc), assessments cannot be saved. The assessment data is available to the user as a base64 encoded string. This might need manual intervention by the user to copy the data and send it to an administrator, so that it can be saved manually in Learnosity.

This submission data is also available anytime via public method getSubmissionData().

View a demonstration on the Learnosity demos site.


Current supported options are:

  • Download the results file (not available in Internet Explorer or mobile Safari, due to browser limitations)
  • Email the raw encoded response JSON in the body of an email (via mailto protocol, not available in Microsoft-based browsers due to mailto URI length limit in IE)
  • Copy the encoded response data

Note: File download is supported in desktop Safari, however the download filename will be "Unknown" due to a browser limitation.

The options available are configurable when instantiating the Items API.

By default download is turned on, however how this can be turned off by adding submit_failed_options and setting download to false.

{
    "name": "My activity title",
    "navigation": {...},
    // ... other properties ...
    "configuration": {
        "submit_failed_options": {
            "download": false
        }
    }
}

By default mailto is turned off, however this can be easily changed by adding submit_failed_options and setting mailto to true.

{
    "name": "My activity title",
    "navigation": {...},
    // ... other properties ...
    "configuration": {
        "submit_failed_options": {
            "mailto": true
        }
    }
}

The recipient (ie. to, cc, bcc) and subject of the mailto options can be further configured by passing an object.

{
    "name": "My activity title",
    "navigation": {...},
    // ... other properties ...
    "configuration": {
        "submit_failed_options": {
            "mailto": {
                "to": "youremail@example.com", // Defaults to empty
                "cc": "youremail@example.com",
                "bcc": "youremail@example.com, yoursecondemail@example.com",
                "subject": "Manual session responses" // Defaults to `Raw assessment responses`
            }
        }
    }
}

The usual set of label bundle options is available for the configuration panel.

Was this article helpful?
0 out of 0 found this helpful

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