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 API Endpoints Within Course #80

Open
9 of 11 tasks
armintalaie opened this issue Nov 17, 2024 · 0 comments
Open
9 of 11 tasks

Tagging API Endpoints Within Course #80

armintalaie opened this issue Nov 17, 2024 · 0 comments
Assignees

Comments

@armintalaie
Copy link
Collaborator

armintalaie commented Nov 17, 2024

Tagging System for courses

Overview

Add tagging functionality at the course level to organize course content

Database Tables

  • course_tags table: store course-level tags
    • id: UUID // this can actually be an int
    • course_id: UUID (foreign key)
    • name: text
    • colour: text (optional)
    • created_at, updated_at timestamps
    • parent_id Default is NULL
    • unique constraint on (course_id, name)

API Endpoints

These will be under /courses/{course_id}/tags:

  • POST: create a new tag for course

    • Validate tag inputs (name, color)
    • Check user is course admin/maintainer
    • Ensure tag name is unique within course
  • GET: list all tags for course

  • PATCH /{tag_id}: update course tag

    • Check user is course admin/maintainer
    • Update tag properties (name, color)
    • Ensure new name doesn't conflict
  • DELETE /{tag_id}: delete course tag

    • Check user is course admin/maintainer
    • Remove tag from all course content
  • GET /{tag_id}/content: get tagged content

    • List all course content with this tag
    • Check user course access

Tasks:

  • Write migration scripts
  • Implement tag validation models
  • Add permission checks
  • Write CRUD operations
  • Add tag colour validation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants