Add openedx-filters hook to VerticalBlock before rendering of child blocks#517
Merged
pkulkark merged 1 commit intoopencraft-release/nutmeg.2from Feb 1, 2023
Merged
Conversation
This commit adds a openedx-filters hook to the VerticalBlock XBlock before rendering of it's children. This allows Open edX plugins to customize the presentation of specific blocks based on the context.
pomegranited
approved these changes
Feb 1, 2023
pomegranited
left a comment
There was a problem hiding this comment.
@pkulkark This is working great, thank you!
I had to make a small modification to the EDIT_LINKS_PLUGIN_GIT_REPOS to get the edit links to work, but that was all :)
--- lms.orig.yml 2023-02-01 02:38:13.022390121 +0000
+++ lms.yml 2023-02-01 02:38:01.786467704 +0000
@@ -475,7 +475,7 @@
fail_silently: false
pipeline: ["edit_links.pipeline.AddEditLink"]
EDIT_LINKS_PLUGIN_GIT_REPOS:
- course-v1:Test+TST01+2023_T1: "https://gitlab.com/-/ide/project/mooc-floss/mooc-floss/edit/master/-/course/html/"
+ course-v1:Test+TST01+2023_T1: "https://gitlab.com/-/ide/project/mooc-floss/mooc-floss/edit/master/-/course/"
EDIT_LINKS_PLUGIN_GIT_EDIT_LABEL: "Gitlab"
OPTIMIZELY_PROJECT_ID: null
ORA2_FILE_PREFIX: opencraft-test-bb6660.opencraft.hosting/ora2👍
- I tested this on the sandbox:
- Logged in as a normal student user (honor@example.com)
- Enrolled in the test course
- Clicked "Edit on Gitlab" in various units.
- Verified that I was taken to the GitLab IDE to edit that page's content.
- I checked the code against the original #517
- I made sure any change in configuration variables is reflected in the corresponding
client'sconfiguration-securerepository.
We should be able to addOPEN_EDX_FILTERS_CONFIGandEDIT_LINKS_PLUGIN_GIT_REPOSto theEDXAPP_LMS_ENV_EXTRAin the courses.opencraft.com's settings so we don't have to do it manually, right?
Member
Author
@pomegranited Yes, that's right. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR backports the changes in openedx#30773 to nutmeg.
Supporting Information
OpenCraft Internal Jira task: https://tasks.opencraft.com/browse/BB-6660
Testing Instructions
See testing instructions in open-craft/openedx-edit-links#1