Author API Methods
setItemReference()
Sets the reference of the Item being edited.
You would want to use this method so that you can set a common Item reference from your own database and the Learnosity Item bank, for example.
Examples
var itemReference = authorApp.setItemReference("my-new-item-reference");
console.log(itemReference);
Arguments
-
itemReference string
The Item reference used to identify the Item.
Maximum length is 150 characters.
Return value
Type boolean
Returns true
if successful.
Returns false
if unable to set the Item reference, for example, when not in the Item editor view, or the new reference is the same as the current reference.
Related articles
- The
getItemReference()
method, which allows you to get the Item reference.