19 declare(strict_types=1);
22 trait ProgressRepoMockNIFT
28 public function getByIds(
int $prg_id,
int $assignment_id):
ilPRGProgress 30 throw new Exception(
"Not implemented for testing", 1);
36 public function getByPrgIdAndUserId(
int $prg_id,
int $usr_id): array
38 throw new Exception(
"Not implemented for testing", 1);
40 public function getByPrgId(
int $prg_id): array
42 throw new Exception(
"Not implemented for testing", 1);
44 public function getFirstByPrgId(
int $prg_id): void
46 throw new Exception(
"Not implemented for testing", 1);
48 public function getExpiredSuccessfull(): array
50 throw new Exception(
"Not implemented for testing", 1);
52 public function getRiskyToFailInstances(): array
54 throw new Exception(
"Not implemented for testing", 1);
56 public function getLatestAssignedProgress(
int $prg_id,
int $usr_id): ?\
ilPRGProgress 58 throw new Exception(
"Not implemented for testing", 1);
60 public function getPassedDeadline(): array
62 throw new Exception(
"Not implemented for testing", 1);
66 throw new Exception(
"Not implemented for testing", 1);
68 public function createFor(
70 ilStudyProgrammeAssignment $ass
72 throw new Exception(
"Not implemented for testing", 1);
76 trait AssignmentRepoMockNIFT
81 public function createFor(
int $prg_obj_id,
int $usr_id,
int $assigning_usr_id):
ilPRGAssignment 83 throw new Exception(
"Not implemented for testing", 1);
85 public function getForUser(
int $usr_id): array
87 throw new Exception(
"Not implemented for testing", 1);
89 public function getAllForNodeIsContained(
int $prg_obj_id, ?array $user_filter = null, ?
ilPRGAssignmentFilter $custom_filters = null): array
91 throw new Exception(
"Not implemented for testing", 1);
93 public function countAllForNodeIsContained(
int $prg_obj_id, array $user_filter = null,
ilPRGAssignmentFilter $custom_filters = null):
int 95 throw new Exception(
"Not implemented for testing", 1);
97 public function getAllForSpecificNode(
int $prg_obj_id, array $user_filter = null): array
99 throw new Exception(
"Not implemented for testing", 1);
103 throw new Exception(
"Not implemented for testing", 1);
105 public function getDashboardInstancesforUser(
int $usr_id): array
107 throw new Exception(
"Not implemented for testing", 1);
109 public function getAboutToExpire(
110 array $programmes_and_due,
111 bool $discard_formerly_notified =
true 113 throw new Exception(
"Not implemented for testing", 1);
115 public function getByPrgId(
int $prg_id): array
117 throw new Exception(
"Not implemented for testing", 1);
119 public function getDueToRestart(): array
121 throw new Exception(
"Not implemented for testing", 1);
123 public function getDueToManuelRestart(
int $days_before_end): array
125 throw new Exception(
"Not implemented for testing", 1);
129 throw new Exception(
"Not implemented for testing", 1);
131 public function deleteAllAssignmentsForProgrammeId(
int $prg_obj_id): void
133 throw new Exception(
"Not implemented for testing", 1);
135 public function getExpiredAndNotInvalidated(): array
137 throw new Exception(
"Not implemented for testing", 1);
141 trait SettingsRepoMockNIFT
149 throw new Exception(
"Not implemented for testing", 1);
153 throw new Exception(
"Not implemented for testing", 1);
155 public function loadByType(
int $type_id): array
157 throw new Exception(
"Not implemented for testing", 1);
159 public function loadIdsByType(
int $type_id): array
161 throw new Exception(
"Not implemented for testing", 1);
167 use AssignmentRepoMockNIFT;
169 public array $assignments = [];
173 return $this->assignments[
$id];
178 $this->assignments[$assignment->
getId()] = $assignment;
184 use SettingsRepoMockNIFT;
204 $this->validity_of_qualification_settings =
222 $this->events =
new class () {
223 public function userSuccessful(
ilPRGProgress $a_progress): void
229 protected function throwIfNotInTree(): void
233 public function update(): bool
235 return $this->updateSettings();
237 protected function getLoggedInUserId():
int 245 return (
string) $progress->
getId();
250 return $this->env->assignment_repo;
254 return $this->env->settings_repo;
257 protected function refreshLPStatus(
int $usr_id,
int $node_obj_id = null): void
264 $parent_id = $this->env->mock_tree[$progress->
getNodeId()][
'parent'];
265 if (is_null($parent_id)) {
268 return $this->getProgressRepository()->get($parent_id);
271 public function getChildrenProgress(
ilPRGAssignment $assignment,
int $progress_node_id): array
274 foreach ($this->env->mock_tree[$progress->
getNodeId()][
'children'] as $child_id) {
275 $progresses[] = $this->getProgressRepository()->get($child_id);
282 return $this->updateParentProgress($progress);
292 return $this->tree[$obj_id][
'prg'];
295 public function hasChildren(
bool $include_references =
false): bool
297 if ($this->
id < 12) {
306 public array $raised = [];
312 public function raise($event, $parameter):
void 314 $this->raised[] = [$event, $parameter];
store(ilPRGAssignment $assignment)
applyProgressDeadline(ilStudyProgrammeSettingsRepository $settings_repo, ilPRGProgress $progress, int $acting_usr_id=null, bool $recalculate=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getProgressIdString(int $node_id)
A Progress is the status of a user on a single node of an assignment; it is unique by assignment_id:u...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getObjId()
Get the id of the study program.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Assignments are relations of users to a PRG; They hold progress-information for (sub-)nodes of the PR...