[FC-0009] Studio backend APIs to support copying and pasting of entire Units#32812
Conversation
|
Thanks for the pull request, @bradenmacdonald! As a core committer in this repo, you can merge this once the pull request is approved per the core committer reviewer requirements and according to the agreement with your edX Champion. |
dbe1cd5 to
0a67d8e
Compare
345c13c to
967a25e
Compare
|
@ormsbee FYI, in case you're interested or would like to review. |
7075469 to
3451b9b
Compare
3451b9b to
228e3b6
Compare
Agrendalath
left a comment
There was a problem hiding this comment.
@bradenmacdonald, I noticed that the timezones changed in exports from 0 to Z (e.g., <chapter display_name="Section" start="2021-01-01T00:00:00+00:00"> to <chapter display_name="Section" start="2021-01-01T00:00:00Z">. It probably makes no difference, but I wanted to note this.
👍
- I tested this: checked the XML exports for regressions, checked that the clipboard still works
- I read through the code
- I checked for accessibility issues: n/a
- Includes documentation: n/a
- I made sure any change in configuration variables is reflected in the corresponding client's
configuration-securerepository: n/a
| user_id: int, | ||
| # Hint to use as usage ID (block_id) for the new XBlock | ||
| slug_hint: str | None = None, | ||
| # UsageKey of the XBlock that this one is a copy of |
There was a problem hiding this comment.
Nit: this format looks nice, but the IDEs won't catch it. In most IDEs, you see the description of all params while hovering over a function's name. This feature works correctly when they are described with :param arg_name: description.
There was a problem hiding this comment.
OK, thanks. I'll tweak in a future PR.
|
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. |
Description
This updates the "copy/paste" APIs in Studio so that they work with entire Units (vertical XBlocks and their children), and not just individual "leaf" XBlocks/components.
Supporting information
Tickets:
Testing instructions
We can do more comprehensive testing of the copy/paste code once the UI is implemented. For now, just check the test code and that there are no regressions to copying of individual components.
This code also changes
XmlMixin. I've tried to keep the change as small as possible (so it shouldn't really affect what happens with the ImportRuntime during import/export) but it is possible this affects the import/export process. Try exporting a substantial course before checking out this PR, then with this PR active, import that course and export it again and check for any changes in the resulting final export file.Deadline
None
Other information
Private-ref: MNG-3769