Skip to content
Snippets Groups Projects
Commit fbaab967 authored by cewing's avatar cewing
Browse files

MIT CCX: Prevent the discussion tab from displaying

When the POC feature is enabled and there is an active poc displaying discussions leads to undefined behaviors.  Hide the tab to prevent usability problems.
parent 97748e56
No related merge requests found
......@@ -376,6 +376,10 @@ class DiscussionTab(EnrolledOrStaffTab):
)
def can_display(self, course, settings, is_user_authenticated, is_user_staff, is_user_enrolled):
if settings.FEATURES.get('PERSONAL_ONLINE_COURSES', False):
from pocs.overrides import get_current_poc
if get_current_poc():
return False
super_can_display = super(DiscussionTab, self).can_display(
course, settings, is_user_authenticated, is_user_staff, is_user_enrolled
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment