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.

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

References $factory, and $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.

457 : bool
458 {
459 if (
460 ($this->userIsSystemAdmin() && $finalized)
461 || ($finalized && $this->userMayAmendGrades())
462 ) {
463 return true;
464 }
465
466 return false;
467 }

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

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 }

Referenced by getAction().

+ 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.

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 }

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

472 : bool
473 {
474 if (($this->userIsSystemAdmin() && !$finalized) || (!$finalized && $this->userMayEditMembers())) {
475 return true;
476 }
477
478 return false;
479 }

Referenced by getAction().

+ 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.

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 }
finalized()
Is this membership allready finalized?
id()
Get the user id corresponding to this membership.
fileName()
Get the name of the uploaded file.
checkAmendable(bool $finalized)
Check the current user has amend permission on record.
getExaminerId(ilIndividualAssessmentMember $record)
Returns the examnier id from record.
checkDownloadFile(int $usr_id, string $file_name=null)
Check the current user is allowed to download the record file.
checkEditable(bool $finalized, int $examiner_id=null, int $usr_id)
Check the current user has edit permission on record.
checkUserRemoveable(bool $finalized)
Check the current user is allowed to remove the user.
$action
This describes commonalities between all types of Dropdowns.
Definition: Dropdown.php:16
$target
Definition: test.php:19

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

Referenced by render().

+ 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.

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.

References ilIndividualAssessmentMember\changerId().

Referenced by importantInfos().

+ 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.

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 }
getRecordNote(string $record_note)
Returns inforamtions out of record note.

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

Referenced by render().

+ 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.

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 }

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

Referenced by getStatus().

+ 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.

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.

References ilIndividualAssessmentMember\examinerId().

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

+ 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.

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 }

References $target.

◆ getFullNameFor()

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

Returns login of examinier.

Returns
string[]

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

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

References $name, and ilObjUser\_lookupName().

Referenced by importantInfos().

+ 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.

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 }
importantInfos(ilIndividualAssessmentMember $record)
Returns all informations needed for important row.
getLocationInfos(string $location=null, bool $finalized, int $examiner_id=null, int $usr_id)
Returns the location of assessment.

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

Referenced by render().

+ 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.

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 @access public.

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

Referenced by importantInfos().

+ 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.

98 : string
99 {
100 return $record->lastname() . ", " . $record->firstname();
101 }
lastname()
Get the examinee lastname corresponding to this membership.
firstname()
Get the examinee firstname corresponding to this membership.

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

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 inforamtions out of internal record note.

Returns
string[]

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

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 }

◆ 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.

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.

Referenced by getFurtherFields().

+ 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.

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 }

References hasPublicProfile(), and txt().

Referenced by importantInfos().

+ 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.

341 : array
342 {
343 return array(
344 $this->txt("iass_record") => $record_note
345 );
346 }

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

238 : string
239 {
240 if ($status == 0) {
242 }
243
244 if (!$finalized && !is_null($examinerId)) {
246 }
247
248 return $this->getEntryForStatus($status);
249 }

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

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 subheadline for each row.

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

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 }
LPStatus()
Get the LP-status corresponding to this membership.
getStatus(bool $finalized, int $status, int $examiner_id=null)
Returns readable status.

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

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

303 : bool
304 {
306 return (
307 ($user->getPref('public_profile') == 'y') ||
308 $user->getPref('public_profile') == 'g'
309 );
310 }
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
$user
Definition: migrateto20.php:57

References $user, and ilObjectFactory\getInstanceByObjId().

Referenced by getProfileLink().

+ 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.

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 }
getProfileLink(string $case, string $examiner, int $examiner_id)
getFullNameFor(int $user_id=null)
Returns login of examinier.
getGradedInformations(ilDate $event_time)
Returns informations about the grading.

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

Referenced by getFurtherFields(), and render().

+ 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\UI\Component\Component[]$view_constrols

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

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 }
Edit the record of a user, set LP.
getContent(ilIndividualAssessmentMember $record)
Return all content elements for each row.
getAction(ilIndividualAssessmentMember $record, $ui_factory)
Return the ui control with executable actions.
getSubheadline(ilIndividualAssessmentMember $record)
Returns the subheadline for each row.
getHeadline(ilIndividualAssessmentMember $record)
Returns the headline for each row.
getFurtherFields(ilIndividualAssessmentMember $record)
Returns all informations needed for further informations for each row.
This describes a Row used in Presentation Table.
This is how the factory for UI elements looks.
Definition: Factory.php:16
$row
$this data['403_header']
$data
Definition: bench.php:6

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

+ 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.

51 {
52 $this->data = $data;
53 }

References $data, and data.

◆ txt()

ilIndividualAssessmentMembersTableGUI::txt ( string  $code)
protected

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

535 : string
536 {
537 return $this->lng->txt($code);
538 }
$code
Definition: example_050.php:99

References $code.

Referenced by getAction(), getGradedInformations(), getProfileLink(), getSubheadline(), and render().

+ Here is the caller graph for this function:

◆ userIsSystemAdmin()

ilIndividualAssessmentMembersTableGUI::userIsSystemAdmin ( )
protected

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

520 : bool
521 {
522 return $this->iass_access->isSystemAdmin();
523 }

◆ userMayAmendGrades()

ilIndividualAssessmentMembersTableGUI::userMayAmendGrades ( )
protected

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

510 : bool
511 {
512 return $this->iass_access->mayAmendGradeUser();
513 }

◆ userMayDownloadAttachment()

ilIndividualAssessmentMembersTableGUI::userMayDownloadAttachment ( int  $usr_id)
protected

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

495 : bool
496 {
497 return $this->userMayViewGrades() || $this->userMayEditGrades() || $this->userMayEditGradesOf($usr_id);
498 }

◆ userMayEditGrades()

ilIndividualAssessmentMembersTableGUI::userMayEditGrades ( )
protected

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

505 : bool
506 {
507 return $this->iass_access->mayGradeUser();
508 }

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

+ Here is the caller graph for this function:

◆ userMayEditGradesOf()

ilIndividualAssessmentMembersTableGUI::userMayEditGradesOf ( int  $usr_id)
protected

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

525 : bool
526 {
527 return $this->iass_access->mayGradeUserById($usr_id);
528 }

◆ userMayEditMembers()

ilIndividualAssessmentMembersTableGUI::userMayEditMembers ( )
protected

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

515 : bool
516 {
517 return $this->iass_access->mayEditMembers();
518 }

◆ userMayViewGrades()

ilIndividualAssessmentMembersTableGUI::userMayViewGrades ( )
protected

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

500 : bool
501 {
502 return $this->iass_access->mayViewUser();
503 }

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

+ 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.

430 : bool
431 {
432 return
433 $this->checkEditable($finalized, $examiner_id, $usr_id)
434 || $this->checkAmendable($finalized)
435 || $this->userMayViewGrades()
436 ;
437 }

◆ wasEditedByViewer()

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

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

530 : bool
531 {
532 return $examiner_id === $this->current_user_id || null === $examiner_id;
533 }

Field Documentation

◆ CHANGED

const ilIndividualAssessmentMembersTableGUI::CHANGED = "changed"

◆ GRADED

const ilIndividualAssessmentMembersTableGUI::GRADED = "graded"

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