Skip to content

Commit

Permalink
Merge pull request #538 from openedx/saleem-latif/ENT-9704-updates
Browse files Browse the repository at this point in the history
ENT-9704:  Updated text for null emails record of leaderboard.
  • Loading branch information
saleem-latif authored Nov 14, 2024
2 parents 8016bc3 + 12d0b10 commit 8a50701
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Unreleased

=========================

[10.4.0] - 2024-11-14
---------------------
* Updated text for null emails record of leaderboard.

[10.3.0] - 2024-11-13
---------------------
* Re-write top 10 charts queries for Enrollments, Engagements and Completions
Expand Down
2 changes: 1 addition & 1 deletion enterprise_data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Enterprise data api application. This Django app exposes API endpoints used by enterprises.
"""

__version__ = "10.3.0"
__version__ = "10.4.0"
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from ..utils import run_query
from .base import BaseTable

NULL_EMAIL_TEXT = 'learners who have not shared consent'


class FactEngagementAdminDashTable(BaseTable):
"""
Expand Down Expand Up @@ -327,8 +329,9 @@ def get_all_leaderboard_data(
if include_null_email:
engagement_data_dict['None'] = find_first(engagement_data, lambda x: x['email'] is None) or {}
completion = find_first(completion_data, lambda x: x['email'] is None) or \
{'course_completion_count': 'Unknown'}
{'course_completion_count': ''}
engagement_data_dict['None']['course_completion_count'] = completion['course_completion_count']
engagement_data_dict['None']['email'] = NULL_EMAIL_TEXT

return list(engagement_data_dict.values())

Expand Down

0 comments on commit 8a50701

Please sign in to comment.