ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilStudyProgrammeProgress Class Reference

Class ilStudyProgrammeProgress. More...

+ Collaboration diagram for ilStudyProgrammeProgress:

Public Member Functions

 __construct (int $id)
 
 getId ()
 Get the id of the progress. More...
 
 getAssignmentId ()
 Get the assignment this progress belongs to. More...
 
 withAssignmentId (int $assignment_id)
 
 getNodeId ()
 Get the obj_id of the program node this progress belongs to. More...
 
 withNodeId (int $prg_id)
 
 getUserId ()
 Get the id of the user this progress is for. More...
 
 withUserId (int $usr_id)
 
 getAmountOfPoints ()
 Get the amount of points the user needs to achieve on the subnodes of this node. More...
 
 withAmountOfPoints (int $points)
 Throws when amount of points is smaller then zero. More...
 
 getCurrentAmountOfPoints ()
 
 withCurrentAmountOfPoints (int $points_cur)
 Set the amount of points the user currently has achieved on this node. More...
 
 getStatus ()
 Get the status the user has on this node. More...
 
 withStatus (int $status)
 Set the status of this node. More...
 
 isTransitionAllowedTo (int $new_status)
 
 getLastChangeBy ()
 Get the id of the user/object who/which invoked the last change on this assignment. More...
 
 getLastChange ()
 
 withLastChange (int $last_change_by, DateTimeImmutable $timestamp)
 
 getAssignmentDate ()
 
 withAssignmentDate (DateTimeImmutable $assignment_date)
 
 getCompletionDate ()
 
 getCompletionBy ()
 Get the id of object or user that lead to the successful completion of this node. More...
 
 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 ()
 
 invalidate ()
 
 isInvalidated ()
 
 isSuccessfulExpired ()
 
 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)
 

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 DATE_TIME_FORMAT = 'Y-m-d H:i:s'
 
const DATE_FORMAT = 'Y-m-d'
 
const DATE_FORMAT_ENDOFDAY = 'Y-m-d 23:59:59'
 

Static Public Attributes

static $STATUS
 

Protected Attributes

 $id
 
 $assignment_id
 
 $prg_id
 
 $usr_id
 
 $points = 0
 
 $points_cur = 0
 
 $status
 
 $completion_by
 
 $last_change
 
 $last_change_by
 
 $assignment_date
 
 $completion_date
 
 $deadline
 
 $vq_date
 
 $invalidated = false
 
 $is_individual = false
 

Detailed Description

Class ilStudyProgrammeProgress.

Represents the progress of a user for one program assignment on one node of the program.

The user has one progress per assignment and program node in the subtree of the assigned program.

Author
: Richard Klees richa.nosp@m.rd.k.nosp@m.lees@.nosp@m.conc.nosp@m.epts-.nosp@m.and-.nosp@m.train.nosp@m.ing..nosp@m.de
: Denis Klöpfer richa.nosp@m.rd.k.nosp@m.lees@.nosp@m.conc.nosp@m.epts-.nosp@m.and-.nosp@m.train.nosp@m.ing..nosp@m.de
: Nils Haagen nils..nosp@m.haag.nosp@m.en@co.nosp@m.ncep.nosp@m.ts-an.nosp@m.d-tr.nosp@m.ainin.nosp@m.g.de

Definition at line 20 of file class.ilStudyProgrammeProgress.php.

Constructor & Destructor Documentation

◆ __construct()

ilStudyProgrammeProgress::__construct ( int  $id)

Definition at line 175 of file class.ilStudyProgrammeProgress.php.

References $id.

176  {
177  $this->id = $id;
178  }

Member Function Documentation

◆ getAllowedTargetStatusFor()

static ilStudyProgrammeProgress::getAllowedTargetStatusFor ( int  $status_from)
static

Definition at line 320 of file class.ilStudyProgrammeProgress.php.

Referenced by ilStudyProgrammeIndividualPlanTableGUI\getManualStatusSelect().

320  : array
321  {
322  switch ($status_from) {
323  case self::STATUS_IN_PROGRESS:
324  return [
325  self::STATUS_ACCREDITED,
326  self::STATUS_COMPLETED,
327  self::STATUS_FAILED,
328  self::STATUS_NOT_RELEVANT
329  ];
330  case self::STATUS_ACCREDITED:
331  return [
332  self::STATUS_IN_PROGRESS,
333  self::STATUS_COMPLETED,
334  self::STATUS_FAILED,
335  self::STATUS_NOT_RELEVANT
336  ];
337  case self::STATUS_COMPLETED:
338  return [
339  self::STATUS_IN_PROGRESS // deaccriditation of sub-progress might revert completion,
340  ];
341  case self::STATUS_FAILED:
342  return [
343  self::STATUS_IN_PROGRESS,
344  self::STATUS_COMPLETED, // with re-calculation of deadline, progress might directly be completed.
345  self::STATUS_NOT_RELEVANT
346  ];
347  case self::STATUS_NOT_RELEVANT:
348  return[
349  self::STATUS_IN_PROGRESS
350  ];
351  }
352 
353  return [];
354  }
+ Here is the caller graph for this function:

◆ getAmountOfPoints()

ilStudyProgrammeProgress::getAmountOfPoints ( )

Get the amount of points the user needs to achieve on the subnodes of this node.

Also the amount of points, this node yields for the progress on the nodes above.

Definition at line 240 of file class.ilStudyProgrammeProgress.php.

References $points.

Referenced by ilStudyProgrammeProgressListGUI\buildProgressBar(), ilStudyProgrammeProgressListGUI\buildProgressStatus(), ilStudyProgrammeProgressListGUI\buildToolTip(), ilObjStudyProgramme\canBeCompleted(), ilObjStudyProgramme\recalculateProgressStatus(), and ilStudyProgrammeProgressDBRepository\update().

240  : int
241  {
242  return $this->points;
243  }
+ Here is the caller graph for this function:

◆ getAssignmentDate()

ilStudyProgrammeProgress::getAssignmentDate ( )

Definition at line 396 of file class.ilStudyProgrammeProgress.php.

References $assignment_date.

Referenced by ilStudyProgrammeProgressDBRepository\update().

+ Here is the caller graph for this function:

◆ getAssignmentId()

ilStudyProgrammeProgress::getAssignmentId ( )

◆ getCompletionBy()

ilStudyProgrammeProgress::getCompletionBy ( )

Get the id of object or user that lead to the successful completion of this node.

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

References $completion_by.

Referenced by ilStudyProgrammeProgressDBRepository\update().

417  : ?int
418  {
419  return $this->completion_by;
420  }
+ Here is the caller graph for this function:

◆ getCompletionDate()

◆ getCurrentAmountOfPoints()

ilStudyProgrammeProgress::getCurrentAmountOfPoints ( )

◆ getDeadline()

ilStudyProgrammeProgress::getDeadline ( )

Definition at line 432 of file class.ilStudyProgrammeProgress.php.

References $deadline.

Referenced by ilObjStudyProgramme\applyProgressDeadline(), and ilStudyProgrammeProgressDBRepository\update().

+ Here is the caller graph for this function:

◆ getId()

◆ getLastChange()

ilStudyProgrammeProgress::getLastChange ( )

Definition at line 366 of file class.ilStudyProgrammeProgress.php.

References $last_change.

Referenced by ilStudyProgrammeProgressDBRepository\update(), and withLastChange().

367  {
368  if ($this->last_change) {
369  return DateTimeImmutable::createFromFormat(self::DATE_TIME_FORMAT, $this->last_change);
370  }
371  return $this->last_change;
372  }
+ Here is the caller graph for this function:

◆ getLastChangeBy()

ilStudyProgrammeProgress::getLastChangeBy ( )

Get the id of the user/object who/which invoked the last change on this assignment.

Returns
int

Definition at line 361 of file class.ilStudyProgrammeProgress.php.

References $last_change_by.

Referenced by ilStudyProgrammeProgressDBRepository\update().

+ Here is the caller graph for this function:

◆ getNodeId()

◆ getStatus()

ilStudyProgrammeProgress::getStatus ( )

Get the status the user has on this node.

Returns
int - one of ilStudyProgrammeProgress::STATUS_*

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

References $status.

Referenced by ilObjStudyProgramme\applyProgressDeadline(), isAccredited(), isFailed(), isInProgress(), isRelevant(), isSuccessful(), ilStudyProgrammeProgressDBRepository\update(), and withStatus().

285  : int
286  {
287  return $this->status;
288  }
+ Here is the caller graph for this function:

◆ getUserId()

ilStudyProgrammeProgress::getUserId ( )

◆ getValidityOfQualification()

ilStudyProgrammeProgress::getValidityOfQualification ( )

Definition at line 444 of file class.ilStudyProgrammeProgress.php.

References $vq_date.

Referenced by hasValidQualification(), isSuccessfulExpired(), and ilStudyProgrammeProgressDBRepository\update().

+ Here is the caller graph for this function:

◆ hasIndividualModifications()

ilStudyProgrammeProgress::hasIndividualModifications ( )

Definition at line 456 of file class.ilStudyProgrammeProgress.php.

References $is_individual.

Referenced by ilStudyProgrammeProgressTest\testIndividualPlan(), and ilStudyProgrammeProgressDBRepository\update().

456  : bool
457  {
458  return $this->is_individual;
459  }
+ Here is the caller graph for this function:

◆ hasValidQualification()

ilStudyProgrammeProgress::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 483 of file class.ilStudyProgrammeProgress.php.

References getValidityOfQualification(), and isSuccessful().

483  : ?bool
484  {
485  if (!$this->isSuccessful()) {
486  return null;
487  }
488  return (
489  is_null($this->getValidityOfQualification()) ||
490  $this->getValidityOfQualification()->format('Y-m-d') >= $now->format('Y-m-d')
491  );
492  }
+ Here is the call graph for this function:

◆ invalidate()

ilStudyProgrammeProgress::invalidate ( )

Definition at line 514 of file class.ilStudyProgrammeProgress.php.

Referenced by ilStudyProgrammeProgressDBRepository\buildByRow().

515  {
516  if (!$this->vq_date || $this->vq_date->format('Y-m-d') > date('Y-m-d')) {
517  throw new ilException("may not invalidate non-expired progress");
518  }
519  $clone = clone $this;
520  $clone->invalidated = true;
521  return $clone;
522  }
Class ilStudyProgrammeProgress.
+ Here is the caller graph for this function:

◆ isAccredited()

ilStudyProgrammeProgress::isAccredited ( )

Definition at line 504 of file class.ilStudyProgrammeProgress.php.

References getStatus().

Referenced by ilStudyProgrammeMailTemplateContext\getNewestProgressForUser().

504  : bool
505  {
506  return $this->getStatus() == self::STATUS_ACCREDITED;
507  }
getStatus()
Get the status the user has on this node.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isFailed()

ilStudyProgrammeProgress::isFailed ( )

Definition at line 499 of file class.ilStudyProgrammeProgress.php.

References getStatus().

499  : bool
500  {
501  return $this->getStatus() == self::STATUS_FAILED;
502  }
getStatus()
Get the status the user has on this node.
+ Here is the call graph for this function:

◆ isInProgress()

ilStudyProgrammeProgress::isInProgress ( )

Definition at line 509 of file class.ilStudyProgrammeProgress.php.

References getStatus().

509  : bool
510  {
511  return $this->getStatus() == self::STATUS_IN_PROGRESS;
512  }
getStatus()
Get the status the user has on this node.
+ Here is the call graph for this function:

◆ isInvalidated()

ilStudyProgrammeProgress::isInvalidated ( )

Definition at line 524 of file class.ilStudyProgrammeProgress.php.

References $invalidated.

Referenced by ilStudyProgrammeProgressDBRepository\update().

524  : bool
525  {
526  return $this->invalidated;
527  }
+ Here is the caller graph for this function:

◆ isRelevant()

ilStudyProgrammeProgress::isRelevant ( )

Definition at line 494 of file class.ilStudyProgrammeProgress.php.

References getStatus().

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

494  : bool
495  {
496  return $this->getStatus() != self::STATUS_NOT_RELEVANT;
497  }
getStatus()
Get the status the user has on this node.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSuccessful()

ilStudyProgrammeProgress::isSuccessful ( )

Definition at line 468 of file class.ilStudyProgrammeProgress.php.

References getStatus().

Referenced by ilStudyProgrammeProgressListGUI\buildProgressBar(), ilStudyProgrammeIndividualPlanProgressListGUI\buildProgressStatus(), ilStudyProgrammeMailTemplateContext\getNewestProgressForUser(), hasValidQualification(), and ilObjStudyProgramme\recalculateProgressStatus().

468  : bool
469  {
470  return in_array(
471  $this->getStatus(),
472  [
473  self::STATUS_COMPLETED,
474  self::STATUS_ACCREDITED
475  ]
476  );
477  }
getStatus()
Get the status the user has on this node.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSuccessfulExpired()

ilStudyProgrammeProgress::isSuccessfulExpired ( )
Deprecated:

Definition at line 532 of file class.ilStudyProgrammeProgress.php.

References getValidityOfQualification().

Referenced by ilStudyProgrammeMailTemplateContext\getNewestProgressForUser().

532  : bool
533  {
534  if (
535  !is_null($this->getValidityOfQualification()) &&
536  $this->getValidityOfQualification()->format('Y-m-d') < (new DateTimeImmutable())->format('Y-m-d')
537  ) {
538  return true;
539  }
540  return false;
541  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isTransitionAllowedTo()

ilStudyProgrammeProgress::isTransitionAllowedTo ( int  $new_status)

Definition at line 313 of file class.ilStudyProgrammeProgress.php.

Referenced by withStatus().

313  : bool
314  {
315  return is_null($this->status) ||
316  $this->status == $new_status ||
317  in_array($new_status, self::getAllowedTargetStatusFor($this->status));
318  }
+ Here is the caller graph for this function:

◆ markAccredited()

ilStudyProgrammeProgress::markAccredited ( DateTimeImmutable  $date,
int  $acting_usr_id 
)

Definition at line 543 of file class.ilStudyProgrammeProgress.php.

References withStatus().

544  {
545  return $this
546  ->withStatus(self::STATUS_ACCREDITED)
547  ->withCompletion($acting_usr_id, $date)
548  ->withLastChange($acting_usr_id, $date);
549  }
Class ilStudyProgrammeProgress.
withStatus(int $status)
Set the status of this node.
+ Here is the call graph for this function:

◆ markFailed()

ilStudyProgrammeProgress::markFailed ( DateTimeImmutable  $date,
int  $acting_usr_id 
)

Definition at line 560 of file class.ilStudyProgrammeProgress.php.

References withStatus().

Referenced by ilObjStudyProgramme\applyProgressDeadline().

561  {
562  return $this
563  ->withStatus(self::STATUS_FAILED)
564  ->withCompletion(null, null)
565  ->withLastChange($acting_usr_id, $date);
566  }
Class ilStudyProgrammeProgress.
withStatus(int $status)
Set the status of this node.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ markNotFailed()

ilStudyProgrammeProgress::markNotFailed ( DateTimeImmutable  $date,
int  $acting_usr_id 
)

Definition at line 568 of file class.ilStudyProgrammeProgress.php.

References withStatus().

Referenced by ilObjStudyProgramme\applyProgressDeadline().

569  {
570  return $this
571  ->withStatus(self::STATUS_IN_PROGRESS)
572  ->withCompletion(null, null)
573  ->withLastChange($acting_usr_id, $date);
574  }
Class ilStudyProgrammeProgress.
withStatus(int $status)
Set the status of this node.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ markNotRelevant()

ilStudyProgrammeProgress::markNotRelevant ( DateTimeImmutable  $date,
int  $acting_usr_id 
)

Definition at line 584 of file class.ilStudyProgrammeProgress.php.

References withStatus().

585  {
586  return $this
587  ->withStatus(self::STATUS_NOT_RELEVANT)
588  ->withLastChange($acting_usr_id, $date)
589  ->withValidityOfQualification(null)
590  ->withDeadline(null)
591  ->withIndividualModifications(true);
592  }
Class ilStudyProgrammeProgress.
withStatus(int $status)
Set the status of this node.
+ Here is the call graph for this function:

◆ markRelevant()

ilStudyProgrammeProgress::markRelevant ( DateTimeImmutable  $date,
int  $acting_usr_id 
)

Definition at line 594 of file class.ilStudyProgrammeProgress.php.

References withStatus().

595  {
596  return $this
597  ->withStatus(self::STATUS_IN_PROGRESS)
598  ->withCompletion(null, null)
599  ->withLastChange($acting_usr_id, $date)
600  ->withIndividualModifications(true);
601  }
Class ilStudyProgrammeProgress.
withStatus(int $status)
Set the status of this node.
+ Here is the call graph for this function:

◆ succeed()

ilStudyProgrammeProgress::succeed ( DateTimeImmutable  $date,
int  $triggering_obj_id 
)

Definition at line 576 of file class.ilStudyProgrammeProgress.php.

References withStatus().

577  {
578  return $this
579  ->withStatus(self::STATUS_COMPLETED)
580  ->withCompletion($triggering_obj_id, $date)
581  ->withLastChange($triggering_obj_id, $date);
582  }
Class ilStudyProgrammeProgress.
withStatus(int $status)
Set the status of this node.
+ Here is the call graph for this function:

◆ unmarkAccredited()

ilStudyProgrammeProgress::unmarkAccredited ( DateTimeImmutable  $date,
int  $acting_usr_id 
)

Definition at line 551 of file class.ilStudyProgrammeProgress.php.

References withStatus().

552  {
553  return $this
554  ->withStatus(self::STATUS_IN_PROGRESS)
555  ->withCompletion(null, null)
556  ->withValidityOfQualification(null)
557  ->withLastChange($acting_usr_id, $date);
558  }
Class ilStudyProgrammeProgress.
withStatus(int $status)
Set the status of this node.
+ Here is the call graph for this function:

◆ withAmountOfPoints()

ilStudyProgrammeProgress::withAmountOfPoints ( int  $points)

Throws when amount of points is smaller then zero.

Definition at line 248 of file class.ilStudyProgrammeProgress.php.

References $points.

Referenced by ilObjStudyProgramme\resetProgressToSettings().

249  {
250  if ($points < 0) {
251  throw new ilException("ilStudyProgrammeProgress::setAmountOfPoints: "
252  . "Expected a number >= 0 as argument, got '$points'");
253  }
254 
255  $clone = clone $this;
256  $clone->points = $points;
257  return $clone;
258  }
Class ilStudyProgrammeProgress.
+ Here is the caller graph for this function:

◆ withAssignmentDate()

ilStudyProgrammeProgress::withAssignmentDate ( DateTimeImmutable  $assignment_date)

Definition at line 401 of file class.ilStudyProgrammeProgress.php.

References $assignment_date.

402  {
403  $clone = clone $this;
404  $clone->assignment_date = $assignment_date;
405  return $clone;
406  }
Class ilStudyProgrammeProgress.

◆ withAssignmentId()

ilStudyProgrammeProgress::withAssignmentId ( int  $assignment_id)

Definition at line 198 of file class.ilStudyProgrammeProgress.php.

References $assignment_id.

199  {
200  $clone = clone $this;
201  $clone->assignment_id = $assignment_id;
202  return $clone;
203  }
Class ilStudyProgrammeProgress.

◆ withCompletion()

ilStudyProgrammeProgress::withCompletion ( int  $usr_or_obj_id = null,
DateTimeImmutable  $completion_date = null 
)

Definition at line 422 of file class.ilStudyProgrammeProgress.php.

References $completion_date.

426  $clone = clone $this;
427  $clone->completion_by = $usr_or_obj_id;
428  $clone->completion_date = $completion_date;
429  return $clone;
430  }
Class ilStudyProgrammeProgress.

◆ withCurrentAmountOfPoints()

ilStudyProgrammeProgress::withCurrentAmountOfPoints ( int  $points_cur)

Set the amount of points the user currently has achieved on this node.

Exceptions
whenamount of points is smaller then zero.

Definition at line 269 of file class.ilStudyProgrammeProgress.php.

References $points_cur.

Referenced by ilObjStudyProgramme\recalculateProgressStatus().

270  {
271  if ($points_cur < 0) {
272  throw new ilException("ilStudyProgrammeProgress::setAmountOfPoints: "
273  . "Expected a number >= 0 as argument, got '$points'");
274  }
275  $clone = clone $this;
276  $clone->points_cur = $points_cur;
277  return $clone;
278  }
Class ilStudyProgrammeProgress.
+ Here is the caller graph for this function:

◆ withDeadline()

ilStudyProgrammeProgress::withDeadline ( DateTimeImmutable  $deadline = null)

Definition at line 437 of file class.ilStudyProgrammeProgress.php.

References $deadline.

438  {
439  $clone = clone $this;
440  $clone->deadline = $deadline;
441  return $clone;
442  }
Class ilStudyProgrammeProgress.

◆ withIndividualModifications()

ilStudyProgrammeProgress::withIndividualModifications ( bool  $individual)

Definition at line 461 of file class.ilStudyProgrammeProgress.php.

Referenced by ilStudyProgrammeProgressTest\testIndividualPlan().

462  {
463  $clone = clone $this;
464  $clone->is_individual = $individual;
465  return $clone;
466  }
Class ilStudyProgrammeProgress.
+ Here is the caller graph for this function:

◆ withLastChange()

ilStudyProgrammeProgress::withLastChange ( int  $last_change_by,
DateTimeImmutable  $timestamp 
)
Exceptions
ilExceptionif new date is earlier than the existing one

Definition at line 377 of file class.ilStudyProgrammeProgress.php.

References $last_change_by, and getLastChange().

Referenced by ilObjStudyProgramme\resetProgressToSettings().

381  $new_date = $timestamp->format(self::DATE_TIME_FORMAT);
382  if ($this->getLastChange() && $this->getLastChange()->format(self::DATE_TIME_FORMAT) > $new_date) {
383  throw new ilException(
384  "Cannot set last change to an earlier date:"
385  . "\ncurrent: " . $this->getLastChange()->format(self::DATE_TIME_FORMAT)
386  . "\nnew: " . $new_date,
387  1
388  );
389  }
390  $clone = clone $this;
391  $clone->last_change = $new_date;
392  $clone->last_change_by = $last_change_by;
393  return $clone;
394  }
Class ilStudyProgrammeProgress.
foreach($mandatory_scripts as $file) $timestamp
Definition: buildRTE.php:81
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withNodeId()

ilStudyProgrammeProgress::withNodeId ( int  $prg_id)

Definition at line 213 of file class.ilStudyProgrammeProgress.php.

References $prg_id.

214  {
215  $clone = clone $this;
216  $clone->prg_id = $prg_id;
217  return $clone;
218  }
Class ilStudyProgrammeProgress.

◆ withStatus()

ilStudyProgrammeProgress::withStatus ( int  $status)

Set the status of this node.

Exceptions
whenstatus is none of ilStudyProgrammeProgress::STATUS_*.

Definition at line 294 of file class.ilStudyProgrammeProgress.php.

References $status, getId(), getStatus(), and isTransitionAllowedTo().

Referenced by markAccredited(), markFailed(), markNotFailed(), markNotRelevant(), markRelevant(), ilObjStudyProgramme\recalculateProgressStatus(), succeed(), unmarkAccredited(), and ilObjStudyProgramme\updateProgressRelevanceFromSettings().

295  {
296  if (!in_array($status, self::$STATUS)) {
297  throw new ilException("No such status: " . "'$status'");
298  }
299 
300  if (!$this->isTransitionAllowedTo($status)) {
301  throw new ilException(
302  "Changing progress with status " . $this->getStatus()
303  . " cannot change to status " . "'$status'"
304  . ' (progress_id: ' . $this->getId() . ')'
305  );
306  }
307 
308  $clone = clone $this;
309  $clone->status = $status;
310  return $clone;
311  }
getId()
Get the id of the progress.
getStatus()
Get the status the user has on this node.
Class ilStudyProgrammeProgress.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withUserId()

ilStudyProgrammeProgress::withUserId ( int  $usr_id)

Definition at line 228 of file class.ilStudyProgrammeProgress.php.

References $usr_id.

229  {
230  $clone = clone $this;
231  $clone->usr_id = $usr_id;
232  return $clone;
233  }
Class ilStudyProgrammeProgress.

◆ withValidityOfQualification()

ilStudyProgrammeProgress::withValidityOfQualification ( DateTimeImmutable  $date = null)

Definition at line 449 of file class.ilStudyProgrammeProgress.php.

Referenced by ilObjStudyProgramme\resetProgressToSettings().

450  {
451  $clone = clone $this;
452  $clone->vq_date = $date;
453  return $clone;
454  }
Class ilStudyProgrammeProgress.
+ Here is the caller graph for this function:

Field Documentation

◆ $assignment_date

ilStudyProgrammeProgress::$assignment_date
protected

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

Referenced by getAssignmentDate(), and withAssignmentDate().

◆ $assignment_id

ilStudyProgrammeProgress::$assignment_id
protected

Definition at line 68 of file class.ilStudyProgrammeProgress.php.

Referenced by getAssignmentId(), and withAssignmentId().

◆ $completion_by

ilStudyProgrammeProgress::$completion_by
protected

Definition at line 115 of file class.ilStudyProgrammeProgress.php.

Referenced by getCompletionBy().

◆ $completion_date

ilStudyProgrammeProgress::$completion_date
protected

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

Referenced by getCompletionDate(), and withCompletion().

◆ $deadline

ilStudyProgrammeProgress::$deadline
protected

Definition at line 152 of file class.ilStudyProgrammeProgress.php.

Referenced by getDeadline(), and withDeadline().

◆ $id

ilStudyProgrammeProgress::$id
protected

Definition at line 61 of file class.ilStudyProgrammeProgress.php.

Referenced by __construct(), and getId().

◆ $invalidated

ilStudyProgrammeProgress::$invalidated = false
protected

Definition at line 166 of file class.ilStudyProgrammeProgress.php.

Referenced by isInvalidated().

◆ $is_individual

ilStudyProgrammeProgress::$is_individual = false
protected

Definition at line 171 of file class.ilStudyProgrammeProgress.php.

Referenced by hasIndividualModifications().

◆ $last_change

ilStudyProgrammeProgress::$last_change
protected

Definition at line 124 of file class.ilStudyProgrammeProgress.php.

Referenced by getLastChange().

◆ $last_change_by

ilStudyProgrammeProgress::$last_change_by
protected

Definition at line 131 of file class.ilStudyProgrammeProgress.php.

Referenced by getLastChangeBy(), and withLastChange().

◆ $points

ilStudyProgrammeProgress::$points = 0
protected

Definition at line 91 of file class.ilStudyProgrammeProgress.php.

Referenced by getAmountOfPoints(), and withAmountOfPoints().

◆ $points_cur

ilStudyProgrammeProgress::$points_cur = 0
protected

◆ $prg_id

ilStudyProgrammeProgress::$prg_id
protected

Definition at line 75 of file class.ilStudyProgrammeProgress.php.

Referenced by getNodeId(), and withNodeId().

◆ $STATUS

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

Definition at line 38 of file class.ilStudyProgrammeProgress.php.

◆ $status

ilStudyProgrammeProgress::$status
protected

Definition at line 105 of file class.ilStudyProgrammeProgress.php.

Referenced by getStatus(), and withStatus().

◆ $usr_id

ilStudyProgrammeProgress::$usr_id
protected

Definition at line 82 of file class.ilStudyProgrammeProgress.php.

Referenced by getUserId(), and withUserId().

◆ $vq_date

ilStudyProgrammeProgress::$vq_date
protected

Definition at line 159 of file class.ilStudyProgrammeProgress.php.

Referenced by getValidityOfQualification().

◆ DATE_FORMAT

◆ DATE_FORMAT_ENDOFDAY

const ilStudyProgrammeProgress::DATE_FORMAT_ENDOFDAY = 'Y-m-d 23:59:59'

◆ DATE_TIME_FORMAT

const ilStudyProgrammeProgress::DATE_TIME_FORMAT = 'Y-m-d H:i:s'

◆ STATUS_ACCREDITED

const ilStudyProgrammeProgress::STATUS_ACCREDITED = 3

Definition at line 32 of file class.ilStudyProgrammeProgress.php.

Referenced by ilObjStudyProgrammeAccess\checkCondition(), ilStudyProgrammeMembersTableGUI\fetchData(), ilStudyProgrammeDashboardViewGUI\findValid(), ilStudyProgrammeMembersTableGUI\getFilterWhere(), ilStudyProgrammeIndividualPlanTableGUI\getManualStatusSelect(), ilStudyProgrammeMembersTableGUI\getPossibleActions(), ilStudyProgrammeMembersTableGUI\getStatusOptions(), ilStudyProgrammeProgressDBRepository\loadExpiredSuccessful(), ilStudyProgrammeProgressDBRepository\loadPassedDeadline(), ilStudyProgrammeProgressDBRepository\loadRiskyToFailInstance(), ilStudyProgrammeProgressTest\status(), ilStudyProgrammeMailTemplateContext\statusToRepr(), ilObjStudyProgramme\statusToRepr(), ilStudyProgrammeProgressRepositoryTest\test_query_ByIds(), ilStudyProgrammeProgressRepositoryTest\test_query_past_succsessful_1(), ilStudyProgrammeProgressRepositoryTest\test_query_past_succsessful_2(), ilPrgInvalidateExpiredProgressesCronJobTest\test_run(), ilStudyProgrammeProgressRepositoryTest\test_save_and_load(), ilStudyProgrammeProgressTest\testAllowedTransitionsForAccredited(), ilStudyProgrammeProgressTest\testAllowedTransitionsForInProgress(), ilStudyProgrammeUserProgressTest\testMarkAccredited(), ilStudyProgrammeProgressTest\testMarkAccredited(), ilStudyProgrammeProgressCalculationsTest\testMarkAccreditedOnLPNode(), ilStudyProgrammeProgressCalculationsTest\testMarkAccreditedShouldCompleteParentBySufficientPoints(), ilStudyProgrammeProgressCalculationsTest\testMarkAccreditedShouldNotChangeIrrelevantParent(), ilStudyProgrammeProgressCalculationsTest\testMarkRelevantShouldRecalculateStatusAndPoints(), ilStudyProgrammeUserProgressTest\testPossibleActions(), ilStudyProgrammeProgressCalculationTest\testProgress2(), ilStudyProgrammeProgressCalculationsTest\testTranstitionToProgressWithPastDeadline(), and ilObjStudyProgrammeIndividualPlanGUI\updateStatus().

◆ STATUS_COMPLETED

const ilStudyProgrammeProgress::STATUS_COMPLETED = 2

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

Referenced by ilObjStudyProgrammeAccess\checkCondition(), ilStudyProgrammeMembersTableGUI\fetchData(), ilStudyProgrammeDashboardViewGUI\findValid(), ilStudyProgrammeMembersTableGUI\getFilterWhere(), ilStudyProgrammeMembersTableGUI\getStatusOptions(), ilStudyProgrammeProgressDBRepository\loadExpiredSuccessful(), ilStudyProgrammeProgressDBRepository\loadRiskyToFailInstance(), ilObjStudyProgramme\markNotRelevant(), ilObjStudyProgramme\recalculateProgressStatus(), ilStudyProgrammeProgressTest\status(), ilStudyProgrammeMailTemplateContext\statusToRepr(), ilObjStudyProgramme\statusToRepr(), ilStudyProgrammeProgressRepositoryTest\test_query_past_succsessful_1(), ilPrgInvalidateExpiredProgressesCronJobTest\test_run(), ilStudyProgrammeProgressTest\testAllowedTransitionsForAccredited(), ilStudyProgrammeProgressTest\testAllowedTransitionsForCompleted(), ilStudyProgrammeProgressTest\testAllowedTransitionsForFailed(), ilStudyProgrammeProgressTest\testAllowedTransitionsForInProgress(), ilStudyProgrammeProgressCalculationsTest\testChangingValidity(), ilStudyProgrammeProgressCalculationsTest\testDontChangeDeadlineForCompleted(), ilStudyProgrammeProgressCalculationsTest\testDontFailByDeadlineIfSucceeded(), ilStudyProgrammeProgressTest\testHasValidQualification(), ilStudyProgrammeProgressCalculationTest\testInitialProgressOnOptionalNodes(), ilStudyProgrammeUserProgressTest\testMarkAccredited(), ilStudyProgrammeProgressCalculationsTest\testMarkAccreditedOnLPNode(), ilStudyProgrammeProgressCalculationsTest\testMarkAccreditedShouldCompleteParentBySufficientPoints(), ilStudyProgrammeProgressCalculationsTest\testMarkRelevantShouldRecalculateStatusAndPoints(), ilStudyProgrammeProgressCalculationTest\testProgress1(), ilStudyProgrammeProgressCalculationTest\testProgress2(), ilStudyProgrammeProgressCalculationTest\testProgress3(), ilStudyProgrammeProgressCalculationTest\testProgress4(), ilStudyProgrammeProgressTest\testSucceed(), and ilStudyProgrammeProgressCalculationsTest\testSuccessionCompletingParents().

◆ STATUS_FAILED

◆ STATUS_IN_PROGRESS

const ilStudyProgrammeProgress::STATUS_IN_PROGRESS = 1

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

