diff --git a/lms/envs/production.py b/lms/envs/production.py index d1c5a08aa2b0..8455f76948a0 100644 --- a/lms/envs/production.py +++ b/lms/envs/production.py @@ -1080,3 +1080,6 @@ def get_env_setting(setting): "SECRET": ENV_TOKENS.get('BIG_BLUE_BUTTON_GLOBAL_SECRET', None), "URL": ENV_TOKENS.get('BIG_BLUE_BUTTON_GLOBAL_URL', None), } + +############## Settings for survey report ############## +SURVEY_REPORT_EXTRA_DATA = ENV_TOKENS.get('SURVEY_REPORT_EXTRA_DATA', {}) diff --git a/openedx/features/survey_report/application.py b/openedx/features/survey_report/application.py index c54919206d1f..89ee9a2ef2b6 100644 --- a/openedx/features/survey_report/application.py +++ b/openedx/features/survey_report/application.py @@ -2,6 +2,8 @@ Contains the logic to manage survey report model. """ +from django.conf import settings + from openedx.features.survey_report.queries import ( get_unique_courses_offered, get_currently_learners, @@ -20,11 +22,15 @@ def generate_report() -> None: registered = get_learners_registered() certificates = get_generated_certificates() enrollments = get_course_enrollments() + extra_data = settings.SURVEY_REPORT_EXTRA_DATA - SurveyReport( + survey_report = SurveyReport( courses_offered=courses_offered, learners=learners, - learners_registered=registered, + registered_learners=registered, generated_certificates=certificates, - enrollments=enrollments + enrollments=enrollments, + extra_data=extra_data, ) + + survey_report.save()