ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 29 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 42 of file class.ilIndividualAssessmentMembersTableGUI.php.

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

51  {
52  $this->parent = $parent;
53  $this->lng = $lng;
54  $this->ctrl = $ctrl;
55  $this->iass_access = $iass_access;
56  $this->factory = $factory;
57  $this->renderer = $renderer;
58  $this->current_user_id = $current_user->getId();
59  $this->current_user = $current_user;
60  $this->date_formatter = $date_formatter;
61  }
factory()
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 473 of file class.ilIndividualAssessmentMembersTableGUI.php.

Referenced by getAction(), getContent(), and mayViewLocation().

473  : bool
474  {
475  if (
476  ($this->iass_access->isSystemAdmin() && $finalized) ||
477  ($finalized && $this->iass_access->mayAmendAllUsers())
478  ) {
479  return true;
480  }
481 
482  return false;
483  }
+ 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 500 of file class.ilIndividualAssessmentMembersTableGUI.php.

References userMayDownloadAttachment().

Referenced by getAction(), and getContent().

500  : bool
501  {
502  if ((!is_null($file_name) && $file_name !== '')
503  && ($this->iass_access->isSystemAdmin() || $this->userMayDownloadAttachment($usr_id))
504  ) {
505  return true;
506  }
507 
508  return false;
509  }
+ Here is the call graph for this function:
+ 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 456 of file class.ilIndividualAssessmentMembersTableGUI.php.

References wasEditedByViewer().

Referenced by getAction(), getContent(), and mayViewLocation().

456  : bool
457  {
458  if ($finalized) {
459  return false;
460  }
461 
462  return
463  (
464  $this->iass_access->mayGradeUser($usr_id)
465  &&
466  $this->wasEditedByViewer($examiner_id)
467  );
468  }
+ Here is the call graph for this function:
+ 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 488 of file class.ilIndividualAssessmentMembersTableGUI.php.

Referenced by getAction().

488  : bool
489  {
490  if (($this->iass_access->isSystemAdmin() && !$finalized) || (!$finalized && $this->iass_access->mayEditMembers())) {
491  return true;
492  }
493 
494  return false;
495  }
+ 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 256 of file class.ilIndividualAssessmentMembersTableGUI.php.

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

Referenced by render().

256  : Dropdown
257  {
258  $items = [];
259 
260  $examiner_id = $record->examinerId();
261  $usr_id = $record->id();
262  $finalized = $record->finalized();
263  $file_name = $record->fileName();
264 
265  $this->ctrl->setParameterByClass('ilIndividualAssessmentMemberGUI', 'usr_id', $usr_id);
266 
267  if ($this->checkEditable($finalized, $usr_id, $examiner_id)) {
268  $target = $this->ctrl->getLinkTargetByClass(ilIndividualAssessmentMemberGUI::class, 'edit');
269  $items[] = $ui_factory->button()->shy($this->txt('iass_usr_edit'), $target);
270  }
271 
272  if ($this->checkUserRemoveable($finalized)) {
273  $this->ctrl->setParameterByClass('ilIndividualAssessmentMembersGUI', 'usr_id', $usr_id);
274  $target = $this->ctrl->getLinkTargetByClass('ilIndividualAssessmentMembersGUI', 'removeUserConfirmation');
275  $items[] = $ui_factory->button()->shy($this->txt('iass_usr_remove'), $target);
276  $this->ctrl->setParameterByClass('ilIndividualAssessmentMembersGUI', 'usr_id', null);
277  }
278 
279  if ($this->checkAmendable($finalized)) {
280  $target = $this->ctrl->getLinkTargetByClass('ilIndividualAssessmentMemberGUI', 'amend');
281  $items[] = $ui_factory->button()->shy($this->txt('iass_usr_amend'), $target);
282  }
283 
284  if ($this->checkDownloadFile($usr_id, $file_name)) {
285  $target = $this->ctrl->getLinkTargetByClass('ilIndividualAssessmentMemberGUI', 'downloadFile');
286  $items[] = $ui_factory->button()->shy($this->txt('iass_usr_download_attachment'), $target);
287  }
288  $this->ctrl->setParameterByClass('ilIndividualAssessmentMemberGUI', 'usr_id', null);
289 
290  return $ui_factory->dropdown()->standard($items)->withLabel($this->txt("actions"));
291  }
dropdown()
description: purpose: > Dropdowns reveal a list of interactions that change the system’s status or ...
checkAmendable(bool $finalized)
Check the current user has amended permission on record.
This describes commonalities between all types of Dropdowns.
Definition: Dropdown.php:34
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
checkDownloadFile(int $usr_id, ?string $file_name=null)
Check the current user is allowed to download the record file.
checkEditable(bool $finalized, int $usr_id, ?int $examiner_id=null)
Check the current user has edit permission on record.
button()
description: purpose: > Buttons trigger interactions that change the system’s or view's status...
checkUserRemoveable(bool $finalized)
Check the current user is allowed to remove the user.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getChangedByInformation()

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

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

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

Referenced by getImportantInfos().

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

◆ getContent()

ilIndividualAssessmentMembersTableGUI::getContent ( ilIndividualAssessmentMember  $record)
protected

Return all content elements for each row.

Returns
string[]

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

References $current_user_id, checkAmendable(), checkDownloadFile(), checkEditable(), ilIndividualAssessmentMember\examinerId(), ilIndividualAssessmentMember\fileName(), ilIndividualAssessmentMember\finalized(), getFileDownloadLink(), getInternalRecordNote(), getRecordNote(), ilIndividualAssessmentMember\id(), ilIndividualAssessmentMember\internalNote(), and ilIndividualAssessmentMember\record().

Referenced by render().

197  : array
198  {
199  $examiner_id = $record->examinerId();
200  if (
201  !$this->checkEditable($record->finalized(), $record->id(), $examiner_id)
202  && !$this->checkAmendable($record->finalized())
203  && !$this->iass_access->mayViewUser($record->id())
204  && !$this->iass_access->mayGradeUser($record->id())
205  ) {
206  return [];
207  }
208 
209  $usr_id = $record->id();
210 
211  if (
212  !$this->iass_access->mayViewUser($usr_id)
213  && !$record->finalized()
214  && $examiner_id !== $this->current_user_id
215  ) {
216  return [];
217  }
218 
219  $file_name = $record->fileName();
220 
221  return array_merge(
222  $this->getRecordNote($record->record()),
223  $this->getInternalRecordNote($record->internalNote()),
224  $this->checkDownloadFile($usr_id, $file_name)
225  ? $this->getFileDownloadLink($usr_id)
226  : []
227  );
228  }
getRecordNote(string $record_note)
Returns information out of record note.
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.
checkEditable(bool $finalized, int $usr_id, ?int $examiner_id=null)
Check the current user has edit permission on record.
getInternalRecordNote(?string $internal_note=null)
Returns information out of internal record note.
getFileDownloadLink(int $usr_id)
Get the link for download of file.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEntryForStatus()

ilIndividualAssessmentMembersTableGUI::getEntryForStatus ( int  $a_status)
protected

Get text for lp status.

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

References ilIndividualAssessmentMembers\LP_COMPLETED, ilIndividualAssessmentMembers\LP_FAILED, ilIndividualAssessmentMembers\LP_IN_PROGRESS, and txt().

Referenced by getFurtherFields(), and getStatus().

427  : string
428  {
429  switch ($a_status) {
431  return $this->txt('iass_status_pending');
433  return $this->txt('iass_status_completed');
435  return $this->txt('iass_status_failed');
436  default:
437  throw new ilIndividualAssessmentException("Invalid status: " . $a_status);
438  }
439  }
+ Here is the call graph for this function:
+ 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 409 of file class.ilIndividualAssessmentMembersTableGUI.php.

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

Referenced by getContent().

409  : array
410  {
411  $this->ctrl->setParameterByClass('ilIndividualAssessmentMemberGUI', 'usr_id', $usr_id);
412  $target = $this->ctrl->getLinkTargetByClass(
413  'ilIndividualAssessmentMemberGUI',
415  );
416  $this->ctrl->setParameterByClass('ilIndividualAssessmentMemberGUI', 'usr_id', null);
417  $link = $this->factory->link()->standard($this->txt("iass_download"), $target);
418 
419  return array(
420  $this->txt("iass_file") => $this->renderer->render($link)
421  );
422  }
factory()
renderer()
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFullNameFor()

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

Returns login of examiner.

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

References $user_id, and ilObjUser\_lookupName().

Referenced by getChangedByInformation(), and getGradedByInformation().

326  : string
327  {
328  if (is_null($user_id)) {
329  return "";
330  }
331 
332  $name_fields = ilObjUser::_lookupName($user_id);
333  return $name_fields["lastname"] . ", " . $name_fields["firstname"] . " [" . $name_fields["login"] . "]";
334  }
static _lookupName(int $a_user_id)
lookup user name
+ 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 235 of file class.ilIndividualAssessmentMembersTableGUI.php.

References ilIndividualAssessmentMember\examinerId(), ilIndividualAssessmentMember\finalized(), getEntryForStatus(), getImportantInfos(), getLocationInfos(), ilIndividualAssessmentMember\id(), ilIndividualAssessmentMember\LPStatus(), ilIndividualAssessmentMember\place(), and txt().

Referenced by render().

235  : array
236  {
237  if (!$this->iass_access->mayViewUser($record->id()) && !$this->iass_access->mayGradeUser($record->id())) {
238  return [];
239  }
240 
241  return array_merge(
242  $record->LPStatus() ? [$this->txt("grading") . ":" => $this->getEntryForStatus($record->LPStatus())] : [],
243  $this->getImportantInfos($record, false),
244  $this->getLocationInfos(
245  $record->finalized(),
246  $record->id(),
247  $record->place(),
248  $record->examinerId()
249  )
250  );
251  }
getImportantInfos(ilIndividualAssessmentMember $record, bool $finalized_only=true)
Returns all information needed for important row.
getLocationInfos(bool $finalized, int $usr_id, ?string $location=null, ?int $examiner_id=null)
Returns the location of assessment.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGradedByInformation()

ilIndividualAssessmentMembersTableGUI::getGradedByInformation ( ?int  $graded_by_id)
protected

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

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

Referenced by getImportantInfos().

151  : array
152  {
153  if (is_null($graded_by_id)) {
154  return [];
155  }
156 
157  if (!ilObjUser::userExists([$graded_by_id])) {
158  return [$this->txt('iass_graded_by') => $this->txt("user_deleted")];
159  }
160 
161  $full_name = $this->getFullNameFor($graded_by_id);
162  if (!$this->hasPublicProfile($graded_by_id)) {
163  return [$this->txt('iass_graded_by') => $full_name];
164  }
165 
166  return [
167  $this->txt('iass_graded_by') => $this->getProfileLink($full_name, $graded_by_id)
168  ];
169  }
static userExists(array $a_usr_ids=[])
getFullNameFor(?int $user_id=null)
Returns login of examiner.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGradedInformation()

ilIndividualAssessmentMembersTableGUI::getGradedInformation ( ?DateTimeImmutable  $event_time)
protected

Returns information about the grading.

Returns
string[]

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

References txt().

Referenced by getImportantInfos().

314  : array
315  {
316  if (is_null($event_time)) {
317  return [];
318  }
319  $event_time_str = $this->date_formatter->format($this->current_user, $event_time, true);
320  return [$this->txt("iass_event_time") => $event_time_str];
321  }
+ 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 111 of file class.ilIndividualAssessmentMembersTableGUI.php.

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

Referenced by render().

111  : string
112  {
113  return $record->lastname() . ", " . $record->firstname() . " [" . $record->login() . "]";
114  }
+ 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 134 of file class.ilIndividualAssessmentMembersTableGUI.php.

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

Referenced by getFurtherFields(), and render().

134  : array
135  {
136  if (
137  (!$this->iass_access->mayViewUser($record->id()) && !$this->iass_access->mayGradeUser($record->id()))
138  ||
139  (!$record->finalized() && $finalized_only)
140  ) {
141  return [];
142  }
143 
144  return array_merge(
145  $this->getGradedInformation($record->eventTime()),
146  $this->getGradedByInformation($record->examinerId()),
147  $this->getChangedByInformation($record->changerId(), $record->changeTime())
148  );
149  }
getChangedByInformation(?int $changed_by_id, ?DateTimeImmutable $change_date)
getGradedInformation(?DateTimeImmutable $event_time)
Returns information about the grading.
+ 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 397 of file class.ilIndividualAssessmentMembersTableGUI.php.

References txt().

Referenced by getContent().

