openedx-learning 0.26.0__tar.gz → 0.27.1__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.
- {openedx_learning-0.26.0/openedx_learning.egg-info → openedx_learning-0.27.1}/PKG-INFO +4 -3
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/__init__.py +1 -1
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/api/authoring.py +1 -0
- openedx_learning-0.27.1/openedx_learning/apps/authoring/backup_restore/admin.py +3 -0
- openedx_learning-0.27.1/openedx_learning/apps/authoring/backup_restore/api.py +15 -0
- openedx_learning-0.27.1/openedx_learning/apps/authoring/backup_restore/apps.py +12 -0
- openedx_learning-0.27.1/openedx_learning/apps/authoring/backup_restore/management/commands/lp_dump.py +44 -0
- openedx_learning-0.27.1/openedx_learning/apps/authoring/backup_restore/models.py +3 -0
- openedx_learning-0.27.1/openedx_learning/apps/authoring/backup_restore/toml.py +75 -0
- openedx_learning-0.27.1/openedx_learning/apps/authoring/backup_restore/zipper.py +53 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/components/apps.py +2 -2
- openedx_learning-0.27.1/openedx_learning/apps/authoring/publishing/admin.py +513 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/publishing/api.py +41 -8
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/publishing/apps.py +2 -2
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/publishing/models/publishable_entity.py +20 -3
- openedx_learning-0.27.1/openedx_learning/apps/authoring/sections/admin.py +48 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/sections/api.py +6 -2
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/sections/apps.py +4 -4
- openedx_learning-0.27.1/openedx_learning/apps/authoring/subsections/admin.py +48 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/subsections/api.py +6 -2
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/subsections/apps.py +2 -2
- openedx_learning-0.27.1/openedx_learning/apps/authoring/units/admin.py +48 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/units/api.py +6 -2
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/units/apps.py +2 -2
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/lib/admin_utils.py +17 -1
- {openedx_learning-0.26.0 → openedx_learning-0.27.1/openedx_learning.egg-info}/PKG-INFO +4 -3
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning.egg-info/SOURCES.txt +14 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning.egg-info/requires.txt +3 -2
- openedx_learning-0.27.1/openedx_tagging/core/tagging/migrations/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/models/base.py +1 -1
- openedx_learning-0.27.1/openedx_tagging/core/tagging/rest_api/__init__.py +0 -0
- openedx_learning-0.27.1/openedx_tagging/core/tagging/rest_api/v1/__init__.py +0 -0
- openedx_learning-0.27.1/openedx_tagging/py.typed +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/requirements/base.in +2 -0
- openedx_learning-0.26.0/openedx_learning/apps/authoring/publishing/admin.py +0 -248
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/CHANGELOG.rst +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/LICENSE.txt +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/MANIFEST.in +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/README.rst +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/api/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/api/authoring_models.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/__init__.py +0 -0
- {openedx_learning-0.26.0/openedx_learning/apps/authoring/collections → openedx_learning-0.27.1/openedx_learning/apps/authoring/backup_restore}/__init__.py +0 -0
- {openedx_learning-0.26.0/openedx_learning/apps/authoring/collections/migrations → openedx_learning-0.27.1/openedx_learning/apps/authoring/backup_restore/management}/__init__.py +0 -0
- {openedx_learning-0.26.0/openedx_learning/apps/authoring/components → openedx_learning-0.27.1/openedx_learning/apps/authoring/backup_restore/management/commands}/__init__.py +0 -0
- {openedx_learning-0.26.0/openedx_learning/apps/authoring/components/management → openedx_learning-0.27.1/openedx_learning/apps/authoring/backup_restore/migrations}/__init__.py +0 -0
- {openedx_learning-0.26.0/openedx_learning/apps/authoring/components/management/commands → openedx_learning-0.27.1/openedx_learning/apps/authoring/collections}/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/collections/admin.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/collections/api.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/collections/apps.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/collections/migrations/0001_initial.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/collections/migrations/0002_remove_collection_name_collection_created_by_and_more.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/collections/migrations/0003_collection_entities.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/collections/migrations/0004_collection_key.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/collections/migrations/0005_alter_collection_options_alter_collection_enabled.py +0 -0
- {openedx_learning-0.26.0/openedx_learning/apps/authoring/components → openedx_learning-0.27.1/openedx_learning/apps/authoring/collections}/migrations/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/collections/models.py +0 -0
- {openedx_learning-0.26.0/openedx_learning/apps/authoring/contents → openedx_learning-0.27.1/openedx_learning/apps/authoring/components}/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/components/admin.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/components/api.py +0 -0
- {openedx_learning-0.26.0/openedx_learning/apps/authoring/contents/migrations → openedx_learning-0.27.1/openedx_learning/apps/authoring/components/management}/__init__.py +0 -0
- {openedx_learning-0.26.0/openedx_learning/apps/authoring/publishing → openedx_learning-0.27.1/openedx_learning/apps/authoring/components/management/commands}/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/components/management/commands/add_assets_to_component.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/components/migrations/0001_initial.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/components/migrations/0002_alter_componentversioncontent_key.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/components/migrations/0003_remove_componentversioncontent_learner_downloadable.py +0 -0
- {openedx_learning-0.26.0/openedx_learning/apps/authoring/publishing → openedx_learning-0.27.1/openedx_learning/apps/authoring/components}/migrations/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/components/models.py +0 -0
- {openedx_learning-0.26.0/openedx_learning/apps/authoring/sections → openedx_learning-0.27.1/openedx_learning/apps/authoring/contents}/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/contents/admin.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/contents/api.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/contents/apps.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/contents/migrations/0001_initial.py +0 -0
- {openedx_learning-0.26.0/openedx_learning/apps/authoring/sections → openedx_learning-0.27.1/openedx_learning/apps/authoring/contents}/migrations/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/contents/models.py +0 -0
- {openedx_learning-0.26.0/openedx_learning/apps/authoring/subsections → openedx_learning-0.27.1/openedx_learning/apps/authoring/publishing}/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/publishing/contextmanagers.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/publishing/migrations/0001_initial.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/publishing/migrations/0002_alter_learningpackage_key_and_more.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/publishing/migrations/0003_containers.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/publishing/migrations/0004_publishableentity_can_stand_alone.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/publishing/migrations/0005_alter_entitylistrow_options.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/publishing/migrations/0006_draftchangelog.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/publishing/migrations/0007_bootstrap_draftchangelog.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/publishing/migrations/0008_alter_draftchangelogrecord_options_and_more.py +0 -0
- {openedx_learning-0.26.0/openedx_learning/apps/authoring/subsections → openedx_learning-0.27.1/openedx_learning/apps/authoring/publishing}/migrations/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/publishing/models/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/publishing/models/container.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/publishing/models/draft_log.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/publishing/models/entity_list.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/publishing/models/learning_package.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/publishing/models/publish_log.py +0 -0
- {openedx_learning-0.26.0/openedx_learning/apps/authoring/units → openedx_learning-0.27.1/openedx_learning/apps/authoring/sections}/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/sections/migrations/0001_initial.py +0 -0
- {openedx_learning-0.26.0/openedx_learning/apps/authoring/units → openedx_learning-0.27.1/openedx_learning/apps/authoring/sections}/migrations/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/sections/models.py +0 -0
- {openedx_learning-0.26.0/openedx_learning/contrib → openedx_learning-0.27.1/openedx_learning/apps/authoring/subsections}/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/subsections/migrations/0001_initial.py +0 -0
- {openedx_learning-0.26.0/openedx_learning/lib → openedx_learning-0.27.1/openedx_learning/apps/authoring/subsections/migrations}/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/subsections/models.py +0 -0
- {openedx_learning-0.26.0/openedx_tagging/core → openedx_learning-0.27.1/openedx_learning/apps/authoring/units}/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/units/migrations/0001_initial.py +0 -0
- {openedx_learning-0.26.0/openedx_tagging/core/tagging → openedx_learning-0.27.1/openedx_learning/apps/authoring/units/migrations}/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/apps/authoring/units/models.py +0 -0
- {openedx_learning-0.26.0/openedx_tagging/core/tagging/migrations → openedx_learning-0.27.1/openedx_learning/contrib}/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/contrib/media_server/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/contrib/media_server/apps.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/contrib/media_server/urls.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/contrib/media_server/views.py +0 -0
- {openedx_learning-0.26.0/openedx_tagging/core/tagging/rest_api → openedx_learning-0.27.1/openedx_learning/lib}/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/lib/cache.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/lib/collations.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/lib/fields.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/lib/managers.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/lib/test_utils.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/lib/validators.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning/py.typed +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning.egg-info/dependency_links.txt +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning.egg-info/not-zip-safe +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_learning.egg-info/top_level.txt +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/__init__.py +0 -0
- {openedx_learning-0.26.0/openedx_tagging/core/tagging/rest_api/v1 → openedx_learning-0.27.1/openedx_tagging/core}/__init__.py +0 -0
- /openedx_learning-0.26.0/openedx_tagging/py.typed → /openedx_learning-0.27.1/openedx_tagging/core/tagging/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/admin.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/api.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/apps.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/data.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/import_export/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/import_export/actions.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/import_export/api.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/import_export/exceptions.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/import_export/import_plan.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/import_export/parsers.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/import_export/tasks.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/import_export/template.csv +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/import_export/template.json +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0001_initial.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0001_squashed.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0002_auto_20230718_2026.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0003_auto_20230721_1238.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0004_auto_20230723_2001.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0005_language_taxonomy.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0006_alter_objecttag_unique_together.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0006_auto_20230802_1631.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0007_tag_import_task_log_null_fix.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0008_taxonomy_description_not_null.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0009_alter_objecttag_object_id.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0010_cleanups.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0011_remove_required.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0012_language_taxonomy.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0013_tag_parent_blank.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0014_minor_fixes.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0015_taxonomy_export_id.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0016_object_tag_export_id.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0017_alter_tagimporttask_status.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/migrations/0018_objecttag_is_copied.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/models/__init__.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/models/import_export.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/models/system_defined.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/models/utils.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/rest_api/paginators.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/rest_api/urls.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/rest_api/utils.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/rest_api/v1/permissions.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/rest_api/v1/serializers.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/rest_api/v1/urls.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/rest_api/v1/views.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/rest_api/v1/views_import.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/rules.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/openedx_tagging/core/tagging/urls.py +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/setup.cfg +0 -0
- {openedx_learning-0.26.0 → openedx_learning-0.27.1}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: openedx-learning
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.27.1
|
|
4
4
|
Summary: Open edX Learning Core and Tagging.
|
|
5
5
|
Home-page: https://github.com/openedx/openedx-learning
|
|
6
6
|
Author: David Ormsbee
|
|
@@ -20,10 +20,11 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
20
20
|
Requires-Python: >=3.11
|
|
21
21
|
License-File: LICENSE.txt
|
|
22
22
|
Requires-Dist: djangorestframework<4.0
|
|
23
|
+
Requires-Dist: tomlkit
|
|
23
24
|
Requires-Dist: celery
|
|
24
|
-
Requires-Dist: edx-drf-extensions
|
|
25
|
-
Requires-Dist: attrs
|
|
26
25
|
Requires-Dist: Django
|
|
26
|
+
Requires-Dist: attrs
|
|
27
|
+
Requires-Dist: edx-drf-extensions
|
|
27
28
|
Requires-Dist: rules<4.0
|
|
28
29
|
Dynamic: author
|
|
29
30
|
Dynamic: author-email
|
|
@@ -9,6 +9,7 @@ APIs.
|
|
|
9
9
|
"""
|
|
10
10
|
# These wildcard imports are okay because these api modules declare __all__.
|
|
11
11
|
# pylint: disable=wildcard-import
|
|
12
|
+
from ..apps.authoring.backup_restore.api import *
|
|
12
13
|
from ..apps.authoring.collections.api import *
|
|
13
14
|
from ..apps.authoring.components.api import *
|
|
14
15
|
from ..apps.authoring.contents.api import *
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Backup Restore API
|
|
3
|
+
"""
|
|
4
|
+
from openedx_learning.apps.authoring.backup_restore.zipper import LearningPackageZipper
|
|
5
|
+
from openedx_learning.apps.authoring.publishing.api import get_learning_package_by_key
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def create_zip_file(lp_key: str, path: str) -> None:
|
|
9
|
+
"""
|
|
10
|
+
Creates a zip file with a toml file so far (WIP)
|
|
11
|
+
|
|
12
|
+
Can throw a NotFoundError at get_learning_package_by_key
|
|
13
|
+
"""
|
|
14
|
+
learning_package = get_learning_package_by_key(lp_key)
|
|
15
|
+
LearningPackageZipper(learning_package).create_zip(path)
|
|
@@ -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,44 @@
|
|
|
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
|
+
raise CommandError(message) from exc
|
|
37
|
+
except Exception as e:
|
|
38
|
+
message = f"Failed to export learning package '{lp_key}': {e}"
|
|
39
|
+
logger.exception(
|
|
40
|
+
"Failed to create zip file %s (learning‑package key %s)",
|
|
41
|
+
file_name,
|
|
42
|
+
lp_key,
|
|
43
|
+
)
|
|
44
|
+
raise CommandError(message) from e
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"""
|
|
2
|
+
TOML serialization for learning packages and publishable entities.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from datetime import datetime
|
|
6
|
+
|
|
7
|
+
import tomlkit
|
|
8
|
+
|
|
9
|
+
from openedx_learning.apps.authoring.publishing.models import PublishableEntity, PublishableEntityVersion
|
|
10
|
+
from openedx_learning.apps.authoring.publishing.models.learning_package import LearningPackage
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def toml_learning_package(learning_package: LearningPackage) -> str:
|
|
14
|
+
"""Create a TOML representation of the learning package."""
|
|
15
|
+
doc = tomlkit.document()
|
|
16
|
+
doc.add(tomlkit.comment(f"Datetime of the export: {datetime.now()}"))
|
|
17
|
+
section = tomlkit.table()
|
|
18
|
+
section.add("title", learning_package.title)
|
|
19
|
+
section.add("key", learning_package.key)
|
|
20
|
+
section.add("description", learning_package.description)
|
|
21
|
+
section.add("created", learning_package.created)
|
|
22
|
+
section.add("updated", learning_package.updated)
|
|
23
|
+
doc.add("learning_package", section)
|
|
24
|
+
return tomlkit.dumps(doc)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def toml_publishable_entity(entity: PublishableEntity) -> str:
|
|
28
|
+
"""Create a TOML representation of a publishable entity."""
|
|
29
|
+
|
|
30
|
+
current_draft_version = getattr(entity, "draft", None)
|
|
31
|
+
current_published_version = getattr(entity, "published", None)
|
|
32
|
+
|
|
33
|
+
doc = tomlkit.document()
|
|
34
|
+
entity_table = tomlkit.table()
|
|
35
|
+
entity_table.add("uuid", str(entity.uuid))
|
|
36
|
+
entity_table.add("can_stand_alone", entity.can_stand_alone)
|
|
37
|
+
|
|
38
|
+
if current_draft_version:
|
|
39
|
+
draft_table = tomlkit.table()
|
|
40
|
+
draft_table.add("version_num", current_draft_version.version.version_num)
|
|
41
|
+
entity_table.add("draft", draft_table)
|
|
42
|
+
|
|
43
|
+
published_table = tomlkit.table()
|
|
44
|
+
if current_published_version:
|
|
45
|
+
published_table.add("version_num", current_published_version.version.version_num)
|
|
46
|
+
else:
|
|
47
|
+
published_table.add(tomlkit.comment("unpublished: no published_version_num"))
|
|
48
|
+
entity_table.add("published", published_table)
|
|
49
|
+
|
|
50
|
+
doc.add("entity", entity_table)
|
|
51
|
+
doc.add(tomlkit.nl())
|
|
52
|
+
doc.add(tomlkit.comment("### Versions"))
|
|
53
|
+
|
|
54
|
+
for entity_version in entity.versions.all():
|
|
55
|
+
version = tomlkit.aot()
|
|
56
|
+
version_table = toml_publishable_entity_version(entity_version)
|
|
57
|
+
version.append(version_table)
|
|
58
|
+
doc.add("version", version)
|
|
59
|
+
|
|
60
|
+
return tomlkit.dumps(doc)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def toml_publishable_entity_version(version: PublishableEntityVersion) -> tomlkit.items.Table:
|
|
64
|
+
"""Create a TOML representation of a publishable entity version."""
|
|
65
|
+
version_table = tomlkit.table()
|
|
66
|
+
version_table.add("title", version.title)
|
|
67
|
+
version_table.add("uuid", str(version.uuid))
|
|
68
|
+
version_table.add("version_num", version.version_num)
|
|
69
|
+
container_table = tomlkit.table()
|
|
70
|
+
container_table.add("children", [])
|
|
71
|
+
unit_table = tomlkit.table()
|
|
72
|
+
unit_table.add("graded", True)
|
|
73
|
+
container_table.add("unit", unit_table)
|
|
74
|
+
version_table.add("container", container_table)
|
|
75
|
+
return version_table # For use in AoT
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""
|
|
2
|
+
This module provides functionality to create a zip file containing the learning package data,
|
|
3
|
+
including a TOML representation of the learning package and its entities.
|
|
4
|
+
"""
|
|
5
|
+
import zipfile
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
from openedx_learning.apps.authoring.backup_restore.toml import toml_learning_package, toml_publishable_entity
|
|
9
|
+
from openedx_learning.apps.authoring.publishing import api as publishing_api
|
|
10
|
+
from openedx_learning.apps.authoring.publishing.models.learning_package import LearningPackage
|
|
11
|
+
|
|
12
|
+
TOML_PACKAGE_NAME = "package.toml"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class LearningPackageZipper:
|
|
16
|
+
"""
|
|
17
|
+
A class to handle the zipping of learning content for backup and restore.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
def __init__(self, learning_package: LearningPackage):
|
|
21
|
+
self.learning_package = learning_package
|
|
22
|
+
|
|
23
|
+
def create_zip(self, path: str) -> None:
|
|
24
|
+
"""
|
|
25
|
+
Creates a zip file containing the learning package data.
|
|
26
|
+
Args:
|
|
27
|
+
path (str): The path where the zip file will be created.
|
|
28
|
+
Raises:
|
|
29
|
+
Exception: If the learning package cannot be found or if the zip creation fails.
|
|
30
|
+
"""
|
|
31
|
+
package_toml_content: str = toml_learning_package(self.learning_package)
|
|
32
|
+
|
|
33
|
+
with zipfile.ZipFile(path, "w", compression=zipfile.ZIP_DEFLATED) as zipf:
|
|
34
|
+
# Add the package.toml string
|
|
35
|
+
zipf.writestr(TOML_PACKAGE_NAME, package_toml_content)
|
|
36
|
+
|
|
37
|
+
# Add the entities directory
|
|
38
|
+
entities_folder = Path("entities")
|
|
39
|
+
zip_info = zipfile.ZipInfo(str(entities_folder) + "/") # Ensure trailing slash
|
|
40
|
+
zipf.writestr(zip_info, "") # Add explicit empty directory entry
|
|
41
|
+
|
|
42
|
+
# Add the collections directory
|
|
43
|
+
collections_folder = Path("collections")
|
|
44
|
+
collections_info = zipfile.ZipInfo(str(collections_folder) + "/") # Ensure trailing slash
|
|
45
|
+
zipf.writestr(collections_info, "") # Add explicit empty directory
|
|
46
|
+
|
|
47
|
+
# Add each entity's TOML file
|
|
48
|
+
for entity in publishing_api.get_entities(self.learning_package.pk):
|
|
49
|
+
# Create a TOML representation of the entity
|
|
50
|
+
entity_toml_content: str = toml_publishable_entity(entity)
|
|
51
|
+
entity_toml_filename = f"{entity.key}.toml"
|
|
52
|
+
entity_toml_path = entities_folder / entity_toml_filename
|
|
53
|
+
zipf.writestr(str(entity_toml_path), entity_toml_content)
|
|
@@ -18,7 +18,7 @@ class ComponentsConfig(AppConfig):
|
|
|
18
18
|
"""
|
|
19
19
|
Register Component and ComponentVersion.
|
|
20
20
|
"""
|
|
21
|
-
from ..publishing.api import
|
|
21
|
+
from ..publishing.api import register_publishable_models # pylint: disable=import-outside-toplevel
|
|
22
22
|
from .models import Component, ComponentVersion # pylint: disable=import-outside-toplevel
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
register_publishable_models(Component, ComponentVersion)
|