-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Add a JSONField to the CCX model for storing custom metadata #35593
Comments
Hi @pdpinch, @mariajgrimaldi and @felipemontoya Could you maybe help me with this? |
Thanks @JuanDavidBuitrago . Do you have a suggestion on how to namespace attributes? If we have two external providers that use, for example ClassroomCode, how should the two values be stored to avoid clashes? |
Hi @scottrish As the proposal is to add a new
Also, if the need arose to store some other value, not necessarily a ClassroomCode, we could add it to the current list
And in the end get the complete array
I hope that answers your question. |
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:
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.
The text was updated successfully, but these errors were encountered: