-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
openedx/edx-platform
#34356Description
"As a content author, when I export a course/library I want the tag data to be stored in the export. Subsequently when I import a course/library that has tag data in it, I expect that data to be imported as well. When Importing from an external instance, I want the imported tag data to match the Export ID present in my instance and import it accordingly, otherwise those unmatched taxonomy/tags should be dropped hidden."
Acceptance Criteria
- When a course with tags is exported to a
.tar.gzfile, it includes a newtags.csvfile with the course tags.- This should be exactly the same format as already implemented in feat: export tagged course as csv edx-platform#34091
- If neither the course itself nor any items in the course have tags, the
tags.csvfile is not included. (Probably useget_object_tag_counts()to determine this very efficiently.) - The format of the the
tags.csvfile will have to be changed slightly:- the "Type" column will have to be the block type (e.g.
verticalnot "Unit" etc.) - the "ID" column should just include the
block_ide.g.1238971orunit7not the whole usage key (block-v1:...). This is because the course export format is independent of the course ID. - These changes should be made to all versions of the "export tags CSV" code (don't just make these changes for course export).
- the "Type" column will have to be the block type (e.g.
- When a course is imported, if the import contains a
tags.csvfile, then after the content is imported, all the tags will be applied using the CSV. Invalid block IDs are ignored. - Taxonomy Matching: Taxonomies should be matched based on their [Tagging] An "Export ID" identifies each Taxonomy #183. On import, tags should always be imported as ObjectTags, even if no matching Taxonomy is found, or no matching tag currently exists in the taxonomy. (To prevent data loss.)
- Scenario 1: Tags in the OLX have a matching Taxonomy (by Export ID) and matching Tags in that Taxonomy (by Value):
- Tags will be imported and visible in Studio.
- (Create the ObjectTag as normal, linked to the Taxonomy and Tag)
- Scenario 2: Tags in the OLX have a matching Taxonomy (by Export ID) but some of the Tags in the OLX are not found in the Taxonomy:
- Such tag(s) should not be visible in Studio, but iff the Taxonomy is ever updated to include that tag value, the tags will "re-appear".
- (Create the ObjectTag anyways, linked to the Taxonomy but not linked to the Tag. The value is set in _value.)
- Scenario 3: Tags in the OLX do not match any Taxonomy (by Export ID):
- These tags will not be visible in the Studio UI, but should still be exported if the course is exported again. Iff a Taxonomy is ever created/imported with the matching Export ID, the tags will "re-appear".
- (Still create the ObjectTag instances for these tags, with the Export ID as the _name and the value as the _value.)
- Scenario 4: Tags in the OLX match a Taxonomy (by Export ID) but the current user does not have permission to view/use that taxonomy [because it's linked to a different org]:
- Tags will be imported and visible in Studio. Course author will be able to delete them if they want. Course author will not be able to add additional tags from the same taxonomy though, because they don't have permission.
- Scenario 1: Tags in the OLX have a matching Taxonomy (by Export ID) and matching Tags in that Taxonomy (by Value):
Library import/export will be handled in #184
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done