Skip to content

Commit

Permalink
feat: add extra_data setting
Browse files Browse the repository at this point in the history
Co-authored-by: henrrypg <henrry.pulgarin@edunext.co>
  • Loading branch information
Alec4r and Henrrypg committed Oct 24, 2022
1 parent 9109012 commit 9f65641
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions lms/envs/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -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', {})
12 changes: 9 additions & 3 deletions openedx/features/survey_report/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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()

0 comments on commit 9f65641

Please sign in to comment.