19declare(strict_types=1);
93 "Cannot set last change to an earlier date:"
94 .
"\ncurrent: " . $this->
getLastChange()->format(self::DATE_TIME_FORMAT)
107 return $this->restart_date;
112 return $this->restarted_asssignment_id;
117 return $this->getRestartedAssignmentId() !== -1;
121 int $restarted_asssignment_id,
122 ?\DateTimeImmutable $restart_date =
null
124 $clone = clone $this;
125 $clone->restarted_asssignment_id = $restarted_asssignment_id;
126 $clone->restart_date = $restart_date;
132 return $this->manually_assigned;
137 $clone = clone $this;
138 $clone->manually_assigned = $manual;
144 $clone = clone $this;
145 $clone->user_info = $user_info;
150 return $this->user_info;
156 $clone = clone $this;
157 $clone->progress = $progress;
162 return $this->progress;
167 return $this->progress->getNodeId();
173 $pgs = $this->getProgressTree();
177 foreach ($pgs->getSubnodes() as
$id => $sub) {
178 $this->getProgresses($ret, $sub);
185 $pgs = $this->getProgressTree();
186 $path = $pgs->findSubnodePath((
string) $node_id);
188 foreach (
$path as $hop) {
189 if ($pgs->getId() !== $hop) {
190 $pgs = $pgs->getSubnode($hop);
197 DateTimeImmutable $deadline
199 return array_values(array_filter(
200 $this->getProgresses(),
201 fn($pgs) => ! is_null($pgs->getDeadline()) && $pgs->getDeadline() <= $deadline
207 $clone = clone $this;
208 $clone->events = $events;
214 return $this->events;
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Base class for ILIAS Exception handling.
Assignments are relations of users to a PRG; They hold progress-information for (sub-)nodes of the PR...
getRestartedAssignmentId()
withManuallyAssigned(bool $manual)
const AUTO_ASSIGNED_BY_ORGU
DateTimeImmutable$restart_date
withRestarted(int $restarted_asssignment_id, ?\DateTimeImmutable $restart_date=null)
const AUTO_ASSIGNED_BY_GROUP
int $restarted_asssignment_id
withProgressTree(ilPRGProgress $progress)
DateTimeImmutable $last_change
getProgresses(array &$ret=[], ?ilPRGProgress $pgs=null)
withUserInformation(ilPRGUserInformation $user_info)
withEvents(StudyProgrammeEvents $events)
__construct(int $id, int $usr_id)
const AUTO_ASSIGNED_BY_RESTART
withLastChange(int $last_change_by, \DateTimeImmutable $last_change)
const NO_RESTARTED_ASSIGNMENT
ilPRGUserInformation $user_info
const AUTO_ASSIGNED_BY_ROLE
getProgressesWithDeadline(DateTimeImmutable $deadline)
const AUTO_ASSIGNED_BY_COURSE
StudyProgrammeEvents $events
getProgressForNode(int $node_id)
A Progress is the status of a user on a single node of an assignment; it is unique by assignment_id:u...
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
trait ilPRGAssignmentActions
This trait is for (physical) separation of code only; it is actually just part of an ilPRGAssignment ...
if(!file_exists('../ilias.ini.php'))