3declare(strict_types=1);
41 ->withCompletion(7,
new DateTimeImmutable(
'2023-12-01'))
42 ->withValidityOfQualification(
new DateTimeImmutable(
'2023-12-31'));
44 ->withProgressTree($pgs);
48 ->withProgressTree($pgs);
51 ->withCompletion(7,
new DateTimeImmutable(
'2023-12-02'))
52 ->withValidityOfQualification(
new DateTimeImmutable(
'2023-12-30'));
54 ->withProgressTree($pgs);
57 ->withCompletion(7,
new DateTimeImmutable(
'2023-11-01'));
59 ->withProgressTree($pgs);
61 $this->assignments = [
62 $ass0, $ass1, $ass2, $ass3
70 $pgs = $this->placeholder_mock->getRelevantProgress($assignments);
71 $this->assertNull($pgs);
76 $assignments = [$this->assignments[1]];
77 $pgs = $this->placeholder_mock->getRelevantProgress($assignments);
78 $this->assertEquals($this->assignments[1]->getProgressTree(), $pgs);
84 $this->assignments[0],
85 $this->assignments[2],
88 $pgs = $this->placeholder_mock->getRelevantProgress($assignments);
89 $this->assertEquals($this->assignments[3]->getProgressTree(), $pgs);
94 $assignments = $this->assignments;
95 $pgs = $this->placeholder_mock->getRelevantProgress($assignments);
96 $this->assertEquals($this->assignments[3]->getProgressTree(), $pgs);
102 $this->assignments[0],
103 $this->assignments[2]
105 $pgs = $this->placeholder_mock->getRelevantProgress($assignments);
106 $this->assertEquals($this->assignments[0]->getProgressTree(), $pgs);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getRelevantProgress(array $assignments)
testPRGCertificateLatestProgressUnsuccesfulAssignments()
testPRGCertificateLatestProgressWithOnlySuccessfulAssignments()
testPRGCertificateLatestProgressWithOnlyLimitedAssignments()
PRGPlaceholderMock $placeholder_mock
testPRGCertificateLatestProgressWithMixedAssignments()
testPRGCertificateLatestProgressNoAssignments()
Assignments are relations of users to a PRG; They hold progress-information for (sub-)nodes of the PR...
A Progress is the status of a user on a single node of an assignment; it is unique by assignment_id:u...
getRelevantProgressFromAssignments(array $assignments)