Commit 8213b00a by Matt Drayer

Merge pull request #282 from edx-solutions/ziafazal/api-exclude-unenrolled-from-org-metrics

added active flag on organisation metrics
parents 33be2be6 68c225ad
......@@ -35,7 +35,8 @@ class OrganizationsViewSet(viewsets.ModelViewSet):
response_data = {}
grade_avg = 0
grade_complete_match_range = getattr(settings, 'GRADEBOOK_GRADE_COMPLETE_PROFORMA_MATCH_RANGE', 0.01)
org_user_grades = StudentGradebook.objects.filter(user__organizations=pk, user__is_active=True)
org_user_grades = StudentGradebook.objects.filter(user__organizations=pk, user__is_active=True,
user__courseenrollment__is_active=True)
courses_filter = request.QUERY_PARAMS.get('courses', None)
if courses_filter:
upper_bound = getattr(settings, 'API_LOOKUP_UPPER_BOUND', 100)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment