chore(video): remove audio description waffle flag and related gating [LP-1205] - #461
Merged
abhalsod-sonata merged 2 commits intoSep 9, 2026
Conversation
The Audio Description feature is fully rolled out on edx.org, so the contentstore.enable_audio_description CourseWaffleFlag no longer serves a purpose. Remove the flag, its toggle helper, and every place it was consulted: - studio_audio_description XBlock handler no longer returns 404 when the flag is off - Studio editor context always exposes the AD file name and handler URL - LMS player metadata no longer carries audioDescriptionEnabled, and 09_video_audio_description.js no longer gates rendering/binding on it - course_waffle_flags serializer, view docstring and tests drop enable_audio_description - Handler tests drop the flag-off case and the override_waffle_flag decorators Behaviour is unchanged for every environment where the flag was on. Prerequisite for the upstream contribution under LP-911, following the LP-1108 precedent for the transcript editor.
The waffle flag removal took audioDescriptionEnabled out of the player metadata, but five expected-metadata dicts in test_video_mongo.py still asserted it. Remove those entries. The separate snake_case audio_description_enabled template-context key means "this video has an AD file" and is intentionally left in place. LP-1205
hiteshkava
approved these changes
Sep 9, 2026
abhalsod-sonata
deleted the
chore/LP-1205-remove-audio-description-toggle
branch
September 9, 2026 07:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the
contentstore.enable_audio_descriptionCourseWaffleFlag and allgating on it. The feature is fully rolled out on edx.org (TNL2-606), so the
flag is dead weight, and removing it downstream first means the upstream
contribution under LP-911 doesn't need to carry it. Same approach as the
transcript editor in LP-1108.
Changes
cms/djangoapps/contentstore/toggles.pyENABLE_AUDIO_DESCRIPTIONflag, annotation andaudio_description_enabled()helperxmodule/video_block/video_handlers.pystudio_audio_descriptionno longer 404s when the flag is offxmodule/video_block/video_block.pyaudio_description_file_name/audio_description_handler_url; LMS player metadata no longer includesaudioDescriptionEnabledxmodule/js/src/video/09_video_audio_description.jsfeatureEnabled; render and bind the AD control wheneveraudioDescriptionUrlis presentcms/.../serializers/course_waffle_flags.pyenable_audio_descriptionfield and gettercms/.../views/course_waffle_flags.pycms/.../tests/test_course_waffle_flags.pyoverride_waffle_flagimportcms/.../tests/test_video_audio_description_handler.pyoverride_waffle_flagdecorators; drop unusedcourse_idfrom the block mock; renametest_delete_when_flag_enabled→test_delete_clears_field_and_returns_204lms/djangoapps/courseware/tests/test_video_handlers.pyNote on the player JS
The toggle's docstring stated LMS playback was not gated by this flag. It was:
video_block.pywrote the flag into player metadata asaudioDescriptionEnabled,and
09_video_audio_description.jsskipped rendering/binding when it was falsy.Removing only the Python side would have left that key
undefinedand broken ADplayback. The JS gate is removed in the same change so playback matches current
production (flag-on) behaviour.
Not touched: the
'audio_description_enabled': bool(audio_description_url)template-context key in
video_block.pyand its expectations intest_video_mongo.py- that key means "this video has an AD file", not the flag.Testing
pytest cms/djangoapps/contentstore/tests/test_video_audio_description_handler.py cms/djangoapps/contentstore/rest_api/v1/views/tests/test_course_waffle_flags.py --ds=cms.envs.testpytest lms/djangoapps/courseware/tests/test_video_handlers.py -k AudioDescription --ds=lms.envs.testgit grep -n -E "enable_audio_description|audio_description_enabled|ENABLE_AUDIO_DESCRIPTION|audioDescriptionEnabled"→ only thebool(url)template key remainsTicket