-
Notifications
You must be signed in to change notification settings - Fork 1
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] Handle tags when importing/exporting courses #182
Comments
@pomegranited @yusuf-musleh @jmakowski1123 Could you please review the four scenarios I outlined in "Taxonomy Matching" above, and let me know your thoughts? |
I think this covers all the scenarios.. But without a good way to communicate what happened to the user, they may be confused.
This one is problematic: the new invisible ObjectTags don't have anywhere to store the taxonomy Export ID, so they won't know to resync if a new Taxonomy gets imported. One way to fix this is to change ObjectTag to use
If we ignore the org issue and link them to a Taxonomy/Tag anyway, they will show up in Studio, but the user may not be allowed to delete them or add more tags from that Taxonomy. I don't think that is a bad thing -- content authors can then work with their Taxonomy Admins to add org owners to the Taxonomy (or make it available to all orgs).
It's worth mentioning that this "re-appearing" is handled by ObjectTag.resync, which is called when individual tags are added or updated via the tagging API. But I'm not seeing where it's called during bulk tag import? E.g. actions.CreateTag does not use the api to create Tags, and so it looks like this step got missed. |
@bradenmacdonald Scenario 1 and 2 look fine to me. For scenario 3, in the case where some (or all) of the Tags with the same values exist, but the export_id does not match, do we want to map those Tags that have a matching value to the ones in the existing taxonomy and treat them as if they belong to it? Or are we treating the export_id as the source of truth for all importing/exporting regardless of tag value? If it's the later, that might cause issues with conflicts if we try to create new invisible tags, since the tag value should be unique in the DB across all taxonomies For scenarios 4, building off Jill's point, if we allow those tags to be imported and shown in the UI, maybe we can add some sort of special distinction or indication on those tags (like a different color + tool tip) that informs the user that these tags were applied, however you do not have permissions to edit/remove tags for this taxonomy. They could then handle it internally with their Taxonomy Admins. |
Oh, I mentioned that above. When we import the tags, we won't actually have a name for the taxonomy, just the Export ID. So when we create the ObjectTag, we can put the Export ID as the
That makes sense to me :)
Yeah it's not something we currently do. But we can add that in as part of this ticket. |
The values could match zero, one, or many taxonomies but there's no way to know if they're related or not. I want to treat Export ID as the source of truth and not try to "guess" which taxonomy it should be.
Not sure why you're saying that. Values are only unique within a taxonomy.
You can still remove the tags from the object, if you want. You just can't edit the taxonomy. Which is fine, since you can't edit taxonomies from the tagging drawer anyways. In fact, we currently don't let you edit taxonomies at all besides via import :p. What I'm trying to say is that as far as the tagging drawer goes, these tags will look like any others, except you won't be able to add additional tags from the same taxonomy to your object. But everything else will look and behave the same. |
Got it, that makes sense.
Oh right! I forgot they're unique within the taxonomy, sorry for the confusion there.
Got it, that sounds good to me 👍 |
@bradenmacdonald I will stop the work here because of this discussion. I think the scope will change. |
@ChrisChV Thanks. I do think that the scope will change, yep. Just need a bit more time to figure it out. |
@yusuf-musleh Could you edit this story to replace the Acceptance criteria with these new ones? I can't edit it since you created it. NEW Acceptance Criteria
|
@bradenmacdonald Updated the acceptance criteria. |
This part has been deleted in the description of the PR, the Taxonomy Matching scenarios. Is there a way to recover it? |
@ChrisChV Yes, to recover it do this: |
@feanil I used to be able to edit this issue (as you can see in the edit history), but now I can't. I still have the ability to close it though, even though I didn't create it. I'd also like to rename milestones like https://github.com/openedx/modular-learning/milestone/5 which I used to be able to do but now I can't. Was this an intentional change to my permissions or is something configured wrong? |
@ChrisChV Sorry about that! I did it in a hurry and didn't realize I was supposed to keep that part as is. I've updated the description again. Thanks @bradenmacdonald for stepping in! |
"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
droppedhidden."Acceptance Criteria
.tar.gz
file, it includes a newtags.csv
file with the course tags.tags.csv
file is not included. (Probably useget_object_tag_counts()
to determine this very efficiently.)tags.csv
file will have to be changed slightly:vertical
not "Unit" etc.)block_id
e.g.1238971
orunit7
not the whole usage key (block-v1:...
). This is because the course export format is independent of the course ID.tags.csv
file, then after the content is imported, all the tags will be applied using the CSV. Invalid block IDs are ignored.Library import/export will be handled in #184
The text was updated successfully, but these errors were encountered: