14 protected function setUp() : void
25 include_once(
"./Modules/Exercise/PeerReview/class.ExcPeerReviewDistribution.php");
26 return new \ILIAS\Exercise\PeerReview\ExcPeerReviewDistribution($user_ids, $num_assignments);
34 $user_ids = [100,200,300,400,500];
39 foreach ($user_ids as $user_id) {
40 $this->assertEquals(count($distribution->getPeersOfRater($user_id)), $num_assignments);
49 $user_ids = [10,20,30,40,50];
55 foreach ($user_ids as $user_id) {
56 foreach ($distribution->getPeersOfRater($user_id) as $peer) {
57 $peer_raters[$peer][$user_id] = $user_id;
61 $this->assertEquals(count($peer_raters), count($user_ids));
63 foreach ($peer_raters as $peer => $raters) {
64 $this->assertEquals(count($raters), $num_assignments);
73 $user_ids = [10,20,30,40,50];
78 foreach ($user_ids as $user_id) {
79 foreach ($distribution->getPeersOfRater($user_id) as $peer) {
80 $this->assertNotEquals($user_id, $peer);
getDistribution($user_ids, $num_assignments)
testDistributionNoSelfAssignment()
Test if raters are not assigned as peers to themselves.
testDistributionNumberOfPeers()
Test if each rater has $num_assignments peers.
testDistributionNumberOfRaters()
Test if each peer is assigned to $num_assignments raters.