397  : array
398  {
399  if (is_null($internal_note)) {
400  return [];
401  }
402 
403  return [$this->txt("iass_internal_note") => $internal_note];
404  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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 361 of file class.ilIndividualAssessmentMembersTableGUI.php.

References $location, mayViewLocation(), and txt().

Referenced by getFurtherFields().

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

◆ getProfileLink()

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

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

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

Referenced by getChangedByInformation(), and getGradedByInformation().

336  : string
337  {
338  $back_url = $this->ctrl->getLinkTarget($this->parent, "view");
339  $this->ctrl->setParameterByClass('ilpublicuserprofilegui', 'user_id', $user_id);
340  $this->ctrl->setParameterByClass('ilpublicuserprofilegui', "back_url", rawurlencode($back_url));
341  $link = $this->ctrl->getLinkTargetByClass('ilpublicuserprofilegui', 'getHTML');
342  $link = $this->factory->link()->standard($full_name, $link);
343 
344  return $this->renderer->render($link);
345  }
factory()
renderer()
+ 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 383 of file class.ilIndividualAssessmentMembersTableGUI.php.

References txt().

Referenced by getContent().

383  : array
384  {
385  if (is_null($record_note)) {
386  return [];
387  }
388 
389  return [$this->txt("iass_record") => $record_note];
390  }
+ Here is the call graph for this function:
+ 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 296 of file class.ilIndividualAssessmentMembersTableGUI.php.

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

Referenced by getSubheadline().

296  : string
297  {
298  if ($status == 0) {
300  }
301 
302  if (!$finalized && !is_null($examiner_id)) {
303  return $this->txt('iass_assessment_not_completed');
304  }
305 
306  return $this->getEntryForStatus($status);
307  }
+ 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 119 of file class.ilIndividualAssessmentMembersTableGUI.php.

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

Referenced by render().

119  : string
120  {
121  if (!$this->iass_access->mayViewUser($record->id()) && !$this->iass_access->mayGradeUser($record->id())) {
122  return "";
123  }
124 
125  $examiner_id = $record->examinerId();
126  return $this->txt("grading") . ": " . $this->getStatus($record->finalized(), $record->LPStatus(), $examiner_id);
127  }
getStatus(bool $finalized, int $status, ?int $examiner_id=null)
Returns readable status.
+ 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 347 of file class.ilIndividualAssessmentMembersTableGUI.php.

References ilObjectFactory\getInstanceByObjId().

Referenced by getChangedByInformation(), and getGradedByInformation().

347  : bool
348  {
349  $user = ilObjectFactory::getInstanceByObjId($examiner_id);
350  return (
351  ($user->getPref('public_profile') == 'y') ||
352  $user->getPref('public_profile') == 'g'
353  );
354  }
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
+ 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 444 of file class.ilIndividualAssessmentMembersTableGUI.php.

References checkAmendable(), and checkEditable().

Referenced by getLocationInfos().

444  : bool
445  {
446  return
447  $this->checkEditable($finalized, $usr_id, $examiner_id) ||
448  $this->checkAmendable($finalized) ||
449  $this->iass_access->mayViewUser($usr_id)
450  ;
451  }
checkAmendable(bool $finalized)
Check the current user has amended permission on record.
checkEditable(bool $finalized, int $usr_id, ?int $examiner_id=null)
Check the current user has edit permission on record.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ render()

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

Renders the presentation table.

Parameters
ILIAS

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

References factory(), getAction(), getContent(), getFurtherFields(), getHeadline(), getImportantInfos(), getSubheadline(), ILIAS\UI\Factory\listing(), renderer(), txt(), ILIAS\GlobalScreen\Scope\Footer\Factory\withAction(), and ILIAS\UI\Component\Table\PresentationRow\withHeadline().

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

◆ setData()

ilIndividualAssessmentMembersTableGUI::setData ( array  $data)

Set data to show in table.

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

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

◆ txt()

ilIndividualAssessmentMembersTableGUI::txt ( string  $code)
protected

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

References ILIAS\Repository\lng().

Referenced by getAction(), getChangedByInformation(), getEntryForStatus(), getFileDownloadLink(), getFurtherFields(), getGradedByInformation(), getGradedInformation(), getInternalRecordNote(), getLocationInfos(), getRecordNote(), getStatus(), getSubheadline(), and render().

521  : string
522  {
523  return $this->lng->txt($code);
524  }
+ 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 511 of file class.ilIndividualAssessmentMembersTableGUI.php.

Referenced by checkDownloadFile().

511  : bool
512  {
513  return $this->iass_access->mayViewUser($usr_id) || $this->iass_access->mayGradeUser($usr_id);
514  }
+ Here is the caller graph for this function:

◆ wasEditedByViewer()

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

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

References null.

Referenced by checkEditable().

516  : bool
517  {
518  return $examiner_id === $this->current_user_id || null === $examiner_id;
519  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilIndividualAssessmentMembersTableGUI::$ctrl
protected

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

Referenced by __construct().

◆ $current_user

ilObjUser ilIndividualAssessmentMembersTableGUI::$current_user
protected

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

Referenced by __construct().

◆ $current_user_id

int ilIndividualAssessmentMembersTableGUI::$current_user_id
protected

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

Referenced by getContent().

◆ $data

array ilIndividualAssessmentMembersTableGUI::$data = []
protected

◆ $date_formatter

ilIndividualAssessmentDateFormatter ilIndividualAssessmentMembersTableGUI::$date_formatter
protected

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

Referenced by __construct().

◆ $factory

Factory ilIndividualAssessmentMembersTableGUI::$factory
protected

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

Referenced by __construct().

◆ $iass_access

IndividualAssessmentAccessHandler ilIndividualAssessmentMembersTableGUI::$iass_access
protected

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

Referenced by __construct().

◆ $lng

ilLanguage ilIndividualAssessmentMembersTableGUI::$lng
protected

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

Referenced by __construct().

◆ $parent

ilIndividualAssessmentMembersGUI ilIndividualAssessmentMembersTableGUI::$parent
protected

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

Referenced by __construct().

◆ $renderer

Renderer ilIndividualAssessmentMembersTableGUI::$renderer
protected

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

Referenced by __construct().


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