Conditionalize track selection based on settings of course duration and content gating

This commit is contained in:
Bill Filler
2018-12-18 16:30:15 -05:00
committed by Gabe Mulley
parent b35cf731a1
commit c253374372
7 changed files with 83 additions and 54 deletions

View File

@@ -31,6 +31,7 @@ from openedx.core.djangoapps.embargo import api as embargo_api
from openedx.core.djangoapps.programs.utils import ProgramDataExtender, ProgramProgressMeter
from openedx.core.djangoapps.waffle_utils import WaffleFlag, WaffleFlagNamespace
from openedx.features.content_type_gating.models import ContentTypeGatingConfig
from openedx.features.course_duration_limits.models import CourseDurationLimitConfig
from student.models import CourseEnrollment
from util.db import outer_atomic
from xmodule.modulestore.django import modulestore
@@ -192,6 +193,10 @@ class ChooseModeView(View):
user=request.user,
course_key=course_key
),
"course_duration_limit_enabled": CourseDurationLimitConfig.enabled_for_enrollment(
user=request.user,
course_key=course_key
),
}
context.update(
get_experiment_user_metadata_context(