Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4fac959
refactor: add grading stats service for HPPS integration
donnapep Apr 1, 2026
fdf8597
refactor: use wpdb->prepare %i for table names in grading stats services
donnapep Apr 1, 2026
bb99f4d
Add changelog entry for grading stats service
donnapep Apr 1, 2026
f6206fe
fix: align status filters between comments and tables grading stats
donnapep Apr 1, 2026
fb961f0
fix: fix lint alignment issues in grading stats test files
donnapep Apr 1, 2026
0faa01c
fix: add @var annotations to get_row() calls to resolve Psalm Possibl…
donnapep Apr 1, 2026
28552bd
fix: add null check to get_courses_average_grade and improve test cov…
donnapep Apr 1, 2026
cd593c1
fix: add missing docblocks to grading stats test files
donnapep Apr 1, 2026
67b395f
fix: fix PHPCS errors and update Psalm baseline for grading stats ser…
donnapep Apr 1, 2026
3c9d778
Add changelog for grade averages bug fix and update AGENTS.md convent…
donnapep Apr 2, 2026
000fa38
Standardize service instantiation in Sensei_Grading
donnapep Apr 2, 2026
bf0dff4
Exclude phantom grade=0 entries from grade averages
donnapep Apr 2, 2026
d921185
Remove redundant _quiz_has_questions check and simplify tables queries
donnapep Apr 2, 2026
86a50e7
Clean up grading stats test fixtures
donnapep Apr 2, 2026
d945008
Tweak to change log entry
donnapep Apr 2, 2026
640eca8
Update test names and fix lint issues in grading stats tests
donnapep Apr 2, 2026
b7f8e33
Simplify reports overview service instantiation
donnapep Apr 2, 2026
b27d006
Use Quiz_Progress_Interface constants for graded status values
donnapep Apr 2, 2026
5e581a3
Fix alignment warnings in grading stats service and Sensei_Grading
donnapep Apr 2, 2026
d792c72
Add quiz_answers meta to grading test fixtures
donnapep Apr 2, 2026
48b704a
Fix Psalm DuplicateArrayKey errors on PHP 7.4
donnapep Apr 7, 2026
0ed06b7
Add combined filter test for get_grade_totals
donnapep Apr 7, 2026
682069b
Address PR review feedback for grading stats service
donnapep Apr 7, 2026
9434901
Tighten Sensei_Grading method docblocks and return types
donnapep Apr 7, 2026
101148f
Drop static memoization in Sensei_Grading service helpers
donnapep Apr 7, 2026
a0b7b0c
Add assertion messages to grading stats tests
donnapep Apr 7, 2026
cc0ecab
Address remaining PR review feedback
donnapep Apr 14, 2026
1117ea4
Use guard clauses in build_user_filter methods
donnapep Apr 14, 2026
287c3e7
Use positive conditionals and guard clauses consistently
donnapep Apr 14, 2026
9f58e46
Restore psalm baseline entries for table-reading-aggregate quiz repo
donnapep May 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog/add-hpps-grading-stats-service
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: changed

Add grading stats service for HPPS integration.
4 changes: 4 additions & 0 deletions changelog/fix-grade-averages-spurious-zero
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Fix grade averages being dragged down by spurious grade=0 meta written on lesson start.
36 changes: 21 additions & 15 deletions config/psalm/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,9 @@
</PropertyNotSetInConstructor>
</file>
<file src="includes/admin/class-sensei-learners-main.php">
<ArgumentTypeCoercion occurrences="4">
<code>$item</code>
<ArgumentTypeCoercion occurrences="3">
<code>$item</code>
<code>$user_activity</code>
<code>array(
'total_items' =&gt; $total_items,
'total_pages' =&gt; $total_pages,
'per_page' =&gt; $per_page,
)</code>
</ArgumentTypeCoercion>
<DocblockTypeContradiction occurrences="3">
<code>! $item</code>
Expand Down Expand Up @@ -1653,9 +1647,8 @@
</PropertyNotSetInConstructor>
</file>
<file src="includes/class-sensei-grading-user-quiz.php">
<InvalidScalarArgument occurrences="9">
<InvalidScalarArgument occurrences="8">
<code>$attachment_id</code>
<code>$lesson_status_id</code>
<code>$question_grade_total</code>
<code>$quiz_grade</code>
<code>$quiz_grade</code>
Expand Down Expand Up @@ -2837,10 +2830,6 @@
<DocblockTypeContradiction occurrences="1">
<code>0</code>
</DocblockTypeContradiction>
<DuplicateArrayKey occurrences="2">
<code>$published_quiz_ids</code>
<code>$published_quiz_ids</code>
</DuplicateArrayKey>
<InvalidArgument occurrences="9">
<code>$key</code>
<code>$published_quiz_ids</code>
Expand All @@ -2851,8 +2840,6 @@
<code>$published_quiz_ids</code>
<code>$published_quiz_ids</code>
<code>'module'</code>
<code>'module'</code>
<code>'module'</code>
</InvalidArgument>
<InvalidArrayOffset occurrences="2">
<code>$count[ $key ]</code>
Expand Down Expand Up @@ -4560,6 +4547,15 @@
<code>$comment-&gt;comment_ID</code>
</InvalidScalarArgument>
</file>
<file src="includes/internal/services/class-comments-based-grading-stats-service.php">
<PossiblyInvalidPropertyFetch occurrences="5">
<code>$result-&gt;courses_average</code>
<code>$row-&gt;count</code>
<code>$row-&gt;grade_count</code>
<code>$row-&gt;grade_sum</code>
<code>$row-&gt;sum</code>
</PossiblyInvalidPropertyFetch>
</file>
<file src="includes/internal/services/class-comments-based-progress-aggregation-service.php">
<PossiblyInvalidPropertyFetch occurrences="5">
<code>$row-&gt;days_to_complete_count</code>
Expand Down Expand Up @@ -4587,6 +4583,15 @@
<code>ARRAY_A</code>
</UndefinedConstant>
</file>
<file src="includes/internal/services/class-tables-based-grading-stats-service.php">
<PossiblyInvalidPropertyFetch occurrences="5">
<code>$result-&gt;courses_average</code>
<code>$row-&gt;count</code>
<code>$row-&gt;grade_count</code>
<code>$row-&gt;grade_sum</code>
<code>$row-&gt;sum</code>
</PossiblyInvalidPropertyFetch>
</file>
<file src="includes/internal/services/class-tables-based-progress-aggregation-service.php">
<PossiblyInvalidPropertyFetch occurrences="5">
<code>$row-&gt;days_to_complete_count</code>
Expand All @@ -4597,6 +4602,7 @@
</PossiblyInvalidPropertyFetch>
<UndefinedConstant occurrences="2">
<code>ARRAY_A</code>
<code>ARRAY_A</code>
</UndefinedConstant>
</file>
<file src="includes/internal/student-progress/course-progress/repositories/class-comments-based-course-progress-repository.php">
Expand Down
Loading
Loading