Skip to content

[BB-6206] Adds a openedx-filter event to hook into XBlock Rendering#30650

Closed
tecoholic wants to merge 2 commits intoopenedx:masterfrom
open-craft:tecoholic/BB-6206-edit-link-poc
Closed

[BB-6206] Adds a openedx-filter event to hook into XBlock Rendering#30650
tecoholic wants to merge 2 commits intoopenedx:masterfrom
open-craft:tecoholic/BB-6206-edit-link-poc

Conversation

@tecoholic
Copy link
Contributor

@tecoholic tecoholic commented Jun 24, 2022

Description

This PR introduces a new openedx-filters event org.openedx.learning.xblock.render.started.v1 hook in the platform. This is implemented a part of the PoC to implement "Edit Link" in the course content for Open Source courses.

Users impacted by the change:

  • "Students"

Supporting information

Testing instructions

This PR is 1 of the 3 PRs that implement the Edit Link PoC and should be tested in tandem.

Other related PRs

  1. openedx-filters - [BB-6206] Introduce a Filter to hook into courseware XBlock rendering openedx-filters#35
  2. openedx-edit-links - Implement "Edit on Git" link for each section open-craft/openedx-edit-links#1

Deadline

"None" if there's no rush, or provide a specific date or event (and reason) if there is one.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jun 24, 2022
@openedx-webhooks
Copy link

openedx-webhooks commented Jun 24, 2022

Thanks for the pull request, @tecoholic! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

This is currently a draft pull request. When it is ready for our review and all tests are green, click "Ready for Review", or remove "WIP" from the title, as appropriate.

@bradenmacdonald
Copy link
Contributor

There are many places that XBlocks can be rendered - in LMS courseware, in Studio when editing courses, in LMS Libraries via direct learning (LabXchange is the only example), or when editing Libraries in Studio.

Is the intention of this PR that it is strictly for XBlocks being rendered for courses in the LMS, or for any time an XBlock is rendered in any learning context? I would say the latter is the most flexible. For example, then you could use it to add authoring tools in Studio too.

Whichever it is, the documentation should be very explicit about that, but right now I think it's ambiguous.

As another example, the docstring currently says that this is only used with units (vertical blocks), but the render_xblock method that you've added it to here can be used to render any kind of XBlock. For example, with the mobile app, it often renders a single XBlock directly, such as a problem block.

It's also worth noting that in the mobile app, XBlocks which have native UI are only downloaded using their data via student_view_data so this won't affect them. It only affects XBlocks that are rendered in a webview.

@tecoholic
Copy link
Contributor Author

@bradenmacdonald Thank you for providing a great context. Frankly, I didn't think of the various contexts in which the XBlock could be rendered and you are absolutely right about the description being vauge. Let me dig into this more and find the right place to place this hook and also document the context better.

The intention initially was to place a modify the content per unit (hence the target on VerticalBlocks). Based on the testing and the followup discussion, it is becoming clear that this should be targeted at individual XBlock level.

I moving this to draft while the ambiguity is resolved.

@tecoholic tecoholic marked this pull request as draft June 30, 2022 06:40
@natabene
Copy link
Contributor

@tecoholic Thank you for your contribution. Please let me know once this is ready for our review.

@tecoholic
Copy link
Contributor Author

Closing this in favor of #30773

@tecoholic tecoholic closed this Jul 24, 2022
@openedx-webhooks
Copy link

@tecoholic Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

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

Labels

open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants