Skip to content

Commit

Permalink
fix: fix xblock close checking for HTML xblock
Browse files Browse the repository at this point in the history
  • Loading branch information
NiedielnitsevIvan committed Jun 17, 2024
1 parent 1072927 commit 1c30aea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openedx/features/offline_mode/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def generate_offline_content_for_course(course_id):
course_key = CourseKey.from_string(course_id)
for offline_supported_block_type in OFFLINE_SUPPORTED_XBLOCKS:
for xblock in modulestore().get_items(course_key, qualifiers={'category': offline_supported_block_type}):
if hasattr(xblock, 'closed') and not xblock.closed():
if not hasattr(xblock, 'closed') or not xblock.closed():
block_id = str(xblock.location)
html_data = XBlockRenderer(block_id).render_xblock_from_lms()
generate_offline_content_for_block.apply_async([block_id, html_data])
Expand Down

0 comments on commit 1c30aea

Please sign in to comment.