Skip to content

Xblock version 5.0.0 broke plugin #777

@BrandonHBodine

Description

@BrandonHBodine

We have a plugin that is replacing the default XBlock with our own implementation that was recently broken with what we believe was the removal of pkg_resources support here #716.

We followed this post as our way of implementation https://discuss.openedx.org/t/override-default-edx-platform-xblock-mappings-without-forking/12441

Suspected root of the issue in our plugin:

    def ready(self):
        """
        Django startup code: swap edx-platform mapping for blocks with our translated versions.

        See https://discuss.openedx.org/t/override-default-edx-platform-xblock-mappings-without-forking/12441
        """

        # List of translated block types, for dismbiguating entry points
        translated_blocks = ["html", "problem", "video"]

        for block_type in translated_blocks:
            block_entry_points = list(
                pkg_resources.iter_entry_points("xblock.v1", block_type)
            )

            # If we have multiple entry points, ours gets precedence over the Open-edX copy
            if len(block_entry_points) > 1:
                dist = pkg_resources.get_distribution("Open-edX")
                del dist.get_entry_map("xblock.v1")[block_type]

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions