ILIAS  release_7 Revision v7.30-3-g800a261c036
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, 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...
 

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...
 
 getGradedByInformation (?int $graded_by_id)
 
 getChangedByInformation (?int $changed_by_id, ?DateTime $change_date)
 
 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 (?DateTimeImmutable $event_time)
 Returns informations about the grading. More...
 
 getFullNameFor (int $user_id=null)
 Returns login of examinier. More...
 
 getProfileLink (string $full_name, int $user_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...
 
 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,
IndividualAssessmentAccessHandler  $iass_access,
Factory  $factory,
Renderer  $renderer,
int  $current_user_id 
)

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

30 {
31 $this->parent = $parent;
32 $this->lng = $lng;
33 $this->ctrl = $ctrl;
34 $this->iass_access = $iass_access;
35 $this->factory = $factory;
36 $this->renderer = $renderer;
37 $this->current_user_id = $current_user_id;
38 }
$factory
Definition: metadata.php:58
$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 452 of file class.ilIndividualAssessmentMembersTableGUI.php.

452 : bool
453 {
454 if (
455 ($this->userIsSystemAdmin() && $finalized)
456 || ($finalized && $this->userMayAmendGrades())
457 ) {
458 return true;
459 }
460
461 return false;
462 }

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

479 : bool
480 {
481 if ((!is_null($file_name) && $file_name !== '')
482 && ($this->userIsSystemAdmin() || $this->userMayDownloadAttachment($usr_id))
483 ) {
484 return true;
485 }
486
487 return false;
488 }

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

437 : bool
438 {
439 if (
440 ($this->userIsSystemAdmin() && !$finalized)
441 || (!$finalized && $this->userMayEditGradesOf($usr_id) && $this->wasEditedByViewer($examiner_id))
442 ) {
443 return true;
444 }
445
446 return false;
447 }

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

467 : bool
468 {
469 if (($this->userIsSystemAdmin() && !$finalized) || (!$finalized && $this->userMayEditMembers())) {
470 return true;
471 }
472
473 return false;
474 }

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

227 : Dropdown
228 {
229 $items = [];
230
231 $examiner_id = $record->examinerId();
232 $usr_id = (int) $record->id();
233 $finalized = $record->finalized();
234 $file_name = $record->fileName();
235
236 $this->ctrl->setParameterByClass('ilIndividualAssessmentMemberGUI', 'usr_id', $usr_id);
237
238 if ($this->checkEditable($finalized, $examiner_id, $usr_id)) {
239 $target = $this->ctrl->getLinkTargetByClass(ilIndividualAssessmentMemberGUI::class, 'edit');
240 $items[] = $ui_factory->button()->shy($this->txt('iass_usr_edit'), $target);
241 }
242
243 if ($this->checkUserRemoveable($finalized)) {
244 $this->ctrl->setParameterByClass('ilIndividualAssessmentMembersGUI', 'usr_id', $usr_id);
245 $target = $this->ctrl->getLinkTargetByClass('ilIndividualAssessmentMembersGUI', 'removeUserConfirmation');
246 $items[] = $ui_factory->button()->shy($this->txt('iass_usr_remove'), $target);
247 $this->ctrl->setParameterByClass('ilIndividualAssessmentMembersGUI', 'usr_id', null);
248 }
249
250 if ($this->checkAmendable($finalized)) {
251 $target = $this->ctrl->getLinkTargetByClass('ilIndividualAssessmentMemberGUI', 'amend');
252 $items[] = $ui_factory->button()->shy($this->txt('iass_usr_amend'), $target);
253 }
254
255 if ($this->checkDownloadFile($usr_id, $file_name)) {
256 $target = $this->ctrl->getLinkTargetByClass('ilIndividualAssessmentMemberGUI', 'downloadFile');
257 $items[] = $ui_factory->button()->shy($this->txt('iass_usr_download_attachment'), $target);
258 }
259 $this->ctrl->setParameterByClass('ilIndividualAssessmentMemberGUI', 'usr_id', null);
260
261 $action = $ui_factory->dropdown()->standard($items)->withLabel($this->txt("actions"));
262 return $action;
263 }
checkAmendable(bool $finalized)
Check the current user has amend 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 $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.
This describes commonalities between all types of Dropdowns.
Definition: Dropdown.php:16

References checkAmendable(), checkDownloadFile(), checkEditable(), checkUserRemoveable(), ilIndividualAssessmentMember\examinerId(), ilIndividualAssessmentMember\fileName(), ilIndividualAssessmentMember\finalized(), ilIndividualAssessmentMember\id(), and txt().

Referenced by render().

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

◆ getChangedByInformation()

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

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

151 : array
152 {
153 if (is_null($changed_by_id)) {
154 return [];
155 }
156
157 $changed_date_str = "";
158 if (!is_null($change_date)) {
159 $dt = new ilDate($change_date->format("Y-m-d"), IL_CAL_DATE);
160 $changed_date_str = ilDatePresentation::formatDate($dt);
161 }
162
163 $full_name = $this->getFullNameFor($changed_by_id);
164 if (!$this->hasPublicProfile($changed_by_id)) {
165 return [$this->txt('iass_changed_by') => $full_name . ' ' . $changed_date_str];
166 }
167
168 return [
169 $this->txt('iass_changed_by') => $this->getProfileLink($full_name, $changed_by_id) . ' ' . $changed_date_str
170 ];
171 }
const IL_CAL_DATE
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
Class for single dates.
getFullNameFor(int $user_id=null)
Returns login of examinier.

References ilDatePresentation\formatDate(), getFullNameFor(), getProfileLink(), hasPublicProfile(), IL_CAL_DATE, and txt().

+ Here is the call graph for this function:

◆ getContent()

ilIndividualAssessmentMembersTableGUI::getContent ( ilIndividualAssessmentMember  $record)
protected

Return all content elements for each row.

Returns
string[]

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

178 : array
179 {
180 $examiner_id = $record->examinerId();
181 if (
182 !$this->checkEditable($record->finalized(), $examiner_id, (int) $record->id())
183 && !$this->checkAmendable($record->finalized())
184 && !$this->userMayViewGrades()
185 && !$this->userMayEditGrades()
186 ) {
187 return [];
188 }
189
190 $usr_id = (int) $record->id();
191 $file_name = $record->fileName();
192
193 return array_merge(
194 $this->getRecordNote($record->record()),
195 $this->getInternalRecordNote($record->internalNote()),
196 $this->checkDownloadFile($usr_id, $file_name)
197 ? $this->getFileDownloadLink($usr_id, $file_name)
198 : []
199 );
200 }
getRecordNote(string $record_note)
Returns inforamtions out of record note.

References checkEditable(), ilIndividualAssessmentMember\examinerId(), ilIndividualAssessmentMember\fileName(), ilIndividualAssessmentMember\finalized(), 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 405 of file class.ilIndividualAssessmentMembersTableGUI.php.

405 : string
406 {
407 switch ($a_status) {
409 return $this->txt('iass_status_pending');
410 break;
412 return $this->txt('iass_status_completed');
413 break;
415 return $this->txt('iass_status_failed');
416 break;
417 default:
418 throw new ilIndividualAssessmentException("Invalid status: " . $a_status);
419 }
420 }

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

Referenced by getStatus().

+ Here is the caller graph for this function:

◆ getFileDownloadLink()

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

Get the link for download of file.

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

390 : array
391 {
392 $this->ctrl->setParameterByClass('ilIndividualAssessmentMemberGUI', 'usr_id', $usr_id);
393 $target = $this->ctrl->getLinkTargetByClass('ilIndividualAssessmentMemberGUI', ilIndividualAssessmentMemberGUI::CMD_DOWNLOAD_FILE);
394 $this->ctrl->setParameterByClass('ilIndividualAssessmentMemberGUI', 'usr_id', null);
395 $link = $this->factory->link()->standard($this->txt("iass_download"), $target);
396
397 return array(
398 $this->txt("iass_file") => $this->renderer->render($link)
399 );
400 }

References ilIndividualAssessmentMemberGUI\CMD_DOWNLOAD_FILE.

◆ getFullNameFor()

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

Returns login of examinier.

Returns
string[]

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

303 : string
304 {
305 if (is_null($user_id)) {
306 return "";
307 }
308
309 $name_fields = ilObjUser::_lookupName($user_id);
310 $name = $name_fields["lastname"] . ", " . $name_fields["firstname"] . " [" . $name_fields["login"] . "]";
311
312 return $name;
313 }
static _lookupName($a_user_id)
lookup user name
if($format !==null) $name
Definition: metadata.php:230

References $name, and ilObjUser\_lookupName().

Referenced by getChangedByInformation(), and getGradedByInformation().

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

◆ getFurtherFields()

ilIndividualAssessmentMembersTableGUI::getFurtherFields ( ilIndividualAssessmentMember  $record)
protected

Returns all informations needed for further informations for each row.

Returns
string[]

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

