ILIAS  release_8 Revision v8.24
class.ilObjPollGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
23
33{
34 protected ilHelpGUI $help;
35 protected ilTabsGUI $tabs;
39
40 public function __construct(int $a_id = 0, int $a_id_type = self::REPOSITORY_NODE_ID, int $a_parent_node_id = 0)
41 {
42 global $DIC;
43
44 $this->lng = $DIC->language();
45 $this->ctrl = $DIC->ctrl();
46 $this->help = $DIC["ilHelp"];
47 $this->tpl = $DIC["tpl"];
48 $this->tabs = $DIC->tabs();
49 $this->nav_history = $DIC["ilNavigationHistory"];
50 $this->toolbar = $DIC->toolbar();
51 $this->user = $DIC->user();
52 $this->tree = $DIC->repositoryTree();
53 $this->locator = $DIC["ilLocator"];
54 $this->ui_factory = $DIC->ui()->factory();
55 $this->ui_renderer = $DIC->ui()->renderer();
56
57 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
58
59 $this->lng->loadLanguageModule("poll");
60 }
61
62 public function getType(): string
63 {
64 return "poll";
65 }
66
67 protected function afterSave(ilObject $new_object): void
68 {
69 $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
70 $this->ctrl->redirect($this, "render");
71 }
72
73 protected function initEditCustomForm(ilPropertyFormGUI $a_form): void
74 {
75 // activation
76 $this->lng->loadLanguageModule('rep');
77
78 $section = new ilFormSectionHeaderGUI();
79 $section->setTitle($this->lng->txt('rep_activation_availability'));
80 $a_form->addItem($section);
81
82 // additional info only with multiple references
83 $act_obj_info = $act_ref_info = "";
84 if (count(ilObject::_getAllReferences($this->object->getId())) > 1) {
85 $act_obj_info = ' ' . $this->lng->txt('rep_activation_online_object_info');
86 $act_ref_info = $this->lng->txt('rep_activation_access_ref_info');
87 }
88
89 $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'online');
90 $online->setInfo($this->lng->txt('poll_activation_online_info') . $act_obj_info);
91 $a_form->addItem($online);
92
93 $dur = new ilDateDurationInputGUI($this->lng->txt('rep_visibility_until'), "access_period");
94 $dur->setShowTime(true);
95 $a_form->addItem($dur);
96
97
98 // period/results
99
100 $section = new ilFormSectionHeaderGUI();
101 $section->setTitle($this->lng->txt('poll_voting_period_and_results'));
102 $a_form->addItem($section);
103
104 $vdur = new ilDateDurationInputGUI($this->lng->txt('poll_voting_period_limited'), "voting_period");
105 $vdur->setShowTime(true);
106 $a_form->addItem($vdur);
107
108 $results = new ilRadioGroupInputGUI($this->lng->txt("poll_view_results"), "results");
109 $results->setRequired(true);
110 $results->addOption(new ilRadioOption(
111 $this->lng->txt("poll_view_results_always"),
113 ));
114 $results->addOption(new ilRadioOption(
115 $this->lng->txt("poll_view_results_never"),
117 ));
118 $results->addOption(new ilRadioOption(
119 $this->lng->txt("poll_view_results_after_vote"),
121 ));
122 $results->addOption(new ilRadioOption(
123 $this->lng->txt("poll_view_results_after_period"),
125 ));
126 $a_form->addItem($results);
127
128 $show_result_as = new ilRadioGroupInputGUI($this->lng->txt("poll_show_results_as"), "show_results_as");
129 $show_result_as->setRequired(true);
130 $result_bar = new ilRadioOption(
131 $this->lng->txt("poll_barchart"),
133 );
134 $show_result_as->addOption($result_bar);
135 $show_result_as->addOption(new ilRadioOption(
136 $this->lng->txt("poll_piechart"),
138 ));
139 $a_form->addItem($show_result_as);
140
141 $sort = new ilRadioGroupInputGUI($this->lng->txt("poll_result_sorting"), "sort");
142 $sort->setRequired(true);
143 $sort->addOption(new ilRadioOption($this->lng->txt("poll_result_sorting_answers"), "0"));
144 $sort->addOption(new ilRadioOption($this->lng->txt("poll_result_sorting_votes"), "1"));
145 $a_form->addItem($sort);
146
147 $section = new ilFormSectionHeaderGUI();
148 $section->setTitle($this->lng->txt('poll_comments'));
149 $a_form->addItem($section);
150
151 $comment = new ilCheckboxInputGUI($this->lng->txt('poll_comments'), 'comment');
152 //$comment->setInfo($this->lng->txt('poll_comments_info'));
153 $a_form->addItem($comment);
154 }
155
156 protected function getEditFormCustomValues(array &$a_values): void
157 {
158 $a_values["online"] = !$this->object->getOfflineStatus();
159 $a_values["results"] = $this->object->getViewResults();
160 $a_values["access_period"]["start"] = $this->object->getAccessBegin()
161 ? new ilDateTime($this->object->getAccessBegin(), IL_CAL_UNIX)
162 : null;
163 $a_values["access_period"]["end"] = $this->object->getAccessEnd()
164 ? new ilDateTime($this->object->getAccessEnd(), IL_CAL_UNIX)
165 : null;
166 $a_values["voting_period"]["start"] = $this->object->getVotingPeriodBegin()
167 ? new ilDateTime($this->object->getVotingPeriodBegin(), IL_CAL_UNIX)
168 : null;
169 $a_values["voting_period"]["end"] = $this->object->getVotingPeriodEnd()
170 ? new ilDateTime($this->object->getVotingPeriodEnd(), IL_CAL_UNIX)
171 : null;
172 $a_values["sort"] = (string) (int) $this->object->getSortResultByVotes();
173 $a_values["comment"] = $this->object->getShowComments();
174 $a_values["show_results_as"] = $this->object->getShowResultsAs();
175 }
176
177 protected function validateCustom(ilPropertyFormGUI $form): bool
178 {
179 #20594
180 if (!$form->getInput("voting_period") &&
181 (int) $form->getInput("results") === ilObjPoll::VIEW_RESULTS_AFTER_PERIOD) {
182 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("form_input_not_valid"));
183 $form->getItemByPostVar("results")->setAlert($this->lng->txt("poll_view_results_after_period_impossible"));
184 return false;
185 }
186 return parent::validateCustom($form);
187 }
188
189 protected function updateCustom(ilPropertyFormGUI $form): void
190 {
191 $this->object->setViewResults((int) $form->getInput("results"));
192 $this->object->setOfflineStatus(!((string) $form->getInput("online") === "1"));
193 $this->object->setSortResultByVotes((bool) $form->getInput("sort"));
194 $this->object->setShowComments((bool) $form->getInput("comment"));
195 $this->object->setShowResultsAs((int) $form->getInput("show_results_as"));
196
197 $period = $form->getItemByPostVar("access_period");
198 if ($period->getStart() && $period->getEnd()) {
199 $this->object->setAccessType(ilObjectActivation::TIMINGS_ACTIVATION);
200 $this->object->setAccessBegin($period->getStart()->get(IL_CAL_UNIX));
201 $this->object->setAccessEnd($period->getEnd()->get(IL_CAL_UNIX));
202 } else {
203 $this->object->setAccessType(ilObjectActivation::TIMINGS_DEACTIVATED);
204 }
205
206 $period = $form->getItemByPostVar("voting_period");
207 if ($period->getStart() && $period->getEnd()) {
208 $this->object->setVotingPeriod(true);
209 $this->object->setVotingPeriodBegin($period->getStart()->get(IL_CAL_UNIX));
210 $this->object->setVotingPeriodEnd($period->getEnd()->get(IL_CAL_UNIX));
211 } else {
212 $this->object->setVotingPeriodBegin(0);
213 $this->object->setVotingPeriodEnd(0);
214 $this->object->setVotingPeriod(false);
215 }
216 }
217
218 protected function setTabs(): void
219 {
220 $this->help->setScreenIdComponent("poll");
221
222 if ($this->checkPermissionBool("write")) {
223 $this->tabs_gui->addTab(
224 "content",
225 $this->lng->txt("content"),
226 $this->ctrl->getLinkTarget($this, "")
227 );
228 }
229
230 if ($this->checkPermissionBool("write")) {
231 $this->tabs_gui->addTab(
232 "settings",
233 $this->lng->txt("settings"),
234 $this->ctrl->getLinkTarget($this, "edit")
235 );
236
237 $this->tabs_gui->addTab(
238 "participants",
239 $this->lng->txt("poll_result"),
240 $this->ctrl->getLinkTarget($this, "showParticipants")
241 );
242
243 $this->tabs_gui->addTab(
244 "export",
245 $this->lng->txt("export"),
246 $this->ctrl->getLinkTargetByClass("ilexportgui", "")
247 );
248 }
249
250 // will add permissions if needed
251 parent::setTabs();
252 }
253
254 public function executeCommand(): void
255 {
256 $next_class = $this->ctrl->getNextClass($this);
257 $cmd = $this->ctrl->getCmd();
258
259 $this->tpl->loadStandardTemplate();
260
261 // add entry to navigation history
262 if (!$this->getCreationMode() &&
263 $this->getAccessHandler()->checkAccess("read", "", $this->node_id)) {
264 $link = $this->ctrl->getLinkTargetByClass("ilrepositorygui", "frameset");
265 $this->nav_history->addItem($this->node_id, $link, "poll");
266 }
267
268 switch ($next_class) {
269 case "ilcommonactiondispatchergui":
271 $this->ctrl->forwardCommand($gui);
272 break;
273
274 case "ilpermissiongui":
275 $this->prepareOutput();
276 $this->tabs->activateTab("id_permissions");
277 $perm_gui = new ilPermissionGUI($this);
278 $this->ctrl->forwardCommand($perm_gui);
279 break;
280
281 case "ilobjectcopygui":
282 $cp = new ilObjectCopyGUI($this);
283 $cp->setType("poll");
284 $this->ctrl->forwardCommand($cp);
285 break;
286
287 case 'ilexportgui':
288 $this->prepareOutput();
289 $this->tabs->activateTab("export");
290 $exp_gui = new ilExportGUI($this);
291 $exp_gui->addFormat("xml");
292 $this->ctrl->forwardCommand($exp_gui);
293 break;
294
295 default:
296 parent::executeCommand();
297 }
298 }
299
300 public function render(?ilPropertyFormGUI $a_form = null): void
301 {
302 if (!$this->checkPermissionBool("write")) {
303 $this->tpl->setOnScreenMessage('info', $this->lng->txt("no_permission"));
304 return;
305 }
306
307 $this->tabs->activateTab("content");
308
309 $message = "";
310 if (!$a_form) {
311 if ($this->object->countVotes()) {
312 $url = $this->ctrl->getLinkTarget($this, "showParticipants");
313
314 $mbox = $this->ui_factory->messageBox()->info($this->lng->txt("poll_votes_no_edit"))
315 ->withLinks([$this->ui_factory->link()->standard(
316 $this->lng->txt("poll_result"),
317 $url
318 )]);
319
320 $message = $this->ui_renderer->render($mbox);
321 }
322
323 $a_form = $this->initQuestionForm((bool) $this->object->countVotes());
324 }
325
326 $this->tpl->setPermanentLink('poll', $this->node_id);
327
328 $this->tpl->setContent($message . $a_form->getHTML());
329 }
330
331 protected function initQuestionForm(bool $a_read_only = false): ilPropertyFormGUI
332 {
333 $form = new ilPropertyFormGUI();
334 $form->setFormAction($this->ctrl->getFormAction($this, "saveQuestion"));
335 $form->setTitle($this->lng->txt("obj_poll"));
336
337 $question = new ilTextAreaInputGUI($this->lng->txt("poll_question"), "question");
338 $question->setRequired(true);
339 $question->setCols(40);
340 $question->setRows(2);
341 $question->setValue($this->object->getQuestion());
342 $question->setDisabled($a_read_only);
343 $form->addItem($question);
344
345 $dimensions = " (" . ilObjPoll::getImageSize() . "px)";
346 $img = new ilImageFileInputGUI($this->lng->txt("poll_image") . $dimensions, "image");
347 $img->setDisabled($a_read_only);
348 $form->addItem($img);
349
350 // show existing file
351 $file = $this->object->getImageFullPath(true);
352 if ($file) {
353 $img->setImage(ilWACSignedPath::signFile($file));
354 }
355
356 $anonymous = new ilRadioGroupInputGUI($this->lng->txt("poll_mode"), "mode");
357 $anonymous->setRequired(true);
358 $option = new ilRadioOption($this->lng->txt("poll_mode_anonymous"), "0");
359 $option->setInfo($this->lng->txt("poll_mode_anonymous_info"));
360 $anonymous->addOption($option);
361 $option = new ilRadioOption($this->lng->txt("poll_mode_personal"), "1");
362 $option->setInfo($this->lng->txt("poll_mode_personal_info"));
363 $anonymous->addOption($option);
364 $anonymous->setValue($this->object->getNonAnonymous() ? "1" : "0");
365 $anonymous->setDisabled($a_read_only);
366 $form->addItem($anonymous);
367
368 $nanswers = new ilNumberInputGUI($this->lng->txt("poll_max_number_of_answers"), "nanswers");
369 $nanswers->setRequired(true);
370 $nanswers->setMinValue(1);
371 $nanswers->setSize(3);
372 $nanswers->setValue((string) $this->object->getMaxNumberOfAnswers());
373 $nanswers->setDisabled($a_read_only);
374 $form->addItem($nanswers);
375
376 $answers = new ilTextInputGUI($this->lng->txt("poll_answers"), "answers");
377 $answers->setRequired(true);
378 $answers->setMulti(true, true);
379 $answers->setDisabled($a_read_only);
380 $form->addItem($answers);
381
382 $multi_answers = array();
383 foreach ($this->object->getAnswers() as $idx => $item) {
384 $answer = (string) ($item['answer'] ?? '');
385 if (!$idx) {
386 $answers->setValue($answer);
387 }
388 $multi_answers[] = $answer;
389 }
390 $answers->setMultiValues($multi_answers);
391
392 if (!$a_read_only) {
393 $form->addCommandButton("saveQuestion", $this->lng->txt("save"));
394 }
395
396 return $form;
397 }
398
399 public function saveQuestion(): void
400 {
401 $form = $this->initQuestionForm();
402 if ($form->checkInput()) {
403 $this->object->setQuestion((string) $form->getInput("question"));
404 $this->object->setNonAnonymous((bool) $form->getInput("mode"));
405
406 $image = $form->getItemByPostVar("image");
407 $res = $form->getFileUpload("image");
408 if (!empty($res)) {
409 $this->object->uploadImage($res);
410 } elseif ($image->getDeletionFlag()) {
411 $this->object->deleteImage();
412 }
413
414 $nr_of_anwers = $this->object->saveAnswers((array) $form->getInput("answers"));
415
416 // #15073
417 $this->object->setMaxNumberOfAnswers(min((int) $form->getInput("nanswers"), $nr_of_anwers));
418
419 if ($this->object->update()) {
420 $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
421 $this->ctrl->redirect($this, "render");
422 }
423 }
424
425 $form->setValuesByPost();
426 $this->render($form);
427 }
428
429 protected function setParticipantsSubTabs(string $a_active): void
430 {
431 if (!$this->object->getNonAnonymous()) {
432 return;
433 }
434
435 $this->tabs->addSubTab(
436 "result_answers",
437 $this->lng->txt("poll_result_answers"),
438 $this->ctrl->getLinkTarget($this, "showParticipants")
439 );
440 $this->tabs->addSubTab(
441 "result_users",
442 $this->lng->txt("poll_result_users"),
443 $this->ctrl->getLinkTarget($this, "showParticipantVotes")
444 );
445
446 $this->tabs->activateSubTab($a_active);
447 }
448
449 public function showParticipants(): void
450 {
451 if (!$this->checkPermissionBool("write")) {
452 $this->tpl->setOnScreenMessage('info', $this->lng->txt("no_permission"));
453 return;
454 }
455
456 $this->tabs->activateTab("participants");
457 $this->setParticipantsSubTabs("result_answers");
458
459 $tbl = new ilPollAnswerTableGUI($this, "showParticipants");
460 $this->tpl->setContent($tbl->getHTML());
461 }
462
463 public function showParticipantVotes(): void
464 {
465 if (!$this->checkPermissionBool("write") ||
466 !$this->object->getNonAnonymous()) {
467 $this->tpl->setOnScreenMessage('info', $this->lng->txt("no_permission"));
468 return;
469 }
470
471 $this->tabs->activateTab("participants");
472 $this->setParticipantsSubTabs("result_users");
473
474 $tbl = new ilPollUserTableGUI($this, "showParticipantVotes");
475 $this->tpl->setContent($tbl->getHTML());
476 }
477
478 public function confirmDeleteAllVotes(): void
479 {
480 if (!$this->checkPermissionBool("write")) {
481 $this->tpl->setOnScreenMessage('info', $this->lng->txt("no_permission"));
482 return;
483 }
484
485 $this->tabs->activateTab("participants");
486
487 $cgui = new ilConfirmationGUI();
488 $cgui->setHeaderText($this->lng->txt("poll_delete_votes_sure"));
489
490 $cgui->setFormAction($this->ctrl->getFormAction($this));
491 $cgui->setCancel($this->lng->txt("cancel"), "showParticipants");
492 $cgui->setConfirm($this->lng->txt("confirm"), "deleteAllVotes");
493
494 $this->tpl->setContent($cgui->getHTML());
495 }
496
497 public function deleteAllVotes(): void
498 {
499 if (!$this->checkPermissionBool("write")) {
500 $this->tpl->setOnScreenMessage('info', $this->lng->txt("no_permission"));
501 return;
502 }
503
504 $this->object->deleteAllVotes();
505
506 $this->ctrl->redirect($this, "showParticipants");
507 }
508
509 public function vote(): void
510 {
511 global $DIC;
512 $aw = (array) ($DIC->http()->request()->getParsedBody()['aw'] ?? array());
513
514 $valid = true;
515 if ($this->object->getMaxNumberOfAnswers() > 1) {
516 if (count($aw) > $this->object->getMaxNumberOfAnswers()) {
517 $valid = false;
518 }
519 if (!count($aw)) {
520 $valid = false;
521 }
522 } elseif ((int) !$aw) {
523 $valid = false;
524 }
525
526 $session_last_poll_vote = ilSession::get('last_poll_vote');
527 if ($valid && $this->user->getId() != ANONYMOUS_USER_ID) {
528 unset($session_last_poll_vote[$this->object->getId()]);
529 ilSession::set('last_poll_vote', $session_last_poll_vote);
530 $this->object->saveVote($this->user->getId(), $aw);
531
532 $this->sendNotifications();
533 } else {
534 $session_last_poll_vote[$this->object->getId()] = $aw;
535 ilSession::set('last_poll_vote', $session_last_poll_vote);
536 }
537
538 ilUtil::redirect(ilLink::_getLink($this->tree->getParentId($this->ref_id)));
539 }
540
541 public function subscribe(): void
542 {
543 ilNotification::setNotification(ilNotification::TYPE_POLL, $this->user->getId(), $this->object->getId(), true);
544
545 $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
546 ilUtil::redirect(ilLink::_getLink($this->tree->getParentId($this->ref_id)));
547 }
548
549 public function unsubscribe(): void
550 {
551 ilNotification::setNotification(ilNotification::TYPE_POLL, $this->user->getId(), $this->object->getId(), false);
552
553 $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
554 ilUtil::redirect(ilLink::_getLink($this->tree->getParentId($this->ref_id)));
555 }
556
557 protected function sendNotifications(): void
558 {
559 // recipients
562 $this->object->getId(),
563 null,
564 true
565 );
566 if (!count($users)) {
567 return;
568 }
569
570 $ntf = new ilSystemNotification();
571 $ntf->setLangModules(array("poll"));
572 $ntf->setRefId($this->ref_id);
573
574 $ntf->setSubjectLangId('poll_vote_notification_subject');
575 $ntf->setIntroductionLangId('poll_vote_notification_body');
576 $ntf->setGotoLangId('poll_vote_notification_link');
577 $ntf->setReasonLangId('poll_vote_notification_reason');
578
579 $notified = $ntf->sendMailAndReturnRecipients($users, null, "read");
580
582 }
583
584 protected function addLocatorItems(): void
585 {
586 if (is_object($this->object)) {
587 $this->locator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""), "", $this->node_id);
588 }
589 }
590
591 public static function _goto(string $a_target): void
592 {
593 global $DIC;
594
595 $tree = $DIC->repositoryTree();
596 $ilAccess = $DIC->access();
597 $ilCtrl = $DIC->ctrl();
598
599 $id = explode("_", $a_target);
600 $ref_id = (int) ($id[0] ?? 0);
601
602 // #13728 - used in notification mostly
603 if ($ilAccess->checkAccess("write", "", $ref_id)) {
604 $ilCtrl->setParameterByClass(self::class, "ref_id", $ref_id);
605 $ilCtrl->redirectByClass([ilRepositoryGUI::class, self::class,], "showParticipants");
606 } else {
607 // is sideblock: so show parent instead
608 $container_id = $tree->getParentId($ref_id);
609
610 // #11810
611 ilUtil::redirect(ilLink::_getLink($container_id) .
613 }
614 }
615}
$comment
Definition: buildRTE.php:72
const IL_CAL_UNIX
This class represents a checkbox property in a property form.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
@classDescription Date and time handling
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Help GUI class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Navigation History of Repository Items.
static updateNotificationTime(int $type, int $id, array $user_ids, ?int $page_id=null, bool $activate_new_entries=true)
Update the last mail timestamp for given object and users.
static getNotificationsForObject(int $type, int $id, ?int $page_id=null, bool $ignore_threshold=false)
Get all users/recipients for given object.
static setNotification(int $type, int $user_id, int $id, bool $status=true)
Set notification status for object and user.
This class represents a number property in a property form.
Class ilObjPollGUI.
render(?ilPropertyFormGUI $a_form=null)
afterSave(ilObject $new_object)
Post (successful) object creation hook.
validateCustom(ilPropertyFormGUI $form)
Validate custom values (if not possible with checkInput())
setParticipantsSubTabs(string $a_active)
initEditCustomForm(ilPropertyFormGUI $a_form)
Add custom fields to update form.
executeCommand()
execute command
setTabs()
create tabs (repository/workspace switch)
getType()
Functions that must be overwritten.
initQuestionForm(bool $a_read_only=false)
updateCustom(ilPropertyFormGUI $form)
Insert custom update form values into object.
addLocatorItems()
Functions to be overwritten.
static _goto(string $a_target)
getEditFormCustomValues(array &$a_values)
Add values to custom edit fields.
__construct(int $a_id=0, int $a_id_type=self::REPOSITORY_NODE_ID, int $a_parent_node_id=0)
ilNavigationHistory $nav_history
const VIEW_RESULTS_ALWAYS
const SHOW_RESULTS_AS_PIECHART
const VIEW_RESULTS_AFTER_VOTE
const SHOW_RESULTS_AS_BARCHART
static getImageSize()
const VIEW_RESULTS_AFTER_PERIOD
const VIEW_RESULTS_NEVER
New implementation of ilObjectGUI.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
prepareOutput(bool $show_sub_objects=true)
GUI class for the workflow of copying objects.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getAllReferences(int $id)
get all reference ids for object ID
static _lookupObjId(int $ref_id)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
TableGUI class for poll users.
This class represents a property form user interface.
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
getItemByPostVar(string $a_post_var)
This class represents a property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text area property in a property form.
This class represents a text property in a property form.
getParentId(int $a_node_id)
get parent id of given node
static redirect(string $a_script)
static signFile(string $path_to_file)
const ANONYMOUS_USER_ID
Definition: constants.php:27
$valid
global $DIC
Definition: feed.php:28
$img
Definition: imgupload.php:83
This is how the factory for UI elements looks.
Definition: Factory.php:38
An entity that renders components to a string output.
Definition: Renderer.php:31
$res
Definition: ltiservices.php:69
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$url
$results
$message
Definition: xapiexit.php:32