phil / peer-review
Fair peer assessment for courses: dated phases, a seeded balanced allocation, calibration on pre-graded examples, a double grade for the work and the reviews.
Requires
- php: >=8.5
- phil/proposal-review: ^0.1@dev
- psr/clock: ^1.0
- psr/event-dispatcher: ^1.0
Requires (Dev)
- phpunit/phpunit: ^13.4
- symfony/clock: ^8.2
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-30 02:52:58 UTC
README
Fair peer assessment for courses: dated phases, a seeded balanced allocation, calibration on pre-graded examples, and a double grade for the work and the reviews.
phil/peer-review is a plain PHP library. A teacher sets an activity — its dated phases, one rubric and a policy —; the participants hand in a work, assess the works of their peers, and receive a grade for their work and another for the quality of their reviews. The library keeps what the participants do through one port and decides nothing that it cannot explain.
- Dated phases, read on the clock: submission, an optional calibration, assessment and grading follow one another without a gap; each action opens and closes with its phase, whether a scheduled task runs or not.
- A balanced allocation anyone can check: every work gets as many reviewers as the policy asks and every author reviews as many works, never their own nor the work of an author they are in conflict with; the draw comes from a seed, so that publishing the seed proves it was not arranged. A work is also given by hand.
- Calibration before judging others: reviewers assess pre-graded examples until their scores come within the tolerance of the teachers' reference, or until their attempts run out; nobody is stuck, and the grades say who agreed.
- One rubric everywhere: peers, authors on their own work, teachers and examples fill the same weighted criteria, each on its own scale.
- A double grade with its explanation: the grade of the work is the teachers' assessment when it prevails, otherwise the median or mean of the peers; the quality of a review is its distance from a reference — the teachers', or the other peers' criterion by criterion — and a review without enough comparisons is left ungraded rather than graded on too little.
- Anonymous by default, identifiers only: authors read their feedback from the grading phase on, without the names of their peers unless the activity reveals them; participants are stable opaque identifiers, never email addresses, and events carry identifiers only.
Status
| Part | State |
|---|---|
| Activities: schedule, rubric, policy | Implemented and tested |
| Submission, random and manual allocation with conflicts | Implemented and tested |
| Calibration on pre-graded examples | Implemented and tested |
| Peer, self and teacher assessments, feedback | Implemented and tested |
| The double grade and its explanation | Implemented and tested |
| The store port and its in-memory store | Implemented and tested |
Documentation
| Document | What it covers |
|---|---|
| Installation | Requirements, installing, a first activity. |
| Activities | Phases, rubric, policy, submission, allocation, calibration, assessment, feedback. |
| Grading | The grade of a work, the quality of a review, the final grade. |
| Extension points | The store, the events, the clock, what is stable. |
| Testing | The tests and the benchmark. |
| Reference | Every public type, with its role. |
Quick start
composer require phil/peer-review
use Phil\PeerReview\Activity; use Phil\PeerReview\PeerReview; use Phil\PeerReview\Phase; use Phil\PeerReview\PhaseWindow; use Phil\PeerReview\Schedule; use Phil\ProposalReview\Criterion; use Phil\ProposalReview\Score; $activity = new Activity('essay-1', new Schedule([ new PhaseWindow(Phase::Submission, new DateTimeImmutable('2027-02-01'), new DateTimeImmutable('2027-02-08')), new PhaseWindow(Phase::Assessment, new DateTimeImmutable('2027-02-08'), new DateTimeImmutable('2027-02-15')), new PhaseWindow(Phase::Grading, new DateTimeImmutable('2027-02-15'), new DateTimeImmutable('2027-02-22')), ]), [new Criterion('argument', weight: 2, max: 10), new Criterion('style', max: 5)]); $peerReview = new PeerReview($store, $clock, $dispatcher); $peerReview->submit($activity, 'work-17', 'student-17', 'files/essay-17.pdf'); // during submission $peerReview->allocate($activity, $seed); // once submission is over $peerReview->assess($activity, 'work-17', 'student-4', [new Score('argument', 7), new Score('style', 4)], 'Clear.'); $grades = $peerReview->grades($activity); $grades->participant('student-17')?->final; // 0 to 1, or null
Requirements
PHP 8.5 or later, phil/proposal-review (criteria, scores and their arithmetic), psr/clock and
psr/event-dispatcher.
Contributing
Contributions are welcome on the PHIL monorepo: read the contribution guide and the code of conduct. Report a vulnerability privately, as the security policy explains, never in a public issue.
License
MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.