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);
91 throw new Exception(
"Not implemented for testing", 1);
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);
139 public function getLatestAssignment(
int $root_prg_obj_id,
int $usr_id): ?
ilPRGAssignment 141 throw new Exception(
"Not implemented for testing", 1);
143 public function getLongestValidAssignment(
int $root_prg_obj_id,
int $usr_id): ?
ilPRGAssignment 145 throw new Exception(
"Not implemented for testing", 1);
149 trait SettingsRepoMockNIFT
157 throw new Exception(
"Not implemented for testing", 1);
161 throw new Exception(
"Not implemented for testing", 1);
163 public function loadByType(
int $type_id): array
165 throw new Exception(
"Not implemented for testing", 1);
167 public function loadIdsByType(
int $type_id): array
169 throw new Exception(
"Not implemented for testing", 1);
175 use AssignmentRepoMockNIFT;
177 public array $assignments = [];
181 return $this->assignments[
$id];
186 $this->assignments[$assignment->
getId()] = $assignment;
192 use SettingsRepoMockNIFT;
194 public array $settings = [];
212 $this->validity_of_qualification_settings =
230 $this->events =
new class () {
231 public function userSuccessful(
ilPRGProgress $a_progress): void
237 protected function throwIfNotInTree(): void
241 public function update(): bool
243 return $this->updateSettings();
245 protected function getLoggedInUserId():
int 253 return (
string) $progress->
getId();
258 return $this->env->assignment_repo;
262 return $this->env->settings_repo;
265 protected function refreshLPStatus(
int $usr_id, ?
int $node_obj_id =
null): void
272 $parent_id = $this->env->mock_tree[$progress->
getNodeId()][
'parent'];
273 if (is_null($parent_id)) {
276 return $this->getProgressRepository()->get($parent_id);
279 public function getChildrenProgress(
ilPRGAssignment $assignment,
int $progress_node_id): array
282 foreach ($this->env->mock_tree[$progress->
getNodeId()][
'children'] as $child_id) {
283 $progresses[] = $this->getProgressRepository()->get($child_id);
290 return $this->updateParentProgress($progress);
300 return $this->tree[$obj_id][
'prg'];
303 public function hasChildren(
bool $include_references =
false): bool
305 if ($this->
id < 12) {
314 public array $raised = [];
320 public function raise($event, $parameter):
void 322 $this->raised[] = [$event, $parameter];
store(ilPRGAssignment $assignment)
applyProgressDeadline(ilStudyProgrammeSettingsRepository $settings_repo, ilPRGProgress $progress, ?int $acting_usr_id=null, bool $recalculate=true)
getProgressIdString(int $node_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
A Progress is the status of a user on a single node of an assignment; it is unique by assignment_id:u...
Covers the persistence of settings belonging to a study programme (SP).
getObjId()
Get the id of the study program.
Assignments are relations of users to a PRG; They hold progress-information for (sub-)nodes of the PR...
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
__construct(Container $dic, ilPlugin $plugin)
Assignments are relations of users to a PRG; They hold progress-information for (sub-)nodes of the PR...