Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add KOLIBRI_ENABLE_CUSTOM_CHANNEL_NAV - default True to options.py #8025

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions kolibri/plugins/learn/kolibri_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
from kolibri.core.webpack import hooks as webpack_hooks
from kolibri.plugins import KolibriPluginBase
from kolibri.plugins.hooks import register_hook
from kolibri.utils import conf


class Learn(KolibriPluginBase):
untranslated_view_urls = "api_urls"
translated_view_urls = "urls"
kolibri_options = "options"


@register_hook
Expand Down Expand Up @@ -51,6 +53,9 @@ def plugin_data(self):
return {
"allowGuestAccess": get_device_setting("allow_guest_access"),
"allowLearnerUnassignedResourceAccess": allow_learner_unassigned_resource_access(),
"enableCustomChannelNav": conf.OPTIONS["Learn"][
"KOLIBRI_ENABLE_CUSTOM_CHANNEL_NAV"
],
}


Expand Down
9 changes: 9 additions & 0 deletions kolibri/plugins/learn/options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
option_spec = {
"Learn": {
"KOLIBRI_ENABLE_CUSTOM_CHANNEL_NAV": {
"type": "boolean",
"default": False,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue asks for this to be disabled by default, so if the flag is going to be DISABLE then this should default to True!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made it into an ENABLE name instead

"envvars": ("KOLIBRI_ENABLE_CUSTOM_CHANNEL_NAV",),
},
},
}