ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilIndividualAssessmentMemberGUI Class Reference
+ Inheritance diagram for ilIndividualAssessmentMemberGUI:
+ Collaboration diagram for ilIndividualAssessmentMemberGUI:

Public Member Functions

 __construct (protected ilCtrl $ctrl, protected ilLanguage $lng, protected ilGlobalPageTemplate $tpl, protected ilObjUser $user, protected Input\Factory $input_factory, protected MessageBox\Factory $messagebox_factory, protected Button\Factory $button_factory, protected Link\Factory $link_factory, protected Refinery\Factory $refinery_factory, protected Data\Factory $data_factory, protected Renderer $renderer, protected ServerRequest $request, protected ilIndividualAssessmentPrimitiveInternalNotificator $notificator, protected ilToolbarGUI $toolbar, protected ilObjIndividualAssessment $object, protected ilErrorHandling $error_object, protected ILIAS\Refinery\Factory $refinery, protected ILIAS\HTTP\Wrapper\RequestWrapper $request_wrapper, protected ilIndividualAssessmentDateFormatter $date_formatter, protected IRSS $irss, protected ilIndividualAssessmentGradingStakeholder $stakeholder,)
 
 executeCommand ()
 Since this is a ilCtrl aware UploadHandler executeCommand MUST be implemented. More...
 
 getInfoResult (string $identifier)
 
 getInfoForExistingFiles (array $file_ids)
 
 getFileIdentifierParameterName ()
 
 getUploadURL ()
 
 getExistingFileInfoURL ()
 
 setObject (ilObjIndividualAssessment $object)
 
 setParentGUI (ilIndividualAssessmentMembersGUI $parent_gui)
 
 getParentGUI ()
 
 handleAccessViolation ()
 
- Public Member Functions inherited from ILIAS\MetaData\OERExposer\OAIPMH\Handler\AbstractCtrlAwareUploadHandler
 __construct ()
 ilUIDemoFileUploadHandlerGUI constructor. More...
 
 getFileIdentifierParameterName ()
 
 getUploadURL ()
 
 getExistingFileInfoURL ()
 
 getFileRemovalURL ()
 
 executeCommand ()
 Since this is a ilCtrl aware UploadHandler executeCommand MUST be implemented. More...
 
 getInfoResult (string $identifier)
 
 getInfoForExistingFiles (array $file_ids)
 
 supportsChunkedUploads ()
 

Data Fields

const CMD_VIEW = 'view'
 
const CMD_EDIT = 'edit'
 
const CMD_UPDATE = 'update'
 
const CMD_FINALIZE = 'finalize'
 
const CMD_FINALIZE_CONFIRMATION = 'finalizeConfirmation'
 
const CMD_AMEND = 'amend'
 
const CMD_SAVE_AMEND = "saveAmend"
 
const CMD_DOWNLOAD_FILE = "downloadFile"
 
- Data Fields inherited from ILIAS\UI\Component\Input\Field\UploadHandler
const DEFAULT_FILE_ID_PARAMETER = 'file_id'
 

Protected Member Functions

 view ()
 
 edit ()
 
 amend ()
 
 getFormActionForCommand (string $cmd)
 
 downloadFile ()
 
 saveAmend ()
 
 buildForm (string $form_action, bool $may_be_edited, bool $amend=false)
 
 finalize ()
 
 finalizeConfirmation ()
 
 saveMember (ilIndividualAssessmentUserGrading $grading, bool $keep_examiner=false, bool $amend=false)
 
 getPossibleLPStates ()
 
 getUploadResult ()
 
 getRemoveResult (string $identifier)
 
 redirect (string $cmd)
 
 getObject ()
 
 getAccessHandler ()
 
 getExaminee ()
 
 getMember ()
 
 setToolbar ()
 
 mayBeEdited ()
 
 mayBeViewed ()
 
 mayBeAmended ()
 
 userMayGrade ()
 
 userMayView ()
 
 userMayAmend ()
 
 targetWasEditedByOtherUser (ilIndividualAssessmentMember $member)
 
 isFinalized ()
 
- Protected Member Functions inherited from ILIAS\MetaData\OERExposer\OAIPMH\Handler\AbstractCtrlAwareUploadHandler
 readChunkedInformation ()
 
 getUploadResult ()
 
 getRemoveResult (string $identifier)
 

Protected Attributes

ilIndividualAssessmentAccessHandler $iass_access = null
 
- Protected Attributes inherited from ILIAS\MetaData\OERExposer\OAIPMH\Handler\AbstractCtrlAwareUploadHandler
const CMD_UPLOAD = 'upload'
 
const CMD_REMOVE = 'remove'
 
const CMD_INFO = 'info'
 
HttpServices $http
 
ilCtrl $ctrl
 
FileUpload $upload
 
bool $is_chunked = false
 
int $chunk_index = 0
 
int $amount_of_chunks = 0
 
string $chunk_id = null
 
int $chunk_total_size = 0
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilIndividualAssessmentMemberGUI::__construct ( protected ilCtrl  $ctrl,
protected ilLanguage  $lng,
protected ilGlobalPageTemplate  $tpl,
protected ilObjUser  $user,
protected Input\Factory  $input_factory,
protected MessageBox\Factory  $messagebox_factory,
protected Button\Factory  $button_factory,
protected Link\Factory  $link_factory,
protected Refinery\Factory  $refinery_factory,
protected Data\Factory  $data_factory,
protected Renderer  $renderer,
protected ServerRequest  $request,
protected ilIndividualAssessmentPrimitiveInternalNotificator  $notificator,
protected ilToolbarGUI  $toolbar,
protected ilObjIndividualAssessment  $object,
protected ilErrorHandling  $error_object,
protected ILIAS\Refinery\Factory  $refinery,
protected ILIAS\HTTP\Wrapper\RequestWrapper  $request_wrapper,
protected ilIndividualAssessmentDateFormatter  $date_formatter,
protected IRSS  $irss,
protected ilIndividualAssessmentGradingStakeholder  $stakeholder 
)

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

References ILIAS\GlobalScreen\Provider\__construct().

72  {
74  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ amend()

ilIndividualAssessmentMemberGUI::amend ( )
protected

Definition at line 154 of file class.ilIndividualAssessmentMemberGUI.php.

References buildForm(), getFormActionForCommand(), handleAccessViolation(), ILIAS\Repository\lng(), mayBeAmended(), renderer(), and setToolbar().

154  : void
155  {
156  if (!$this->mayBeAmended()) {
157  $this->handleAccessViolation();
158  return;
159  }
160 
161  $this->setToolbar();
162  $form = $this->buildForm($this->getFormActionForCommand(self::CMD_SAVE_AMEND), true, true);
163  $form->withSubmitLabel($this->lng->txt("save_amend"));
164  $this->tpl->setContent($this->renderer->render($form));
165  }
buildForm(string $form_action, bool $may_be_edited, bool $amend=false)
renderer()
+ Here is the call graph for this function:

◆ buildForm()

ilIndividualAssessmentMemberGUI::buildForm ( string  $form_action,
bool  $may_be_edited,
bool  $amend = false 
)
protected

Definition at line 211 of file class.ilIndividualAssessmentMemberGUI.php.

References $lng, getMember(), getObject(), getPossibleLPStates(), and ILIAS\Repository\user().

Referenced by amend(), edit(), and view().

216  $section = $this->getMember()->getGrading()->toFormInput(
217  $this->input_factory->field(),
218  $this->data_factory,
219  $this->lng,
220  $this->refinery_factory,
221  $this,
222  $this->user->getDateFormat(),
223  $this->getObject()->getSettings()->getRecordTemplate(),
224  $this->getPossibleLPStates(),
225  $may_be_edited,
226  $this->getObject()->getSettings()->isEventTimePlaceRequired(),
227  $this->getObject()->getSettings()->isFileRequired(),
228  $amend
229  );
230 
231  $form = $this->input_factory->container()->form()->standard($form_action, [$section]);
232  return $form->withAdditionalTransformation(
233  $this->refinery_factory->custom()->transformation(
234  function ($values) use ($amend) {
235  return array_shift($values);
236  }
237  )
238  );
239  }
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ downloadFile()

ilIndividualAssessmentMemberGUI::downloadFile ( )
protected

Definition at line 176 of file class.ilIndividualAssessmentMemberGUI.php.

References getMember().

176  : void
177  {
178  $identifier = $this->getMember()->getGrading()->getFile();
179  $resource_id = $this->irss->manage()->find($identifier);
180  if ($resource_id) {
181  $this->irss->consume()->download($resource_id)->run();
182  }
183  }
+ Here is the call graph for this function:

◆ edit()

ilIndividualAssessmentMemberGUI::edit ( )
protected

Definition at line 111 of file class.ilIndividualAssessmentMemberGUI.php.

References buildForm(), ILIAS\Repository\ctrl(), finalizeConfirmation(), getFormActionForCommand(), getMember(), getObject(), handleAccessViolation(), ILIAS\Repository\lng(), mayBeEdited(), renderer(), saveMember(), setToolbar(), and ilIndividualAssessmentLPInterface\updateLPStatusOfMember().

111  : void
112  {
113  if (!$this->mayBeEdited()) {
114  $this->handleAccessViolation();
115  return;
116  }
117 
118  $this->setToolbar();
119  $form = $this->buildForm($this->getFormActionForCommand(self::CMD_UPDATE), true);
120  $this->tpl->setContent($this->renderer->render($form));
121  }
buildForm(string $form_action, bool $may_be_edited, bool $amend=false)
renderer()
+ Here is the call graph for this function:

◆ executeCommand()

ilIndividualAssessmentMemberGUI::executeCommand ( )

Since this is a ilCtrl aware UploadHandler executeCommand MUST be implemented.

The Implementation MUST make sure, the Upload and the Removal Command are handled correctly

Implements ILIAS\MetaData\OERExposer\OAIPMH\Handler\ilCtrlAwareUploadHandler.

Definition at line 76 of file class.ilIndividualAssessmentMemberGUI.php.

References ILIAS\Repository\ctrl().

76  : void
77  {
78  $cmd = $this->ctrl->getCmd();
79 
80  switch ($cmd) {
81  case self::CMD_VIEW:
82  case self::CMD_UPDATE:
83  case self::CMD_EDIT:
84  case self::CMD_FINALIZE:
85  case self::CMD_FINALIZE_CONFIRMATION:
86  case self::CMD_AMEND:
87  case self::CMD_SAVE_AMEND:
88  case self::CMD_DOWNLOAD_FILE:
89  $this->$cmd();
90  break;
91  case AbstractCtrlAwareUploadHandler::CMD_UPLOAD:
92  case AbstractCtrlAwareUploadHandler::CMD_REMOVE:
93  case AbstractCtrlAwareUploadHandler::CMD_INFO:
94  parent::executeCommand();
95  break;
96  default:
97  throw new LogicException("Unknown command $cmd");
98  }
99  }
+ Here is the call graph for this function:

◆ finalize()

ilIndividualAssessmentMemberGUI::finalize ( )
protected

Definition at line 241 of file class.ilIndividualAssessmentMemberGUI.php.

References Vendor\Package\$e, ILIAS\Repository\ctrl(), getMember(), getObject(), handleAccessViolation(), ILIAS\Repository\lng(), mayBeEdited(), ILIAS\Repository\object(), redirect(), and ilIndividualAssessmentLPInterface\updateLPStatusOfMember().

241  : void
242  {
243  if (!$this->mayBeEdited()) {
244  $this->handleAccessViolation();
245  return;
246  }
247 
248  $member = $this->getMember();
249  if (!$member->mayBeFinalized()) {
250  $this->tpl->setOnScreenMessage("failure", $this->lng->txt('iass_may_not_finalize'), true);
251  $this->redirect('edit');
252  return;
253  }
254 
255  try {
256  $grading = $member->getGrading()->withFinalized(true);
257  $member = $member->withGrading($grading);
258  $this->getObject()->membersStorage()->updateMember($member);
260  $this->tpl->setOnScreenMessage("failure", $e->getMessage(), true);
261  $this->redirect('edit');
262  return;
263  }
264 
265  if ($this->object->isActiveLP()) {
267  }
268 
269  try {
270  $member->maybeSendNotification($this->notificator);
271  $this->ctrl->redirectByClass(ilIndividualAssessmentMembersGUI::class, 'view');
272  } catch (ilIndividualAssessmentException $e) {
273  $this->tpl->setOnScreenMessage("failure", $e->getMessage(), true);
274  $this->redirect('edit');
275  return;
276  }
277 
278  $this->tpl->setOnScreenMessage("success", $this->lng->txt('iass_membership_finalized'), true);
279  $this->redirect('view');
280  }
static updateLPStatusOfMember(ilIndividualAssessmentMember $member)
+ Here is the call graph for this function:

