Skip to content

DIG-8344 Add assessment rater flow and signed routes#395

Merged
maheshmuralip merged 9 commits into
mainfrom
DIG-8344
Jun 25, 2026
Merged

DIG-8344 Add assessment rater flow and signed routes#395
maheshmuralip merged 9 commits into
mainfrom
DIG-8344

Conversation

@maheshmuralip

Copy link
Copy Markdown
Contributor

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.

maheshmuralip and others added 5 commits June 23, 2026 11:33
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 raterId through 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_at on 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.

Comment thread app/Traits/AssessmentHelperTrait.php Outdated
Comment thread app/Livewire/Summary.php Outdated
Comment thread app/Livewire/Assessments.php
Comment thread app/Livewire/Summary.php Outdated
Comment thread app/Livewire/AssessmentReport.php
Comment thread app/Livewire/Summary.php Outdated
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.
@maheshmuralip maheshmuralip marked this pull request as ready for review June 25, 2026 10:57
@maheshmuralip maheshmuralip requested a review from a team as a code owner June 25, 2026 10:57
@maheshmuralip maheshmuralip changed the title DIG-8344 initial commit to add assessment rater flow and signed routes DIG-8344 Add assessment rater flow and signed routes Jun 25, 2026
@maheshmuralip maheshmuralip merged commit 14348cc into main Jun 25, 2026
1 check passed
@maheshmuralip maheshmuralip deleted the DIG-8344 branch June 25, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants