File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -392,6 +392,15 @@ class ContentLibraryData(ScopeData):
392392
393393 NAMESPACE : ClassVar [str ] = "lib"
394394
395+ @property
396+ def org (self ) -> str :
397+ """Get the organization name from the library key.
398+
399+ Returns:
400+ str: The organization name (e.g., ``DemoX`` from ``lib:DemoX:CSPROB``).
401+ """
402+ return self .library_key .org
403+
395404 @property
396405 def library_id (self ) -> str :
397406 """The library identifier as used in Open edX (e.g., 'lib:DemoX:CSPROB').
@@ -494,6 +503,15 @@ class CourseOverviewData(ScopeData):
494503
495504 NAMESPACE : ClassVar [str ] = "course-v1"
496505
506+ @property
507+ def org (self ) -> str :
508+ """Get the organization name from the course key.
509+
510+ Returns:
511+ str: The organization name (e.g., ``DemoX`` from ``course-v1:DemoX+TestCourse+2024_T1``).
512+ """
513+ return self .course_key .org
514+
497515 @property
498516 def course_id (self ) -> str :
499517 """The course identifier as used in Open edX (e.g., 'course-v1:TestOrg+TestCourse+2024_T1').
You can’t perform that action at this time.
0 commit comments