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

[Tagging] Pasting XBlocks containing Tag data in clipboard #180

Closed
yusuf-musleh opened this issue Jan 17, 2024 · 0 comments · Fixed by openedx/edx-platform#34270
Closed

Comments

@yusuf-musleh
Copy link
Member

"As a content author, when I paste an xblock that has been copied and contains tag data, I expect the tags to be pasted (carried over) to the newly pasted xblock"

This step comes after implementing #179 , and tag data is being serialized and stored in the clipboard.

Acceptance Criteria
This step implements the changes needed to paste/copy over the tags to the newly created (pasted) XBlock:

  • Pasting (i.e. create a block from staged content) is performed in the _create_block handler calling the import_staged_content_from_user_clipboard method
  • The olx containing all the serialized information of the staged content for the copied block is retrieved from get_staged_content_olx
  • That olx should contain the serialized tags information mentioned in the serialization step. We’d extract the tags for the xblock (and all the children if they exist) and apply those tags to the new xblock that is created. This change would be made in the newly created XBlock mixin used in the Copy step, introducing a method in it to extract the serialized tags/taxonomies in the xblock (and it’s children)
  • In order to apply the tags to the new xblocks, we can make use of the tag_content_object method, since we should have the tag values along with their taxonomy external_ids serialized
    • In the case when the XBlock is copied between orgs, the org that is being copied to may not have permissions/access to the taxonomies (along with their tags). If that is the case, the tags should be dropped and not copied over from the first org.
  • Implement tests to verify this was implemented correctly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants