Assessment/Player

Everything relating to the assessment player.

Methods

answerMasking(action)

Shows or hides the player answer masking tool. Answer masking has to be enabled in Items API configuration for this to work.

Since
2.15.0
Parameters:
Name Type Description
action boolean

Whether to show (true) or hide (false).

dialog(config)

Renders an Items API custom dialog.

Since
0.1.0
See
Example
LT.dialog({
    "header": "My heading",
    "body":  "Custom body with <strong>html</strong> support",
    "buttons": [
        {
            "button_id": "my_primary_button",
            "label": "My Primary Button",
            "is_primary": true
        },
        {
            "button_id": "my_standard_button",
            "label": "My Standard Button",
            "is_primary": false
        }
    ]
});
Parameters:
Name Type Description
config object

Dialog configuration

hideDialog()

Hides a custom dialog.

Since
1.1.0

isResponsiveMode() → {boolean}

Checks whether the player is in responsive mode. This will be either the small or medium breakpoints. See more https://help.learnosity.com/hc/en-us/articles/360000758337-Customizing-the-Assessment-Player-experience-with-User-Interface-Regions#responsive-behavior

Since
1.2.0
Returns
Type
(boolean)

isReviewScreen() → {boolean}

Check that the review screen has been loaded.

Since
0.1.0
Returns
Type
(boolean)

lineReader(actionopt)

Shows or hides the player line reader. The line reader has to be enabled in Items API configuration for this to work.

Since
2.15.0
Parameters:
Name Type Attributes Description
action string <optional>

Whether to toggle (default), show or hide the line reader.

navigate(target)

Generic function to call API navigation methods. Supports:

  • previous
  • next
  • review
  • submit
  • Number (0-based) representing the item index

Internally this calls next(), previous(), review(), or goto() and submit().

Since
0.1.0
Parameters:
Name Type Description
target string

next()

Navigates to the next item. No-op if on the last item.

Since
0.1.0

previous()

Navigates to the previous item. No-op if on item #1.

Since
0.1.0

review()

Toggles the review screen.

Since
0.1.0

submit()

Submits the session.

Since
0.1.0