Initialization Option Items API

items

Defines the Items to be used in the current assessment.

This option is essential because this is the main way to specify the Item content, where you are selecting Items and building the assessment according to your own requirements.

This can be defined as an array of unique Item references as strings, or an array of ItemObjects for advanced usage.

Note The items and activity_template_id initialization options are mutually-alternative. Therefore, instead of specifying the individual Items to be delivered via the items initialization option, you could instead use the activity_template_id initialization option and pass an Activity reference. The Activity reference is supported in most Learnosity products and allows you to group Items for use in assessments and reporting.

Values

Request object key items

This option can be initialized as one of the following types: array[strings] array[ItemObject].

  • Type array[strings]
    An array of unique Item references as strings.
    var initializationOptions = {
        items: [
            "my_item_reference_1",
            "my_item_reference_2",
            "my_item_reference_3",
            // ...
        ]
        // ...
    };
  • Type array[ItemObject]
    An array of Item objects.
    var initializationOptions = {
        items: [
            {
                "id": "my_item_reference_id_1",
                "reference": "item_reference_1"
            },
            {
                "id": "my_item_reference_id_2",
                "reference": "my_item_reference_2"
            },
            {
                "id": "my_item_reference_id_3",
                "reference": "my_item_reference_3"
            },
            // additional Item object definitions below ...
        ]
    };
    • ItemObject object

      Item objects can be used in place of Item references when Items from multiple Item banks or Item pools need to be used within the same Activity.

      • id string

        A host-page supplied unique identifier (which can be the same as the Item reference).

        Note When using a different value than the reference, some data from Reports API might be affected.

      • reference string
        The Item reference to retrieve.
      • data_table_index integer

        A configuration parameter that will be used to specify the index of a single row in the dynamic content dataset to serve at runtime.

        Note It will override the data_table_index value in dynamic_items.

      • data_table_row string

        A configuration parameter that will be used to specify the key of a single row in the dynamic content dataset to serve at runtime.

        Important Must be a valid UUID.

        Note It has priority over data_table_index.

        Note It has priority over data_table_index value in the dynamic_items initialization option.

      • item_pool_id string
        Sets or override the Item Pool to retrieve Item from.
      • organisation_id string
        Sets or override the Item Bank to retrieve Item from.
      • scoring_type string

        The scoring type specified in the Item Bank can be overriden for each Item. If desired, it can also be overridden for the entire Activity. If both an Item-level and an Activity-level scoring types are specified, the Item-level configuration takes precedence.

Caveats

Related articles

Was this article helpful?