fix: include the correct SCSS file for lti_block (#33155)
There exists a Sass file for lti_block's display, but not for its editor.
However, during the `add_sass_to_fragment` refactoring, I mixed that 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
This commit is contained in:
@@ -383,7 +383,6 @@ class LTIBlock(
|
||||
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 @@ class LTIBlock(
|
||||
"""
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user