Open RobertPeek opened 7 years ago
+1 This would be really useful.
@RobertPeek @dancgray When you say
check for the '_isEnabled' value an element
By 'element' do you mean just the primary '_isEnabled' attribute on a component, block, article or contentObject content item?
{
"_isEnabled": false
}
Or do you mean plugin specific '_isEnabled' values as well... such as:
{
"_trickle": {
"_isEnabled": false
}
}
@oliverfoster
My thoughts were that "_isEnabled" should be checked within a plugin, like your example above with Trickle.
Ahh, as I feared. Thanks dude.
I really like the concept of checking for enabled plugins, but there is not really a bullet proof way to check that a plugin is actually enabled. Some developers, and most core plugins use _isEnabled
but you can name and structure your json as you wish. Also, a plugin may be globally enabled in config.json
or course.json
and used in other elements.
I think we should give plugin-authors a way to communicate what setting will actually enable a plugin. This may default to _isEnabled
.
This will also make things in the Authoringtool much easier. For instance we could show icons when a plugin is enabled in the page editor. https://github.com/adaptlearning/adapt_authoring/issues/1481
Would it be possible to add a check for the _'isEnabled' value on an element within the grunt translate task? At present all JSON is translated even when plugins are not enabled and if fields are pre-populated with text this can cause over translating of words.
I am of course referring to the exported files from the Authoring Tool as this exports all attributes on every element (article, Block, Component etc). When working in the Framework you can of course just remove the unnecessary JSON.