Skip to content

Commit bac18da

Browse files
committed
chore: remove legacy video editor code
1 parent ddd197e commit bac18da

4 files changed

Lines changed: 7 additions & 32 deletions

File tree

cms/djangoapps/contentstore/toggles.py

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -86,25 +86,6 @@ def exam_setting_view_enabled(course_key):
8686
return not LEGACY_STUDIO_EXAM_SETTINGS.is_enabled(course_key)
8787

8888

89-
# .. toggle_name: legacy_studio.video_editor
90-
# .. toggle_implementation: WaffleFlag
91-
# .. toggle_default: False
92-
# .. toggle_description: Temporarily fall back to the old Video component (a.k.a. video block) editor.
93-
# .. toggle_use_cases: temporary
94-
# .. toggle_creation_date: 2025-03-14
95-
# .. toggle_target_removal_date: 2025-09-14
96-
# .. toggle_tickets: https://github.com/openedx/edx-platform/issues/36275
97-
# .. toggle_warning: In Ulmo, this toggle will be removed. Only the new (React-based) experience will be available.
98-
LEGACY_STUDIO_VIDEO_EDITOR = CourseWaffleFlag('legacy_studio.video_editor', __name__)
99-
100-
101-
def use_new_video_editor(course_key):
102-
"""
103-
Returns a boolean = true if new video editor is enabled
104-
"""
105-
return not LEGACY_STUDIO_VIDEO_EDITOR.is_enabled(course_key)
106-
107-
10889
# .. toggle_name: legacy_studio.pdf_editor
10990
# .. toggle_implementation: WaffleFlag
11091
# .. toggle_default: False
@@ -129,7 +110,7 @@ def use_new_pdf_editor():
129110
# .. toggle_use_cases: temporary
130111
# .. toggle_creation_date: 2023-04-03
131112
# .. toggle_target_removal_date: 2023-6-01
132-
# .. toggle_warning: You need to activate the `new_core_editors.use_new_video_editor` flag to use this new flow.
113+
# .. toggle_warning: This controls the new core video xblock editor flow.
133114
ENABLE_VIDEO_GALLERY_FLOW_FLAG = WaffleFlag('new_core_editors.use_video_gallery_flow', __name__)
134115

135116

cms/static/js/views/pages/container.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -538,12 +538,11 @@ function($, _, Backbone, gettext, BasePage,
538538
if (!options || options.view !== 'visibility_view') {
539539
const primaryHeader = $(event.target).closest('.xblock-header-primary, .nav-actions');
540540

541-
var useNewVideoEditor = primaryHeader.attr('use-new-editor-video'),
542-
blockType = primaryHeader.attr('data-block-type'),
541+
var blockType = primaryHeader.attr('data-block-type'),
543542
useNewPdfEditor = primaryHeader.attr('use-new-editor-pdf');
544543

545544
if((blockType === 'html')
546-
|| (useNewVideoEditor === 'True' && blockType === 'video')
545+
|| (blockType === 'video')
547546
|| (blockType === 'problem')
548547
|| (useNewPdfEditor === 'True' && blockType === 'pdf')
549548
) {
@@ -1204,8 +1203,7 @@ function($, _, Backbone, gettext, BasePage,
12041203
},
12051204

12061205
onNewXBlock: function(xblockElement, scrollOffset, is_duplicate, data) {
1207-
var useNewVideoEditor = this.$('.xblock-header-primary').attr('use-new-editor-video'),
1208-
useVideoGalleryFlow = this.$('.xblock-header-primary').attr("use-video-gallery-flow");
1206+
var useVideoGalleryFlow = this.$('.xblock-header-primary').attr("use-video-gallery-flow");
12091207

12101208
// find the block type in the locator if availible
12111209
if(data.hasOwnProperty('locator')) {
@@ -1214,7 +1212,7 @@ function($, _, Backbone, gettext, BasePage,
12141212
}
12151213
// open mfe editors for new blocks only and not for content imported from libraries
12161214
if(!data.hasOwnProperty('upstreamRef') && (blockType.includes('html')
1217-
|| (useNewVideoEditor === 'True' && blockType.includes('video'))
1215+
|| (blockType.includes('video'))
12181216
|| (blockType.includes('problem')))
12191217
){
12201218
if (this.options.isIframeEmbed && (this.isSplitTestContentPage || this.isVerticalContentPage)) {

cms/templates/container.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from django.utils.translation import gettext as _
1414

1515
from cms.djangoapps.contentstore.helpers import xblock_studio_url, xblock_type_display_name
16-
from cms.djangoapps.contentstore.toggles import use_new_pdf_editor, use_new_video_editor, use_video_gallery_flow
16+
from cms.djangoapps.contentstore.toggles import use_new_pdf_editor, use_video_gallery_flow
1717
from cms.djangoapps.contentstore.utils import get_editor_page_base_url
1818
from openedx.core.djangolib.js_utils import (
1919
dump_js_escaped_json, js_escaped_string
@@ -111,7 +111,6 @@
111111
<%block name="content">
112112

113113
<%
114-
use_new_editor_video = use_new_video_editor(xblock_locator.course_key)
115114
use_new_editor_pdf = use_new_pdf_editor()
116115
use_new_video_gallery_flow = use_video_gallery_flow()
117116
%>
@@ -167,7 +166,6 @@ <h1 class="page-header-title xblock-field-value incontext-editor-value"><span cl
167166
</div>
168167

169168
<nav class="nav-actions" aria-label="${_('Page Actions')}"
170-
use-new-editor-video = ${use_new_editor_video}
171169
use-new-editor-pdf = ${use_new_editor_pdf}
172170
use-video-gallery-flow = ${use_new_video_gallery_flow}
173171
authoring_MFE_base_url = ${get_editor_page_base_url(xblock_locator.course_key)}

cms/templates/studio_xblock_wrapper.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88
from openedx.core.djangolib.js_utils import (
99
dump_js_escaped_json, js_escaped_string
1010
)
11-
from cms.djangoapps.contentstore.toggles import use_new_pdf_editor, use_new_video_editor, use_video_gallery_flow
11+
from cms.djangoapps.contentstore.toggles import use_new_pdf_editor, use_video_gallery_flow
1212
from cms.lib.xblock.upstream_sync import UpstreamLink
1313
from openedx.core.djangoapps.content_tagging.toggles import is_tagging_feature_disabled
1414
%>
1515
<%
16-
use_new_editor_video = use_new_video_editor(xblock.context_key)
1716
use_new_editor_pdf = use_new_pdf_editor()
1817
use_new_video_gallery_flow = use_video_gallery_flow()
1918
use_tagging = not is_tagging_feature_disabled()
@@ -83,7 +82,6 @@
8382
is-collapsed
8483
% endif
8584
"
86-
use-new-editor-video = ${use_new_editor_video}
8785
use-new-editor-pdf = ${use_new_editor_pdf}
8886
use-video-gallery-flow = ${use_new_video_gallery_flow}
8987
authoring_MFE_base_url = ${get_editor_page_base_url(xblock.location.course_key)}

0 commit comments

Comments
 (0)