Extensions/Assessment/networkStatus

Extensions add specific functionality to Items API. They rely on modules within LT being available.

--

Checks for an active network connection. If none found, adds an icon to the UI to indicate the status to the end user.

Methods

run(optionsopt)

Since
2.12.0
Example
import { LT } from '@caspingus/lt/src/assessment/core';
import * as networkStatus from '@caspingus/lt/src/assessment/extensions/ui/networkStatus/index';

LT.init(itemsApp); // Set up LT with the Items API application instance variable
networkStatus.run();
Parameters:
Name Type Attributes Description
options object <optional>

Optional configuration object includes:

  • iconWrapper (string) classname of element to inject the broken connection icon. You should never need this if using any of the Learnosity regions.
  • interval (numeric) millisecond interval to check connection. Defaults to 30000 (30 seconds).
  • message (string) message for tooltip and screen reader users.
  • render (boolean) whether to render the icon or not. Defaults to true.
  • uri (string) URI to check for network connectivity. Defaults to a Learnosity API endpoint which is already whitelisted.