207 : array
208 {
209 if (!$this->userMayViewGrades() && !$this->userMayEditGrades()) {
210 return [];
211 }
212
213 return array_merge(
214 $this->importantInfos($record),
215 $this->getLocationInfos(
216 $record->place(),
217 $record->finalized(),
218 $record->examinerId(),
219 (int) $record->id()
220 )
221 );
222 }
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\examinerId(), 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:

◆ getGradedByInformation()

ilIndividualAssessmentMembersTableGUI::getGradedByInformation ( ?int  $graded_by_id)
protected

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

135 : array
136 {
137 if (is_null($graded_by_id)) {
138 return [];
139 }
140
141 $full_name = $this->getFullNameFor($graded_by_id);
142 if (!$this->hasPublicProfile($graded_by_id)) {
143 return [$this->txt('iass_graded_by') => $full_name];
144 }
145
146 return [
147 $this->txt('iass_graded_by') => $this->getProfileLink($full_name, $graded_by_id)
148 ];
149 }

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

+ Here is the call graph for this function:

◆ getGradedInformations()

ilIndividualAssessmentMembersTableGUI::getGradedInformations ( ?DateTimeImmutable  $event_time)
protected

Returns informations about the grading.

Returns
string[]

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

286 : array
287 {
288 $event_time_str = "";
289 if (!is_null($event_time)) {
290 $dt = new ilDate($event_time->format("Y-m-d"), IL_CAL_DATE);
291 $event_time_str = ilDatePresentation::formatDate($dt);
292 }
293 return array(
294 $this->txt("iass_event_time") . ": " => $event_time_str
295 );
296 }

References ilDatePresentation\formatDate(), IL_CAL_DATE, 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 95 of file class.ilIndividualAssessmentMembersTableGUI.php.

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

Referenced by render().

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

◆ getInternalRecordNote()

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

Returns inforamtions out of internal record note.

Returns
string[]

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

377 {
378 if (is_null($internal_note)) {
379 $internal_note = "";
380 }
381
382 return array(
383 $this->txt("iass_internal_note") => $internal_note
384 );
385 }

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

345 : array {
346 if (!$this->viewLocation($finalized, $examiner_id, $usr_id)) {
347 return array();
348 }
349
350 if ($location == "" || is_null($location)) {
351 $location = $this->txt("none");
352 }
353
354 return array(
355 $this->txt("iass_location") . ": " => $location
356 );
357 }
$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  $full_name,
int  $user_id 
)
protected

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

316 {
317 $back_url = $this->ctrl->getLinkTarget($this->parent, "view");
318 $this->ctrl->setParameterByClass('ilpublicuserprofilegui', 'user_id', $user_id);
319 $this->ctrl->setParameterByClass('ilpublicuserprofilegui', "back_url", rawurlencode($back_url));
320 $link = $this->ctrl->getLinkTargetByClass('ilpublicuserprofilegui', 'getHTML');
321 $link = $this->factory->link()->standard($full_name, $link);
322
323 return $this->renderer->render($link);
324 }

Referenced by getChangedByInformation(), and getGradedByInformation().

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

364 : array
365 {
366 return array(
367 $this->txt("iass_record") => $record_note
368 );
369 }

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

268 : string
269 {
270 if ($status == 0) {
272 }
273
274 if (!$finalized && !is_null($examiner_id)) {
275 return $this->txt('iass_assessment_not_completed');
276 }
277
278 return $this->getEntryForStatus($status);
279 }

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

Referenced by getSubheadline().

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

◆ getSubheadline()

ilIndividualAssessmentMembersTableGUI::getSubheadline ( ilIndividualAssessmentMember  $record)
protected

Returns the subheadline for each row.

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

103 : string
104 {
105 if (!$this->userMayViewGrades() && !$this->userMayEditGrades()) {
106 return "";
107 }
108
109 $examiner_id = $record->examinerId();
110 return $this->txt("grading") . ": " . $this->getStatus($record->finalized(), $record->LPStatus(), $examiner_id);
111 }
getStatus(bool $finalized, int $status, int $examiner_id=null)
Returns readable status.

References ilIndividualAssessmentMember\examinerId(), ilIndividualAssessmentMember\finalized(), 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 326 of file class.ilIndividualAssessmentMembersTableGUI.php.

326 : bool
327 {
328 $user = ilObjectFactory::getInstanceByObjId($examiner_id);
329 return (
330 ($user->getPref('public_profile') == 'y') ||
331 $user->getPref('public_profile') == 'g'
332 );
333 }
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id

References ilObjectFactory\getInstanceByObjId().

Referenced by getChangedByInformation(), and getGradedByInformation().

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

◆ importantInfos()

ilIndividualAssessmentMembersTableGUI::importantInfos ( ilIndividualAssessmentMember  $record)
protected

Returns all informations needed for important row.

Returns
string[]

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

118 : array
119 {
120 $finalized = $record->finalized();
121
122 if ((!$this->userMayViewGrades() && !$this->userMayEditGrades()) || !$finalized) {
123 return [];
124 }
125
126 $dfdf = array_merge(
127 $this->getGradedInformations($record->eventTime()),
128 $this->getGradedByInformation($record->examinerId()),
129 $this->getChangedByInformation($record->changerId(), $record->changeTime())
130 );
131
132 return $dfdf;
133 }
getGradedInformations(?DateTimeImmutable $event_time)
Returns informations about the grading.

References ilIndividualAssessmentMember\changerId(), ilIndividualAssessmentMember\changeTime(), ilIndividualAssessmentMember\eventTime(), ilIndividualAssessmentMember\examinerId(), ilIndividualAssessmentMember\finalized(), getGradedInformations(), 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 57 of file class.ilIndividualAssessmentMembersTableGUI.php.

57 : string
58 {
59 $ptable = $this->factory->table()->presentation(
60 "",
61 $view_constrols,
62 function (
63 PresentationRow $row,
65 Factory $ui_factory,
66 $environment
67 ) {
68 $headline = $this->getHeadline($record);
69 $subheadline = $this->getSubheadline($record);
70 $important_infos = $this->importantInfos($record);
71 $further_fields = $this->getFurtherFields($record);
72 $content = $this->getContent($record);
73 $action = $this->getAction($record, $ui_factory);
74
75 $row = $row
76 ->withHeadline($headline)
77 ->withSubheadline($subheadline)
78 ->withImportantFields($important_infos)
79 ->withContent($ui_factory->listing()->descriptive($content))
80 ->withFurtherFieldsHeadline($this->txt("iass_further_field_headline"))
81 ->withFurtherFields($further_fields)
82 ->withAction($action);
83
84 return $row;
85 }
86 );
87
88 $data = array_slice($this->data, $offset, $limit);
89 return $this->renderer->render($ptable->withData($data));
90 }
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.
withHeadline($headline)
Get a row like this with the given headline.
This is how the factory for UI elements looks.
Definition: Factory.php:18
$data
Definition: storeScorm.php:23

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

+ Here is the call graph for this function:

◆ setData()

ilIndividualAssessmentMembersTableGUI::setData ( array  $data)

Set data to show in table.

Parameters
mixed[]$data
Returns
void

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

48 {
49 $this->data = $data;
50 }

References $data.

◆ txt()

ilIndividualAssessmentMembersTableGUI::txt ( string  $code)
protected

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

530 : string
531 {
532 return $this->lng->txt($code);
533 }

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

+ Here is the caller graph for this function:

◆ userIsSystemAdmin()

ilIndividualAssessmentMembersTableGUI::userIsSystemAdmin ( )
protected

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

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

◆ userMayAmendGrades()

ilIndividualAssessmentMembersTableGUI::userMayAmendGrades ( )
protected

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

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

◆ userMayDownloadAttachment()

ilIndividualAssessmentMembersTableGUI::userMayDownloadAttachment ( int  $usr_id)
protected

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

490 : bool
491 {
492 return $this->userMayViewGrades() || $this->userMayEditGrades() || $this->userMayEditGradesOf($usr_id);
493 }

◆ userMayEditGrades()

ilIndividualAssessmentMembersTableGUI::userMayEditGrades ( )
protected

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

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

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

+ Here is the caller graph for this function:

◆ userMayEditGradesOf()

ilIndividualAssessmentMembersTableGUI::userMayEditGradesOf ( int  $usr_id)
protected

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

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

◆ userMayEditMembers()

ilIndividualAssessmentMembersTableGUI::userMayEditMembers ( )
protected

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

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

◆ userMayViewGrades()

ilIndividualAssessmentMembersTableGUI::userMayViewGrades ( )
protected

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

495 : bool
496 {
497 return $this->iass_access->mayViewUser();
498 }

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

425 : bool
426 {
427 return
428 $this->checkEditable($finalized, $examiner_id, $usr_id)
429 || $this->checkAmendable($finalized)
430 || $this->userMayViewGrades()
431 ;
432 }

◆ wasEditedByViewer()

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

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

525 : bool
526 {
527 return $examiner_id === $this->current_user_id || null === $examiner_id;
528 }

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