Read courses per-row Completions and Average Progress from HPPS - #8209
Draft
donnapep wants to merge 3 commits into
Draft
Read courses per-row Completions and Average Progress from HPPS#8209donnapep wants to merge 3 commits into
donnapep wants to merge 3 commits into
Conversation
8 tasks
Contributor
Extract the per-course average progress calculation out of get_total_average_progress() into a new public get_average_progress_per_course() method, so the courses list table can prime per-row progress from primed table-aware data instead of running per-row comment queries. get_total_average_progress() now sums the per-course values, keeping its return value unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the courses list table's remaining per-row comment queries (completions, feeding both the completions and completion_rate columns, and average_progress) with cache lookups primed for the current page via count_statuses_by_post() and the new get_average_progress_per_course() service method. This makes both columns storage-aware in HPPS mode, same as the other columns on this table. Also deprecates the now-unused sensei_analysis_course_completions filter. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A course with no enrolled students or no lessons has no computable average progress. Restore the previous N/A display for those courses instead of showing 0%, which wrongly implied zero progress. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
donnapep
force-pushed
the
hpps-reports-courses-avg-grade
branch
from
August 25, 2026 15:26
0558d49 to
39962d5
Compare
donnapep
force-pushed
the
hpps-reports-courses-completions-progress
branch
from
August 25, 2026 15:26
60acda6 to
fc9a88a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SEN-83: HPPS: Reports Overview aggregates → table-aware
Part of the Reports → Overview HPPS effort. Stacked on
hpps-reports-courses-avg-grade.Proposed Changes
N/A(not0%) for a course with no enrolled students or no lessons.Testing Instructions
Setup (HPPS enabled):
Verify at Reports → Overview → Courses:
Deprecated Code
This per-row filter no longer runs. No replacement:
sensei_analysis_course_completions