Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow SGA blocks to be used in Libraries v2 context [FC-0076] #363

Merged
merged 4 commits into from
Feb 21, 2025

Conversation

pomegranited
Copy link

@pomegranited pomegranited commented Feb 18, 2025

What are the relevant tickets?

Part of: openedx/frontend-app-authoring#1514
Private-ref: FAL-4032

What's this PR do?

Fixes errors thrown when previewing/editing SGA blocks in a Libraries v2 context.

How should this be manually tested?

To verify the issues fixed here:

  1. Ensure that edx_sga is in the list of LIBRARY_SUPPORTED_BLOCKS configured for your Authoring MFE.
  2. Import the Open edX Demo course into your tutor dev stack (tutor dev do importdemocourse)
  3. Navigate to the Open edX Demo course and locate the Staff Graded Assignment (sga) block.
  4. Copy the SGA block to your staging clipboard.
  5. Go back to the Authoring MFE home page, and create a new content library.
  6. Paste the copied SGA component into your library.
  7. Click on the SGA card to display its Preview in the sidebar, and/or click Expand to view it in a modal.
  8. Click "Edit Component" to edit the SGA block.

To test this fix:

  1. Install this branch in your CMS, e.g. tutor dev exec cms pip install git+https://github.com/mitodl/edx-sga.git@refs/pull/363/head
  2. Repeat the verification steps above while watching the CMS logs.
  3. Ensure the SGA Preview shows the same content that was displayed for the SGA block in the course.
  4. Ensure that you can edit and save changes to the library SGA block from within the library context.

Screenshots

image

as it means the same thing (in the course context), and is provided as
part of xblock.core
* `start` attribute does not exist in library context
* catch errors for fields scoped outside "content" or "settings"
@Anas12091101
Copy link

@pomegranited could you please rebase this PR?

Copy link

@Anas12091101 Anas12091101 left a comment

Choose a reason for hiding this comment

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

I have tested this locally and everything LGTM 👍 . Thanks @pomegranited for making these changes

@Anas12091101 Anas12091101 merged commit 1f0487e into mitodl:master Feb 21, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants