ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilPRGProgress Class Reference

A Progress is the status of a user on a single node of an assignment; it is unique by assignment_id:usr_id:node_id. More...

+ Inheritance diagram for ilPRGProgress:
+ Collaboration diagram for ilPRGProgress:

Public Member Functions

 __construct (int $prg_obj_id, int $status=self::STATUS_NOT_RELEVANT)
 
 getNodeId ()
 
 getAmountOfPoints ()
 
 withAmountOfPoints (int $points)
 
 getCurrentAmountOfPoints ()
 
 withCurrentAmountOfPoints (int $points_cur)
 
 getStatus ()
 
 withStatus (int $status)
 
 isTransitionAllowedTo (int $new_status)
 
 getLastChangeBy ()
 
 getLastChange ()
 
 withLastChange (int $last_change_by, \DateTimeImmutable $last_change)
 
 getAssignmentDate ()
 
 withAssignmentDate (?\DateTimeImmutable $assignment_date)
 
 getCompletionDate ()
 
 getCompletionBy ()
 
 withCompletion (?int $usr_or_obj_id=null, ?\DateTimeImmutable $completion_date=null)
 
 getDeadline ()
 
 withDeadline (?\DateTimeImmutable $deadline=null)
 
 getValidityOfQualification ()
 
 withValidityOfQualification (?\DateTimeImmutable $date=null)
 
 hasIndividualModifications ()
 
 withIndividualModifications (bool $individual)
 
 isSuccessful ()
 
 hasValidQualification (\DateTimeImmutable $now)
 There may be no qualification at all (since the PRG is not passed), or the qualification is valid or invalid due to a date. More...
 
 isRelevant ()
 
 isFailed ()
 
 isAccredited ()
 
 isInProgress ()
 
 getAchievedPointsOfChildren ()
 
 getPossiblePointsOfRelevantChildren ()
 
 invalidate ()
 
 isInvalidated ()
 
 withInvalidated (bool $invalidated)
 
 markAccredited (\DateTimeImmutable $date, int $acting_usr_id)
 
 unmarkAccredited (\DateTimeImmutable $date, int $acting_usr_id)
 
 markFailed (\DateTimeImmutable $date, int $acting_usr_id)
 
 markNotFailed (\DateTimeImmutable $date, int $acting_usr_id)
 
 succeed (\DateTimeImmutable $date, int $triggering_obj_id)
 
 markNotRelevant (\DateTimeImmutable $date, int $acting_usr_id)
 
 markRelevant (\DateTimeImmutable $date, int $acting_usr_id)
 
- Public Member Functions inherited from ILIAS\StudyProgramme\Assignment\Node
 __construct ($id)
 
 setSubnodes (array $subnodes)
 
 withContainer (Node $node)
 this is only used internally - do not use apart from constructing the tree! More...
 
 withSubnode ($node)
 
 getSubnodes ()
 
 getSubnode (string $id)
 
 getPath ()
 
 findSubnodePath (string $id, ?Node $node=null)
 
 getId ()
 

Static Public Member Functions

static getAllowedTargetStatusFor (int $status_from)
 

Data Fields

const STATUS_IN_PROGRESS = 1
 
const STATUS_COMPLETED = 2
 
const STATUS_ACCREDITED = 3
 
const STATUS_NOT_RELEVANT = 4
 
const STATUS_FAILED = 5
 
const COMPLETED_BY_SUBNODES = -2
 
const DATE_TIME_FORMAT = ilPRGAssignment::DATE_TIME_FORMAT
 
const DATE_FORMAT = ilPRGAssignment::DATE_FORMAT
 

Static Public Attributes

static $STATUS
 

Protected Attributes

int $prg_obj_id
 
int $points = 0
 
int $points_cur = 0
 
int $status = 4
 
int $completion_by = null
 
DateTimeImmutable $last_change
 
int $last_change_by = -1
 
DateTimeImmutable $assignment_date = null
 
DateTimeImmutable $completion_date = null
 
DateTimeImmutable $deadline = null
 
DateTimeImmutable $vq_date = null
 
bool $invalidated = false
 
bool $is_individual = false
 
- Protected Attributes inherited from ILIAS\StudyProgramme\Assignment\Node
array $subnodes = []
 
Node $container = null
 
string $id
 
int $current_points = 0
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\StudyProgramme\Assignment\Node
 getContainer ()
 

Detailed Description

A Progress is the status of a user on a single node of an assignment; it is unique by assignment_id:usr_id:node_id.

Definition at line 27 of file class.ilPRGProgress.php.

Constructor & Destructor Documentation

◆ __construct()

ilPRGProgress::__construct ( int  $prg_obj_id,
int  $status = self::STATUS_NOT_RELEVANT 
)

Definition at line 63 of file class.ilPRGProgress.php.

References $prg_obj_id, $status, and ILIAS\GlobalScreen\Provider\__construct().

66  {
67  $this->prg_obj_id = $prg_obj_id;
68  $this->status = $status;
69  $this->last_change = new \DateTimeImmutable();
70  $this->assignment_date = new \DateTimeImmutable();
71  parent::__construct((string) $prg_obj_id, []);
72  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getAchievedPointsOfChildren()

ilPRGProgress::getAchievedPointsOfChildren ( )

Definition at line 316 of file class.ilPRGProgress.php.

References ILIAS\StudyProgramme\Assignment\Node\getSubnodes().

Referenced by recalculateProgressStatus().

316  : int
317  {
318  $sum = 0;
319  $children = $this->getSubnodes();
320  foreach ($children as $child_progress) {
321  if ($child_progress->isSuccessful()) {
322  $sum += $child_progress->getAmountOfPoints();
323  }
324  }
325  return $sum;
326  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAllowedTargetStatusFor()

static ilPRGProgress::getAllowedTargetStatusFor ( int  $status_from)
static

Definition at line 145 of file class.ilPRGProgress.php.

Referenced by ilStudyProgrammeIndividualPlanTableGUI\getManualStatusSelect().

145  : array
146  {
147  switch ($status_from) {
148  case self::STATUS_IN_PROGRESS:
149  return [
150  self::STATUS_ACCREDITED,
151  self::STATUS_COMPLETED,
152  self::STATUS_FAILED,
153  self::STATUS_NOT_RELEVANT
154  ];
155  case self::STATUS_ACCREDITED:
156  return [
157  self::STATUS_IN_PROGRESS,
158  self::STATUS_COMPLETED,
159  self::STATUS_FAILED,
160  self::STATUS_NOT_RELEVANT
161  ];
162  case self::STATUS_COMPLETED:
163  return [
164  self::STATUS_IN_PROGRESS, // deaccriditation of sub-progress might revert completion,
165  self::STATUS_NOT_RELEVANT
166  ];
167  case self::STATUS_FAILED:
168  return [
169  self::STATUS_IN_PROGRESS,
170  self::STATUS_COMPLETED, // with re-calculation of deadline, progress might directly be completed.
171  self::STATUS_NOT_RELEVANT
172  ];
173  case self::STATUS_NOT_RELEVANT:
174  return[
175  self::STATUS_IN_PROGRESS
176  ];
177  }
178 
179  return [];
180  }
+ Here is the caller graph for this function:

◆ getAmountOfPoints()

◆ getAssignmentDate()

ilPRGProgress::getAssignmentDate ( )

Definition at line 202 of file class.ilPRGProgress.php.

References $assignment_date.

Referenced by ilPRGAssignmentDBRepository\storeProgressRow(), and updateProgressDeadlineFromSettings().

202  : ?\DateTimeImmutable
203  {
204  return $this->assignment_date;
205  }
DateTimeImmutable $assignment_date
+ Here is the caller graph for this function:

◆ getCompletionBy()

ilPRGProgress::getCompletionBy ( )

Definition at line 219 of file class.ilPRGProgress.php.

References $completion_by.

Referenced by ilStudyProgrammeUserTable\completionByToCollection(), ilStudyProgrammeUserTable\completionByToRepresent(), and ilPRGAssignmentDBRepository\storeProgressRow().

219  : ?int
220  {
221  return $this->completion_by;
222  }
+ Here is the caller graph for this function:

◆ getCompletionDate()

ilPRGProgress::getCompletionDate ( )

Definition at line 214 of file class.ilPRGProgress.php.

References $completion_date.

Referenced by ilPRGAssignmentDBRepository\storeProgressRow(), and updateProgressValidityFromSettings().

214  : ?\DateTimeImmutable
215  {
216  return $this->completion_date;
217  }
DateTimeImmutable $completion_date
+ Here is the caller graph for this function:

◆ getCurrentAmountOfPoints()

ilPRGProgress::getCurrentAmountOfPoints ( )

◆ getDeadline()

ilPRGProgress::getDeadline ( )

Definition at line 234 of file class.ilPRGProgress.php.

References $deadline.

Referenced by applyProgressDeadline(), ilPRGActionNoteBuilder\sortByDeadline(), ilPRGAssignmentDBRepository\storeProgressRow(), and succeed().

234  : ?\DateTimeImmutable
235  {
236  return $this->deadline;
237  }
DateTimeImmutable $deadline
+ Here is the caller graph for this function:

◆ getLastChange()

ilPRGProgress::getLastChange ( )

Definition at line 187 of file class.ilPRGProgress.php.

References $last_change.

Referenced by ilPRGAssignmentDBRepository\storeProgressRow().

187  : \DateTimeImmutable
188  {
189  return $this->last_change;
190  }
DateTimeImmutable $last_change
+ Here is the caller graph for this function:

◆ getLastChangeBy()

ilPRGProgress::getLastChangeBy ( )

Definition at line 182 of file class.ilPRGProgress.php.

References $last_change_by.

Referenced by ilPRGAssignmentDBRepository\storeProgressRow().

182  : int
183  {
184  return $this->last_change_by;
185  }
+ Here is the caller graph for this function:

◆ getNodeId()

◆ getPossiblePointsOfRelevantChildren()

ilPRGProgress::getPossiblePointsOfRelevantChildren ( )

Definition at line 328 of file class.ilPRGProgress.php.

References ILIAS\StudyProgramme\Assignment\Node\getSubnodes().

Referenced by ilStudyProgrammeProgressListGUI\buildProgressBar(), ilStudyProgrammeProgressListGUI\buildProgressStatus(), and ilObjStudyProgramme\canBeCompleted().

328  : int
329  {
330  $sum = 0;
331  $children = $this->getSubnodes();
332  foreach ($children as $child_progress) {
333  if ($child_progress->isRelevant()) {
334  $sum += $child_progress->getAmountOfPoints();
335  }
336  }
337  return $sum;
338  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStatus()

ilPRGProgress::getStatus ( )

Definition at line 114 of file class.ilPRGProgress.php.

References $status.

Referenced by applyProgressDeadline(), isAccredited(), isFailed(), isInProgress(), isRelevant(), isSuccessful(), recalculateProgressStatus(), ilPRGAssignmentDBRepository\storeProgressRow(), and withStatus().

114  : int
115  {
116  return $this->status;
117  }
+ Here is the caller graph for this function:

◆ getValidityOfQualification()

ilPRGProgress::getValidityOfQualification ( )

Definition at line 246 of file class.ilPRGProgress.php.

References $vq_date.

Referenced by hasValidQualification(), and ilPRGAssignmentDBRepository\storeProgressRow().

246  : ?\DateTimeImmutable
247  {
248  return $this->vq_date;
249  }
DateTimeImmutable $vq_date
+ Here is the caller graph for this function:

◆ hasIndividualModifications()

ilPRGProgress::hasIndividualModifications ( )

Definition at line 258 of file class.ilPRGProgress.php.

References $is_individual.

Referenced by ilPRGAssignmentDBRepository\storeProgressRow().

258  : bool
259  {
260  return $this->is_individual;
261  }
+ Here is the caller graph for this function:

◆ hasValidQualification()

ilPRGProgress::hasValidQualification ( \DateTimeImmutable  $now)

There may be no qualification at all (since the PRG is not passed), or the qualification is valid or invalid due to a date.

Definition at line 285 of file class.ilPRGProgress.php.

References getValidityOfQualification(), isSuccessful(), and null.

285  : ?bool
286  {
287  if (!$this->isSuccessful()) {
288  return null;
289  }
290  return (
291  is_null($this->getValidityOfQualification()) ||
292  $this->getValidityOfQualification()->format(self::DATE_FORMAT) >= $now->format(self::DATE_FORMAT)
293  );
294  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ invalidate()

ilPRGProgress::invalidate ( )

Definition at line 340 of file class.ilPRGProgress.php.

References withInvalidated().

340  : self
341  {
342  if (!$this->vq_date) {
343  throw new ilException("may not invalidate non-expired progress (no invalidation date)");
344  }
345  if ($this->vq_date->format(self::DATE_FORMAT) > date(self::DATE_FORMAT)) {
346  $msg = $this->vq_date->format(self::DATE_FORMAT) . ' > ' . date(self::DATE_FORMAT);
347  throw new ilException("may not invalidate non-expired progress ($msg)");
348  }
349  return $this->withInvalidated(true);
350  }
withInvalidated(bool $invalidated)
+ Here is the call graph for this function:

◆ isAccredited()

ilPRGProgress::isAccredited ( )

Definition at line 306 of file class.ilPRGProgress.php.

References getStatus().

306  : bool
307  {
308  return $this->getStatus() == self::STATUS_ACCREDITED;
309  }
+ Here is the call graph for this function:

◆ isFailed()

ilPRGProgress::isFailed ( )

Definition at line 301 of file class.ilPRGProgress.php.

References getStatus().

301  : bool
302  {
303  return $this->getStatus() == self::STATUS_FAILED;
304  }
+ Here is the call graph for this function:

◆ isInProgress()

ilPRGProgress::isInProgress ( )

Definition at line 311 of file class.ilPRGProgress.php.

References getStatus().

Referenced by updateProgressRelevanceFromSettings().

311  : bool
312  {
313  return $this->getStatus() == self::STATUS_IN_PROGRESS;
314  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isInvalidated()

ilPRGProgress::isInvalidated ( )

Definition at line 352 of file class.ilPRGProgress.php.

References $invalidated.

Referenced by ilPRGAssignmentDBRepository\storeProgressRow(), and ilStudyProgrammeUserTable\validToRepresent().

352  : bool
353  {
354  return $this->invalidated;
355  }
+ Here is the caller graph for this function:

◆ isRelevant()

ilPRGProgress::isRelevant ( )

Definition at line 296 of file class.ilPRGProgress.php.

References getStatus().

Referenced by recalculateProgressStatus(), resetProgressToSettings(), ilStudyProgrammeExpandableProgressListGUI\shouldShowSubProgress(), and updateProgressRelevanceFromSettings().

296  : bool
297  {
298  return $this->getStatus() != self::STATUS_NOT_RELEVANT;
299  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSuccessful()

ilPRGProgress::isSuccessful ( )

Definition at line 270 of file class.ilPRGProgress.php.

References getStatus().

Referenced by ilStudyProgrammeProgressListGUI\buildProgressBar(), ilStudyProgrammeIndividualPlanProgressListGUI\buildProgressStatus(), ilStudyProgrammeUserTable\completionByToCollection(), ilStudyProgrammeIndividualPlanTableGUI\fetchData(), hasValidQualification(), recalculateProgressStatus(), resetProgressToSettings(), updateProgressValidityFromSettings(), and ilStudyProgrammeUserTable\validToRepresent().

270  : bool
271  {
272  return in_array(
273  $this->getStatus(),
274  [
275  self::STATUS_COMPLETED,
276  self::STATUS_ACCREDITED
277  ]
278  );
279  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isTransitionAllowedTo()

ilPRGProgress::isTransitionAllowedTo ( int  $new_status)

Definition at line 138 of file class.ilPRGProgress.php.

Referenced by withStatus().

138  : bool
139  {
140  return is_null($this->status) ||
141  $this->status === $new_status ||
142  in_array($new_status, self::getAllowedTargetStatusFor($this->status));
143  }
+ Here is the caller graph for this function:

◆ markAccredited()

ilPRGProgress::markAccredited ( \DateTimeImmutable  $date,
int  $acting_usr_id 
)

Definition at line 364 of file class.ilPRGProgress.php.

364  : self
365  {
366  return $this
367  ->withStatus(self::STATUS_ACCREDITED)
368  ->withCompletion($acting_usr_id, $date)
369  ->withLastChange($acting_usr_id, $date);
370  }

◆ markFailed()

ilPRGProgress::markFailed ( \DateTimeImmutable  $date,
int  $acting_usr_id 
)

Definition at line 381 of file class.ilPRGProgress.php.

References null.

Referenced by applyProgressDeadline().

381  : self
382  {
383  return $this
384  ->withStatus(self::STATUS_FAILED)
385  ->withCompletion(null, null)
386  ->withLastChange($acting_usr_id, $date);
387  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ markNotFailed()

ilPRGProgress::markNotFailed ( \DateTimeImmutable  $date,
int  $acting_usr_id 
)

Definition at line 389 of file class.ilPRGProgress.php.

References null.

Referenced by applyProgressDeadline().

389  : self
390  {
391  return $this
392  ->withStatus(self::STATUS_IN_PROGRESS)
393  ->withCompletion(null, null)
394  ->withLastChange($acting_usr_id, $date);
395  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ markNotRelevant()

ilPRGProgress::markNotRelevant ( \DateTimeImmutable  $date,
int  $acting_usr_id 
)

Definition at line 405 of file class.ilPRGProgress.php.

References null.

405  : self
406  {
407  return $this
408  ->withStatus(self::STATUS_NOT_RELEVANT)
409  ->withLastChange($acting_usr_id, $date)
410  ->withValidityOfQualification(null)
411  ->withDeadline(null)
412  ->withCompletion(null, null)
413  ->withCurrentAmountOfPoints(0)
414  ->withIndividualModifications(true);
415  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ markRelevant()

ilPRGProgress::markRelevant ( \DateTimeImmutable  $date,
int  $acting_usr_id 
)

Definition at line 417 of file class.ilPRGProgress.php.

References null.

417  : self
418  {
419  return $this
420  ->withStatus(self::STATUS_IN_PROGRESS)
421  ->withCompletion(null, null)
422  ->withLastChange($acting_usr_id, $date)
423  ->withIndividualModifications(true);
424  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ succeed()

ilPRGProgress::succeed ( \DateTimeImmutable  $date,
int  $triggering_obj_id 
)

Definition at line 397 of file class.ilPRGProgress.php.

397  : self
398  {
399  return $this
400  ->withStatus(self::STATUS_COMPLETED)
401  ->withCompletion($triggering_obj_id, $date)
402  ->withLastChange($triggering_obj_id, $date);
403  }

◆ unmarkAccredited()

ilPRGProgress::unmarkAccredited ( \DateTimeImmutable  $date,
int  $acting_usr_id 
)

Definition at line 372 of file class.ilPRGProgress.php.

References null.

372  : self
373  {
374  return $this
375  ->withStatus(self::STATUS_IN_PROGRESS)
376  ->withCompletion(null, null)
377  ->withValidityOfQualification(null)
378  ->withLastChange($acting_usr_id, $date);
379  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ withAmountOfPoints()

ilPRGProgress::withAmountOfPoints ( int  $points)

Definition at line 85 of file class.ilPRGProgress.php.

References $points.

Referenced by ilStudyProgrammeAssignmentActionsTest\getProgressesWithDefaultStatus(), and resetProgressToSettings().

85  : self
86  {
87  if ($points < 0) {
88  throw new ilException("ilPRGProgress::setAmountOfPoints: "
89  . "Expected a number >= 0 as argument, got '$points'");
90  }
91 
92  $clone = clone $this;
93  $clone->points = $points;
94  return $clone;
95  }
+ Here is the caller graph for this function:

◆ withAssignmentDate()

ilPRGProgress::withAssignmentDate ( ?\DateTimeImmutable  $assignment_date)

Definition at line 207 of file class.ilPRGProgress.php.

References $assignment_date.

207  : self
208  {
209  $clone = clone $this;
210  $clone->assignment_date = $assignment_date;
211  return $clone;
212  }
DateTimeImmutable $assignment_date

◆ withCompletion()

ilPRGProgress::withCompletion ( ?int  $usr_or_obj_id = null,
?\DateTimeImmutable  $completion_date = null 
)

Definition at line 224 of file class.ilPRGProgress.php.

References $completion_date.

227  : self {
228  $clone = clone $this;
229  $clone->completion_by = $usr_or_obj_id;
230  $clone->completion_date = $completion_date;
231  return $clone;
232  }
DateTimeImmutable $completion_date

◆ withCurrentAmountOfPoints()

ilPRGProgress::withCurrentAmountOfPoints ( int  $points_cur)

Definition at line 102 of file class.ilPRGProgress.php.

References $points_cur.

Referenced by recalculateProgressStatus(), and resetProgressToSettings().

102  : self
103  {
104  if ($points_cur < 0) {
105  throw new ilException("ilPRGProgress::setAmountOfPoints: "
106  . "Expected a number >= 0 as argument, got '$points'");
107  }
108 
109  $clone = clone $this;
110  $clone->points_cur = $points_cur;
111  return $clone;
112  }
+ Here is the caller graph for this function:

◆ withDeadline()

ilPRGProgress::withDeadline ( ?\DateTimeImmutable  $deadline = null)

Definition at line 239 of file class.ilPRGProgress.php.

References $deadline.

Referenced by updateProgressDeadlineFromSettings().

239  : self
240  {
241  $clone = clone $this;
242  $clone->deadline = $deadline;
243  return $clone;
244  }
DateTimeImmutable $deadline
+ Here is the caller graph for this function:

◆ withIndividualModifications()

ilPRGProgress::withIndividualModifications ( bool  $individual)

Definition at line 263 of file class.ilPRGProgress.php.

263  : self
264  {
265  $clone = clone $this;
266  $clone->is_individual = $individual;
267  return $clone;
268  }

◆ withInvalidated()

ilPRGProgress::withInvalidated ( bool  $invalidated)

Definition at line 357 of file class.ilPRGProgress.php.

References $invalidated.

Referenced by invalidate().

357  : self
358  {
359  $clone = clone $this;
360  $clone->invalidated = $invalidated;
361  return $clone;
362  }
+ Here is the caller graph for this function:

◆ withLastChange()

ilPRGProgress::withLastChange ( int  $last_change_by,
\DateTimeImmutable  $last_change 
)

Definition at line 192 of file class.ilPRGProgress.php.

References $last_change, and $last_change_by.

195  : self {
196  $clone = clone $this;
197  $clone->last_change = $last_change;
198  $clone->last_change_by = $last_change_by;
199  return $clone;
200  }
DateTimeImmutable $last_change

◆ withStatus()

ilPRGProgress::withStatus ( int  $status)

Definition at line 119 of file class.ilPRGProgress.php.

References $status, ILIAS\StudyProgramme\Assignment\Node\getId(), getStatus(), and isTransitionAllowedTo().

Referenced by recalculateProgressStatus(), and updateProgressRelevanceFromSettings().

119  : self
120  {
121  if (!in_array($status, self::$STATUS)) {
122  throw new ilException("No such status: " . "'$status'");
123  }
124 
125  if (!$this->isTransitionAllowedTo($status)) {
126  throw new ilException(
127  "Changing progress with status " . $this->getStatus()
128  . " cannot change to status " . "'$status'"
129  . ' (progress_id: ' . $this->getId() . ')'
130  );
131  }
132 
133  $clone = clone $this;
134  $clone->status = $status;
135  return $clone;
136  }
isTransitionAllowedTo(int $new_status)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withValidityOfQualification()

ilPRGProgress::withValidityOfQualification ( ?\DateTimeImmutable  $date = null)

Definition at line 251 of file class.ilPRGProgress.php.

Referenced by resetProgressToSettings(), and updateProgressValidityFromSettings().

251  : self
252  {
253  $clone = clone $this;
254  $clone->vq_date = $date;
255  return $clone;
256  }
+ Here is the caller graph for this function:

Field Documentation

◆ $assignment_date

DateTimeImmutable ilPRGProgress::$assignment_date = null
protected

Definition at line 55 of file class.ilPRGProgress.php.

Referenced by getAssignmentDate(), and withAssignmentDate().

◆ $completion_by

int ilPRGProgress::$completion_by = null
protected

Definition at line 52 of file class.ilPRGProgress.php.

Referenced by getCompletionBy().

◆ $completion_date

DateTimeImmutable ilPRGProgress::$completion_date = null
protected

Definition at line 56 of file class.ilPRGProgress.php.

Referenced by getCompletionDate(), and withCompletion().

◆ $deadline

DateTimeImmutable ilPRGProgress::$deadline = null
protected

Definition at line 57 of file class.ilPRGProgress.php.

Referenced by getDeadline(), and withDeadline().

◆ $invalidated

bool ilPRGProgress::$invalidated = false
protected

Definition at line 59 of file class.ilPRGProgress.php.

Referenced by isInvalidated(), and withInvalidated().

◆ $is_individual

bool ilPRGProgress::$is_individual = false
protected

Definition at line 60 of file class.ilPRGProgress.php.

Referenced by hasIndividualModifications().

◆ $last_change

DateTimeImmutable ilPRGProgress::$last_change
protected

Definition at line 53 of file class.ilPRGProgress.php.

Referenced by getLastChange(), and withLastChange().

◆ $last_change_by

int ilPRGProgress::$last_change_by = -1
protected

Definition at line 54 of file class.ilPRGProgress.php.

Referenced by getLastChangeBy(), and withLastChange().

◆ $points

int ilPRGProgress::$points = 0
protected

Definition at line 49 of file class.ilPRGProgress.php.

Referenced by getAmountOfPoints(), and withAmountOfPoints().

◆ $points_cur

int ilPRGProgress::$points_cur = 0
protected

Definition at line 50 of file class.ilPRGProgress.php.

Referenced by getCurrentAmountOfPoints(), and withCurrentAmountOfPoints().

◆ $prg_obj_id

int ilPRGProgress::$prg_obj_id
protected

Definition at line 48 of file class.ilPRGProgress.php.

Referenced by __construct(), and getNodeId().

◆ $STATUS

ilPRGProgress::$STATUS
static
Initial value:
= [
self::STATUS_IN_PROGRESS,
self::STATUS_COMPLETED,
self::STATUS_ACCREDITED,
self::STATUS_NOT_RELEVANT,
self::STATUS_FAILED
]

Definition at line 35 of file class.ilPRGProgress.php.

◆ $status

int ilPRGProgress::$status = 4
protected

Definition at line 51 of file class.ilPRGProgress.php.

Referenced by __construct(), getStatus(), and withStatus().

◆ $vq_date

DateTimeImmutable ilPRGProgress::$vq_date = null
protected

Definition at line 58 of file class.ilPRGProgress.php.

Referenced by getValidityOfQualification().

◆ COMPLETED_BY_SUBNODES

◆ DATE_FORMAT

◆ DATE_TIME_FORMAT

◆ STATUS_ACCREDITED

◆ STATUS_COMPLETED

const ilPRGProgress::STATUS_COMPLETED = 2

Definition at line 30 of file class.ilPRGProgress.php.

Referenced by ilPRGAssignmentDBRepository\getExpiredAndNotInvalidated(), ilPRGAssignmentFilter\getItemConfig(), ilStudyProgrammeMembersTableGUI\getPossibleActions(), ilPRGAssignmentDBRepository\getRiskyToFail(), ilStudyProgrammeProgressTest\ilPRGProgressStatus(), ilStudyProgrammeDashboardViewGUI\initData(), markNotRelevant(), recalculateProgressStatus(), ilObjStudyProgrammeCertificateTest\setUp(), ilStudyProgrammeMailTemplateContext\statusToRepr(), ilObjStudyProgramme\statusToRepr(), ilStudyProgrammeUserTable\statusToRepresent(), ilStudyProgrammeCronAboutToExpireTest\testAboutToExpireEvents(), ilStudyProgrammeCronAboutToExpireTest\testAboutToExpireForRelevantProgrammes(), ilStudyProgrammeAssignmentActionsTest\testPRGAssignmentActionsMarkAccredited(), ilStudyProgrammeAssignmentActionsTest\testPRGAssignmentActionsSucceedAndDeadline(), ilStudyProgrammeProgressTest\testPRGProgressAllowedTransitionsForAccredited(), ilStudyProgrammeProgressTest\testPRGProgressAllowedTransitionsForCompleted(), ilStudyProgrammeProgressTest\testPRGProgressAllowedTransitionsForFailed(), ilStudyProgrammeProgressTest\testPRGProgressAllowedTransitionsForInProgress(), ilStudyProgrammeProgressTest\testPRGProgressHasValidQualification(), ilStudyProgrammeProgressTest\testPRGProgressInvalidation(), ilStudyProgrammeProgressTest\testPRGProgressInvalidInvalidation(), ilStudyProgrammeProgressTest\testPRGProgressPointsOfChildren(), ilStudyProgrammeProgressTest\testPRGProgressProperties(), ilStudyProgrammeProgressTest\testPRGProgressStatusActionsSucceed(), ilPrgRestartAssignmentsCronJobTest\testRestartAssignmentsEvents(), ilPrgRestartAssignmentsCronJobTest\testRestartAssignmentsForRelevantProgrammes(), ilStudyProgrammeCronRiskyToFailTest\testRiskyToFailEvents(), ilStudyProgrammeCronRiskyToFailTest\testRiskyToFailForRelevantProgrammes(), ilPRGAssignmentFilter\toConditions(), and unmarkAccredited().

◆ STATUS_FAILED

◆ STATUS_IN_PROGRESS

const ilPRGProgress::STATUS_IN_PROGRESS = 1

Definition at line 29 of file class.ilPRGProgress.php.

Referenced by applyProgressDeadline(), ilPRGAssignmentFilter\getItemConfig(), ilStudyProgrammeIndividualPlanTableGUI\getManualStatusSelect(), ilPRGAssignmentDBRepository\getPassedDeadline(), ilStudyProgrammeMembersTableGUI\getPossibleActions(), ilStudyProgrammeIndividualPlanTableGUI\getRequiredPointsInput(), ilStudyProgrammeProgressTest\ilPRGProgressStatus(), recalculateProgressStatus(), ilObjStudyProgrammeCertificateTest\setUp(), ilStudyProgrammeMailTemplateContext\statusToRepr(), ilObjStudyProgramme\statusToRepr(), ilStudyProgrammeUserTable\statusToRepresent(), ilStudyProgrammeAssignmentActionsTest\testPRGAssignmentActionsMarkAccredited(), ilStudyProgrammeAssignmentActionsTest\testPRGAssignmentActionsMarkRelevant(), ilStudyProgrammeAssignmentActionsTest\testPRGAssignmentActionsSucceedAndDeadline(), ilStudyProgrammeProgressTest\testPRGProgressAllowedTransitionsForAccredited(), ilStudyProgrammeProgressTest\testPRGProgressAllowedTransitionsForCompleted(), ilStudyProgrammeProgressTest\testPRGProgressAllowedTransitionsForFailed(), ilStudyProgrammeProgressTest\testPRGProgressAllowedTransitionsForInProgress(), ilStudyProgrammeProgressTest\testPRGProgressAllowedTransitionsForIrrelevant(), ilStudyProgrammeProgressTest\testPRGProgressHasValidQualification(), ilStudyProgrammeProgressTest\testPRGProgressInvalidation(), ilStudyProgrammeProgressTest\testPRGProgressPointsOfChildren(), ilStudyProgrammeProgressTest\testPRGProgressProperties(), ilStudyProgrammeProgressTest\testPRGProgressStatusActionsMarkAccredited(), ilStudyProgrammeProgressTest\testPRGProgressStatusActionsMarkFailed(), ilStudyProgrammeProgressTest\testPRGProgressStatusActionsMarkNotFailed(), ilStudyProgrammeProgressTest\testPRGProgressStatusActionsMarkNotRelevant(), ilStudyProgrammeProgressTest\testPRGProgressStatusActionsMarkRelevant(), ilStudyProgrammeProgressTest\testPRGProgressStatusActionsSucceed(), ilStudyProgrammeProgressTest\testPRGProgressStatusActionsUnmarkAccredited(), ilStudyProgrammeProgressTest\testPRGProgressStatusChecker(), unmarkAccredited(), updateProgressRelevanceFromSettings(), and ilObjStudyProgrammeIndividualPlanGUI\updateStatus().

◆ STATUS_NOT_RELEVANT


The documentation for this class was generated from the following file: