Skip to content

chore(video): remove audio description waffle flag and related gating [LP-1205] - #461

Merged
abhalsod-sonata merged 2 commits into
release-ulmofrom
chore/LP-1205-remove-audio-description-toggle
Sep 9, 2026
Merged

chore(video): remove audio description waffle flag and related gating [LP-1205]#461
abhalsod-sonata merged 2 commits into
release-ulmofrom
chore/LP-1205-remove-audio-description-toggle

Conversation

@abhalsod-sonata

Copy link
Copy Markdown
Member

Removes the contentstore.enable_audio_description CourseWaffleFlag and all
gating 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

File Change
cms/djangoapps/contentstore/toggles.py Remove ENABLE_AUDIO_DESCRIPTION flag, annotation and audio_description_enabled() helper
xmodule/video_block/video_handlers.py studio_audio_description no longer 404s when the flag is off
xmodule/video_block/video_block.py Studio context always sets audio_description_file_name / audio_description_handler_url; LMS player metadata no longer includes audioDescriptionEnabled
xmodule/js/src/video/09_video_audio_description.js Drop featureEnabled; render and bind the AD control whenever audioDescriptionUrl is present
cms/.../serializers/course_waffle_flags.py Remove enable_audio_description field and getter
cms/.../views/course_waffle_flags.py Remove the key from the docstring example
cms/.../tests/test_course_waffle_flags.py Remove the key from expected defaults and the flag-on test; drop now-unused override_waffle_flag import
cms/.../tests/test_video_audio_description_handler.py Remove flag-off 404 test and all override_waffle_flag decorators; drop unused course_id from the block mock; rename test_delete_when_flag_enabledtest_delete_clears_field_and_returns_204
lms/djangoapps/courseware/tests/test_video_handlers.py Docstrings only - remove references to the flag

Note on the player JS

The toggle's docstring stated LMS playback was not gated by this flag. It was:
video_block.py wrote the flag into player metadata as audioDescriptionEnabled,
and 09_video_audio_description.js skipped rendering/binding when it was falsy.
Removing only the Python side would have left that key undefined and broken AD
playback. 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.py and its expectations in
test_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.test
  • pytest lms/djangoapps/courseware/tests/test_video_handlers.py -k AudioDescription --ds=lms.envs.test
  • git grep -n -E "enable_audio_description|audio_description_enabled|ENABLE_AUDIO_DESCRIPTION|audioDescriptionEnabled" → only the bool(url) template key remains
  • Manual: upload / play / delete an AD file in Studio and LMS with no flag row present

Ticket

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
@abhalsod-sonata
abhalsod-sonata merged commit 353a5da into release-ulmo Sep 9, 2026
64 checks passed
@abhalsod-sonata
abhalsod-sonata deleted the chore/LP-1205-remove-audio-description-toggle branch September 9, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants