ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilIndividualAssessmentMembersTableGUI Class Reference

List of members fo iass. More...

+ Collaboration diagram for ilIndividualAssessmentMembersTableGUI:

Public Member Functions

 __construct (ilIndividualAssessmentMembersGUI $parent, ilLanguage $lng, ilCtrl $ctrl, IndividualAssessmentAccessHandler $iass_access, Factory $factory, Renderer $renderer, ilObjUser $current_user, ilIndividualAssessmentDateFormatter $date_formatter)
 
 setData (array $data)
 Set data to show in table. More...
 
 render (array $view_constrols, int $offset=0, ?int $limit=null)
 Renders the presentation table. More...
 

Protected Member Functions

 getHeadline (ilIndividualAssessmentMember $record)
 Returns the headline for each row. More...
 
 getSubheadline (ilIndividualAssessmentMember $record)
 Returns the sub headline for each row. More...
 
 getImportantInfos (ilIndividualAssessmentMember $record, bool $finalized_only=true)
 Returns all information needed for important row. More...
 
 getGradedByInformation (?int $graded_by_id)
 
 getChangedByInformation (?int $changed_by_id, ?DateTimeImmutable $change_date)
 
 getContent (ilIndividualAssessmentMember $record)
 Return all content elements for each row. More...
 
 getFurtherFields (ilIndividualAssessmentMember $record)
 Returns all information needed for further information for each row. More...
 
 getAction (ilIndividualAssessmentMember $record, Factory $ui_factory)
 Return the ui control with executable actions. More...
 
 getStatus (bool $finalized, int $status, ?int $examiner_id=null)
 Returns readable status. More...
 
 getGradedInformation (?DateTimeImmutable $event_time)
 Returns information about the grading. More...
 
 getFullNameFor (?int $user_id=null)
 Returns login of examiner. More...
 
 getProfileLink (string $full_name, int $user_id)
 
 hasPublicProfile (int $examiner_id)
 
 getLocationInfos (bool $finalized, int $usr_id, ?string $location=null, ?int $examiner_id=null)
 Returns the location of assessment. More...
 
 getRecordNote (string $record_note)
 Returns information out of record note. More...
 
 getInternalRecordNote (?string $internal_note=null)
 Returns information out of internal record note. More...
 
 getFileDownloadLink (int $usr_id)
 Get the link for download of file. More...
 
 getEntryForStatus (int $a_status)
 Get text for lp status. More...
 
 mayViewLocation (bool $finalized, int $usr_id, ?int $examiner_id=null)
 Check user may view the location. More...
 
 checkEditable (bool $finalized, int $usr_id, ?int $examiner_id=null)
 Check the current user has edit permission on record. More...
 
 checkAmendable (bool $finalized)
 Check the current user has amended permission on record. More...
 
 checkUserRemoveable (bool $finalized)
 Check the current user is allowed to remove the user. More...
 
 checkDownloadFile (int $usr_id, ?string $file_name=null)
 Check the current user is allowed to download the record file. More...
 
 userMayDownloadAttachment (int $usr_id)
 
 wasEditedByViewer (?int $examiner_id=null)
 
 txt (string $code)
 

Protected Attributes

ilIndividualAssessmentMembersGUI $parent
 
ilLanguage $lng
 
ilCtrl $ctrl
 
IndividualAssessmentAccessHandler $iass_access
 
Factory $factory
 
Renderer $renderer
 
int $current_user_id
 
ilObjUser $current_user
 
ilIndividualAssessmentDateFormatter $date_formatter
 
array $data = []
 

Detailed Description

List of members fo iass.

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

Constructor & Destructor Documentation

◆ __construct()

ilIndividualAssessmentMembersTableGUI::__construct ( ilIndividualAssessmentMembersGUI  $parent,
ilLanguage  $lng,
ilCtrl  $ctrl,
IndividualAssessmentAccessHandler  $iass_access,
Factory  $factory,
Renderer  $renderer,
ilObjUser  $current_user,
ilIndividualAssessmentDateFormatter  $date_formatter 
)

Definition at line 43 of file class.ilIndividualAssessmentMembersTableGUI.php.

52 {
53 $this->parent = $parent;
54 $this->lng = $lng;
55 $this->ctrl = $ctrl;
56 $this->iass_access = $iass_access;
57 $this->factory = $factory;
58 $this->renderer = $renderer;
59 $this->current_user_id = $current_user->getId();
60 $this->current_user = $current_user;
61 $this->date_formatter = $date_formatter;
62 }
renderer()
factory()

References $ctrl, $current_user, $date_formatter, $factory, $iass_access, $lng, $parent, $renderer, ILIAS\Repository\ctrl(), factory(), ilObject\getId(), ILIAS\Repository\lng(), and renderer().

+ Here is the call graph for this function:

Member Function Documentation

◆ checkAmendable()

ilIndividualAssessmentMembersTableGUI::checkAmendable ( bool  $finalized)
protected

Check the current user has amended permission on record.

Definition at line 474 of file class.ilIndividualAssessmentMembersTableGUI.php.

474 : bool
475 {
476 if (
477 ($this->iass_access->isSystemAdmin() && $finalized) ||
478 ($finalized && $this->iass_access->mayAmendAllUsers())
479 ) {
480 return true;
481 }
482
483 return false;
484 }

Referenced by getAction().

+ Here is the caller graph for this function:

◆ checkDownloadFile()

ilIndividualAssessmentMembersTableGUI::checkDownloadFile ( int  $usr_id,
?string  $file_name = null 
)
protected

Check the current user is allowed to download the record file.

Definition at line 501 of file class.ilIndividualAssessmentMembersTableGUI.php.

501 : bool
502 {
503 if ((!is_null($file_name) && $file_name !== '')
504 && ($this->iass_access->isSystemAdmin() || $this->userMayDownloadAttachment($usr_id))
505 ) {
506 return true;
507 }
508
509 return false;
510 }

Referenced by getAction().

+ Here is the caller graph for this function:

◆ checkEditable()

ilIndividualAssessmentMembersTableGUI::checkEditable ( bool  $finalized,
int  $usr_id,
?int  $examiner_id = null 
)
protected

Check the current user has edit permission on record.

Definition at line 457 of file class.ilIndividualAssessmentMembersTableGUI.php.

457 : bool
458 {
459 if ($finalized) {
460 return false;
461 }
462
463 return
464 (
465 $this->iass_access->mayGradeUser($usr_id)
466 &&
467 $this->wasEditedByViewer($examiner_id)
468 );
469 }

Referenced by getAction(), and getContent().

+ Here is the caller graph for this function:

◆ checkUserRemoveable()

ilIndividualAssessmentMembersTableGUI::checkUserRemoveable ( bool  $finalized)
protected

Check the current user is allowed to remove the user.

Definition at line 489 of file class.ilIndividualAssessmentMembersTableGUI.php.

489 : bool
490 {
491 if (($this->iass_access->isSystemAdmin() && !$finalized) || (!$finalized && $this->iass_access->mayEditMembers())) {
492 return true;
493 }
494
495 return false;
496 }

Referenced by getAction().

+ Here is the caller graph for this function:

◆ getAction()

ilIndividualAssessmentMembersTableGUI::getAction ( ilIndividualAssessmentMember  $record,
Factory  $ui_factory 
)
protected

Return the ui control with executable actions.

Definition at line 257 of file class.ilIndividualAssessmentMembersTableGUI.php.

257 : Dropdown
258 {
259 $items = [];
260
261 $examiner_id = $record->examinerId();
262 $usr_id = $record->id();
263 $finalized = $record->finalized();
264 $file_name = $record->fileName();
265
266 $this->ctrl->setParameterByClass('ilIndividualAssessmentMemberGUI', 'usr_id', $usr_id);
267
268 if ($this->checkEditable($finalized, $usr_id, $examiner_id)) {
269 $target = $this->ctrl->getLinkTargetByClass(ilIndividualAssessmentMemberGUI::class, 'edit');
270 $items[] = $ui_factory->button()->shy($this->txt('iass_usr_edit'), $target);
271 }
272
273 if ($this->checkUserRemoveable($finalized)) {
274 $this->ctrl->setParameterByClass('ilIndividualAssessmentMembersGUI', 'usr_id', $usr_id);
275 $target = $this->ctrl->getLinkTargetByClass('ilIndividualAssessmentMembersGUI', 'removeUserConfirmation');
276 $items[] = $ui_factory->button()->shy($this->txt('iass_usr_remove'), $target);
277 $this->ctrl->setParameterByClass('ilIndividualAssessmentMembersGUI', 'usr_id', null);
278 }
279
280 if ($this->checkAmendable($finalized)) {
281 $target = $this->ctrl->getLinkTargetByClass('ilIndividualAssessmentMemberGUI', 'amend');
282 $items[] = $ui_factory->button()->shy($this->txt('iass_usr_amend'), $target);
283 }
284
285 if ($this->checkDownloadFile($usr_id, $file_name)) {
286 $target = $this->ctrl->getLinkTargetByClass('ilIndividualAssessmentMemberGUI', 'downloadFile');
287 $items[] = $ui_factory->button()->shy($this->txt('iass_usr_download_attachment'), $target);
288 }
289 $this->ctrl->setParameterByClass('ilIndividualAssessmentMemberGUI', 'usr_id', null);
290
291 return $ui_factory->dropdown()->standard($items)->withLabel($this->txt("actions"));
292 }
checkAmendable(bool $finalized)
Check the current user has amended permission on record.
checkDownloadFile(int $usr_id, ?string $file_name=null)
Check the current user is allowed to download the record file.
checkUserRemoveable(bool $finalized)
Check the current user is allowed to remove the user.
checkEditable(bool $finalized, int $usr_id, ?int $examiner_id=null)
Check the current user has edit permission on record.
This describes commonalities between all types of Dropdowns.
Definition: Dropdown.php:35

References ILIAS\UI\Factory\button(), checkAmendable(), checkDownloadFile(), checkEditable(), checkUserRemoveable(), ILIAS\Repository\ctrl(), ILIAS\UI\Factory\dropdown(), ilIndividualAssessmentMember\examinerId(), ilIndividualAssessmentMember\fileName(), ilIndividualAssessmentMember\finalized(), ilIndividualAssessmentMember\id(), and txt().

+ Here is the call graph for this function:

◆ getChangedByInformation()

ilIndividualAssessmentMembersTableGUI::getChangedByInformation ( ?int  $changed_by_id,
?DateTimeImmutable  $change_date 
)
protected

Definition at line 172 of file class.ilIndividualAssessmentMembersTableGUI.php.

172 : array
173 {
174 if (is_null($changed_by_id)) {
175 return [];
176 }
177
178 $changed_date_str = "";
179 if (!is_null($change_date)) {
180 $changed_date_str = $this->date_formatter->format($this->current_user, $change_date);
181 }
182
183 $full_name = $this->getFullNameFor($changed_by_id);
184 if (!$this->hasPublicProfile($changed_by_id)) {
185 return [$this->txt('iass_changed_by') => $full_name . ' ' . $changed_date_str];
186 }
187
188 return [
189 $this->txt('iass_changed_by') => $this->getProfileLink($full_name, $changed_by_id) . ' ' . $changed_date_str
190 ];
191 }
getFullNameFor(?int $user_id=null)
Returns login of examiner.

References getFullNameFor(), getProfileLink(), hasPublicProfile(), and txt().

