Public Method Items API

items()

Returns an object with methods to navigate between Items in the assessment player.

You would want to use this method so that you can use the navigation methods to create your own custom navigation controls, for example.

Important This method only works when the rendering_type initialization option is set to "assess".

Examples

var assessmentPlayerNavigation = itemsApp.items();

// Show available navigation methods
console.log(assessmentPlayerNavigation);

// To navigate to the next Item, you can run either of the following
assessmentPlayerNavigation.next();
itemsApp.items().next();

Arguments

None.

Return value

object

An object with methods for navigating across Items in the assessment player. Each method returns a Promise that is resolved when navigation completes, or rejected if navigation was interrupted. For example, the learner may cancel navigation via the warning_on_change dialog.

  • goto function

    Navigates to the specified Item.

    This method accepts an Item reference (string) or zero-based index (integer) as an argument.

    Returns: Promise
  • next function
    Navigates to the next Item in the assessment player.
    Returns: Promise
  • previous function
    Navigates to the previous Item in the assessment player.
    Returns: Promise

Related articles

  • The regions initialization option, which can be set to "items-only" to hide the entire assessment player interface and allows you to build your own alternative UI.
Was this article helpful?