feat: Rollout override for Learning Sequences API (#28205)

We control rollout of the Learning Sequences REST API with the
USE_FOR_OUTLINES (learning_sequences.use_for_outlines) course waffle
flag. But sometimes we're going to want to be able to take a look at
production data output of this API before explicitly turning the API on
(and switching over to it) for the Courseware MFE. To do this, we're
going to make the availability base itself purely on the waffle flag and
course type (Old Mongo courses are not supported), and allow people to
"peek" at what the API would have given if it was rolled out by passing
an explicit "force_on=1" querystring param.

This is work to support the rollout of TNL-8330.
This commit is contained in:
David Ormsbee
2021-07-28 11:53:17 -04:00
committed by GitHub
parent a70e6b101e
commit dae459bfb4
7 changed files with 47 additions and 41 deletions

View File

@@ -296,7 +296,7 @@ class OutlineTabView(RetrieveAPIView):
#
# The long term goal is to remove the Course Blocks API call entirely,
# so this is a tiny first step in that migration.
if course_blocks and learning_sequences_api_available(course_key, request.user):
if course_blocks and learning_sequences_api_available(course_key):
user_course_outline = get_user_course_outline(
course_key, request.user, datetime.now(tz=timezone.utc)
)