Creating and Editing Items Within an Activity Using the Author API Activity Editor


The Author API Activity editor allows you to add and edit Items within an Activity, without having to switch to the item_list mode. This means you can create Activities on the fly without having to first create all the Items, or make corrections to your Activity quickly. This document is intended for developers and authors who would use the Author API Activity editor to manage their Activities. 


Initializing the Author API Activity editor to create and edit Items within an Activity

The ability to create and edit Items within an Activity is enabled in the Author API by default, however, you can control these options through the activity_edit.item.add and activity_edit.item.edit config objects.

The behavior of the Item editor within the Activity editor is determined by the options in the item_edit config object in Author API initialization options. You cannot duplicate Items within Activities nor can you disable the persisting of Items in Learnosity's Item banks by setting the config option to false, when creating or editing Items within Activities. All events available in the item_edit mode are also available during the editing of Items within an Activity.


Understanding Item and Activity Status

Items are created in the Published status by default when created within an Activity. 

You can edit the Item status to Archived or Unpublished, but such Items will then not be available to add to any other Activity. You would also not be able to preview Activities with unpublished Items. You can always hide the ability to change the Items status in Item settings by using the item_edit.item.status config option.

When using with multiple Item banks

When configured to use multiple Item banks, Items created within Activities would be saved in the default Item bank. You would not be allowed to edit Items within Activities which come from a read only Item bank, or which come from Item pools.

Navigate routes

The following routes are available through the Navigate() public method for creating and editing Items within an Activity:


This will load the Item edit view within the Activity editor to create a new Item.


This will load the Item specified in the idOrReference parameter in the Item edit view for editing. You can pass on the Item id specified in the Activity or the Item’s reference. If the Activity has more than one Item with the same reference, the first instance of the Item matching the reference would be opened for editing and a console warning would be shown. 

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.