From f89ea2f8f78edf533b428ab22a595f3c4018b3a0 Mon Sep 17 00:00:00 2001 From: "Kyle D. McCormick" Date: Fri, 1 Sep 2023 12:03:22 -0400 Subject: [PATCH] fix: include the correct SCSS file for lti_block lti_block has Sass for its display, but not for its editor. During the `add_sass_to_fragment` refactoring, I mixed this up: I added a non-existent scss file to the studio_view but didn't add the actual scss file to the student_view. Course authors using the (deprecated) lti_block saw: We're having trouble rendering your component Students will not be able to access this component. Re-edit your component to fix the error. Error: Sass not found: /edx/app/edxapp/edx-platform/xmodule/assets/LTIBlockEditor.scss as a result of this bug. Original PR: https://github.com/openedx/edx-platform/pull/32592 Private-ref: https://2u-internal.atlassian.net/browse/TNL-11029 --- xmodule/lti_block.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmodule/lti_block.py b/xmodule/lti_block.py index 7705a7321bd9..a463da79ef0b 100644 --- a/xmodule/lti_block.py +++ b/xmodule/lti_block.py @@ -383,7 +383,6 @@ def studio_view(self, _context): fragment = Fragment( self.runtime.service(self, 'mako').render_cms_template(self.mako_template, context) ) - add_sass_to_fragment(fragment, 'LTIBlockEditor.scss') add_webpack_js_to_fragment(fragment, 'LTIBlockEditor') shim_xmodule_js(fragment, self.studio_js_module_name) return fragment @@ -499,6 +498,7 @@ def student_view(self, _context): """ fragment = Fragment() fragment.add_content(self.runtime.service(self, 'mako').render_lms_template('lti.html', self.get_context())) + add_sass_to_fragment(fragment, 'LTIBlockDisplay.scss') add_webpack_js_to_fragment(fragment, 'LTIBlockDisplay') shim_xmodule_js(fragment, 'LTI') return fragment