ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilIndividualAssessmentMembersTableGUI Class Reference

List of members fo iass. More...

+ Collaboration diagram for ilIndividualAssessmentMembersTableGUI:

Public Member Functions

 __construct (ilIndividualAssessmentMembersGUI $parent, ilLanguage $lng, ilCtrl $ctrl, ilIndividualAssessmentAccessHandler $iass_access, Factory $factory, Renderer $renderer, int $current_user_id)
 
 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...
 

Data Fields

const CHANGED = "changed"
 
const GRADED = "graded"
 

Protected Member Functions

 getHeadline (ilIndividualAssessmentMember $record)
 Returns the headline for each row. More...
 
 getSubheadline (ilIndividualAssessmentMember $record)
 Returns the subheadline for each row. More...
 
 importantInfos (ilIndividualAssessmentMember $record)
 Returns all informations needed for important row. More...
 
 getContent (ilIndividualAssessmentMember $record)
 Return all content elements for each row. More...
 
 getFurtherFields (ilIndividualAssessmentMember $record)
 Returns all informations needed for further informations for each row. More...
 
 getAction (ilIndividualAssessmentMember $record, $ui_factory)
 Return the ui control with executable actions. More...
 
 getStatus (bool $finalized, int $status, int $examiner_id=null)
 Returns readable status. More...
 
 getGradedInformations (ilDate $event_time)
 Returns informations about the grading. More...
 
 getFullNameFor (int $user_id=null)
 Returns login of examinier. More...
 
 getProfileLink (string $case, string $examiner, int $examiner_id)
 
 hasPublicProfile (int $examiner_id)
 
 getLocationInfos (string $location=null, bool $finalized, int $examiner_id=null, int $usr_id)
 Returns the location of assessment. More...
 
 getRecordNote (string $record_note)
 Returns inforamtions out of record note. More...
 
 getInternalRecordNote (string $internal_note=null)
 Returns inforamtions out of internal record note. More...
 
 getFileDownloadLink (int $usr_id, $file_name)
 Get the link for download of file. More...
 
 getEntryForStatus (int $a_status)
 Get text for lp status. More...
 
 getExaminerId (ilIndividualAssessmentMember $record)
 Returns the examnier id from record. More...
 
 getChangerId (ilIndividualAssessmentMember $record)
 
 viewLocation (bool $finalized, int $examiner_id=null, int $usr_id)
 Check user may view the location. More...
 
 checkEditable (bool $finalized, int $examiner_id=null, int $usr_id)
 Check the current user has edit permission on record. More...
 
 checkAmendable (bool $finalized)
 Check the current user has amend 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)
 
 userMayViewGrades ()
 
 userMayEditGrades ()
 
 userMayAmendGrades ()
 
 userMayEditMembers ()
 
 userIsSystemAdmin ()
 
 userMayEditGradesOf (int $usr_id)
 
 wasEditedByViewer (int $examiner_id=null)
 
 txt (string $code)
 

Detailed Description

List of members fo iass.

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

Constructor & Destructor Documentation

◆ __construct()

ilIndividualAssessmentMembersTableGUI::__construct ( ilIndividualAssessmentMembersGUI  $parent,
ilLanguage  $lng,
ilCtrl  $ctrl,
ilIndividualAssessmentAccessHandler  $iass_access,
Factory  $factory,
Renderer  $renderer,
int  $current_user_id 
)

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

References $factory, and $lng.

33  {
34  $this->parent = $parent;
35  $this->lng = $lng;
36  $this->ctrl = $ctrl;
37  $this->iass_access = $iass_access;
38  $this->factory = $factory;
39  $this->renderer = $renderer;
40  $this->current_user_id = $current_user_id;
41  }
$factory
Definition: metadata.php:43
$lng

Member Function Documentation

◆ checkAmendable()

ilIndividualAssessmentMembersTableGUI::checkAmendable ( bool  $finalized)
protected

Check the current user has amend permission on record.

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

References userIsSystemAdmin(), and userMayAmendGrades().

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

457  : bool
458  {
459  if (
460  ($this->userIsSystemAdmin() && $finalized)
461  || ($finalized && $this->userMayAmendGrades())
462  ) {
463  return true;
464  }
465 
466  return false;
467  }
+ Here is the call graph for this function:
+ 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 484 of file class.ilIndividualAssessmentMembersTableGUI.php.

References userIsSystemAdmin(), and userMayDownloadAttachment().

Referenced by getAction(), and getContent().

484  : bool
485  {
486  if ((!is_null($file_name) && $file_name !== '')
487  && ($this->userIsSystemAdmin() || $this->userMayDownloadAttachment($usr_id))
488  ) {
489  return true;
490  }
491 
492  return false;
493  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkEditable()

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

Check the current user has edit permission on record.

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

References userIsSystemAdmin(), userMayEditGradesOf(), and wasEditedByViewer().

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

442  : bool
443  {
444  if (
445  ($this->userIsSystemAdmin() && !$finalized)
446  || (!$finalized && $this->userMayEditGradesOf($usr_id) && $this->wasEditedByViewer($examiner_id))
447  ) {
448  return true;
449  }
450 
451  return false;
452  }
+ 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 472 of file class.ilIndividualAssessmentMembersTableGUI.php.

References userIsSystemAdmin(), and userMayEditMembers().

Referenced by getAction().

472  : bool
473  {
474  if (($this->userIsSystemAdmin() && !$finalized) || (!$finalized && $this->userMayEditMembers())) {
475  return true;
476  }
477 
478  return false;
479  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAction()

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

Return the ui control with executable actions.

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

References $action, $target, checkAmendable(), checkDownloadFile(), checkEditable(), checkUserRemoveable(), ilIndividualAssessmentMember\fileName(), ilIndividualAssessmentMember\finalized(), getExaminerId(), ilIndividualAssessmentMember\id(), and txt().

Referenced by render().

197  : Dropdown
198  {
199  $items = [];
200 
201  $examiner_id = $this->getExaminerId($record);
202  $usr_id = (int) $record->id();
203  $finalized = $record->finalized();
204  $file_name = $record->fileName();
205 
206  $this->ctrl->setParameterByClass('ilIndividualAssessmentMemberGUI', 'usr_id', $usr_id);
207 
208  if ($this->checkEditable($finalized, $examiner_id, $usr_id)) {
209  $target = $this->ctrl->getLinkTargetByClass('ilIndividualAssessmentMemberGUI', 'edit');
210  $items[] = $ui_factory->button()->shy($this->txt('iass_usr_edit'), $target);
211  }
212 
213  if ($this->checkUserRemoveable($finalized)) {
214  $this->ctrl->setParameterByClass('ilIndividualAssessmentMembersGUI', 'usr_id', $usr_id);
215  $target = $this->ctrl->getLinkTargetByClass('ilIndividualAssessmentMembersGUI', 'removeUserConfirmation');
216  $items[] = $ui_factory->button()->shy($this->txt('iass_usr_remove'), $target);
217  $this->ctrl->setParameterByClass('ilIndividualAssessmentMembersGUI', 'usr_id', null);
218  }
219 
220  if ($this->checkAmendable($finalized)) {
221  $target = $this->ctrl->getLinkTargetByClass('ilIndividualAssessmentMemberGUI', 'amend');
222  $items[] = $ui_factory->button()->shy($this->txt('iass_usr_amend'), $target);
223  }
224 
225  if ($this->checkDownloadFile($usr_id, $file_name)) {
226  $target = $this->ctrl->getLinkTargetByClass('ilIndividualAssessmentMemberGUI', 'downloadAttachment');
227  $items[] = $ui_factory->button()->shy($this->txt('iass_usr_download_attachment'), $target);
228  }
229  $this->ctrl->setParameterByClass('ilIndividualAssessmentMemberGUI', 'usr_id', null);
230 
231  $action = $ui_factory->dropdown()->standard($items)->withLabel($this->txt("actions"));
232  return $action;
233  }
getExaminerId(ilIndividualAssessmentMember $record)
Returns the examnier id from record.
$action
checkEditable(bool $finalized, int $examiner_id=null, int $usr_id)
Check the current user has edit permission on record.
finalized()
Is this membership allready finalized?
checkAmendable(bool $finalized)
Check the current user has amend permission on record.
This describes commonalities between all types of Dropdowns.
Definition: Dropdown.php:15
fileName()
Get the name of the uploaded file.
id()
Get the user id corresponding to this membership.
$target
Definition: test.php:19
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.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getChangerId()

ilIndividualAssessmentMembersTableGUI::getChangerId ( ilIndividualAssessmentMember  $record)
protected

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

References ilIndividualAssessmentMember\changerId().

Referenced by importantInfos().

417  {
418  $changer_id = $record->changerId();
419 
420  if (is_null($changer_id)) {
421  return null;
422  }
423 
424  return (int) $changer_id;
425  }
changerId()
Get the user id of the changer.
+ 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 148 of file class.ilIndividualAssessmentMembersTableGUI.php.

References checkAmendable(), checkDownloadFile(), checkEditable(), ilIndividualAssessmentMember\fileName(), ilIndividualAssessmentMember\finalized(), getExaminerId(), getFileDownloadLink(), getInternalRecordNote(), getRecordNote(), ilIndividualAssessmentMember\id(), ilIndividualAssessmentMember\internalNote(), ilIndividualAssessmentMember\record(), userMayEditGrades(), and userMayViewGrades().

Referenced by render().

148  : array
149  {
150  $examiner_id = $this->getExaminerId($record);
151  if (
152  !$this->checkEditable($record->finalized(), $examiner_id, (int) $record->id())
153  && !$this->checkAmendable($record->finalized())
154  && !$this->userMayViewGrades()
155  && !$this->userMayEditGrades()
156  ) {
157  return [];
158  }
159 
160  $usr_id = (int) $record->id();
161  $file_name = $record->fileName();
162 
163  return array_merge(
164  $this->getRecordNote($record->record()),
165  $this->getInternalRecordNote($record->internalNote()),
166  $this->checkDownloadFile($usr_id, $file_name)
167  ? $this->getFileDownloadLink($usr_id, $file_name)
168  : []
169  );
170  }
getExaminerId(ilIndividualAssessmentMember $record)
Returns the examnier id from record.
getRecordNote(string $record_note)
Returns inforamtions out of record note.
checkEditable(bool $finalized, int $examiner_id=null, int $usr_id)
Check the current user has edit permission on record.
finalized()
Is this membership allready finalized?
checkAmendable(bool $finalized)
Check the current user has amend permission on record.
getInternalRecordNote(string $internal_note=null)
Returns inforamtions out of internal record note.
getFileDownloadLink(int $usr_id, $file_name)
Get the link for download of file.
fileName()
Get the name of the uploaded file.
id()
Get the user id corresponding to this membership.
checkDownloadFile(int $usr_id, string $file_name=null)
Check the current user is allowed to download the record 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 382 of file class.ilIndividualAssessmentMembersTableGUI.php.

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

Referenced by getStatus().

382  : string
383  {
384  switch ($a_status) {
386  return $this->txt('iass_status_pending');
387  break;
389  return $this->txt('iass_status_completed');
390  break;
392  return $this->txt('iass_status_failed');
393  break;
395  return $this->txt('iass_assessment_not_completed');
396  break;
397  }
398  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getExaminerId()

ilIndividualAssessmentMembersTableGUI::getExaminerId ( ilIndividualAssessmentMember  $record)
protected

Returns the examnier id from record.

Returns
int | null

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

References ilIndividualAssessmentMember\examinerId().

Referenced by getAction(), getContent(), getFurtherFields(), getSubheadline(), and importantInfos().

406  {
407  $examiner_id = $record->examinerId();
408 
409  if (is_null($examiner_id)) {
410  return null;
411  }
412 
413  return (int) $examiner_id;
414  }
examinerId()
Get the user id of the examiner.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFileDownloadLink()

ilIndividualAssessmentMembersTableGUI::getFileDownloadLink ( int  $usr_id,
  $file_name 
)
protected

Get the link for download of file.

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

References $target, and txt().

Referenced by getContent().

367  : array
368  {
369  $this->ctrl->setParameterByClass('ilIndividualAssessmentMemberGUI', 'usr_id', $usr_id);
370  $target = $this->ctrl->getLinkTargetByClass('ilIndividualAssessmentMemberGUI', 'downloadAttachment');
371  $this->ctrl->setParameterByClass('ilIndividualAssessmentMemberGUI', 'usr_id', null);
372  $link = $this->factory->link()->standard($this->txt("iass_download"), $target);
373 
374  return array(
375  $this->txt("iass_file") => $this->renderer->render($link)
376  );
377  }
$target
Definition: test.php:19
+ 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 examinier.

Returns
string[]

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

References $name, and ilObjUser\_lookupName().

Referenced by importantInfos().

268  : string
269  {
270  if (is_null($user_id)) {
271  return "";
272  }
273 
274  $name_fields = ilObjUser::_lookupName($user_id);
275  $name = $name_fields["lastname"] . ", " . $name_fields["firstname"] . " [" . $name_fields["login"] . "]";
276 
277  return $name;
278  }
static _lookupName($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 informations needed for further informations for each row.

Returns
string[]

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

References ilIndividualAssessmentMember\finalized(), getExaminerId(), getLocationInfos(), ilIndividualAssessmentMember\id(), importantInfos(), ilIndividualAssessmentMember\place(), userMayEditGrades(), and userMayViewGrades().

Referenced by render().

177  : array
178  {
179  if (!$this->userMayViewGrades() && !$this->userMayEditGrades()) {
180  return [];
181  }
182 
183  return array_merge(
184  $this->importantInfos($record),
185  $this->getLocationInfos(
186  $record->place(),
187  $record->finalized(),
188  $this->getExaminerId($record),
189  (int) $record->id()
190  )
191  );
192  }
getLocationInfos(string $location=null, bool $finalized, int $examiner_id=null, int $usr_id)
Returns the location of assessment.
getExaminerId(ilIndividualAssessmentMember $record)
Returns the examnier id from record.
finalized()
Is this membership allready finalized?
id()
Get the user id corresponding to this membership.
importantInfos(ilIndividualAssessmentMember $record)
Returns all informations needed for important row.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGradedInformations()

ilIndividualAssessmentMembersTableGUI::getGradedInformations ( ilDate  $event_time)
protected

Returns informations about the grading.

Returns
string[]

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

References ilDatePresentation\formatDate(), and txt().

Referenced by importantInfos().

256  : array
257  {
258  return array(
259  $this->txt("iass_event_time") . ": " => ilDatePresentation::formatDate($event_time)
260  );
261  }
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
+ 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 98 of file class.ilIndividualAssessmentMembersTableGUI.php.

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

Referenced by render().

98  : string
99  {
100  return $record->lastname() . ", " . $record->firstname();
101  }
firstname()
Get the examinee firstname corresponding to this membership.
lastname()
Get the examinee lastname corresponding to this membership.
+ 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 inforamtions out of internal record note.

Returns
string[]

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

References txt().

Referenced by getContent().

354  {
355  if (is_null($internal_note)) {
356  $internal_note = "";
357  }
358 
359  return array(
360  $this->txt("iass_internal_note") => $internal_note
361  );
362  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLocationInfos()

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

Returns the location of assessment.

Returns
string[]

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

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

Referenced by getFurtherFields().

322  : array {
323  if (!$this->viewLocation($finalized, $examiner_id, $usr_id)) {
324  return array();
325  }
326 
327  if ($location == "" || is_null($location)) {
328  $location = $this->txt("none");
329  }
330 
331  return array(
332  $this->txt("iass_location") . ": " => $location
333  );
334  }
$location
Definition: buildRTE.php:44
viewLocation(bool $finalized, int $examiner_id=null, int $usr_id)
Check user may view the location.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getProfileLink()

ilIndividualAssessmentMembersTableGUI::getProfileLink ( string  $case,
string  $examiner,
int  $examiner_id 
)
protected

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

References hasPublicProfile(), and txt().

Referenced by importantInfos().

281  {
282  if ($examiner === "") {
283  return array();
284  }
285 
286  if (!$this->hasPublicProfile($examiner_id)) {
287  return array(
288  $this->txt("iass_" . $case . "_by") => $examiner
289  );
290  }
291 
292  $back_url = $this->ctrl->getLinkTarget($this->parent, "view");
293  $this->ctrl->setParameterByClass('ilpublicuserprofilegui', 'user_id', $examiner_id);
294  $this->ctrl->setParameterByClass('ilpublicuserprofilegui', "back_url", rawurlencode($back_url));
295  $link = $this->ctrl->getLinkTargetByClass('ilpublicuserprofilegui', 'getHTML');
296  $link = $this->factory->link()->standard($examiner, $link);
297 
298  return array(
299  $this->txt("iass_" . $case . "_by") => $this->renderer->render($link)
300  );
301  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRecordNote()

ilIndividualAssessmentMembersTableGUI::getRecordNote ( string  $record_note)
protected

Returns inforamtions out of record note.

Returns
string[]

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

References txt().

Referenced by getContent().

341  : array
342  {
343  return array(
344  $this->txt("iass_record") => $record_note
345  );
346  }
+ 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 238 of file class.ilIndividualAssessmentMembersTableGUI.php.

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

Referenced by getSubheadline().

238  : string
239  {
240  if ($status == 0) {
242  }
243 
244  if (!$finalized && !is_null($examinerId)) {
246  }
247 
248  return $this->getEntryForStatus($status);
249  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSubheadline()

ilIndividualAssessmentMembersTableGUI::getSubheadline ( ilIndividualAssessmentMember  $record)
protected

Returns the subheadline for each row.

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

References ilIndividualAssessmentMember\finalized(), getExaminerId(), getStatus(), ilIndividualAssessmentMember\LPStatus(), txt(), userMayEditGrades(), and userMayViewGrades().

Referenced by render().

106  : string
107  {
108  if (!$this->userMayViewGrades() && !$this->userMayEditGrades()) {
109  return "";
110  }
111 
112  $examiner_id = $this->getExaminerId($record);
113  return $this->txt("grading") . ": " . $this->getStatus($record->finalized(), (int) $record->LPStatus(), $examiner_id);
114  }
getExaminerId(ilIndividualAssessmentMember $record)
Returns the examnier id from record.
finalized()
Is this membership allready finalized?
getStatus(bool $finalized, int $status, int $examiner_id=null)
Returns readable status.
LPStatus()
Get the LP-status corresponding to this membership.
+ 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 303 of file class.ilIndividualAssessmentMembersTableGUI.php.

References $user, and ilObjectFactory\getInstanceByObjId().

Referenced by getProfileLink().

303  : bool
304  {
306  return (
307  ($user->getPref('public_profile') == 'y') ||
308  $user->getPref('public_profile') == 'g'
309  );
310  }
$user
Definition: migrateto20.php:57
static getInstanceByObjId($a_obj_id, $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:

◆ importantInfos()

ilIndividualAssessmentMembersTableGUI::importantInfos ( ilIndividualAssessmentMember  $record)
protected

Returns all informations needed for important row.

Returns
string[]

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

References ilIndividualAssessmentMember\changerId(), ilIndividualAssessmentMember\eventTime(), ilIndividualAssessmentMember\finalized(), getChangerId(), getExaminerId(), getFullNameFor(), getGradedInformations(), getProfileLink(), userMayEditGrades(), and userMayViewGrades().

Referenced by getFurtherFields(), and render().

121  : array
122  {
123  $finalized = $record->finalized();
124 
125  if ((!$this->userMayViewGrades() && !$this->userMayEditGrades()) || !$finalized) {
126  return [];
127  }
128 
129  $changer = array();
130  if (!is_null($record->changerId())) {
131  $changer_id = $this->getChangerId($record);
132  $changer = $this->getProfileLink(self::CHANGED, $this->getFullNameFor($changer_id), $changer_id);
133  }
134 
135  $examiner_id = $this->getExaminerId($record);
136  return array_merge(
137  $this->getGradedInformations($record->eventTime()),
138  $this->getProfileLink(self::GRADED, $this->getFullNameFor($examiner_id), $examiner_id),
139  $changer
140  );
141  }
getExaminerId(ilIndividualAssessmentMember $record)
Returns the examnier id from record.
finalized()
Is this membership allready finalized?
changerId()
Get the user id of the changer.
getGradedInformations(ilDate $event_time)
Returns informations about the grading.
getProfileLink(string $case, string $examiner, int $examiner_id)
getFullNameFor(int $user_id=null)
Returns login of examinier.
+ 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 60 of file class.ilIndividualAssessmentMembersTableGUI.php.

References $action, $data, $row, data, getAction(), getContent(), getFurtherFields(), getHeadline(), getSubheadline(), importantInfos(), ILIAS\UI\Factory\listing(), txt(), and ILIAS\UI\Component\Table\PresentationRow\withHeadline().

60  : string
61  {
62  $ptable = $this->factory->table()->presentation(
63  "",
64  $view_constrols,
65  function (
68  Factory $ui_factory,
69  $environment
70  ) {
71  $headline = $this->getHeadline($record);
72  $subheadline = $this->getSubheadline($record);
73  $important_infos = $this->importantInfos($record);
74  $further_fields = $this->getFurtherFields($record);
75  $content = $this->getContent($record);
76  $action = $this->getAction($record, $ui_factory);
77 
78  $row = $row
79  ->withHeadline($headline)
80  ->withSubheadline($subheadline)
81  ->withImportantFields($important_infos)
82  ->withContent($ui_factory->listing()->descriptive($content))
83  ->withFurtherFieldsHeadline($this->txt("iass_further_field_headline"))
84  ->withFurtherFields($further_fields)
85  ->withAction($action);
86 
87  return $row;
88  }
89  );
90 
91  $data = array_slice($this->data, $offset, $limit);
92  return $this->renderer->render($ptable->withData($data));
93  }
$action
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 subheadline for each row.
getAction(ilIndividualAssessmentMember $record, $ui_factory)
Return the ui control with executable actions.
This is how the factory for UI elements looks.
Definition: Factory.php:15
$row
This describes a Row used in Presentation Table.
Edit the record of a user, set LP.
withHeadline($headline)
Get a row like this with the given headline.
$this data['403_header']
getFurtherFields(ilIndividualAssessmentMember $record)
Returns all informations needed for further informations for each row.
getHeadline(ilIndividualAssessmentMember $record)
Returns the headline for each row.
importantInfos(ilIndividualAssessmentMember $record)
Returns all informations needed for important row.
$data
Definition: bench.php:6
+ Here is the call graph for this function:

◆ setData()

ilIndividualAssessmentMembersTableGUI::setData ( array  $data)

Set data to show in table.

Parameters
mixed[]$data
Returns
void

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

References $data, and data.

51  {
52  $this->data = $data;
53  }
$this data['403_header']
$data
Definition: bench.php:6

◆ txt()

ilIndividualAssessmentMembersTableGUI::txt ( string  $code)
protected

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

Referenced by getAction(), getEntryForStatus(), getFileDownloadLink(), getGradedInformations(), getInternalRecordNote(), getLocationInfos(), getProfileLink(), getRecordNote(), getSubheadline(), and render().

535  : string
536  {
537  return $this->lng->txt($code);
538  }
$code
Definition: example_050.php:99
+ Here is the caller graph for this function:

◆ userIsSystemAdmin()

ilIndividualAssessmentMembersTableGUI::userIsSystemAdmin ( )
protected

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

Referenced by checkAmendable(), checkDownloadFile(), checkEditable(), and checkUserRemoveable().

520  : bool
521  {
522  return $this->iass_access->isSystemAdmin();
523  }
+ Here is the caller graph for this function:

◆ userMayAmendGrades()

ilIndividualAssessmentMembersTableGUI::userMayAmendGrades ( )
protected

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

Referenced by checkAmendable().

510  : bool
511  {
512  return $this->iass_access->mayAmendGradeUser();
513  }
+ Here is the caller graph for this function:

◆ userMayDownloadAttachment()

ilIndividualAssessmentMembersTableGUI::userMayDownloadAttachment ( int  $usr_id)
protected

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

References userMayEditGrades(), userMayEditGradesOf(), and userMayViewGrades().

Referenced by checkDownloadFile().

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

◆ userMayEditGrades()

ilIndividualAssessmentMembersTableGUI::userMayEditGrades ( )
protected

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

Referenced by getContent(), getFurtherFields(), getSubheadline(), importantInfos(), and userMayDownloadAttachment().

505  : bool
506  {
507  return $this->iass_access->mayGradeUser();
508  }
+ Here is the caller graph for this function:

◆ userMayEditGradesOf()

ilIndividualAssessmentMembersTableGUI::userMayEditGradesOf ( int  $usr_id)
protected

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

Referenced by checkEditable(), and userMayDownloadAttachment().

525  : bool
526  {
527  return $this->iass_access->mayGradeUserById($usr_id);
528  }
+ Here is the caller graph for this function:

◆ userMayEditMembers()

ilIndividualAssessmentMembersTableGUI::userMayEditMembers ( )
protected

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

Referenced by checkUserRemoveable().

515  : bool
516  {
517  return $this->iass_access->mayEditMembers();
518  }
+ Here is the caller graph for this function:

◆ userMayViewGrades()

ilIndividualAssessmentMembersTableGUI::userMayViewGrades ( )
protected

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

Referenced by getContent(), getFurtherFields(), getSubheadline(), importantInfos(), userMayDownloadAttachment(), and viewLocation().

500  : bool
501  {
502  return $this->iass_access->mayViewUser();
503  }
+ Here is the caller graph for this function:

◆ viewLocation()

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

Check user may view the location.

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

References checkAmendable(), checkEditable(), and userMayViewGrades().

Referenced by getLocationInfos().

430  : bool
431  {
432  return
433  $this->checkEditable($finalized, $examiner_id, $usr_id)
434  || $this->checkAmendable($finalized)
435  || $this->userMayViewGrades()
436  ;
437  }
checkEditable(bool $finalized, int $examiner_id=null, int $usr_id)
Check the current user has edit permission on record.
checkAmendable(bool $finalized)
Check the current user has amend permission on record.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wasEditedByViewer()

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

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

Referenced by checkEditable().

530  : bool
531  {
532  return $examiner_id === $this->current_user_id || null === $examiner_id;
533  }
+ Here is the caller graph for this function:

Field Documentation

◆ CHANGED

const ilIndividualAssessmentMembersTableGUI::CHANGED = "changed"

◆ GRADED

const ilIndividualAssessmentMembersTableGUI::GRADED = "graded"

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