openedx-learning 0.25.0__tar.gz → 0.27.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. {openedx_learning-0.25.0/openedx_learning.egg-info → openedx_learning-0.27.0}/PKG-INFO +6 -5
  2. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/__init__.py +1 -1
  3. openedx_learning-0.27.0/openedx_learning/apps/authoring/backup_restore/admin.py +3 -0
  4. openedx_learning-0.27.0/openedx_learning/apps/authoring/backup_restore/api.py +25 -0
  5. openedx_learning-0.27.0/openedx_learning/apps/authoring/backup_restore/apps.py +12 -0
  6. openedx_learning-0.27.0/openedx_learning/apps/authoring/backup_restore/management/commands/lp_dump.py +45 -0
  7. openedx_learning-0.27.0/openedx_learning/apps/authoring/backup_restore/models.py +3 -0
  8. openedx_learning-0.27.0/openedx_learning/apps/authoring/backup_restore/toml.py +72 -0
  9. openedx_learning-0.27.0/openedx_learning/apps/authoring/publishing/admin.py +513 -0
  10. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/publishing/api.py +7 -1
  11. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/publishing/models/publishable_entity.py +13 -0
  12. openedx_learning-0.27.0/openedx_learning/apps/authoring/sections/admin.py +48 -0
  13. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/sections/api.py +0 -1
  14. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/sections/apps.py +2 -2
  15. openedx_learning-0.27.0/openedx_learning/apps/authoring/subsections/admin.py +48 -0
  16. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/subsections/api.py +0 -1
  17. openedx_learning-0.27.0/openedx_learning/apps/authoring/units/admin.py +48 -0
  18. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/units/api.py +0 -1
  19. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/lib/admin_utils.py +17 -1
  20. {openedx_learning-0.25.0 → openedx_learning-0.27.0/openedx_learning.egg-info}/PKG-INFO +6 -5
  21. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning.egg-info/SOURCES.txt +13 -0
  22. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning.egg-info/requires.txt +5 -4
  23. openedx_learning-0.27.0/openedx_tagging/core/tagging/migrations/__init__.py +0 -0
  24. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/models/base.py +1 -1
  25. openedx_learning-0.27.0/openedx_tagging/core/tagging/rest_api/__init__.py +0 -0
  26. openedx_learning-0.27.0/openedx_tagging/core/tagging/rest_api/v1/__init__.py +0 -0
  27. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/rules.py +2 -2
  28. openedx_learning-0.27.0/openedx_tagging/py.typed +0 -0
  29. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/requirements/base.in +2 -0
  30. openedx_learning-0.25.0/openedx_learning/apps/authoring/publishing/admin.py +0 -248
  31. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/CHANGELOG.rst +0 -0
  32. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/LICENSE.txt +0 -0
  33. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/MANIFEST.in +0 -0
  34. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/README.rst +0 -0
  35. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/api/__init__.py +0 -0
  36. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/api/authoring.py +0 -0
  37. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/api/authoring_models.py +0 -0
  38. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/__init__.py +0 -0
  39. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/__init__.py +0 -0
  40. {openedx_learning-0.25.0/openedx_learning/apps/authoring/collections → openedx_learning-0.27.0/openedx_learning/apps/authoring/backup_restore}/__init__.py +0 -0
  41. {openedx_learning-0.25.0/openedx_learning/apps/authoring/collections/migrations → openedx_learning-0.27.0/openedx_learning/apps/authoring/backup_restore/management}/__init__.py +0 -0
  42. {openedx_learning-0.25.0/openedx_learning/apps/authoring/components → openedx_learning-0.27.0/openedx_learning/apps/authoring/backup_restore/management/commands}/__init__.py +0 -0
  43. {openedx_learning-0.25.0/openedx_learning/apps/authoring/components/management → openedx_learning-0.27.0/openedx_learning/apps/authoring/backup_restore/migrations}/__init__.py +0 -0
  44. {openedx_learning-0.25.0/openedx_learning/apps/authoring/components/management/commands → openedx_learning-0.27.0/openedx_learning/apps/authoring/collections}/__init__.py +0 -0
  45. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/collections/admin.py +0 -0
  46. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/collections/api.py +0 -0
  47. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/collections/apps.py +0 -0
  48. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/collections/migrations/0001_initial.py +0 -0
  49. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/collections/migrations/0002_remove_collection_name_collection_created_by_and_more.py +0 -0
  50. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/collections/migrations/0003_collection_entities.py +0 -0
  51. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/collections/migrations/0004_collection_key.py +0 -0
  52. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/collections/migrations/0005_alter_collection_options_alter_collection_enabled.py +0 -0
  53. {openedx_learning-0.25.0/openedx_learning/apps/authoring/components → openedx_learning-0.27.0/openedx_learning/apps/authoring/collections}/migrations/__init__.py +0 -0
  54. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/collections/models.py +0 -0
  55. {openedx_learning-0.25.0/openedx_learning/apps/authoring/contents → openedx_learning-0.27.0/openedx_learning/apps/authoring/components}/__init__.py +0 -0
  56. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/components/admin.py +0 -0
  57. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/components/api.py +0 -0
  58. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/components/apps.py +0 -0
  59. {openedx_learning-0.25.0/openedx_learning/apps/authoring/contents/migrations → openedx_learning-0.27.0/openedx_learning/apps/authoring/components/management}/__init__.py +0 -0
  60. {openedx_learning-0.25.0/openedx_learning/apps/authoring/publishing → openedx_learning-0.27.0/openedx_learning/apps/authoring/components/management/commands}/__init__.py +0 -0
  61. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/components/management/commands/add_assets_to_component.py +0 -0
  62. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/components/migrations/0001_initial.py +0 -0
  63. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/components/migrations/0002_alter_componentversioncontent_key.py +0 -0
  64. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/components/migrations/0003_remove_componentversioncontent_learner_downloadable.py +0 -0
  65. {openedx_learning-0.25.0/openedx_learning/apps/authoring/publishing → openedx_learning-0.27.0/openedx_learning/apps/authoring/components}/migrations/__init__.py +0 -0
  66. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/components/models.py +0 -0
  67. {openedx_learning-0.25.0/openedx_learning/apps/authoring/sections → openedx_learning-0.27.0/openedx_learning/apps/authoring/contents}/__init__.py +0 -0
  68. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/contents/admin.py +0 -0
  69. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/contents/api.py +0 -0
  70. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/contents/apps.py +0 -0
  71. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/contents/migrations/0001_initial.py +0 -0
  72. {openedx_learning-0.25.0/openedx_learning/apps/authoring/sections → openedx_learning-0.27.0/openedx_learning/apps/authoring/contents}/migrations/__init__.py +0 -0
  73. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/contents/models.py +0 -0
  74. {openedx_learning-0.25.0/openedx_learning/apps/authoring/subsections → openedx_learning-0.27.0/openedx_learning/apps/authoring/publishing}/__init__.py +0 -0
  75. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/publishing/apps.py +0 -0
  76. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/publishing/contextmanagers.py +0 -0
  77. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/publishing/migrations/0001_initial.py +0 -0
  78. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/publishing/migrations/0002_alter_learningpackage_key_and_more.py +0 -0
  79. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/publishing/migrations/0003_containers.py +0 -0
  80. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/publishing/migrations/0004_publishableentity_can_stand_alone.py +0 -0
  81. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/publishing/migrations/0005_alter_entitylistrow_options.py +0 -0
  82. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/publishing/migrations/0006_draftchangelog.py +0 -0
  83. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/publishing/migrations/0007_bootstrap_draftchangelog.py +0 -0
  84. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/publishing/migrations/0008_alter_draftchangelogrecord_options_and_more.py +0 -0
  85. {openedx_learning-0.25.0/openedx_learning/apps/authoring/subsections → openedx_learning-0.27.0/openedx_learning/apps/authoring/publishing}/migrations/__init__.py +0 -0
  86. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/publishing/models/__init__.py +0 -0
  87. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/publishing/models/container.py +0 -0
  88. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/publishing/models/draft_log.py +0 -0
  89. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/publishing/models/entity_list.py +0 -0
  90. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/publishing/models/learning_package.py +0 -0
  91. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/publishing/models/publish_log.py +0 -0
  92. {openedx_learning-0.25.0/openedx_learning/apps/authoring/units → openedx_learning-0.27.0/openedx_learning/apps/authoring/sections}/__init__.py +0 -0
  93. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/sections/migrations/0001_initial.py +0 -0
  94. {openedx_learning-0.25.0/openedx_learning/apps/authoring/units → openedx_learning-0.27.0/openedx_learning/apps/authoring/sections}/migrations/__init__.py +0 -0
  95. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/sections/models.py +0 -0
  96. {openedx_learning-0.25.0/openedx_learning/contrib → openedx_learning-0.27.0/openedx_learning/apps/authoring/subsections}/__init__.py +0 -0
  97. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/subsections/apps.py +0 -0
  98. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/subsections/migrations/0001_initial.py +0 -0
  99. {openedx_learning-0.25.0/openedx_learning/lib → openedx_learning-0.27.0/openedx_learning/apps/authoring/subsections/migrations}/__init__.py +0 -0
  100. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/subsections/models.py +0 -0
  101. {openedx_learning-0.25.0/openedx_tagging/core → openedx_learning-0.27.0/openedx_learning/apps/authoring/units}/__init__.py +0 -0
  102. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/units/apps.py +0 -0
  103. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/units/migrations/0001_initial.py +0 -0
  104. {openedx_learning-0.25.0/openedx_tagging/core/tagging → openedx_learning-0.27.0/openedx_learning/apps/authoring/units/migrations}/__init__.py +0 -0
  105. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/apps/authoring/units/models.py +0 -0
  106. {openedx_learning-0.25.0/openedx_tagging/core/tagging/migrations → openedx_learning-0.27.0/openedx_learning/contrib}/__init__.py +0 -0
  107. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/contrib/media_server/__init__.py +0 -0
  108. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/contrib/media_server/apps.py +0 -0
  109. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/contrib/media_server/urls.py +0 -0
  110. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/contrib/media_server/views.py +0 -0
  111. {openedx_learning-0.25.0/openedx_tagging/core/tagging/rest_api → openedx_learning-0.27.0/openedx_learning/lib}/__init__.py +0 -0
  112. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/lib/cache.py +0 -0
  113. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/lib/collations.py +0 -0
  114. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/lib/fields.py +0 -0
  115. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/lib/managers.py +0 -0
  116. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/lib/test_utils.py +0 -0
  117. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/lib/validators.py +0 -0
  118. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning/py.typed +0 -0
  119. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning.egg-info/dependency_links.txt +0 -0
  120. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning.egg-info/not-zip-safe +0 -0
  121. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_learning.egg-info/top_level.txt +0 -0
  122. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/__init__.py +0 -0
  123. {openedx_learning-0.25.0/openedx_tagging/core/tagging/rest_api/v1 → openedx_learning-0.27.0/openedx_tagging/core}/__init__.py +0 -0
  124. /openedx_learning-0.25.0/openedx_tagging/py.typed → /openedx_learning-0.27.0/openedx_tagging/core/tagging/__init__.py +0 -0
  125. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/admin.py +0 -0
  126. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/api.py +0 -0
  127. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/apps.py +0 -0
  128. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/data.py +0 -0
  129. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/import_export/__init__.py +0 -0
  130. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/import_export/actions.py +0 -0
  131. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/import_export/api.py +0 -0
  132. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/import_export/exceptions.py +0 -0
  133. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/import_export/import_plan.py +0 -0
  134. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/import_export/parsers.py +0 -0
  135. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/import_export/tasks.py +0 -0
  136. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/import_export/template.csv +0 -0
  137. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/import_export/template.json +0 -0
  138. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0001_initial.py +0 -0
  139. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0001_squashed.py +0 -0
  140. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0002_auto_20230718_2026.py +0 -0
  141. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0003_auto_20230721_1238.py +0 -0
  142. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0004_auto_20230723_2001.py +0 -0
  143. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0005_language_taxonomy.py +0 -0
  144. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0006_alter_objecttag_unique_together.py +0 -0
  145. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0006_auto_20230802_1631.py +0 -0
  146. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0007_tag_import_task_log_null_fix.py +0 -0
  147. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0008_taxonomy_description_not_null.py +0 -0
  148. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0009_alter_objecttag_object_id.py +0 -0
  149. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0010_cleanups.py +0 -0
  150. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0011_remove_required.py +0 -0
  151. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0012_language_taxonomy.py +0 -0
  152. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0013_tag_parent_blank.py +0 -0
  153. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0014_minor_fixes.py +0 -0
  154. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0015_taxonomy_export_id.py +0 -0
  155. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0016_object_tag_export_id.py +0 -0
  156. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0017_alter_tagimporttask_status.py +0 -0
  157. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/migrations/0018_objecttag_is_copied.py +0 -0
  158. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/models/__init__.py +0 -0
  159. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/models/import_export.py +0 -0
  160. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/models/system_defined.py +0 -0
  161. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/models/utils.py +0 -0
  162. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/rest_api/paginators.py +0 -0
  163. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/rest_api/urls.py +0 -0
  164. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/rest_api/utils.py +0 -0
  165. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/rest_api/v1/permissions.py +0 -0
  166. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/rest_api/v1/serializers.py +0 -0
  167. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/rest_api/v1/urls.py +0 -0
  168. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/rest_api/v1/views.py +0 -0
  169. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/rest_api/v1/views_import.py +0 -0
  170. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/openedx_tagging/core/tagging/urls.py +0 -0
  171. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/setup.cfg +0 -0
  172. {openedx_learning-0.25.0 → openedx_learning-0.27.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openedx-learning
3
- Version: 0.25.0
3
+ Version: 0.27.0
4
4
  Summary: Open edX Learning Core and Tagging.
5
5
  Home-page: https://github.com/openedx/openedx-learning
6
6
  Author: David Ormsbee
@@ -19,12 +19,13 @@ Classifier: Programming Language :: Python :: 3.11
19
19
  Classifier: Programming Language :: Python :: 3.12
20
20
  Requires-Python: >=3.11
21
21
  License-File: LICENSE.txt
22
- Requires-Dist: attrs
23
- Requires-Dist: edx-drf-extensions
24
- Requires-Dist: djangorestframework<4.0
25
- Requires-Dist: celery
26
22
  Requires-Dist: Django
27
23
  Requires-Dist: rules<4.0
24
+ Requires-Dist: celery
25
+ Requires-Dist: djangorestframework<4.0
26
+ Requires-Dist: attrs
27
+ Requires-Dist: tomlkit
28
+ Requires-Dist: edx-drf-extensions
28
29
  Dynamic: author
29
30
  Dynamic: author-email
30
31
  Dynamic: classifier
@@ -2,4 +2,4 @@
2
2
  Open edX Learning ("Learning Core").
3
3
  """
4
4
 
5
- __version__ = "0.25.0"
5
+ __version__ = "0.27.0"
@@ -0,0 +1,3 @@
1
+ """
2
+ Django Admin pages for Backup Restore models (WIP)
3
+ """
@@ -0,0 +1,25 @@
1
+ """
2
+ Backup Restore API
3
+ """
4
+ import zipfile
5
+
6
+ from openedx_learning.apps.authoring.publishing.api import get_learning_package_by_key
7
+
8
+ from .toml import TOMLLearningPackageFile
9
+
10
+ TOML_PACKAGE_NAME = "package.toml"
11
+
12
+
13
+ def create_zip_file(lp_key: str, path: str) -> None:
14
+ """
15
+ Creates a zip file with a toml file so far (WIP)
16
+
17
+ Can throw a NotFoundError at get_learning_package_by_key
18
+ """
19
+ learning_package = get_learning_package_by_key(lp_key)
20
+ toml_file = TOMLLearningPackageFile(learning_package)
21
+ toml_file.create()
22
+ toml_content: str = toml_file.get()
23
+ with zipfile.ZipFile(path, "w", compression=zipfile.ZIP_DEFLATED) as zipf:
24
+ # Add the TOML string as a file in the ZIP
25
+ zipf.writestr(TOML_PACKAGE_NAME, toml_content)
@@ -0,0 +1,12 @@
1
+ """
2
+ Backup/Restore application initialization.
3
+ """
4
+
5
+ from django.apps import AppConfig
6
+
7
+
8
+ class BackupRestoreConfig(AppConfig):
9
+ name = 'openedx_learning.apps.authoring.backup_restore'
10
+ verbose_name = "Learning Core > Authoring > Backup Restore"
11
+ default_auto_field = 'django.db.models.BigAutoField'
12
+ label = "oel_backup_restore"
@@ -0,0 +1,45 @@
1
+ """
2
+ Django management commands to handle backup and restore learning packages (WIP)
3
+ """
4
+ import logging
5
+
6
+ from django.core.management import CommandError
7
+ from django.core.management.base import BaseCommand
8
+
9
+ from openedx_learning.apps.authoring.backup_restore.api import create_zip_file
10
+ from openedx_learning.apps.authoring.publishing.api import LearningPackage
11
+
12
+ logger = logging.getLogger(__name__)
13
+
14
+
15
+ class Command(BaseCommand):
16
+ """
17
+ Django management command to export a learning package to a zip file.
18
+ """
19
+ help = 'Export a learning package to a zip file.'
20
+
21
+ def add_arguments(self, parser):
22
+ parser.add_argument('lp_key', type=str, help='The key of the LearningPackage to dump')
23
+ parser.add_argument('file_name', type=str, help='The name of the output zip file')
24
+
25
+ def handle(self, *args, **options):
26
+ lp_key = options['lp_key']
27
+ file_name = options['file_name']
28
+ if not file_name.endswith(".zip"):
29
+ raise CommandError("Output file name must end with .zip")
30
+ try:
31
+ create_zip_file(lp_key, file_name)
32
+ message = f'{lp_key} written to {file_name}'
33
+ self.stdout.write(self.style.SUCCESS(message))
34
+ except LearningPackage.DoesNotExist as exc:
35
+ message = f"Learning package with key {lp_key} not found"
36
+ logger.exception(message)
37
+ raise CommandError(message) from exc
38
+ except Exception as e:
39
+ message = f"Failed to export learning package '{lp_key}': {e}"
40
+ logger.exception(
41
+ "Failed to create zip file %s (learning‑package key %s)",
42
+ file_name,
43
+ lp_key,
44
+ )
45
+ raise CommandError(message) from e
@@ -0,0 +1,3 @@
1
+ """
2
+ Core models for Backup Restore (WIP)
3
+ """
@@ -0,0 +1,72 @@
1
+ """
2
+ Utilities for backup and restore app
3
+ """
4
+
5
+ from datetime import datetime
6
+ from typing import Any, Dict
7
+
8
+ from tomlkit import comment, document, dumps, nl, table
9
+ from tomlkit.items import Table
10
+
11
+ from openedx_learning.apps.authoring.publishing.models.learning_package import LearningPackage
12
+
13
+
14
+ class TOMLLearningPackageFile():
15
+ """
16
+ Class to create a .toml representation of a LearningPackage instance.
17
+
18
+ This class builds a structured TOML document using `tomlkit` with metadata and fields
19
+ extracted from a `LearningPackage` object. The output can later be saved to a file or used elsewhere.
20
+ """
21
+
22
+ def __init__(self, learning_package: LearningPackage):
23
+ self.doc = document()
24
+ self.learning_package = learning_package
25
+
26
+ def _create_header(self) -> None:
27
+ """
28
+ Adds a comment with the current datetime to indicate when the export occurred.
29
+ This helps with traceability and file versioning.
30
+ """
31
+ self.doc.add(comment(f"Datetime of the export: {datetime.now()}"))
32
+ self.doc.add(nl())
33
+
34
+ def _create_table(self, params: Dict[str, Any]) -> Table:
35
+ """
36
+ Builds a TOML table section from a dictionary of key-value pairs.
37
+
38
+ Args:
39
+ params (Dict[str, Any]): A dictionary containing keys and values to include in the TOML table.
40
+
41
+ Returns:
42
+ Table: A TOML table populated with the provided keys and values.
43
+ """
44
+ section = table()
45
+ for key, value in params.items():
46
+ section.add(key, value)
47
+ return section
48
+
49
+ def create(self) -> None:
50
+ """
51
+ Populates the TOML document with a header and a table containing
52
+ metadata from the LearningPackage instance.
53
+
54
+ This method must be called before calling `get()`, otherwise the document will be empty.
55
+ """
56
+ self._create_header()
57
+ section = self._create_table({
58
+ "title": self.learning_package.title,
59
+ "key": self.learning_package.key,
60
+ "description": self.learning_package.description,
61
+ "created": self.learning_package.created,
62
+ "updated": self.learning_package.updated
63
+ })
64
+ self.doc.add("learning_package", section)
65
+
66
+ def get(self) -> str:
67
+ """
68
+ Returns:
69
+ str: The string representation of the generated TOML document.
70
+ Ensure `create()` has been called beforehand to get meaningful output.
71
+ """
72
+ return dumps(self.doc)