feat(peer-review): implement double-blind peer review assessment module - #1154
Open
shreyasmene06 wants to merge 17 commits into
Open
shreyasmene06 wants to merge 17 commits into
shreyasmene06 wants to merge 17 commits into
Conversation
shreyasmene06
force-pushed
the
feat/peer-review-assessment
branch
from
July 11, 2026 20:39
0c29f16 to
322b0a6
Compare
… interfaces (cherry picked from commit bb65284)
…ontrollers, and jobs (cherry picked from commit cfe922b)
…mentation (cherry picked from commit 322b0a6)
… workflow (cherry picked from commit e55d6154746519723102ae7f82733989fa5b48cf)
ProgressService.stopItem calls ItemRepository.readItemById to validate the item being submitted. readItemById only checked video/quiz/blog/project/feedback collections, but PeerReviewAssessmentService.create writes peer-review items into peerReviewAssessmentCollection (alias of peer_review_assessments). A student starting then submitting a peer-review item would hit 'Item not found' on stopItem, blocking every submission. Add the peerReviewAssessmentCollection lookup to readItemById so it matches the same collection that createItem routes PEER_REVIEW_ASSESSMENT to. Tested via e2e/tests/peer-review-ui-full-flow.spec.ts. (cherry picked from commit fe3b4f9f36ec10e2d3a2e3da2d9c726a816818b7)
9-step serial spec that drives every requirement of the peer-review
feature through a real browser, complementing the existing
peer-review-full-flow.spec.ts (which hits the API directly):
Step 1: Teacher creates assessment via API (same path the imperative
teacher modal uses)
Step 2: Student 1 logs into the real browser, navigates to the
assessment, fills label+URL, waits for the public-access
check, submits
Step 3: 3 other students submit via API
Step 4: Deadline enforcement — past-deadline submit rejected
Step 5: Teacher closes assessment — post-close blocked, assignments
created
Step 6: Student 1 logs into the browser, opens Peer Reviews, submits
a rubric review
Step 7: 3 other students submit reviews via API
Step 8: Finalization computes finalScore per submission (trimmed-mean
algorithm)
Step 9: Teacher logs into the browser, performs manual score override
Test fixture seeds courseSettings (proctors disabled, linear progression
disabled), wipes stale itemsGroup so the new item is the only one, and
signs ethics consent for the UI student so the proctoring gate opens on
first load. Verifies mongo state at every step (peer_review_submissions,
peer_review_assignments, peer_review_reviews, finalScore).
9/9 passing consecutively. Total runtime ~1m 10s.
(cherry picked from commit 5c1ece668d0667e1ae996d18f9239c7f46336ae3)
shreyasmene06
force-pushed
the
feat/peer-review-assessment
branch
from
July 30, 2026 05:21
322b0a6 to
14dfe4d
Compare
…ssessment The prior-pair loader was bypassing the repo via a raw getCollection query and a dynamic ObjectId re-import. The repo's findByAssessment already handles ObjectId coercion correctly (the exact bug class this code was working around), so the bypass was both redundant and fragile. Replace with the repo call, drop the (this as any).database cast, drop the dynamic import and its void-silencer. No behavior change — 93/93 tests still green.
…lback picker lastFallbackPairs was declared, never assigned, and only silenced by the void line — pure dead code. The fallback reviewer picker built a filtered candidate list and a Set, then ran a second loop as a 'ran-out' defensive branch that could only fire if order.length was 1 — which the early N < 2 guard above rules out. Collapse into a single pass. Behavior unchanged: 93/93 tests still green.
…on, teacher override display & reset - Calculate reviewsTotal dynamically based on assigned pairs generated by small class circle algorithm - Trigger scoreSubmission automatically when assigned reviews are completed or assessment closes - Perform on-the-fly score calculation on teacher submission list GET endpoint - Return effective overridden scores in listReviewsForTeacher payload - Add clearTeacherOverride and support reset in teacherOverride endpoint and frontend UI - Fix missing Textarea component import in teacher course page - Add student accounts seed script and update CLAUDE.md documentation
shreyasmene06
force-pushed
the
feat/peer-review-assessment
branch
from
August 1, 2026 10:22
4671517 to
24a80c4
Compare
…ollusion malpractice tracker - Add class average, completion rate, and malpractice alert stat cards - Add score distribution PieChart and rubric criterion performance BarChart using recharts - Implement reciprocal high-scoring collusion and review score discrepancy detection - Add Flagged / Malpractice filter toggle and alert boxes for flagged submissions
…ollusion malpractice tracker - Add class average, completion rate, and malpractice alert stat cards - Add score distribution PieChart and rubric criterion performance BarChart using recharts - Implement reciprocal high-scoring collusion and review score discrepancy detection - Add Flagged / Malpractice filter toggle and alert boxes for flagged submissions - Fix React Rule of Hooks ordering in PeerReviewSubmissionsSection
…l review flag check - Restore handleStartOverride, handleSaveOverride, and handleResetOverride handlers in PeerReviewSubmissionsSection - Add queryClient cache invalidation on score override save and reset - Default teacherManualReviewEnabled config state to true - Update override control condition to allow manual overrides when teacherManualReviewEnabled is not false
…student submissions - Add PATCH /peer-review-assessments/submissions/:submissionId/teacher-override endpoint - Add applyTeacherOverride and clearTeacherOverride to PeerReviewSubmissionRepository - Update PeerReviewScoringService to respect submission-level teacherOverrideScore - Add useTeacherOverrideSubmissionFinalScore hook to frontend - Add overall final score override controls and inline form to student submission cards on teacher dashboard
…dent final scores - Allow teachers to evaluate and score each rubric criterion individually when overriding a student submission final score - Compute live overall total score from rubric criterion inputs - Store teacherOverrideScores and finalScoreBreakdown in PeerReviewSubmissionRepository - Update PeerReviewScoringService and PeerReviewTeacherController to calculate and return rubric breakdown
…ompatibility - Replace hardcoded background:white inline styles with Shadcn theme classes (bg-popover, text-popover-foreground, border-border, bg-background, text-foreground, border-input) - Ensure all text labels, headings, and input fields adapt cleanly to dark mode
… layout refinements
This branch has not been deployed
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.
Description
Implement a complete, production-ready version of the double-blind peer review assessment module. This PR introduces end-to-end support for peer-based evaluations, automated matching algorithms, anti-collusion & malpractice handling, rubric-based score overrides, and responsive UI components.
Key Modules & Improvements:
Backend Repositories, Controllers & Services:
PeerReviewAssessment,PeerReviewSubmission,PeerReviewAssignment, andPeerReviewReviewentities in MongoDB.Teacher Controls, Anti-Collusion & Reviewer Disqualification:
POST /peer-review-assessments/submissions/:submissionId/exclude-studentwith required audit trail reasons.EXCLUDEDstatus) and hides their reviews from target peers' feedback lists.Scheduled Tasks & Anti-Collusion:
Frontend User Interface & Layout Refinements:
h-screen overflow-hidden) so the left navigation sidebar remains stationary while only the main content pane scrolls independently.Security, Double-Blind Guarantees & Test Coverage:
PeerReviewStudentExclusion.test.ts). All 96 tests passing.