Skip to content

feat: add topic model from dropdown in studio#17

Merged
ahmed-arb merged 2 commits intomasterfrom
ahmed-arb/topic-filter-model
Dec 22, 2025
Merged

feat: add topic model from dropdown in studio#17
ahmed-arb merged 2 commits intomasterfrom
ahmed-arb/topic-filter-model

Conversation

@ahmed-arb
Copy link
Copy Markdown
Collaborator

@ahmed-arb ahmed-arb commented Dec 18, 2025

Add Topic Model and Management for Studio Course Settings

Summary

This PR introduces a new Topic model and supporting utilities to enable course topic categorization in Studio. Course authors can now select from existing topics or create new ones when configuring course details.

Changes

Database & Models

  • New Model: Added Topic model with name field to store available course topics
  • Migration: Created initial migration 0001_initial.py for the Topic model
  • Admin Interface: Registered Topic in Django admin with search and list display functionality
  • New endpoint: Added a new endpoint to allow topic creation

Utilities

  • get_topics(): Returns list of all available topic names for populating dropdown options
  • update_other_course_settings(): Merges and saves topic data into course.other_course_settings via the advanced settings API
  • Circular Import Prevention: Refactored imports to use apps.get_model() for lazy loading:
    • CourseEnrollment
    • CourseOverview

Technical Details

  • Topics are stored in the wikimedia_general_topic table
  • Uses model_utils.TimeStampedModel for automatic timestamp tracking
  • Course topic selection is saved in other_course_settings field
  • Some edx-platform model imports converted to lazy loading pattern to avoid initialization issues

Related PRs:
edx-platform: wikimedia/edx-platform#581
frontend-app-authoring: edly-io/frontend-app-authoring#5

Ticket: wikimedia/edx-platform#569

@ahmed-arb ahmed-arb requested a review from eemaanamir December 19, 2025 12:54
@ahmed-arb ahmed-arb merged commit 8100f74 into master Dec 22, 2025
@ahmed-arb ahmed-arb deleted the ahmed-arb/topic-filter-model branch December 22, 2025 09:53
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