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

feat: Add tags to Units #2

Merged
merged 2 commits into from
Nov 2, 2023
Merged

feat: Add tags to Units #2

merged 2 commits into from
Nov 2, 2023

Conversation

yusuf-musleh
Copy link
Contributor

Description

Implements tagging Units in the sample courses. This should help with testing features/functionality related to tags on units.

Related Tickets:

Testing Instructions

Similar to what is mentioned in the README:

  1. To begin, clone this repo inside a directory so it can be accessed from within the devstack (eg: /edx/src/)

  2. Set the TAXONOMY_SAMPLE_PATH variable inside the generate.py file to point to the cloned repo inside your devstack/tutor environment, eg: /edx/src/taxonomy-sample-data

  3. To run the script, enter the LMS shell (make lms-shell) and run the following command:

    python manage.py cms shell < /path/to/taxonomy-sample-data/generate.py
  4. The script should run to completion, you'll notice it tagging the the units (vertical blocks) in the logs of the script


Private-ref: FAL-3523

Copy link
Member

@bradenmacdonald bradenmacdonald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One problem with the current script is it just picks the first tag from each taxonomy, which is never a "grandchild" tag, and is always a root tag. It would be much better if most of the tags are leaf tags like Landscape Architecture in the LightCast skills taxonomy or Physical Sciences in the Canada taxonomy, or hierarchical taxonomy tag 1.9.13.

- Tag courses/units/components using leaf tags rather than the first level
tags for better real life representation of data.
- Update tags deletion implementation after implementation changed in
  edx-platform.
@yusuf-musleh
Copy link
Contributor Author

yusuf-musleh commented Nov 1, 2023

@bradenmacdonald Agreed, I think using grandchild (or "leaf") tags are more representative of real life data. I've updated the implementation to tag using the first leaf tag for each taxonomy. I've also updated the tags deletion implementation to account for the changes made in edx-platform related to tags.

Copy link
Member

@bradenmacdonald bradenmacdonald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement. Works well!

Screenshot 2023-11-02 at 1 56 11 PM

@bradenmacdonald bradenmacdonald merged commit b6d7817 into main Nov 2, 2023
@bradenmacdonald bradenmacdonald deleted the yusuf-musleh/tag-units branch November 2, 2023 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants