1 <?php declare(strict_types = 1);
102 if ($this->last_change) {
103 return DateTimeImmutable::createFromFormat(self::DATE_TIME_FORMAT, $this->last_change);
115 $new_date = $timestamp->format(self::DATE_TIME_FORMAT);
118 "Cannot set last change to an earlier date:" 119 .
"\ncurrent: " . $this->
getLastChange()->format(self::DATE_TIME_FORMAT)
120 .
"\nnew: " . $new_date,
124 $clone = clone $this;
125 $clone->last_change = $new_date;
144 $clone = clone $this;
const AUTO_ASSIGNED_BY_ROLE
getRestartedAssignmentId()
$restarted_asssignment_id
const NO_RESTARTED_ASSIGNMENT
withLastChange(int $last_change_by, DateTimeImmutable $timestamp)
Represents one assignment of the user to a program tree.
foreach($mandatory_scripts as $file) $timestamp
const AUTO_ASSIGNED_BY_COURSE
const AUTO_ASSIGNED_BY_ORGU
withRestarted(int $restarted_asssignment_id, DateTimeImmutable $restart_date=null)
const AUTO_ASSIGNED_BY_GROUP
withRootId(int $root_prg_id)