* Add team assignments to frontend * Limit team assignments to the given teamset * Remove deprecated django render_to_response * Move team assignments panel behind feature flag
27 lines
730 B
Python
27 lines
730 B
Python
"""
|
|
Togglable settings for Teams behavior
|
|
"""
|
|
from django.conf import settings
|
|
from openedx.core.djangoapps.waffle_utils import CourseWaffleFlag
|
|
|
|
|
|
# Course Waffle inherited from edx/edx-ora2
|
|
WAFFLE_NAMESPACE = 'openresponseassessment'
|
|
TEAM_SUBMISSIONS_FLAG = 'team_submissions'
|
|
|
|
# edx/edx-platform feature
|
|
TEAM_SUBMISISONS_FEATURE = 'ENABLE_ORA_TEAM_SUBMISSIONS'
|
|
|
|
|
|
def are_team_submissions_enabled(course_key):
|
|
"""
|
|
Checks to see if the CourseWaffleFlag or Django setting for team submissions is enabled
|
|
"""
|
|
if CourseWaffleFlag(WAFFLE_NAMESPACE, TEAM_SUBMISSIONS_FLAG).is_enabled(course_key):
|
|
return True
|
|
|
|
if settings.FEATURES.get(TEAM_SUBMISISONS_FEATURE, False):
|
|
return True
|
|
|
|
return False
|