DIG-8344 Add assessment rater flow and signed routes#395
Merged
Conversation
Introduce rater support and signed URL flows for external raters. Pass raterId through Livewire components (Assessments, Questions, Summary) and skip standard user-permission checks when raterId is present. Add signed routes for rate-assessment and rate-assessment-summary and enforce signature validation on the Assessments mount. Resolve question text per rater via AssessmentRater lookups and update rater pivot submitted_at when a rater submits; normal submissions still update the assessment submitted_at. Misc: minor view bindings (raterId), route adjustments, small cleanup in QuestionTextResolver, and a couple of helper/use additions.
Remove duplicated assessmentRater() implementations.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for external raters by introducing signed URL entry points and propagating raterId through the assessment/question/summary/report flows, including rater-specific submission tracking via the assessment↔rater pivot.
Changes:
- Introduces signed routes for rater assessment access (assessment, summary, completed, report) and updates invitation/test expectations accordingly.
- Threads
raterIdthrough Livewire components/views and conditionally bypasses standard permission/submission logic for rater flows. - Adds rater-aware question text resolution and updates submission behavior to set
submitted_aton the rater pivot when a rater completes.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Feature/Services/RaterInvitationServiceTest.php | Updates invitation URL expectation to the new signed rater route path. |
| tests/Feature/Livewire/SummaryFeatureTest.php | Adjusts redirects/query params for the updated routing/edit semantics. |
| routes/web.php | Reworks assessment routing and adds signed rater routes. |
| resources/views/livewire/summary.blade.php | Uses a rater-aware “submitted” state and renders nodes/questions based on resolved texts. |
| resources/views/livewire/questions.blade.php | UI tweak to hide “Previous page” for rater flows. |
| resources/views/livewire/assessments.blade.php | Passes raterId into nested questions component and updates the Livewire key. |
| resources/views/livewire/assessment-report.blade.php | Hides “For/Academy Id” block for raters and tightens intro rendering conditions. |
| lang/en/alerts.php | Adds a rater-specific “not submitted” message string. |
| app/Traits/AssessmentHelperTrait.php | Adds assessmentRater() helper and modifies assessment loading for rater flows. |
| app/Services/QuestionTextResolver.php | Minor cleanup/formatting. |
| app/Livewire/Variants.php | Tweaks redirectIfSubmittedOrFinished invocation. |
| app/Livewire/Summary.php | Adds raterId, rater-aware responses/submission logic, and signed redirects for rater navigation. |
| app/Livewire/Questions.php | Filters responses by current rater (self vs external) and adds signed redirect to rater summary. |
| app/Livewire/Frameworks.php | Adds URL facade import. |
| app/Livewire/Assessments.php | Adds rater signature validation and rater-aware resolved question text mapping. |
| app/Livewire/AssessmentReport.php | Adds raterId and rater submission checks before allowing report access. |
| app/Livewire/AssessmentCompleted.php | Adds signed report redirect for rater completion flow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Update Summary Livewire component imports and redirect logic to properly include nodeId/edit params, use route() redirects, and provide a raterId fallback. Add comprehensive feature tests: AssessmentCompleted tests for signed vs normal report redirects; Questions tests for rater finish redirect and per-rater resume behavior; Summary tests for editAnswer, viewReport, continueAssessment and rater confirmSubmit (including DB assertions). These changes ensure signed rater routes and resume/submit flows are covered by tests.
Android63
approved these changes
Jun 25, 2026
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.
Introduce rater support and signed URL flows for external raters. Pass raterId through Livewire components (Assessments, Questions, Summary) and skip standard user-permission checks when raterId is present. Add signed routes for rate-assessment and rate-assessment-summary and enforce signature validation on the Assessments mount. Resolve question text per rater via AssessmentRater lookups and update rater pivot submitted_at when a rater submits; normal submissions still update the assessment submitted_at. Misc: minor view bindings (raterId), route adjustments, small cleanup in QuestionTextResolver, and a couple of helper/use additions.