Skip to content

Commit

Permalink
fix: include the correct SCSS file for lti_block (#33155)
Browse files Browse the repository at this point in the history
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: #32592
Private-ref: https://2u-internal.atlassian.net/browse/TNL-11029
  • Loading branch information
kdmccormick authored Sep 1, 2023
1 parent 53f2030 commit 6704901
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xmodule/lti_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6704901

Please sign in to comment.