Merge pull request #19155 from edx/rev/allow-studio-content-gating-override

Add Studio UI for tagging Full/Limited access contont
This commit is contained in:
Calen Pennington
2018-10-29 13:19:45 -04:00
committed by GitHub
15 changed files with 228 additions and 7 deletions

View File

@@ -15,6 +15,7 @@ from six import text_type
from django_comment_common.models import assign_default_role
from django_comment_common.utils import seed_permissions_roles
from openedx.core.djangoapps.site_configuration.models import SiteConfiguration
from openedx.features.course_duration_limits.config import CONTENT_TYPE_GATING_STUDIO_UI_FLAG
from student import auth
from student.models import CourseEnrollment
from student.roles import CourseInstructorRole, CourseStaffRole
@@ -457,6 +458,9 @@ def get_visibility_partition_info(xblock, course=None):
if len(partition["groups"]) > 1 or any(group["selected"] for group in partition["groups"]):
selectable_partitions.append(partition)
if CONTENT_TYPE_GATING_STUDIO_UI_FLAG.is_enabled():
selectable_partitions += get_user_partition_info(xblock, schemes=["content_type_gate"], course=course)
# Now add the cohort user partitions.
selectable_partitions = selectable_partitions + get_user_partition_info(xblock, schemes=["cohort"], course=course)

View File

@@ -1165,6 +1165,7 @@ INSTALLED_APPS = [
'rest_framework_swagger',
'openedx.features.course_duration_limits',
'openedx.features.content_type_gating',
]