Read-only configuration for Items

You can protect the Items in your Item Bank from unwanted edits using the read-only configuration for Items. Using this configuration, you can either specify that all Items in the Item bank are to be rendered in the read-only mode, or you can specify specific Items based on Tags that are attached to the Items. If nothing is specified in the filter.either config option, all Items in the Item Bank will be rendered in the read-only mode and authors will not be able to create new Items in the Item Bank.

lts-2021-1-author-read-only-items-03-feb__1_.png

Specifying an array of Tags in the v2 format for the filter.either option will render only Items which have any of the Tags specified attached to them in the read-only mode. All other Items can be edited and modified. You can create new Items with this configuration:

 

{
"mode": "item_list",
"config": {
"global": {
"items": {
"read_only": {
"enabled": true
}
}
}
}
}

Code Example 1: configuration to set all Items in the Item Bank to read-only. 

 

For Items that are filtered out, to be rendered in the read-only mode, based on Tags which are attached to them, you could also specify if they can be duplicated so that authors can work on a new copy of the Item while keeping the original one intact. For the duplicated Items, Author API will automatically remove any Tag mentioned in the filter.either option which was attached to the Item so that it can be edited. 

Was this article helpful?

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