Skip to content

Read Courses Overview aggregates from HPPS - #8207

Draft
donnapep wants to merge 2 commits into
hpps-reports-students-last-activityfrom
hpps-reports-courses-aggregates
Draft

Read Courses Overview aggregates from HPPS#8207
donnapep wants to merge 2 commits into
hpps-reports-students-last-activityfrom
hpps-reports-courses-aggregates

Conversation

@donnapep

@donnapep donnapep commented Aug 25, 2026

Copy link
Copy Markdown
Member

SEN-83: HPPS: Reports Overview aggregates → table-aware

Part of the Reports → Overview HPPS effort. Stacked on hpps-reports-students-last-activity.

Proposed Changes

  • Courses tab header columns — Completions, Completion Rate, Average Progress, Average Grade, Days to Completion: their aggregate calculations now go through the aggregation service so they read HPPS tables.

Testing Instructions

Setup (HPPS enabled):

  • Create a course with 2 lessons.
  • Enrol 4 students. Have 1 complete both lessons and the course; have another complete 1 lesson; leave the rest not started.

Verify at Reports → Overview → Courses (course header):

  • Completions = 1, Completion Rate = 25% (1 of 4).
  • Average Progress reflects lessons completed across enrolled students (3 of 8 possible = ~38%).
  • Average Grade and Days to Completion show values consistent with the completed work.
  • Turn HPPS off, reload, and confirm the numbers are identical.

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

WordPress Playground Preview

The changes in this pull request can previewed and tested using a WordPress Playground instance.

Open WordPress Playground Preview

donnapep and others added 2 commits August 25, 2026 11:24
Ports count_statuses_by_post, get_lesson_completion_counts, and
get_courses_average_days_to_completion into both the comments-based
and tables-based Progress_Aggregation_Service implementations. These
generalize the private per-course queries currently in
Sensei_Reports_Overview_Service_Courses to work with prepared
placeholders instead of raw ID interpolation, powering the Courses
overview aggregates.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the raw comments-table queries in
Sensei_Reports_Overview_Service_Courses with calls to
Progress_Query_Service_Factory's aggregation service, so students count,
lesson completions, and average days to completion read from HPPS
progress tables when tables storage is active.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@donnapep
donnapep force-pushed the hpps-reports-students-last-activity branch from 5ed71e8 to 957ffbd Compare August 25, 2026 15:26
@donnapep
donnapep force-pushed the hpps-reports-courses-aggregates branch from 07ac04a to 933b63d Compare August 25, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant