feat!: Add data model for course app API [BD-38] [TNL-8506] [BB-4470] (#28165)
* feat!: Add data model for course app API The current course apps API makes individual queries to determine if a course app is enabled, which can be inefficient. With this change we now have a Django model that contains this information, allowing us to make bulk queries about all the course apps for a course in the API. It also adds a new signal handler that initialises the status of all course apps in a course on course publish. * Use celery tasks and a management commands to make cache async * Review feedback * update log messages use separate celery task for each course task
Showing
- openedx/core/djangoapps/course_apps/api.py 21 additions, 2 deletionsopenedx/core/djangoapps/course_apps/api.py
- openedx/core/djangoapps/course_apps/apps.py 4 additions, 0 deletionsopenedx/core/djangoapps/course_apps/apps.py
- openedx/core/djangoapps/course_apps/handlers.py 36 additions, 0 deletionsopenedx/core/djangoapps/course_apps/handlers.py
- openedx/core/djangoapps/course_apps/management/__init__.py 0 additions, 0 deletionsopenedx/core/djangoapps/course_apps/management/__init__.py
- openedx/core/djangoapps/course_apps/management/commands/__init__.py 0 additions, 0 deletions...re/djangoapps/course_apps/management/commands/__init__.py
- openedx/core/djangoapps/course_apps/management/commands/cache_course_app_status.py 22 additions, 0 deletions...ourse_apps/management/commands/cache_course_app_status.py
- openedx/core/djangoapps/course_apps/migrations/0001_initial.py 62 additions, 0 deletions...dx/core/djangoapps/course_apps/migrations/0001_initial.py
- openedx/core/djangoapps/course_apps/models.py 60 additions, 1 deletionopenedx/core/djangoapps/course_apps/models.py
- openedx/core/djangoapps/course_apps/rest_api/v1/views.py 8 additions, 3 deletionsopenedx/core/djangoapps/course_apps/rest_api/v1/views.py
- openedx/core/djangoapps/course_apps/signals.py 8 additions, 0 deletionsopenedx/core/djangoapps/course_apps/signals.py
- openedx/core/djangoapps/course_apps/tasks.py 48 additions, 0 deletionsopenedx/core/djangoapps/course_apps/tasks.py
- openedx/core/djangoapps/course_apps/tests/test_api.py 31 additions, 0 deletionsopenedx/core/djangoapps/course_apps/tests/test_api.py
Please register or sign in to comment