Skip to content
This repository was archived by the owner on Oct 5, 2023. It is now read-only.

fix: StudioContainerXBlockMixin needs to be updated to match edx-platform changes [BD-13] - #200

Merged
bradenmacdonald merged 1 commit into
openedx-unsupported:masterfrom
open-craft:fix-pb-container-view
May 29, 2023
Merged

fix: StudioContainerXBlockMixin needs to be updated to match edx-platform changes [BD-13]#200
bradenmacdonald merged 1 commit into
openedx-unsupported:masterfrom
open-craft:fix-pb-container-view

Conversation

@bradenmacdonald

@bradenmacdonald bradenmacdonald commented May 18, 2023

Copy link
Copy Markdown
Contributor

The Problem Builder XBlock has not been working in master versions of edx-platform, after openedx/openedx-platform@248c090 was merged via openedx/openedx-platform#31472 .

Without this fix:

Screenshot 2023-05-18 at 4 43 19 PM

With this fix:
Screenshot 2023-05-18 at 4 45 21 PM

This bug was reported at https://discuss.openedx.org/t/reporting-supporting-a-fix-for-problem-builder-x-block-issue/10114/2

Private ref: MNG-3708

@openedx-webhooks openedx-webhooks added the blended PR is managed through 2U's blended developmnt program label May 18, 2023
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @bradenmacdonald!

When this pull request is ready, tag your edX technical lead.


class StudioContainerXBlockMixin:
@XBlock.needs('mako')
class StudioContainerXBlockMixin(XBlockMixin):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bradenmacdonald, it's very similar to the StudioEditableBlock. Would it make sense to merge them?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I think the author_edit_view/author_preview_view functionality is unique, but we could probably make this one so that it subclasses StudioEditableBlock and then we could remove the render_children from this one. Is that what you're thinking?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bradenmacdonald, I think that the StudioEditableBlock needs to be a subclass of the StudioContainerXBlockMixin. We cannot add an edx-platform import to the xblock-utils, because this library is used by the workbench.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. So then this PR has to come first. I got the tests passing now so @Agrendalath can you please give it another look?

@bradenmacdonald
bradenmacdonald force-pushed the fix-pb-container-view branch 2 times, most recently from 88f834c to 4480a36 Compare May 25, 2023 22:29

@Agrendalath Agrendalath left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

  • I tested this: checked that the ProblemBuilder works correctly in Studio
  • I read through the code
  • I checked for accessibility issues: n/a
  • Includes documentation: n/a
  • I made sure any change in configuration variables is reflected in the corresponding client's configuration-secure repository: n/a

Comment thread xblockutils/__init__.py Outdated
"""

__version__ = '3.0.0'
__version__ = '3.0.1'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This version breaks Maple compatibility because MakoService was introduced in Nutmeg. While Maple is an old release, it's good to bump the minor version and add a fix! to announce this. I did a similar thing in openedx/xblock-drag-and-drop-v2#318.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, doing that now. Thanks!

@Agrendalath

Copy link
Copy Markdown
Contributor

@bradenmacdonald, while testing this, I found a small bug in the Problem Builder when the Block Structures are generated. Would you like to take a quick look at open-craft/problem-builder#349?

@bradenmacdonald
bradenmacdonald force-pushed the fix-pb-container-view branch from 4480a36 to 323e588 Compare May 29, 2023 20:52
@bradenmacdonald
bradenmacdonald merged commit 677e695 into openedx-unsupported:master May 29, 2023
@openedx-webhooks

Copy link
Copy Markdown

@bradenmacdonald 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@bradenmacdonald
bradenmacdonald deleted the fix-pb-container-view branch May 29, 2023 21:32
@jswope00

jswope00 commented Jun 1, 2023

Copy link
Copy Markdown

@bradenmacdonald @Agrendalath Thanks for this fix. FYI my problem-builders are still showing the same error in edx.org, both existing problem-builders and new ones I create. Does this mean there is still something to resolve here?
image

@Agrendalath

Copy link
Copy Markdown
Contributor

@jswope00, the requirements upgrade PR openedx/openedx-platform#32321 (which includes this change) is not merged, so this still needs to be deployed to edx.org.

@jswope00

jswope00 commented Jun 1, 2023

Copy link
Copy Markdown

Perfect @Agrendalath thanks for that. Again, appreciate this fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

blended PR is managed through 2U's blended developmnt program

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants