openedx / modular-learning

3 stars 1 forks source link

[Tagging] Finalize v1 OLX tags format and test backwards compatibility #174

Closed bradenmacdonald closed 6 months ago

bradenmacdonald commented 8 months ago

Following https://github.com/openedx/modular-learning/issues/165, test the backwards compatibility of the proposed OLX tag serialization format to make sure that course exports with this data can still be imported to old releases like Ironwood or Hawthorn without errors. The tag attributes should be ignored on anything pre-Redwood. If this is not the case, propose a new format that is backwards compatible.

Current proposal:

<problem tags-v1="lightcast-skills:Typing,Microsoft Office;open-canada-skills:Typist,MS Office">...</problem>

This uses the Export ID from https://github.com/openedx/modular-learning/issues/183.

See Slack discussion.

Note: you should be able to simply install an old version of tutor using pip and then run it, to launch older images of the Open edX platform.

bradenmacdonald commented 8 months ago

@yusuf-musleh As part of this task, please also figure out how to escape special characters. For example, if the tag value contains , or ;, we need to escape those somehow. (Also " or > should be escaped as &quot; etc. but that's probably already handled by the XML encoder.)

yusuf-musleh commented 8 months ago

@bradenmacdonald Sure thing. With regards to setting up the older releases, since I am still using devstack locally, do you think it would be easier to setup older releases using Tutor or should I just stick to the devstack setup I have for them as well?

bradenmacdonald commented 8 months ago

@yusuf-musleh You can try the devstack, since it's just running a single command if you already have it working for master. If it doesn't work, try tutor.

yusuf-musleh commented 8 months ago

An update on this. The proposed OLX format for tags above was tested on master and the old release hawthorn by manually adding serialized tags data to various blocks/components in an exported course and importing it again, and it seems there were no issues and no errors in the logs on both master and hawthorn.

In order to escape special characters that the tags' values could have, such as ,;<>=| etc., we URL encode each of the tag values, however replacing the %20 with a regular space for better readability. This way the existing ,, : and ; can safely be treated as delimiters for tags and taxonomies.

So the finalized proposed and tested format for v1 OLX tags is the following:

<problem tags-v1="lightcast-skills:Typing,Microsoft Office;open-canada-skills:Typist,MS Office,%3Csome%3A%3B%2Cskill%2F%7C%3D%3E">
...
</problem>

The taxonomies and tags in the above example component are as follows:

LightCast Skills: Typing, Microsoft Office Open Canada Skills: Typist, MS Office, \<some:;,skill/|=>

bradenmacdonald commented 6 months ago

Update: we have decided not to include the tags in the OLX for now - see #203 and linked discussion.