◆ finalizeConfirmation()

ilIndividualAssessmentMemberGUI::finalizeConfirmation ( )
protected

Definition at line 282 of file class.ilIndividualAssessmentMemberGUI.php.

References $message, ILIAS\Repository\ctrl(), getExaminee(), ILIAS\Survey\Mode\getId(), handleAccessViolation(), ILIAS\Repository\lng(), mayBeEdited(), and renderer().

Referenced by edit().

282  : void
283  {
284  if (!$this->mayBeEdited()) {
285  $this->handleAccessViolation();
286  return;
287  }
288 
289  $message = $this->lng->txt('iass_finalize_user_qst');
290  $this->ctrl->setParameterByClass(self::class, 'usr_id', $this->getExaminee()->getId());
291  $finalize = $this->ctrl->getFormActionByClass(self::class, self::CMD_FINALIZE);
292  $cancel = $this->ctrl->getFormActionByClass(self::class, self::CMD_EDIT);
293  $this->ctrl->clearParameterByClass(self::class, 'usr_id');
294 
295  $buttons = [
296  $this->button_factory->standard($this->lng->txt('iass_confirm_finalize'), $finalize),
297  $this->button_factory->standard($this->lng->txt('iass_cancel'), $cancel)
298  ];
299 
300  $message_box = $this->messagebox_factory->confirmation($message)->withButtons($buttons);
301 
302  $this->tpl->setContent($this->renderer->render($message_box));
303  }
renderer()
$message
Definition: xapiexit.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAccessHandler()

ilIndividualAssessmentMemberGUI::getAccessHandler ( )
protected

Definition at line 456 of file class.ilIndividualAssessmentMemberGUI.php.

References $iass_access, and getObject().

Referenced by mayBeAmended(), mayBeEdited(), mayBeViewed(), userMayAmend(), userMayGrade(), and userMayView().

457  {
458  if (is_null($this->iass_access)) {
459  $this->iass_access = $this->getObject()->accessHandler();
460  }
461  return $this->iass_access;
462  }
ilIndividualAssessmentAccessHandler $iass_access
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getExaminee()

ilIndividualAssessmentMemberGUI::getExaminee ( )
protected

Definition at line 464 of file class.ilIndividualAssessmentMemberGUI.php.

Referenced by finalizeConfirmation(), getExistingFileInfoURL(), getFormActionForCommand(), getMember(), getUploadURL(), redirect(), and setToolbar().

464  : ilObjUser
465  {
466  return new ilObjUser($this->request_wrapper->retrieve('usr_id', $this->refinery->kindlyTo()->int()));
467  }
+ Here is the caller graph for this function:

◆ getExistingFileInfoURL()

ilIndividualAssessmentMemberGUI::getExistingFileInfoURL ( )
Returns
string of the URL where in GUI existing files are handled. The URL is called by GET with a field with name from getFileIdentifierParameterName() and the FileID of the desired file. Return a FI

Implements ILIAS\UI\Component\Input\Field\UploadHandler.

Definition at line 421 of file class.ilIndividualAssessmentMemberGUI.php.

References ILIAS\Repository\ctrl(), getExaminee(), ILIAS\Survey\Mode\getId(), and null.

421  : string
422  {
423  $this->ctrl->setParameter($this, 'usr_id', $this->getExaminee()->getId());
424  $link = $this->ctrl->getLinkTarget($this, self::CMD_INFO);
425  $this->ctrl->setParameter($this, 'usr_id', null);
426 
427  return $link;
428  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ getFileIdentifierParameterName()

ilIndividualAssessmentMemberGUI::getFileIdentifierParameterName ( )
Returns
string defaults to self::DEFAULT_FILE_ID_PARAMETER

Implements ILIAS\UI\Component\Input\Field\UploadHandler.

Definition at line 407 of file class.ilIndividualAssessmentMemberGUI.php.

Referenced by getInfoForExistingFiles(), getInfoResult(), getRemoveResult(), and getUploadResult().

407  : string
408  {
409  return 'iass';
410  }
+ Here is the caller graph for this function:

◆ getFormActionForCommand()

ilIndividualAssessmentMemberGUI::getFormActionForCommand ( string  $cmd)
protected

Definition at line 167 of file class.ilIndividualAssessmentMemberGUI.php.

References ILIAS\Repository\ctrl(), getExaminee(), and ILIAS\Survey\Mode\getId().

Referenced by amend(), and edit().

167  : string
168  {
169  $this->ctrl->setParameterByClass(self::class, 'usr_id', $this->getExaminee()->getId());
170  $action = $this->ctrl->getFormAction($this, $cmd);
171  $this->ctrl->clearParameterByClass(self::class, 'usr_id');
172 
173  return $action;
174  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInfoForExistingFiles()

ilIndividualAssessmentMemberGUI::getInfoForExistingFiles ( array  $file_ids)
Parameters
array$file_ids
Returns
BasicFileInfoResult[]

Implements ILIAS\UI\Component\Input\Field\UploadHandler.

Definition at line 387 of file class.ilIndividualAssessmentMemberGUI.php.

References $id, getFileIdentifierParameterName(), and null.

387  : array
388  {
389  $file_ids = array_filter($file_ids, fn($id) => $id !== "");
390  return array_map(function ($id) {
391  $resource_id = $this->irss->manage()->find($identifier);
392  if (!$resource_id) {
393  return null;
394  }
395  $resource = $this->irss->manage()->getResource($resource_id);
396  $info = $resource->getCurrentRevision()->getInformation();
397  return new BasicFileInfoResult(
399  $id,
400  $info->getTitle(),
401  $info->getSize(),
402  $info->getMimeType()
403  );
404  }, $file_ids);
405  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:

◆ getInfoResult()

ilIndividualAssessmentMemberGUI::getInfoResult ( string  $identifier)
Returns
null|FileInfoResult for the file with the given identifier or null if the file does not exist.

Implements ILIAS\UI\Component\Input\Field\UploadHandler.

Definition at line 369 of file class.ilIndividualAssessmentMemberGUI.php.

References getFileIdentifierParameterName(), and null.

369  : ?FileInfoResult
370  {
371  $resource_id = $this->irss->manage()->find($identifier);
372  if (!$resource_id) {
373  return null;
374  }
375  $resource = $this->irss->manage()->getResource($resource_id);
376  $info = $resource->getCurrentRevision()->getInformation();
377 
378  return new BasicFileInfoResult(
380  $identifier,
381  $info->getTitle(),
382  $info->getSize(),
383  $info->getMimeType()
384  );
385  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ getMember()

ilIndividualAssessmentMemberGUI::getMember ( )
protected

Definition at line 469 of file class.ilIndividualAssessmentMemberGUI.php.

References getExaminee(), and getObject().

Referenced by buildForm(), downloadFile(), edit(), finalize(), isFinalized(), saveAmend(), saveMember(), setToolbar(), userMayGrade(), and userMayView().

470  {
471  return $this->getObject()->membersStorage()->loadMember(
472  $this->getObject(),
473  $this->getExaminee()
474  );
475  }
Edit the record of a user, set LP.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getObject()

ilIndividualAssessmentMemberGUI::getObject ( )
protected

Definition at line 441 of file class.ilIndividualAssessmentMemberGUI.php.

Referenced by buildForm(), edit(), finalize(), getAccessHandler(), getMember(), saveAmend(), and saveMember().

442  {
443  return $this->object;
444  }
For the purpose of streamlining the grading and learning-process status definition outside of tests...
+ Here is the caller graph for this function:

◆ getParentGUI()

ilIndividualAssessmentMemberGUI::getParentGUI ( )

Definition at line 451 of file class.ilIndividualAssessmentMemberGUI.php.

452  {
453  return $this->parent_gui;
454  }
For the purpose of streamlining the grading and learning-process status definition outside of tests...

◆ getPossibleLPStates()

ilIndividualAssessmentMemberGUI::getPossibleLPStates ( )
protected

Definition at line 324 of file class.ilIndividualAssessmentMemberGUI.php.

References ILIAS\Repository\lng(), ilIndividualAssessmentMembers\LP_COMPLETED, ilIndividualAssessmentMembers\LP_FAILED, and ilIndividualAssessmentMembers\LP_IN_PROGRESS.

Referenced by buildForm().

324  : array
325  {
326  return [
327  ilIndividualAssessmentMembers::LP_IN_PROGRESS => $this->lng->txt('iass_status_pending'),
328  ilIndividualAssessmentMembers::LP_COMPLETED => $this->lng->txt('iass_status_completed'),
329  ilIndividualAssessmentMembers::LP_FAILED => $this->lng->txt('iass_status_failed')
330  ];
331  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRemoveResult()

ilIndividualAssessmentMemberGUI::getRemoveResult ( string  $identifier)
protected

Definition at line 354 of file class.ilIndividualAssessmentMemberGUI.php.

References $message, getFileIdentifierParameterName(), and ILIAS\Repository\lng().

354  : HandlerResult
355  {
356  $resource_id = $this->irss->manage()->find($identifier);
357  if ($resource_id) {
358  $this->irss->manage()->remove($resource_id, $this->stakeholder);
359  $status = HandlerResult::STATUS_OK;
360  $message = $this->lng->txt('iass_file_deleted');
361  } else {
362  $status = HandlerResult::STATUS_FAILED;
363  $identifier = '';
364  $message = 'no resource to delete';
365  }
366  return new BasicHandlerResult($this->getFileIdentifierParameterName(), $status, $identifier, $message);
367  }
$message
Definition: xapiexit.php:31
+ Here is the call graph for this function:

◆ getUploadResult()

ilIndividualAssessmentMemberGUI::getUploadResult ( )
protected

Definition at line 333 of file class.ilIndividualAssessmentMemberGUI.php.

References $message, getFileIdentifierParameterName(), ILIAS\FileUpload\DTO\UploadResult\isOK(), and ILIAS\Repository\upload().

333  : HandlerResult
334  {
335  $this->upload->process();
336  $array = $this->upload->getResults();
337  $result = end($array);
338 
339  if ($result instanceof UploadResult && $result->isOK()) {
340 
341  $resource_id = $this->irss->manage()->upload($result, $this->stakeholder);
342  $identifier = $resource_id->serialize();
343  $status = HandlerResult::STATUS_OK;
344  $message = 'Upload ok';
345  } else {
346  $status = HandlerResult::STATUS_FAILED;
347  $identifier = '';
348  $message = $result->getStatus()->getMessage();
349  }
350 
351  return new BasicHandlerResult($this->getFileIdentifierParameterName(), $status, $identifier, $message);
352  }
$message
Definition: xapiexit.php:31
+ Here is the call graph for this function:

◆ getUploadURL()

ilIndividualAssessmentMemberGUI::getUploadURL ( )
Returns
string of the URL where dropped files are sent to. This URL must make sure the upload is handled and a is returned as JSON.

Implements ILIAS\UI\Component\Input\Field\UploadHandler.

Definition at line 412 of file class.ilIndividualAssessmentMemberGUI.php.

References ILIAS\Repository\ctrl(), getExaminee(), ILIAS\Survey\Mode\getId(), and null.

412  : string
413  {
414  $this->ctrl->setParameter($this, 'usr_id', $this->getExaminee()->getId());
415  $link = $this->ctrl->getLinkTarget($this, self::CMD_UPLOAD);
416  $this->ctrl->setParameter($this, 'usr_id', null);
417 
418  return $link;
419  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ handleAccessViolation()

ilIndividualAssessmentMemberGUI::handleAccessViolation ( )

Definition at line 541 of file class.ilIndividualAssessmentMemberGUI.php.

References ILIAS\Repository\lng().

Referenced by amend(), edit(), finalize(), finalizeConfirmation(), saveAmend(), and view().

541  : void
542  {
543  $this->error_object->raiseError($this->lng->txt("msg_no_perm_read"), $this->error_object->WARNING);
544  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isFinalized()

ilIndividualAssessmentMemberGUI::isFinalized ( )
protected

Definition at line 536 of file class.ilIndividualAssessmentMemberGUI.php.

References getMember().

Referenced by mayBeAmended(), mayBeEdited(), and mayBeViewed().

536  : bool
537  {
538  return $this->getMember()->finalized();
539  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mayBeAmended()

ilIndividualAssessmentMemberGUI::mayBeAmended ( )
protected

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

References getAccessHandler(), isFinalized(), and userMayAmend().

Referenced by amend(), and saveAmend().

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

◆ mayBeEdited()

ilIndividualAssessmentMemberGUI::mayBeEdited ( )
protected

Definition at line 492 of file class.ilIndividualAssessmentMemberGUI.php.

References getAccessHandler(), isFinalized(), and userMayGrade().

Referenced by edit(), finalize(), and finalizeConfirmation().

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

◆ mayBeViewed()

ilIndividualAssessmentMemberGUI::mayBeViewed ( )
protected

Definition at line 497 of file class.ilIndividualAssessmentMemberGUI.php.

References getAccessHandler(), isFinalized(), userMayGrade(), and userMayView().

Referenced by view().

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

◆ redirect()

ilIndividualAssessmentMemberGUI::redirect ( string  $cmd)
protected

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

References ILIAS\Repository\ctrl(), getExaminee(), and ILIAS\Survey\Mode\getId().

Referenced by finalize().

430  : void
431  {
432  $this->ctrl->setParameterByClass(self::class, 'usr_id', $this->getExaminee()->getId());
433  $this->ctrl->redirect($this, $cmd);
434  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveAmend()

ilIndividualAssessmentMemberGUI::saveAmend ( )
protected

Definition at line 185 of file class.ilIndividualAssessmentMemberGUI.php.

References ILIAS\Repository\ctrl(), getMember(), getObject(), handleAccessViolation(), ILIAS\Repository\lng(), mayBeAmended(), saveMember(), and ilIndividualAssessmentLPInterface\updateLPStatusOfMember().

185  : void
186  {
187  if (!$this->mayBeAmended()) {
188  $this->handleAccessViolation();
189  return;
190  }
191 
192  $form = $this
193  ->buildForm($this->ctrl->getFormAction($this, self::CMD_AMEND), true, true)
194  ->withRequest($this->request)
195  ;
196 
197  $grading = $form->getData();
198 
199  if (!is_null($grading)) {
200  $this->saveMember($grading, true, true);
201 
202  if ($this->getObject()->isActiveLP()) {
204  }
205 
206  $this->tpl->setOnScreenMessage("success", $this->lng->txt('iass_amend_saved'), true);
207  $this->ctrl->redirectByClass(ilIndividualAssessmentMembersGUI::class, 'view');
208  }
209  }
static updateLPStatusOfMember(ilIndividualAssessmentMember $member)
saveMember(ilIndividualAssessmentUserGrading $grading, bool $keep_examiner=false, bool $amend=false)
+ Here is the call graph for this function:

◆ saveMember()

ilIndividualAssessmentMemberGUI::saveMember ( ilIndividualAssessmentUserGrading  $grading,
bool  $keep_examiner = false,
bool  $amend = false 
)
protected

Definition at line 305 of file class.ilIndividualAssessmentMemberGUI.php.

References getMember(), getObject(), and ILIAS\Repository\user().

Referenced by edit(), and saveAmend().

309  : void {
310  $member = $this->getMember()
311  ->withGrading($grading)
312  ;
313 
314  if ($amend) {
315  $member = $member->withChangerId($this->user->getId());
316  }
317 
318  if (!$keep_examiner) {
319  $member = $member->withExaminerId($this->user->getId());
320  }
321  $this->getObject()->membersStorage()->updateMember($member);
322  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setObject()

ilIndividualAssessmentMemberGUI::setObject ( ilObjIndividualAssessment  $object)

Definition at line 436 of file class.ilIndividualAssessmentMemberGUI.php.

436  : void
437  {
438  $this->object = $object;
439  }

◆ setParentGUI()

ilIndividualAssessmentMemberGUI::setParentGUI ( ilIndividualAssessmentMembersGUI  $parent_gui)

Definition at line 446 of file class.ilIndividualAssessmentMemberGUI.php.

446  : void
447  {
448  $this->parent_gui = $parent_gui;
449  }

◆ setToolbar()

ilIndividualAssessmentMemberGUI::setToolbar ( )
protected

Definition at line 477 of file class.ilIndividualAssessmentMemberGUI.php.

References $url, ILIAS\Repository\ctrl(), getExaminee(), ILIAS\Survey\Mode\getId(), getMember(), ILIAS\Repository\lng(), null, and ILIAS\Repository\toolbar().

Referenced by amend(), and edit().

477  : void
478  {
479  $member = $this->getMember();
480  if ($member->fileName() != '') {
481  $this->ctrl->setParameter($this, 'usr_id', $this->getExaminee()->getId());
482  $url = $this->ctrl->getLinkTarget($this, self::CMD_DOWNLOAD_FILE, "", false, true);
483  $this->ctrl->setParameter($this, 'usr_id', null);
484  $btn = $this->link_factory->standard(
485  $this->lng->txt('download_assessment_paper'),
486  $url
487  );
488  $this->toolbar->addComponent($btn);
489  }
490  }
$url
Definition: shib_logout.php:66
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ targetWasEditedByOtherUser()

ilIndividualAssessmentMemberGUI::targetWasEditedByOtherUser ( ilIndividualAssessmentMember  $member)
protected

Definition at line 528 of file class.ilIndividualAssessmentMemberGUI.php.

References ilIndividualAssessmentMember\examinerId(), ILIAS\Repository\int(), and ILIAS\Repository\user().

Referenced by userMayGrade().

528  : bool
529  {
530  return
531  (int) $member->examinerId() !== $this->user->getId() &&
532  0 !== (int) $member->examinerId()
533  ;
534  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ userMayAmend()

ilIndividualAssessmentMemberGUI::userMayAmend ( )
protected

Definition at line 523 of file class.ilIndividualAssessmentMemberGUI.php.

References getAccessHandler().

Referenced by mayBeAmended().

523  : bool
524  {
525  return $this->getAccessHandler()->mayAmendAllUsers();
526  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ userMayGrade()

ilIndividualAssessmentMemberGUI::userMayGrade ( )
protected

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

References getAccessHandler(), getMember(), and targetWasEditedByOtherUser().

Referenced by mayBeEdited(), and mayBeViewed().

510  : bool
511  {
512  return
513  $this->getAccessHandler()->isSystemAdmin() ||
514  (!$this->targetWasEditedByOtherUser($this->getMember()) && $this->getAccessHandler()->mayGradeUser($this->getMember()->id()))
515  ;
516  }
targetWasEditedByOtherUser(ilIndividualAssessmentMember $member)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ userMayView()

ilIndividualAssessmentMemberGUI::userMayView ( )
protected

Definition at line 518 of file class.ilIndividualAssessmentMemberGUI.php.

References getAccessHandler(), and getMember().

Referenced by mayBeViewed().

518  : bool
519  {
520  return $this->getAccessHandler()->mayViewUser($this->getMember()->id());
521  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ view()

ilIndividualAssessmentMemberGUI::view ( )
protected

Definition at line 101 of file class.ilIndividualAssessmentMemberGUI.php.

References buildForm(), handleAccessViolation(), mayBeViewed(), and renderer().

101  : void
102  {
103  if (!$this->mayBeViewed()) {
104  $this->handleAccessViolation();
105  return;
106  }
107  $form = $this->buildForm('', false);
108  $this->tpl->setContent($this->renderer->render($form));
109  }
buildForm(string $form_action, bool $may_be_edited, bool $amend=false)
renderer()
+ Here is the call graph for this function:

Field Documentation

◆ $iass_access

ilIndividualAssessmentAccessHandler ilIndividualAssessmentMemberGUI::$iass_access = null
protected

Definition at line 48 of file class.ilIndividualAssessmentMemberGUI.php.

Referenced by getAccessHandler().

◆ CMD_AMEND

const ilIndividualAssessmentMemberGUI::CMD_AMEND = 'amend'

Definition at line 44 of file class.ilIndividualAssessmentMemberGUI.php.

◆ CMD_DOWNLOAD_FILE

const ilIndividualAssessmentMemberGUI::CMD_DOWNLOAD_FILE = "downloadFile"

◆ CMD_EDIT

const ilIndividualAssessmentMemberGUI::CMD_EDIT = 'edit'

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

◆ CMD_FINALIZE

const ilIndividualAssessmentMemberGUI::CMD_FINALIZE = 'finalize'

Definition at line 42 of file class.ilIndividualAssessmentMemberGUI.php.

◆ CMD_FINALIZE_CONFIRMATION

const ilIndividualAssessmentMemberGUI::CMD_FINALIZE_CONFIRMATION = 'finalizeConfirmation'

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

◆ CMD_SAVE_AMEND

const ilIndividualAssessmentMemberGUI::CMD_SAVE_AMEND = "saveAmend"

Definition at line 45 of file class.ilIndividualAssessmentMemberGUI.php.

◆ CMD_UPDATE

const ilIndividualAssessmentMemberGUI::CMD_UPDATE = 'update'

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

◆ CMD_VIEW

const ilIndividualAssessmentMemberGUI::CMD_VIEW = 'view'

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


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