Author API Methods
createActivity()
Navigates to a new Activity editor view, ready for an author to create a new Activity.
You would want to use this method so that you can navigate to the Activity editor view in your own application, for example.
Note This method can not be used to create Adaptive or
Random Activities.
If you want to programmatically create a new Adaptive or Random Activity, you can use the navigate()
method. See examples there.
Important The Activity is not saved when createActivity()
method is run. The author can save the Activity manually, or you can call the saveActivity()
method for the new Activity to be saved to the database.
Examples
authorApp.createActivity('My new Activity reference');
Arguments
-
activityReference string
The Activity reference used to identify the Activity.
If no value is passed, the new Activity that will be created will have a UUID as the reference. If you specify a custom reference, it must not match the reference of an existing Activity in the Item bank; otherwise, the operation will fail with an error.
Maximum length is 150 characters.
Return value
None (undefined
).
Related articles
- The
saveActivity()
method, which saves the Activity to the database.