From 971a65db3d37c9f0a608953ed6585880981a328f Mon Sep 17 00:00:00 2001 From: atesker Date: Fri, 23 Aug 2019 11:30:13 -0400 Subject: [PATCH] convert list to dict version --- bulk_grades/__init__.py | 2 +- bulk_grades/api.py | 3 ++- bulk_grades/settings/local.py | 14 -------------- 3 files changed, 3 insertions(+), 16 deletions(-) delete mode 100644 bulk_grades/settings/local.py diff --git a/bulk_grades/__init__.py b/bulk_grades/__init__.py index de0b9e6..72c0080 100644 --- a/bulk_grades/__init__.py +++ b/bulk_grades/__init__.py @@ -4,6 +4,6 @@ from __future__ import absolute_import, unicode_literals -__version__ = '0.5.6' +__version__ = '0.5.7' default_app_config = 'bulk_grades.apps.BulkGradesConfig' # pylint: disable=invalid-name diff --git a/bulk_grades/api.py b/bulk_grades/api.py index 2020f97..6de075e 100644 --- a/bulk_grades/api.py +++ b/bulk_grades/api.py @@ -407,7 +407,8 @@ def get_rows_to_export(self): enrollments = list(_get_enrollments(self._course_key, track=self.track, cohort=self.cohort)) grades_api.prefetch_course_and_subsection_grades(self._course_key, [enroll['user'] for enroll in enrollments]) client = LearnerAPIClient() - intervention_data = client.courses(self.course_id).user_engagement().get() + intervention_list = client.courses(self.course_id).user_engagement().get() + intervention_data = {val['username']: val for val in intervention_list} for enrollment in enrollments: grades = grades_api.get_subsection_grades(enrollment['user_id'], self._course_key) if self._subsection and (self.subsection_grade_max or self.subsection_grade_min): diff --git a/bulk_grades/settings/local.py b/bulk_grades/settings/local.py deleted file mode 100644 index 14f0cdf..0000000 --- a/bulk_grades/settings/local.py +++ /dev/null @@ -1,14 +0,0 @@ -""" -Common Pluggable Django App settings -""" -from __future__ import absolute_import, unicode_literals - - -def plugin_settings(settings): - """ - Injects local settings into django settings - """ - settings.ANALYTICS_API_CLIENT = { - 'url': 'http://host.docker.internal:8000/api/v0', - 'token': 'edx' - }