Public Method Items API

getActivity()

Obtains the complete initialization object used to initialize Items API and allows you to see all of the option values that have been applied for the current assessment.

You would want to use this method so that you can diagnose any problems with the current assessment, for example.

You can use this to investigate the origin content of a template specified by the activity_template_id initialization option, if defined.

Examples

var activity = itemsApp.getActivity();
console.log(activity);

// Returns
{
    activity_id: "itemsassessdemo",
    config : {
        title: "My Assessment Title",
        subtitle: "My subtitle",
        regions: {…},
        time: {…}
    },
    items: [...],
    name: "Items API demo - assess activity",
    organisation_id: 1234567,
    rendering_type: "assess",
    session_id: "98287363-ea5b-48fa-9ed7-5b58f768",
    type: "submit_practice",
    user_id: "aeee19fb-4e7b-435c-92f9-d93a1099"
}

Arguments

None.

Return value

object

The complete initialization object for the Activity. See code example.

Related articles

  • The activity_template_id initialization option, which is the reference of an existing Activity stored in Learnosity's Item bank to be used as a template.
Was this article helpful?