-
Notifications
You must be signed in to change notification settings - Fork 203
fix: make it work in library v2 [FC-0076] #2272
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
fix: make it work in library v2 [FC-0076] #2272
Conversation
Thanks for the pull request, @DanielVZ96! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2272 +/- ##
==========================================
- Coverage 95.29% 95.29% -0.01%
==========================================
Files 195 195
Lines 21625 21664 +39
Branches 1502 1509 +7
==========================================
+ Hits 20607 20644 +37
Misses 771 771
- Partials 247 249 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Hey @DanielVZ96, just checking in to see if you're still planning to continue working on this PR? |
@itsjeyd yep. I'll work on this before I go to holidays |
I'm only missing updating the tests. |
@DanielVZ96 I see you marked this PR as ready for review, but it still has a bunch of failing tests as well as some merge conflicts to resolve. Could you address those before we get the engineering review process going? Or were you looking for some early input on your approach before spending more time on this PR? |
@itsjeyd sorry i didn't notice the tests were failing after merging master. I'll fix them now |
This reverts commit 824067f.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
- I tested this: I followed the testing instructions
- I read through the code and considered the security, stability and performance implications of the changes.
- Includes tests for bugfixes and/or features added.
- Includes documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 this is working great! Thank you @DanielVZ96 .
- I tested this by adding a new ORA2 block to a library, copying an ORA2 block from a course to a library, copying an ORA2 block from a library to a course, and editing an ORA2 block in a library and in a course.
- I read through the code
- I checked for accessibility issues by using my keyboard to navigate
-
Includes documentationN/A -
User-facing strings are extracted for translationN/A
@@ -454,7 +455,7 @@ def get_base_url_path_for_course_assets(self, course_key): | |||
""" | |||
Returns base url path for course assets | |||
""" | |||
if course_key is None: | |||
if (course_key is None) or isinstance(course_key, LibraryLocatorV2): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe use the OpaqueKey is_course
property here instead, for consistency?
if (course_key is None) or isinstance(course_key, LibraryLocatorV2): | |
if (course_key is None) or not course_key.is_course: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nudge @DanielVZ96 :) Does this suggestion not work?
@@ -478,6 +479,8 @@ def get_teamsets(self, course_id): | |||
""" | |||
Wrapper around get_team_configuration that returns team names only for display | |||
""" | |||
if isinstance(course_id, LibraryLocatorV2): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto here:
if isinstance(course_id, LibraryLocatorV2): | |
if not course_id.is_course: |
@DanielVZ96 Could you please bump the version here?
|
@pomegranited done! |
TL;DR - Modifies functionality so that the xblock can be edited and used in the new Library page.
JIRA: JIRA-XXXX
Private-ref
What changed?
Developer Checklist
Testing Instructions
Reviewer Checklist
Collectively, these should be completed by reviewers of this PR:
FYI: @openedx/content-aurora