openedx / openedx/openedx-platform

Add a JSONField to the CCX model for storing custom metadata

Open
#35,593 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.2k
Forks
4.4k
Avg merge
6d 18h
Merged PRs (30d)
42

Description

Description

The current CCX CustomCourseForEdX model in Open edX does not include a flexible field that allows users to store custom metadata or other types of additional information. This limitation can create challenges for developers and institutions that want to extend the functionality of CCX courses by associating them with external systems or by storing custom configurations and data.

Problem

Many use cases require the ability to associate CCX courses with external systems or tools, store analytics tracking information, or save custom attributes relevant to a specific course. However, there is currently no dedicated field in the CCX model that supports this type of dynamic data storage.

In my use case, every time a new CCX course is created from a master course, I need to associate it with a new class in the external platform. Without a dedicated field in the CCX model, it becomes difficult to store and manage this association.

Additionally, I have explored potential solutions such as using extensions or custom attributes, but those either affect the model or create challenges for maintainability during future updates.

Proposed Solution

I propose adding a JSONField to the CCX model that would allow users to store custom data in a flexible and scalable way. This field could be used not only to store external platform IDs (like in my case) but also to store any kind of metadata that other developers might need for their own integrations or customizations.

Advantages

  • Flexibility: A JSONField would enable developers to store structured data, such as strings, arrays, or dictionaries, for any number of purposes.

  • Scalability: This field can grow to accommodate various use cases without requiring future modifications to the model or database structure.

  • General Utility: Other institutions and developers could use this field to store custom metadata, such as external course identifiers, tracking metrics, or any other platform-specific configurations.

  • Enhanced Customization: Institutions could store any additional course-specific data, such as settings, preferences, or metadata that are essential for their specific context.

Example Use Cases:

  • External Platform Integration: External identifiers for linking to third-party systems.
  • Tracking Analytics: Save custom analytics tracking IDs for deeper integration with external reporting tools.
  • Metadata Storage: Allow institutions to store region-specific data, access control settings, or other custom attributes tied to each CCX.

I believe this feature would not only address my specific use case but would also provide value to a broader audience by enabling more flexible course customizations and integrations.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the CustomCourseForEdX model and reviewing its existing model-test and migration conventions. Done means the model can persist the proposed custom metadata and relevant project checks cover the new field, with its behavior and scope agreed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.