Skip to content

Use quiz submission repository on grading detail page#7928

Merged
donnapep merged 4 commits intotrunkfrom
add/quiz-grading-hpps-integration
Mar 31, 2026
Merged

Use quiz submission repository on grading detail page#7928
donnapep merged 4 commits intotrunkfrom
add/quiz-grading-hpps-integration

Conversation

@donnapep
Copy link
Copy Markdown
Contributor

@donnapep donnapep commented Mar 31, 2026

Summary

  • Replace direct comment meta query with quiz_submission_repository->get() on the quiz grading detail page (admin.php?page=sensei_grading&user=X&quiz_id=Y)
  • This ensures the page works with both comments-based and tables-based (HPPS) storage, matching the pattern established in Integrate HPPS in Grading backend #7923

🤖 Generated with Claude Code

Replace direct comment meta query with repository call so the
quiz grading detail page works with both comments-based and
tables-based (HPPS) storage.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 31, 2026 16:45
@donnapep donnapep self-assigned this Mar 31, 2026
@donnapep donnapep added this to the 4.26.0 milestone Mar 31, 2026
donnapep and others added 2 commits March 31, 2026 12:46
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the quiz grading detail page to retrieve a learner’s quiz submission grade via the quiz submission repository, aligning grading backend data access with the HPPS abstraction so it works for both comments-based and tables-based storage.

Changes:

  • Replace direct lesson status comment meta lookup (get_comment_meta( ..., 'grade' )) with Sensei()->quiz_submission_repository->get().
  • Read the stored grade via Submission_Interface::get_final_grade() when a submission exists.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Add ORDER BY id ASC to the quiz answers query so questions are
returned in insertion order, matching the original randomized
order the student saw. Without this, questions appear in a
different order than the comments-based implementation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@donnapep donnapep merged commit a14a972 into trunk Mar 31, 2026
23 checks passed
@donnapep donnapep deleted the add/quiz-grading-hpps-integration branch March 31, 2026 19: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.

2 participants