ILIAS  release_8 Revision v8.24
ilStudyProgrammeUserTableRow.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
21declare(strict_types=1);
22
27{
28 protected PRGProgressId $id;
29 protected int $ass_id;
30 protected int $usr_id;
31 protected int $pgs_id;
32 protected bool $is_root_progress;
33 protected int $status_raw;
34 protected bool $active_raw;
35
37
38 protected string $active;
39 protected string $firstname;
40 protected string $lastname;
41 protected string $login;
42 protected string $orgus;
43 protected string $gender;
44 protected string $status;
45 protected string $completion_date;
49 protected ?array $completion_by_obj_ids;
50 protected string $completion_by;
51 protected string $points_reachable;
52 protected string $points_required;
53 protected string $points_current;
54 protected string $custom_plan;
55 protected string $belongs_to;
56 protected string $assign_date;
57 protected string $assigned_by;
58 protected string $deadline;
59 protected string $expiry_date;
60 protected string $validity;
61 protected string $restart_date;
62
63 public function __construct(int $ass_id, int $usr_id, int $node_obj_id, bool $is_root_progress)
64 {
65 $this->id = new PRGProgressId($ass_id, $usr_id, $node_obj_id);
66 $this->ass_id = $ass_id;
67 $this->usr_id = $usr_id;
68 $this->node_id = $node_obj_id;
69 $this->is_root_progress = $is_root_progress;
70 }
71
72 public function getId(): PRGProgressId
73 {
74 return $this->id;
75 }
76 public function getAssignmentId(): int
77 {
78 return $this->ass_id;
79 }
80 public function getUsrId(): int
81 {
82 return $this->usr_id;
83 }
84 public function getNodeId(): int
85 {
86 return $this->node_id;
87 }
88 public function isRootProgress(): bool
89 {
91 }
92
93 public function withUserActiveRaw(bool $active_raw): self
94 {
95 $clone = clone $this;
96 $clone->active_raw = $active_raw;
97 return $clone;
98 }
99 public function isUserActiveRaw(): bool
100 {
101 return $this->active_raw;
102 }
103 public function withUserActive(string $active): self
104 {
105 $clone = clone $this;
106 $clone->active = $active;
107 return $clone;
108 }
109 public function getUserActive(): string
110 {
111 return $this->active;
112 }
113
114 public function withFirstname(string $firstname): self
115 {
116 $clone = clone $this;
117 $clone->firstname = $firstname;
118 return $clone;
119 }
120 public function getFirstname(): string
121 {
122 return $this->firstname;
123 }
124
125 public function withLastname(string $lastname): self
126 {
127 $clone = clone $this;
128 $clone->lastname = $lastname;
129 return $clone;
130 }
131 public function getLastname(): string
132 {
133 return $this->lastname;
134 }
135
136 public function getName(): string
137 {
138 return $this->lastname . ', ' . $this->firstname;
139 }
140
141 public function withLogin(string $login): self
142 {
143 $clone = clone $this;
144 $clone->login = $login;
145 return $clone;
146 }
147 public function getLogin(): string
148 {
149 return $this->login;
150 }
151
152 public function withOrgUs(string $orgus): self
153 {
154 $clone = clone $this;
155 $clone->orgus = $orgus;
156 return $clone;
157 }
158 public function getOrgUs(): string
159 {
160 return $this->orgus;
161 }
162
163 public function withGender(string $gender): self
164 {
165 $clone = clone $this;
166 $clone->gender = $gender;
167 return $clone;
168 }
169 public function getGender(): string
170 {
171 return $this->gender;
172 }
173
174 public function withUDF(ilUserDefinedData $udf): self
175 {
176 $clone = clone $this;
177 $clone->udf = $udf;
178 return $clone;
179 }
180 public function getUdf(string $field)
181 {
182 return $this->udf->get($field);
183 }
184
185 public function withStatus(string $status): self
186 {
187 $clone = clone $this;
188 $clone->status = $status;
189 return $clone;
190 }
191 public function getStatus(): string
192 {
193 return $this->status;
194 }
195 public function withStatusRaw(int $status_raw): self
196 {
197 $clone = clone $this;
198 $clone->status_raw = $status_raw;
199 return $clone;
200 }
201 public function getStatusRaw(): int
202 {
203 return $this->status_raw;
204 }
205
206 public function withCompletionDate(string $completion_date): self
207 {
208 $clone = clone $this;
209 $clone->completion_date = $completion_date;
210 return $clone;
211 }
212 public function getCompletionDate(): string
213 {
215 }
216
217 public function withCompletionBy(string $completion_by): self
218 {
219 $clone = clone $this;
220 $clone->completion_by = $completion_by;
221 return $clone;
222 }
223 public function getCompletionBy(): string
224 {
226 }
227
231 public function withCompletionByObjIds(?array $obj_ids): self
232 {
233 $clone = clone $this;
234 $clone->completion_by_obj_ids = $obj_ids;
235 return $clone;
236 }
237
241 public function getCompletionByObjIds(): ?array
242 {
244 }
245
246 public function withPointsReachable(string $points_reachable): self
247 {
248 $clone = clone $this;
249 $clone->points_reachable = $points_reachable;
250 return $clone;
251 }
252 public function getPointsReachable(): string
253 {
255 }
256 public function withPointsRequired(string $points_required): self
257 {
258 $clone = clone $this;
259 $clone->points_required = $points_required;
260 return $clone;
261 }
262 public function getPointsRequired(): string
263 {
265 }
266 public function withPointsCurrent(string $points_current): self
267 {
268 $clone = clone $this;
269 $clone->points_current = $points_current;
270 return $clone;
271 }
272 public function getPointsCurrent(): string
273 {
275 }
276 public function withCustomPlan(string $custom_plan): self
277 {
278 $clone = clone $this;
279 $clone->custom_plan = $custom_plan;
280 return $clone;
281 }
282 public function getCustomPlan(): string
283 {
284 return $this->custom_plan;
285 }
286
287 public function withBelongsTo(string $belongs_to): self
288 {
289 $clone = clone $this;
290 $clone->belongs_to = $belongs_to;
291 return $clone;
292 }
293 public function getBelongsTo(): string
294 {
295 return $this->belongs_to;
296 }
297
298 public function withAssignmentDate(string $assign_date): self
299 {
300 $clone = clone $this;
301 $clone->assign_date = $assign_date;
302 return $clone;
303 }
304 public function getAssignmentDate(): string
305 {
306 return $this->assign_date;
307 }
308
309 public function withAssignmentBy(string $assigned_by): self
310 {
311 $clone = clone $this;
312 $clone->assigned_by = $assigned_by;
313 return $clone;
314 }
315 public function getAssignmentBy(): string
316 {
317 return $this->assigned_by;
318 }
319
320 public function withDeadline(string $deadline): self
321 {
322 $clone = clone $this;
323 $clone->deadline = $deadline;
324 return $clone;
325 }
326 public function getDeadline(): string
327 {
328 return $this->deadline;
329 }
330
331 public function withExpiryDate(string $expiry_date): self
332 {
333 $clone = clone $this;
334 $clone->expiry_date = $expiry_date;
335 return $clone;
336 }
337 public function getExpiryDate(): string
338 {
339 return $this->expiry_date;
340 }
341
342 public function withValidity(string $validity): self
343 {
344 $clone = clone $this;
345 $clone->validity = $validity;
346 return $clone;
347 }
348 public function getValidity(): string
349 {
350 return $this->validity;
351 }
352
353 public function withRestartDate(string $restart_date): self
354 {
355 $clone = clone $this;
356 $clone->restart_date = $restart_date;
357 return $clone;
358 }
359 public function getRestartDate(): string
360 {
361 return $this->restart_date;
362 }
363
364 public function toArray(): array
365 {
366 return [
367 'prgrs_id' => (string) $this->getId(),
368 'name' => $this->getName(),
369 'active_raw' => $this->isUserActiveRaw(),
370 'active' => $this->getUserActive(),
371 'firstname' => $this->getFirstname(),
372 'lastname' => $this->getLastname(),
373 'login' => $this->getLogin(),
374 'orgus' => $this->getOrgUs(),
375 'gender' => $this->getGender(),
376 'status' => $this->getStatus(),
377 'completion_date' => $this->getCompletionDate(),
378 'completion_by' => $this->getCompletionBy(),
379 'points_reachable' => $this->getPointsReachable(),
380 'points_required' => $this->getPointsRequired(),
381 'points_current' => $this->getPointsCurrent(),
382 'custom_plan' => $this->getCustomPlan(),
383 'belongs_to' => $this->getBelongsTo(),
384 'assign_date' => $this->getAssignmentDate(),
385 'assigned_by' => $this->getAssignmentBy(),
386 'deadline' => $this->getDeadline(),
387 'expiry_date' => $this->getExpiryDate(),
388 'validity' => $this->getValidity()
389 ];
390 }
391}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilStudyProgrammeUserTable provides a flattened list of progresses at a programme-node.
__construct(int $ass_id, int $usr_id, int $node_obj_id, bool $is_root_progress)
withPointsReachable(string $points_reachable)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...