Commit bc393990 by Martyn James Committed by Jonathan Piacenti

Drive By - denominator should be a float so that integer calculations do not…

Drive By - denominator should be a float so that integer calculations do not round down before we even choose to round then futher
parent c0725266
......@@ -1610,7 +1610,7 @@ class CoursesCompletionsLeadersList(SecureAPIView):
return Response({}, status=status.HTTP_404_NOT_FOUND)
course_key = get_course_key(course_id)
detached_categories = ['discussion-course', 'group-project', 'discussion-forum']
total_possible_completions = len(get_course_leaf_nodes(course_key, detached_categories))
total_possible_completions = float(len(get_course_leaf_nodes(course_key, detached_categories)))
exclude_users = _get_aggregate_exclusion_user_ids(course_key)
cat_list = [Q(content_id__contains=item.strip()) for item in detached_categories]
cat_list = reduce(lambda a, b: a | b, cat_list)
......
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