1<?
php declare(strict_types=1);
4trait ProgressRepoMockNIFT
12 throw new Exception(
"Not implemented for testing", 1);
18 public function getByPrgIdAndUserId(
int $prg_id,
int $usr_id) : array
20 throw new Exception(
"Not implemented for testing", 1);
22 public function getByPrgId(
int $prg_id) : array
24 throw new Exception(
"Not implemented for testing", 1);
26 public function getFirstByPrgId(
int $prg_id)
28 throw new Exception(
"Not implemented for testing", 1);
30 public function getExpiredSuccessfull() : array
32 throw new Exception(
"Not implemented for testing", 1);
34 public function getRiskyToFailInstances() : array
36 throw new Exception(
"Not implemented for testing", 1);
38 public function getPassedDeadline() : array
40 throw new Exception(
"Not implemented for testing", 1);
44 throw new Exception(
"Not implemented for testing", 1);
46 public function createFor(
50 throw new Exception(
"Not implemented for testing", 1);
54trait AssignmentRepoMockNIFT
62 throw new Exception(
"Not implemented for testing", 1);
64 public function getByUsrId(
int $usr_id) : array
66 throw new Exception(
"Not implemented for testing", 1);
68 public function getByPrgId(
int $prg_id) : array
70 throw new Exception(
"Not implemented for testing", 1);
72 public function getDueToRestart() : array
74 throw new Exception(
"Not implemented for testing", 1);
76 public function getDueToManuelRestart(
int $days_before_end) : array
78 throw new Exception(
"Not implemented for testing", 1);
82 throw new Exception(
"Not implemented for testing", 1);
86trait SettingsRepoMockNIFT
94 throw new Exception(
"Not implemented for testing", 1);
98 throw new Exception(
"Not implemented for testing", 1);
100 public function loadByType(
int $type_id) : array
102 throw new Exception(
"Not implemented for testing", 1);
104 public function loadIdsByType(
int $type_id) : array
106 throw new Exception(
"Not implemented for testing", 1);
113 public $progresses = [];
115 use ProgressRepoMockNIFT;
119 return $this->progresses[$id];
124 $this->progresses[$progress->
getNodeId()] = $progress;
129 return $this->progresses[$prg_id];
135 foreach ($this->progresses as $progress_id => $progress) {
146 public $assignments = [];
148 use AssignmentRepoMockNIFT;
150 public function get(
int $id)
152 return $this->assignments[$id];
156 $this->assignments[$assignment->
getId()] = $assignment;
162 public $settings = [];
164 use SettingsRepoMockNIFT;
193 $this->events =
new class() {
204 public function update() : void
215 return (
string) $progress->
getId();
220 return $this->env->progress_repo;
224 return $this->env->assignment_repo;
228 return $this->env->settings_repo;
237 $parent_id = $this->env->mock_tree[$progress->
getNodeId()][
'parent'];
238 if (is_null($parent_id)) {
247 foreach ($this->env->mock_tree[$progress->
getNodeId()][
'children'] as $child_id) {
265 return $this->tree[$obj_id][
'prg'];
268 public function hasChildren(
bool $include_references =
false) : bool
270 if ($this->
id < 12) {
286 public function raise($event, $parameter) :
void
288 $this->raised[] = [$event, $parameter];
An exception for terminatinating execution or to throw for unit testing.
updateSettings(ilStudyProgrammeSettings $settings)
applyProgressDeadline(ilStudyProgrammeProgress $progress, int $acting_usr_id=null)
getAssignmentRepository()
getProgressIdString(ilStudyProgrammeProgress $progress)
refreshLPStatus(int $usr_id, int $node_obj_id=null)
getPrgInstanceByObjId(int $obj_id)
__construct($a_id=0, bool $a_call_by_reference=true)
ATTENTION: After using the constructor the object won't be in the cache.
hasChildren(bool $include_references=false)
Does this StudyProgramme have other ilObjStudyProgrammes as children?
getChildrenProgress($progress)
updateParentProgress(ilStudyProgrammeProgress $progress)
getParentProgress(ilStudyProgrammeProgress $progress)
Represents one assignment of the user to a program tree.
__construct(\ilAppEventHandler $app_event_handler, \ilStudyProgrammeAssignmentRepository $assignment_repo)
Class ilStudyProgrammeProgress.
getId()
Get the id of the progress.
getAssignmentId()
Get the assignment this progress belongs to.
getNodeId()
Get the obj_id of the program node this progress belongs to.
__construct(int $a_id, \ilStudyProgrammeTypeSettings $type_settings, \ilStudyProgrammeAssessmentSettings $assessment_settings, \ilStudyProgrammeDeadlineSettings $deadline_settings, \ilStudyProgrammeValidityOfAchievedQualificationSettings $validity_of_qualification_settings, \ilStudyProgrammeAutoMailSettings $automail_settings)
getObjId()
Get the id of the study program.
update(ilStudyProgrammeAssignment $assignment)
Update settings belonging to a SP-Object.
Covers the persistence of settings belonging to a study programme (SP).
update(ilStudyProgrammeProgress $progress)
Update record corresponding to progress.
getByPrgIdAndAssignmentId(int $prg_id, int $assignment_id)
Load progress belonging to a prg id and assignment.
getByAssignmentId(int $assignment_id)
Load progress objects belonging to an assignment id.
Covers the persistence of settings belonging to a study programme (SP).
update(ilStudyProgrammeSettings $settings)
Update settings belonging to a SP-Object.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc