Public Method Items API

dynamic

Type: object

Methods for working with Items that contain dynamic content.

You would want to use this object and its methods to interact with dynamic content and "Try Again" functionality.

Note This object and its dynamic content methods won't appear if there is no dynamic content set for the Item.

Properties

  • nextAttempt function

    Load the next data row from the dynamic content table in the Item and displays it for the learner.

    Note This method will load the very first dynamic content entry if it has reached the last index.

    itemsApp.assessApp().item('my_item_reference').nextAttempt();
  • previousAttempt function

    Load the previous data row from the dynamic content table in the Item and displays it for the learner.

    Note This method will load the very last dynamic content entry if it has reached the beginning (index 0).

    itemsApp.assessApp().item('my_item_reference').previousAttempt();
  • currentAttemptIndex function

    Returns the index of the current attempt in the dynamic content table.

    Returns: integer

    The response index for the current attempt. This index can be used to check for the appropriate dynamic content response value.

    itemsApp.assessApp().item('my_item_reference').currentAttemptIndex();
  • totalAttempts function

    Counts the total number of dynamic content attempts for the current Item.

    Used with the "Try Again" functionality, this is the number of times the learner has clicked "Try Again".

    Returns: integer

    Total number of attempts for the specified Item.

    itemsApp.assessApp().item('my_item_reference').totalAttempts();

Related articles

Was this article helpful?