Use quiz submission repository on grading detail page#7928
Merged
Conversation
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>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
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' )) withSensei()->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>
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.
Summary
quiz_submission_repository->get()on the quiz grading detail page (admin.php?page=sensei_grading&user=X&quiz_id=Y)🤖 Generated with Claude Code