Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Block types processing refactoring #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

myhailo-chernyshov-rg
Copy link

@myhailo-chernyshov-rg myhailo-chernyshov-rg commented Jan 7, 2025

Description

There is a problem that when we need to add a new block type processing, we need to change the code in several places: update Cartridge.get_resource_content to define the new processed content type, add the OLX creation logic for this content type to OlxExport and call it in OlxExport._create_olx_nodes.
It is decided to create a separate class responsible for a block type processing. So, there are separate processors for HTML, LTI, QTI, Video etc. The list of block type processors are specified in settings, so we can control the processors to enable from settings. It will simlify a processor disabling if, for example, a third-party xblock created by the processor is not installed on the edX platform.

Depenencies

Supporting information

FC-0063

Deadline

"None"

@myhailo-chernyshov-rg myhailo-chernyshov-rg self-assigned this Jan 7, 2025
@myhailo-chernyshov-rg myhailo-chernyshov-rg marked this pull request as draft January 7, 2025 15:25
@myhailo-chernyshov-rg myhailo-chernyshov-rg force-pushed the myhailochernyshov/block-types-processing-refactoring branch 2 times, most recently from e24e7cd to de68907 Compare January 7, 2025 23:14
@myhailo-chernyshov-rg myhailo-chernyshov-rg changed the title [Draft] Block types processing refactoring refactor: Block types processing refactoring Jan 7, 2025
@myhailo-chernyshov-rg myhailo-chernyshov-rg marked this pull request as ready for review January 7, 2025 23:36
@myhailo-chernyshov-rg myhailo-chernyshov-rg force-pushed the myhailochernyshov/block-types-processing-refactoring branch 4 times, most recently from 6a2f75f to e12cbb8 Compare January 8, 2025 15:46
src/cc2olx/content_parsers/abc.py Show resolved Hide resolved
src/cc2olx/content_parsers/discussion.py Outdated Show resolved Hide resolved
src/cc2olx/content_parsers/html.py Outdated Show resolved Hide resolved
src/cc2olx/content_parsers/html.py Outdated Show resolved Hide resolved
src/cc2olx/content_parsers/html.py Outdated Show resolved Hide resolved
src/cc2olx/content_parsers/qti.py Outdated Show resolved Hide resolved
src/cc2olx/content_parsers/utils.py Show resolved Hide resolved
src/cc2olx/content_parsers/utils.py Outdated Show resolved Hide resolved
src/cc2olx/content_parsers/video.py Outdated Show resolved Hide resolved
src/cc2olx/content_processors.py Show resolved Hide resolved
@myhailo-chernyshov-rg myhailo-chernyshov-rg force-pushed the myhailochernyshov/block-types-processing-refactoring branch 11 times, most recently from 0a321da to f80d0fc Compare January 10, 2025 17:37
@myhailo-chernyshov-rg myhailo-chernyshov-rg force-pushed the myhailochernyshov/block-types-processing-refactoring branch 2 times, most recently from 50a33f9 to 1650432 Compare January 14, 2025 10:06
@myhailo-chernyshov-rg myhailo-chernyshov-rg force-pushed the myhailochernyshov/block-types-processing-refactoring branch from 1650432 to 1c28a30 Compare January 15, 2025 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants