-
Notifications
You must be signed in to change notification settings - Fork 4.2k
fix: Transcripts in downstream creation [FC-0076] #36509
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: Transcripts in downstream creation [FC-0076] #36509
Conversation
|
Thanks for the pull request, @ChrisChV! 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. |
pomegranited
left a comment
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.
👍 @ChrisChV This is working as described and fixes the bug -- one nit to see if we can avoid saving downstream_xblock twice.
- I tested this using the PR testing instructions. Also tested that syncing library updates to the course video block doesn't disrupt this added
edx_video_id. - I read through the code
-
I checked for accessibility issuesN/A - Includes documentation -- code comment explaining why
-
User-facing strings are extracted for translationN/A
| # If the `downstream_xblock` is a new created block, we need to create | ||
| # a new `edx_video_id` to import the transcripts. | ||
| downstream_xblock.edx_video_id = create_external_video(display_name='external video') | ||
| store.update_item(downstream_xblock, request.user.id) |
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: Do we need to save the downstream_xblock here? _insert_static_files_into_downstream_xblock also performs an update_item.
| store.update_item(downstream_xblock, request.user.id) |
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.
And is there any way to add a test for this case, so we don't accidentally break it in future?
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: Do we need to save the
downstream_xblockhere?_insert_static_files_into_downstream_xblockalso performs anupdate_item.
@pomegranited I think it's necessary here, because the update_item in _insert_static_files_into_downstream_xblock is conditional on substitutions, and I'm not sure if those conditions will always apply. What do you think?
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.
Ah sorry, I didn't read the full context of that call. This is fine as is!
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.
And is there any way to add a test for this case, so we don't accidentally break it in future?
Tests added: e05d8d4
rpenido
left a comment
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.
LGTM 👍
Thank you for your work, @ChrisChV!
- I tested this using the instructions from the PR
- I read through the code
- I checked for accessibility issues
- Includes documentation
bradenmacdonald
left a comment
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.
We should maybe add a FIXME: comment that the sync code shouldn't have any special cases for specific block types like video in the future. But video is so messy this is probably a reasonable option for now.
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
|
2U Release Notice: This PR has been deployed to the edX production environment. |
* Fix the issue described in openedx/frontend-app-authoring#1352 (comment)
* Fix the issue described in openedx/frontend-app-authoring#1352 (comment)
* Fix the issue described in openedx/frontend-app-authoring#1352 (comment)
Description
Fix the issue described in openedx/frontend-app-authoring#1352 (comment)
Supporting information
Github issue: openedx/frontend-app-authoring#1352 (comment)
Testing instructions
Library Content. Search and add the video copied in the library.Deadline
ASAP
Other information
N/A