+ Here is the call graph for this function:

◆ getContent()

ilIndividualAssessmentMembersTableGUI::getContent ( ilIndividualAssessmentMember  $record)
protected

Return all content elements for each row.

Returns
string[]

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

198 : array
199 {
200 $examiner_id = $record->examinerId();
201 if (
202 !$this->checkEditable($record->finalized(), $record->id(), $examiner_id)
203 && !$this->checkAmendable($record->finalized())
204 && !$this->iass_access->mayViewUser($record->id())
205 && !$this->iass_access->mayGradeUser($record->id())
206 ) {
207 return [];
208 }
209
210 $usr_id = $record->id();
211
212 if (
213 !$this->iass_access->mayViewUser($usr_id)
214 && !$record->finalized()
215 && $examiner_id !== $this->current_user_id
216 ) {
217 return [];
218 }
219
220 $file_name = $record->fileName();
221
222 return array_merge(
223 $this->getRecordNote($record->record()),
224 $this->getInternalRecordNote($record->internalNote()),
225 $this->checkDownloadFile($usr_id, $file_name)
226 ? $this->getFileDownloadLink($usr_id)
227 : []
228 );
229 }
getRecordNote(string $record_note)
Returns information out of record note.

References checkEditable(), ilIndividualAssessmentMember\examinerId(), ilIndividualAssessmentMember\fileName(), ilIndividualAssessmentMember\finalized(), getRecordNote(), ilIndividualAssessmentMember\id(), ilIndividualAssessmentMember\internalNote(), and ilIndividualAssessmentMember\record().

+ Here is the call graph for this function:

◆ getEntryForStatus()

ilIndividualAssessmentMembersTableGUI::getEntryForStatus ( int  $a_status)
protected

Get text for lp status.

Definition at line 428 of file class.ilIndividualAssessmentMembersTableGUI.php.

428 : string
429 {
430 switch ($a_status) {
432 return $this->txt('iass_status_pending');
434 return $this->txt('iass_status_completed');
436 return $this->txt('iass_status_failed');
437 default:
438 throw new ilIndividualAssessmentException("Invalid status: " . $a_status);
439 }
440 }

References ilIndividualAssessmentMembers\LP_COMPLETED, ilIndividualAssessmentMembers\LP_FAILED, and ilIndividualAssessmentMembers\LP_IN_PROGRESS.

Referenced by getStatus().

+ Here is the caller graph for this function:

◆ getFileDownloadLink()

ilIndividualAssessmentMembersTableGUI::getFileDownloadLink ( int  $usr_id)
protected

Get the link for download of file.

Definition at line 410 of file class.ilIndividualAssessmentMembersTableGUI.php.

410 : array
411 {
412 $this->ctrl->setParameterByClass('ilIndividualAssessmentMemberGUI', 'usr_id', $usr_id);
413 $target = $this->ctrl->getLinkTargetByClass(
414 'ilIndividualAssessmentMemberGUI',
416 );
417 $this->ctrl->setParameterByClass('ilIndividualAssessmentMemberGUI', 'usr_id', null);
418 $link = $this->factory->link()->standard($this->txt("iass_download"), $target);
419
420 return array(
421 $this->txt("iass_file") => $this->renderer->render($link)
422 );
423 }

References ilIndividualAssessmentMemberGUI\CMD_DOWNLOAD_FILE, ILIAS\Repository\ctrl(), factory(), and renderer().

+ Here is the call graph for this function:

◆ getFullNameFor()

ilIndividualAssessmentMembersTableGUI::getFullNameFor ( ?int  $user_id = null)
protected

Returns login of examiner.

Definition at line 327 of file class.ilIndividualAssessmentMembersTableGUI.php.

327 : string
328 {
329 if (is_null($user_id)) {
330 return "";
331 }
332
333 $name_fields = ilObjUser::_lookupName($user_id);
334 return $name_fields["lastname"] . ", " . $name_fields["firstname"] . " [" . $name_fields["login"] . "]";
335 }
static _lookupName(int $a_user_id)

References $user_id, and ilObjUser\_lookupName().

Referenced by getChangedByInformation(), and getGradedByInformation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFurtherFields()

ilIndividualAssessmentMembersTableGUI::getFurtherFields ( ilIndividualAssessmentMember  $record)
protected

Returns all information needed for further information for each row.

Returns
string[]

Definition at line 236 of file class.ilIndividualAssessmentMembersTableGUI.php.

236 : array
237 {
238 if (!$this->iass_access->mayViewUser($record->id()) && !$this->iass_access->mayGradeUser($record->id())) {
239 return [];
240 }
241
242 return array_merge(
243 $record->LPStatus() ? [$this->txt("grading") . ":" => $this->getEntryForStatus($record->LPStatus())] : [],
244 $this->getImportantInfos($record, false),
245 $this->getLocationInfos(
246 $record->finalized(),
247 $record->id(),
248 $record->place(),
249 $record->examinerId()
250 )
251 );
252 }

References ilIndividualAssessmentMember\examinerId(), ilIndividualAssessmentMember\finalized(), ilIndividualAssessmentMember\id(), ilIndividualAssessmentMember\LPStatus(), and ilIndividualAssessmentMember\place().

+ Here is the call graph for this function:

◆ getGradedByInformation()

ilIndividualAssessmentMembersTableGUI::getGradedByInformation ( ?int  $graded_by_id)
protected

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

152 : array
153 {
154 if (is_null($graded_by_id)) {
155 return [];
156 }
157
158 if (!ilObjUser::userExists([$graded_by_id])) {
159 return [$this->txt('iass_graded_by') => $this->txt("user_deleted")];
160 }
161
162 $full_name = $this->getFullNameFor($graded_by_id);
163 if (!$this->hasPublicProfile($graded_by_id)) {
164 return [$this->txt('iass_graded_by') => $full_name];
165 }
166
167 return [
168 $this->txt('iass_graded_by') => $this->getProfileLink($full_name, $graded_by_id)
169 ];
170 }
static userExists(array $a_usr_ids=[])

References getFullNameFor(), getProfileLink(), hasPublicProfile(), txt(), and ilObjUser\userExists().

+ Here is the call graph for this function:

◆ getGradedInformation()

ilIndividualAssessmentMembersTableGUI::getGradedInformation ( ?DateTimeImmutable  $event_time)
protected

Returns information about the grading.

Returns
string[]

Definition at line 315 of file class.ilIndividualAssessmentMembersTableGUI.php.

315 : array
316 {
317 if (is_null($event_time)) {
318 return [];
319 }
320 $event_time_str = $this->date_formatter->format($this->current_user, $event_time, true);
321 return [$this->txt("iass_event_time") => $event_time_str];
322 }

References txt().

Referenced by getImportantInfos().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getHeadline()

ilIndividualAssessmentMembersTableGUI::getHeadline ( ilIndividualAssessmentMember  $record)
protected

Returns the headline for each row.

Definition at line 112 of file class.ilIndividualAssessmentMembersTableGUI.php.

References ilIndividualAssessmentMember\firstname(), ilIndividualAssessmentMember\lastname(), and ilIndividualAssessmentMember\login().

Referenced by render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getImportantInfos()

ilIndividualAssessmentMembersTableGUI::getImportantInfos ( ilIndividualAssessmentMember  $record,
bool  $finalized_only = true 
)
protected

Returns all information needed for important row.

Returns
string[]

Definition at line 135 of file class.ilIndividualAssessmentMembersTableGUI.php.

135 : array
136 {
137 if (
138 (!$this->iass_access->mayViewUser($record->id()) && !$this->iass_access->mayGradeUser($record->id()))
139 ||
140 (!$record->finalized() && $finalized_only)
141 ) {
142 return [];
143 }
144
145 return array_merge(
146 $this->getGradedInformation($record->eventTime()),
147 $this->getGradedByInformation($record->examinerId()),
148 $this->getChangedByInformation($record->changerId(), $record->changeTime())
149 );
150 }
getGradedInformation(?DateTimeImmutable $event_time)
Returns information about the grading.

References ilIndividualAssessmentMember\changerId(), ilIndividualAssessmentMember\changeTime(), ilIndividualAssessmentMember\eventTime(), ilIndividualAssessmentMember\examinerId(), ilIndividualAssessmentMember\finalized(), getGradedInformation(), and ilIndividualAssessmentMember\id().

Referenced by render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInternalRecordNote()

ilIndividualAssessmentMembersTableGUI::getInternalRecordNote ( ?string  $internal_note = null)
protected

Returns information out of internal record note.

Returns
string[]

Definition at line 398 of file class.ilIndividualAssessmentMembersTableGUI.php.

398 : array
399 {
400 if (is_null($internal_note)) {
401 return [];
402 }
403
404 return [$this->txt("iass_internal_note") => $internal_note];
405 }

◆ getLocationInfos()

ilIndividualAssessmentMembersTableGUI::getLocationInfos ( bool  $finalized,
int  $usr_id,
?string  $location = null,
?int  $examiner_id = null 
)
protected

Returns the location of assessment.

Returns
string[]

Definition at line 362 of file class.ilIndividualAssessmentMembersTableGUI.php.

367 : array {
368 if (!$this->mayViewLocation($finalized, $usr_id, $examiner_id)) {
369 return [];
370 }
371
372 if ($location === "" || is_null($location)) {
373 return [];
374 }
375
376 return [$this->txt("iass_location") . ": " => $location];
377 }
$location
Definition: buildRTE.php:22
mayViewLocation(bool $finalized, int $usr_id, ?int $examiner_id=null)
Check user may view the location.

◆ getProfileLink()

ilIndividualAssessmentMembersTableGUI::getProfileLink ( string  $full_name,
int  $user_id 
)
protected

Definition at line 337 of file class.ilIndividualAssessmentMembersTableGUI.php.

337 : string
338 {
339 $back_url = $this->ctrl->getLinkTarget($this->parent, "view");
340 $this->ctrl->setParameterByClass(PublicProfileGUI::class, 'user_id', $user_id);
341 $this->ctrl->setParameterByClass(PublicProfileGUI::class, "back_url", rawurlencode($back_url));
342 $link = $this->ctrl->getLinkTargetByClass(PublicProfileGUI::class, 'getHTML');
343 $link = $this->factory->link()->standard($full_name, $link);
344
345 return $this->renderer->render($link);
346 }

References $user_id, ILIAS\Repository\ctrl(), factory(), and renderer().

Referenced by getChangedByInformation(), and getGradedByInformation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRecordNote()

ilIndividualAssessmentMembersTableGUI::getRecordNote ( string  $record_note)
protected

Returns information out of record note.

Returns
string[]

Definition at line 384 of file class.ilIndividualAssessmentMembersTableGUI.php.

384 : array
385 {
386 if (is_null($record_note)) {
387 return [];
388 }
389
390 return [$this->txt("iass_record") => $record_note];
391 }

Referenced by getContent().

+ Here is the caller graph for this function:

◆ getStatus()

ilIndividualAssessmentMembersTableGUI::getStatus ( bool  $finalized,
int  $status,
?int  $examiner_id = null 
)
protected

Returns readable status.

Definition at line 297 of file class.ilIndividualAssessmentMembersTableGUI.php.

297 : string
298 {
299 if ($status == 0) {
301 }
302
303 if (!$finalized && !is_null($examiner_id)) {
304 return $this->txt('iass_assessment_not_completed');
305 }
306
307 return $this->getEntryForStatus($status);
308 }

References getEntryForStatus(), ilIndividualAssessmentMembers\LP_IN_PROGRESS, and txt().

Referenced by getSubheadline().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSubheadline()

ilIndividualAssessmentMembersTableGUI::getSubheadline ( ilIndividualAssessmentMember  $record)
protected

Returns the sub headline for each row.

Definition at line 120 of file class.ilIndividualAssessmentMembersTableGUI.php.

120 : string
121 {
122 if (!$this->iass_access->mayViewUser($record->id()) && !$this->iass_access->mayGradeUser($record->id())) {
123 return "";
124 }
125
126 $examiner_id = $record->examinerId();
127 return $this->txt("grading") . ": " . $this->getStatus($record->finalized(), $record->LPStatus(), $examiner_id);
128 }
getStatus(bool $finalized, int $status, ?int $examiner_id=null)
Returns readable status.

References ilIndividualAssessmentMember\examinerId(), ilIndividualAssessmentMember\finalized(), getStatus(), ilIndividualAssessmentMember\id(), ilIndividualAssessmentMember\LPStatus(), and txt().

Referenced by render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasPublicProfile()

ilIndividualAssessmentMembersTableGUI::hasPublicProfile ( int  $examiner_id)
protected

Definition at line 348 of file class.ilIndividualAssessmentMembersTableGUI.php.

348 : bool
349 {
350 $user = ilObjectFactory::getInstanceByObjId($examiner_id);
351 return (
352 ($user->getPref('public_profile') == 'y') ||
353 $user->getPref('public_profile') == 'g'
354 );
355 }
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id

References ilObjectFactory\getInstanceByObjId().

Referenced by getChangedByInformation(), and getGradedByInformation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mayViewLocation()

ilIndividualAssessmentMembersTableGUI::mayViewLocation ( bool  $finalized,
int  $usr_id,
?int  $examiner_id = null 
)
protected

Check user may view the location.

Definition at line 445 of file class.ilIndividualAssessmentMembersTableGUI.php.

445 : bool
446 {
447 return
448 $this->checkEditable($finalized, $usr_id, $examiner_id) ||
449 $this->checkAmendable($finalized) ||
450 $this->iass_access->mayViewUser($usr_id)
451 ;
452 }

◆ render()

ilIndividualAssessmentMembersTableGUI::render ( array  $view_constrols,
int  $offset = 0,
?int  $limit = null 
)

Renders the presentation table.

Parameters
ILIAS\UI\Component\Component[]$view_constrols

Definition at line 83 of file class.ilIndividualAssessmentMembersTableGUI.php.

83 : string
84 {
85 $ptable = $this->factory->table()->presentation(
86 "",
87 $view_constrols,
88 function (
89 PresentationRow $row,
91 Factory $ui,
92 $environment
93 ) {
94 return $row
95 ->withHeadline($this->getHeadline($record))
96 ->withSubheadline($this->getSubheadline($record))
97 ->withImportantFields($this->getImportantInfos($record))
98 ->withContent($ui->listing()->descriptive($this->getContent($record)))
99 ->withFurtherFieldsHeadline($this->txt("iass_further_field_headline"))
100 ->withFurtherFields($this->getFurtherFields($record))
101 ->withAction($this->getAction($record, $ui));
102 }
103 );
104
105 $data = array_slice($this->data, $offset, $limit);
106 return $this->renderer->render($ptable->withData($data));
107 }
Edit the record of a user, set LP.
getSubheadline(ilIndividualAssessmentMember $record)
Returns the sub headline for each row.
getHeadline(ilIndividualAssessmentMember $record)
Returns the headline for each row.
getImportantInfos(ilIndividualAssessmentMember $record, bool $finalized_only=true)
Returns all information needed for important row.
This describes a Row used in Presentation Table.
withHeadline(string $headline)
Get a row like this with the given headline.
This is how the factory for UI elements looks.
Definition: Factory.php:38

References $data, factory(), getHeadline(), getImportantInfos(), getSubheadline(), ILIAS\UI\Factory\listing(), renderer(), and ILIAS\UI\Component\Table\PresentationRow\withHeadline().

+ Here is the call graph for this function:

◆ setData()

ilIndividualAssessmentMembersTableGUI::setData ( array  $data)

Set data to show in table.

Definition at line 67 of file class.ilIndividualAssessmentMembersTableGUI.php.

67 : void
68 {
69 $this->data = array_filter(
70 $data,
71 fn($record) =>
72 $this->iass_access->mayEditMembers()
73 || $this->iass_access->mayGradeUser($record->id())
74 || $this->iass_access->mayViewUser($record->id())
75 );
76 }

References $data.

◆ txt()

ilIndividualAssessmentMembersTableGUI::txt ( string  $code)
protected

Definition at line 522 of file class.ilIndividualAssessmentMembersTableGUI.php.

522 : string
523 {
524 return $this->lng->txt($code);
525 }

References ILIAS\Repository\lng().

Referenced by getAction(), getChangedByInformation(), getGradedByInformation(), getGradedInformation(), getStatus(), and getSubheadline().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ userMayDownloadAttachment()

ilIndividualAssessmentMembersTableGUI::userMayDownloadAttachment ( int  $usr_id)
protected

Definition at line 512 of file class.ilIndividualAssessmentMembersTableGUI.php.

512 : bool
513 {
514 return $this->iass_access->mayViewUser($usr_id) || $this->iass_access->mayGradeUser($usr_id);
515 }

◆ wasEditedByViewer()

ilIndividualAssessmentMembersTableGUI::wasEditedByViewer ( ?int  $examiner_id = null)
protected

Definition at line 517 of file class.ilIndividualAssessmentMembersTableGUI.php.

517 : bool
518 {
519 return $examiner_id === $this->current_user_id || null === $examiner_id;
520 }

Field Documentation

◆ $ctrl

ilCtrl ilIndividualAssessmentMembersTableGUI::$ctrl
protected

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

Referenced by __construct().

◆ $current_user

ilObjUser ilIndividualAssessmentMembersTableGUI::$current_user
protected

Definition at line 39 of file class.ilIndividualAssessmentMembersTableGUI.php.

Referenced by __construct().

◆ $current_user_id

int ilIndividualAssessmentMembersTableGUI::$current_user_id
protected

◆ $data

array ilIndividualAssessmentMembersTableGUI::$data = []
protected

Definition at line 41 of file class.ilIndividualAssessmentMembersTableGUI.php.

Referenced by render(), and setData().

◆ $date_formatter

ilIndividualAssessmentDateFormatter ilIndividualAssessmentMembersTableGUI::$date_formatter
protected

Definition at line 40 of file class.ilIndividualAssessmentMembersTableGUI.php.

Referenced by __construct().

◆ $factory

Factory ilIndividualAssessmentMembersTableGUI::$factory
protected

Definition at line 36 of file class.ilIndividualAssessmentMembersTableGUI.php.

Referenced by __construct().

◆ $iass_access

IndividualAssessmentAccessHandler ilIndividualAssessmentMembersTableGUI::$iass_access
protected

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

Referenced by __construct().

◆ $lng

ilLanguage ilIndividualAssessmentMembersTableGUI::$lng
protected

Definition at line 33 of file class.ilIndividualAssessmentMembersTableGUI.php.

Referenced by __construct().

◆ $parent

ilIndividualAssessmentMembersGUI ilIndividualAssessmentMembersTableGUI::$parent
protected

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

Referenced by __construct().

◆ $renderer

Renderer ilIndividualAssessmentMembersTableGUI::$renderer
protected

Definition at line 37 of file class.ilIndividualAssessmentMembersTableGUI.php.

Referenced by __construct().


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