Welcome to the workshop. Here we'll get a hands-on approach on creating periodic reports on a sandbox provided by OpenCraft.
- Register an account on the provided sandbox
https://lilac-periodic-reports.opencraft.hosting
- Create some instructor reports by joining the Demo course and navigating to the Instructor tab > Data Download
- Now let's check out the Periodic Reports Administration
https://lilac-periodic-reports.opencraft.hosting/admin/periodic_instructor_reports/
- Create a schedule for one of the tasks
4.1. Pick a Task, your user as Owner, and set the interval for every minute.
4.2. Make sure to add the Demo course by adding ["course-v1:edX+DemoX+Demo_Course"]
to the Course ids.
4.3. If you select the profile information task, ensure to add [['email', 'username']]
to the Arguments.
4.4 Add a prefix for your generated reports.
4.5 Select a folder structure:
regular - the usual way of the reports are uploaded by the edX platform, uses the hashed course ID, prefix and report name
by_date - similar to regular, but instead of the hashed course ID, the current date (yyyy-mm-dd format) will be used
flat - no intermediate folders will be used, only the prefix and report name
-
Pick a task in edx-platform/lms/djangoapps/instructor_task/api.py you want to compatible with periodic reports.
-
Extend the
task_input
of the report function with**kwargs
as this task does. -
Ensure the called task can upload files to a custom location.
-
Fix tests and update documentation.
-
Pronto!
For an example, check this commit: https://github.com/openedx/edx-platform/commit/4d975899846df0671ca8faca8a9c1a5c6cecb76f
- Ensure the instance is using Redis for Celery
CELERY_BROKER_TRANSPORT: redis
- Add the necessary configuration to /edx/etc/lms.yml
ENABLE_CELERY_BEAT: true
CELERYBEAT_SCHEDULER: 'django_celery_beat.schedulers:DatabaseScheduler'
ADDL_INSTALLED_APPS:
- django_celery_beat
- Install the plugin
$ pip install git+https://github.com/open-craft/[email protected]#egg=periodic-instructor-reports
- Restart the LMS and lms-worker services
More information at https://github.com/open-craft/periodic-instructor-reports/blob/main/README.md