https://github.com/adaptlearning/adapt-contrib-modifiers
An extension to manage a collection of modifier sets used throughout the content
https://github.com/adaptlearning/adapt-contrib-modifiers
Last synced: 7 months ago
JSON representation
An extension to manage a collection of modifier sets used throughout the content
- Host: GitHub
- URL: https://github.com/adaptlearning/adapt-contrib-modifiers
- Owner: adaptlearning
- License: gpl-3.0
- Created: 2023-04-03T14:22:03.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-03-03T17:25:11.000Z (12 months ago)
- Last Synced: 2025-03-03T18:33:36.038Z (12 months ago)
- Language: JavaScript
- Homepage: HomePage
- Size: 15.6 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# adapt-contrib-modifiers
An extension to manage a collection of modifier sets used throughout the content. In addition to managing registered sets, this plugin provides the abstract modifier set logic from which other plugins can extend to create new sets.
## Modifier sets
A modifier set consists of a collection of models for which changes to modifying attributes are observed and managed, to control their `_isAvailable` property.
Each plugin will register a set type with the API, and identify its parent-child model relationship, along with any extended functionality specific to that plugin. Examples of modifiers include [banking](https://github.com/adaptlearning/adapt-contrib-banking) and [randomise](https://github.com/adaptlearning/adapt-contrib-randomise).
If the config or associated child models are changed in a way which affects the modifier, the parent model is reset as the content will be refreshed and needs to be retaken.
## Usage
Plugins can extend the [ModifierSet](https://github.com/adaptlearning/adapt-contrib-modifiers/blob/master/js/ModifierSet.js) by importing the set as required:
```JavaScript
import ModifierSet from 'extensions/adapt-contrib-modifiers/js/ModifierSet';
```
----------------------------
**Version number:** 1.0.0
**Framework versions:** >=5.28.8
**Author / maintainer:** Adapt Core Team with [contributors](https://github.com/adaptlearning/adapt-contrib-modifiers/graphs/contributors)