Skip to content

Add openedx-filters hook to VerticalBlock before rendering of child blocks#517

Merged
pkulkark merged 1 commit intoopencraft-release/nutmeg.2from
pooja/backport-bb6457-to-nutmeg
Feb 1, 2023
Merged

Add openedx-filters hook to VerticalBlock before rendering of child blocks#517
pkulkark merged 1 commit intoopencraft-release/nutmeg.2from
pooja/backport-bb6457-to-nutmeg

Conversation

@pkulkark
Copy link
Member

@pkulkark pkulkark commented Jan 30, 2023

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

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.
Copy link

@pomegranited pomegranited left a comment

Choose a reason for hiding this comment

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

@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's configuration-secure repository.
    We should be able to add OPEN_EDX_FILTERS_CONFIG and EDIT_LINKS_PLUGIN_GIT_REPOS to the EDXAPP_LMS_ENV_EXTRA in the courses.opencraft.com's settings so we don't have to do it manually, right?

@pkulkark pkulkark merged commit 2b6c0b4 into opencraft-release/nutmeg.2 Feb 1, 2023
@pkulkark pkulkark deleted the pooja/backport-bb6457-to-nutmeg branch February 1, 2023 16:43
@pkulkark pkulkark restored the pooja/backport-bb6457-to-nutmeg branch February 1, 2023 16:43
@pkulkark
Copy link
Member Author

pkulkark commented Feb 1, 2023

We should be able to add OPEN_EDX_FILTERS_CONFIG and EDIT_LINKS_PLUGIN_GIT_REPOS to the EDXAPP_LMS_ENV_EXTRA in the courses.opencraft.com's settings so we don't have to do it manually, right?

@pomegranited Yes, that's right.

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.

3 participants