diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7ad479d3..9af42fe7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,6 +16,11 @@ Unreleased ========================= +[10.5.0] - 2024-11-14 +--------------------- + * Fix CSV file names + * Fix ordering of skills charts data + [10.4.0] - 2024-11-14 --------------------- * Updated text for null emails record of leaderboard. @@ -35,8 +40,8 @@ Unreleased [10.0.1] - 2024-10-25 --------------------- - * Same as ``10.0.0`` - * Bumping the version so a new tag can be created in the GitHub + * Same as ``10.0.0`` + * Bumping the version so a new tag can be created in the GitHub [10.0.0] - 2024-10-25 --------------------- diff --git a/enterprise_data/__init__.py b/enterprise_data/__init__.py index 906c7541..5dcafd71 100644 --- a/enterprise_data/__init__.py +++ b/enterprise_data/__init__.py @@ -2,4 +2,4 @@ Enterprise data api application. This Django app exposes API endpoints used by enterprises. """ -__version__ = "10.4.0" +__version__ = "10.5.0" diff --git a/enterprise_data/admin_analytics/database/queries/skills_daily_rollup_admin_dash.py b/enterprise_data/admin_analytics/database/queries/skills_daily_rollup_admin_dash.py index 3779d58b..5ab31483 100644 --- a/enterprise_data/admin_analytics/database/queries/skills_daily_rollup_admin_dash.py +++ b/enterprise_data/admin_analytics/database/queries/skills_daily_rollup_admin_dash.py @@ -38,7 +38,8 @@ def get_top_skills_by_enrollment(): WITH TopSkills AS ( -- Get top 10 skills by total enrollments SELECT - skill_name + skill_name, + SUM(enrolls) AS total_enrollment_count FROM skills_daily_rollup_admin_dash WHERE @@ -47,7 +48,7 @@ def get_top_skills_by_enrollment(): GROUP BY skill_name ORDER BY - SUM(enrolls) DESC + total_enrollment_count DESC LIMIT 10 ) SELECT @@ -70,7 +71,7 @@ def get_top_skills_by_enrollment(): GROUP BY sd.skill_name, subject_name ORDER BY - subject_name; + total_enrollment_count DESC; """ @staticmethod @@ -82,7 +83,8 @@ def get_top_skills_by_completion(): WITH TopSkills AS ( -- Get top 10 skills by total completions SELECT - skill_name + skill_name, + SUM(completions) AS total_completion_count FROM skills_daily_rollup_admin_dash WHERE @@ -91,7 +93,7 @@ def get_top_skills_by_completion(): GROUP BY skill_name ORDER BY - SUM(completions) DESC + total_completion_count DESC LIMIT 10 ) SELECT @@ -114,5 +116,5 @@ def get_top_skills_by_completion(): GROUP BY sd.skill_name, subject_name ORDER BY - subject_name; + total_completion_count DESC; """ diff --git a/enterprise_data/api/v1/views/analytics_completions.py b/enterprise_data/api/v1/views/analytics_completions.py index 1bd33854..56565a5e 100644 --- a/enterprise_data/api/v1/views/analytics_completions.py +++ b/enterprise_data/api/v1/views/analytics_completions.py @@ -75,7 +75,7 @@ def list(self, request, enterprise_uuid): ) if response_type == ResponseType.CSV.value: - filename = f"""individual_completions, {start_date} - {end_date}.csv""" + filename = f"""Individual Completions, {start_date} - {end_date}.csv""" return StreamingHttpResponse( IndividualCompletionsCSVRenderer().render(self._stream_serialized_data( diff --git a/enterprise_data/api/v1/views/analytics_engagements.py b/enterprise_data/api/v1/views/analytics_engagements.py index 02eb6408..48f0c33e 100644 --- a/enterprise_data/api/v1/views/analytics_engagements.py +++ b/enterprise_data/api/v1/views/analytics_engagements.py @@ -75,7 +75,7 @@ def list(self, request, enterprise_uuid): ) if response_type == ResponseType.CSV.value: - filename = f"""individual_engagements, {start_date} - {end_date}.csv""" + filename = f"""Individual Engagements, {start_date} - {end_date}.csv""" return StreamingHttpResponse( IndividualEngagementsCSVRenderer().render(self._stream_serialized_data( diff --git a/enterprise_data/api/v1/views/analytics_enrollments.py b/enterprise_data/api/v1/views/analytics_enrollments.py index 3c672008..067d9a5f 100644 --- a/enterprise_data/api/v1/views/analytics_enrollments.py +++ b/enterprise_data/api/v1/views/analytics_enrollments.py @@ -74,7 +74,7 @@ def list(self, request, enterprise_uuid): ) if response_type == ResponseType.CSV.value: - filename = f"""individual_enrollments, {start_date} - {end_date}.csv""" + filename = f"""Individual Enrollments, {start_date} - {end_date}.csv""" return StreamingHttpResponse( IndividualEnrollmentsCSVRenderer().render(self._stream_serialized_data(