Referenced by ilObjStudyProgramme\applyProgressDeadline(), ilStudyProgrammeProgressCalculationsTest\buildProgramme(), ilStudyProgrammeProgressDBRepository\createFor(), ilStudyProgrammeIndividualPlanTableGUI\getManualStatusSelect(), ilStudyProgrammeMembersTableGUI\getPossibleActions(), ilStudyProgrammeIndividualPlanTableGUI\getRequiredPointsInput(), ilStudyProgrammeMembersTableGUI\getStatusOptions(), ilStudyProgrammeDashboardViewGUI\isInProgress(), ilStudyProgrammeProgressDBRepository\loadPassedDeadline(), ilObjStudyProgramme\recalculateProgressStatus(), ilObjStudyProgramme\removeMemberFromProgrammes(), ilPrgUpdateProgressCronJob\run(), ilObjStudyProgramme\setProgressesCompletedIfParentIsProgrammeInLPCompletedMode(), ilStudyProgrammeProgressTest\status(), ilStudyProgrammeMailTemplateContext\statusToRepr(), ilObjStudyProgramme\statusToRepr(), ilStudyProgrammeProgressRepositoryTest\test_create(), ilStudyProgrammeProgressRepositoryTest\test_save_and_load(), ilStudyProgrammeProgressTest\testAllowedTransitionsForAccredited(), ilStudyProgrammeProgressTest\testAllowedTransitionsForCompleted(), ilStudyProgrammeProgressTest\testAllowedTransitionsForFailed(), ilStudyProgrammeProgressTest\testAllowedTransitionsForInProgress(), ilStudyProgrammeProgressTest\testAllowedTransitionsForIrrelevant(), ilStudyProgrammeProgressCalculationsTest\testDontChangeValidityForIncomplete(), ilStudyProgrammeProgressCalculationsTest\testDontFailByFutureDeadline(), ilStudyProgrammeProgressTest\testHasValidQualification(), ilStudyProgrammeUserProgressTest\testInitialProgressActive(), ilStudyProgrammeUserProgressTest\testInitialProgressDraft(), ilStudyProgrammeProgressCalculationTest\testInitialProgressOnOptionalNodes(), ilStudyProgrammeUserProgressTest\testInitialProgressOutdated(), ilStudyProgrammeProgressCalculationsTest\testInternalRunIntegrity(), ilStudyProgrammeProgressCalculationsTest\testInternalTreeIntegrity(), ilStudyProgrammeUserProgressTest\testMarkAccredited(), ilStudyProgrammeProgressCalculationsTest\testMarkAccreditedOnLPNode(), ilStudyProgrammeProgressCalculationsTest\testMarkAccreditedShouldNotChangeIrrelevantParent(), ilStudyProgrammeUserProgressTest\testMarkFailed(), ilStudyProgrammeProgressCalculationsTest\testMarkIrrelevantDoesNotCompleteParent(), ilStudyProgrammeUserProgressTest\testMarkNotFailed(), ilStudyProgrammeProgressTest\testMarkNotFailed(), ilStudyProgrammeUserProgressTest\testMarkNotRelevant(), ilStudyProgrammeProgressTest\testMarkRelevant(), ilStudyProgrammeUserProgressTest\testPossibleActions(), ilStudyProgrammeProgressCalculationTest\testProgress4(), ilStudyProgrammeUserAssignmentTest\testRstartAssignment(), ilStudyProgrammeUserProgressTest\testUnmarkAccredited(), ilStudyProgrammeProgressTest\testUnmarkAccredited(), ilObjStudyProgramme\updateProgressRelevanceFromSettings(), and ilObjStudyProgrammeIndividualPlanGUI\updateStatus().

◆ STATUS_NOT_RELEVANT

const ilStudyProgrammeProgress::STATUS_NOT_RELEVANT = 4

Definition at line 34 of file class.ilStudyProgrammeProgress.php.

Referenced by ilObjStudyProgramme\addMissingProgresses(), ilObjStudyProgramme\canBeRemoved(), ilStudyProgrammeIndividualPlanTableGUI\getManualStatusSelect(), ilStudyProgrammeMembersTableGUI\getStatusOptions(), ilStudyProgrammeProgressTest\status(), ilStudyProgrammeMailTemplateContext\statusToRepr(), ilObjStudyProgramme\statusToRepr(), ilStudyProgrammeProgressTest\testAllowedTransitionsForAccredited(), ilStudyProgrammeProgressTest\testAllowedTransitionsForFailed(), ilStudyProgrammeProgressTest\testAllowedTransitionsForInProgress(), ilStudyProgrammeProgressTest\testAllowedTransitionsForIrrelevant(), ilStudyProgrammeUserProgressTest\testInitialProgressDraft(), ilStudyProgrammeUserProgressTest\testInitialProgressOutdated(), ilStudyProgrammeProgressCalculationsTest\testMarkAccreditedShouldNotChangeIrrelevantParent(), ilStudyProgrammeProgressTest\testMarkNotRelevant(), ilStudyProgrammeUserProgressTest\testMarkNotRelevant(), ilStudyProgrammeProgressCalculationsTest\testMarkRelevantShouldRecalculateStatusAndPoints(), ilStudyProgrammeUserProgressTest\testNewNodesAreNotRelevant(), ilStudyProgrammeUserProgressTest\testOutdatedNodesCantBeSetToRelevant(), ilStudyProgrammeUserProgressTest\testPossibleActions(), ilStudyProgrammeProgressCalculationTest\testProgress3(), ilStudyProgrammeProgressCalculationTest\testProgress4(), ilObjStudyProgramme\updateProgressRelevanceFromSettings(), and ilObjStudyProgrammeIndividualPlanGUI\updateStatus().


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