Commit fbaab967 by cewing

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
......@@ -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
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment