ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilObjPollGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5require_once "./Services/Object/classes/class.ilObject2GUI.php";
6
19{
23 protected $help;
24
28 protected $tabs;
29
33 protected $nav_history;
34
38 protected $ui;
39
40 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $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 $lng = $DIC->language();
55 $this->ui = $DIC->ui();
56
57 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
58
59 $lng->loadLanguageModule("poll");
60 }
61
62 public function getType()
63 {
64 return "poll";
65 }
66
67 protected function afterSave(ilObject $a_new_object)
68 {
70
71 ilUtil::sendSuccess($this->lng->txt("object_added"), true);
72 $ilCtrl->redirect($this, "render");
73 }
74
75 protected function initEditCustomForm(ilPropertyFormGUI $a_form)
76 {
78
79 // activation
80
81 include_once "Services/Object/classes/class.ilObjectActivation.php";
82 $this->lng->loadLanguageModule('rep');
83
85 $section->setTitle($this->lng->txt('rep_activation_availability'));
86 $a_form->addItem($section);
87
88 // additional info only with multiple references
89 $act_obj_info = $act_ref_info = "";
90 if (sizeof(ilObject::_getAllReferences($this->object->getId())) > 1) {
91 $act_obj_info = ' ' . $this->lng->txt('rep_activation_online_object_info');
92 $act_ref_info = $this->lng->txt('rep_activation_access_ref_info');
93 }
94
95 $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'online');
96 $online->setInfo($this->lng->txt('poll_activation_online_info') . $act_obj_info);
97 $a_form->addItem($online);
98
99 include_once "Services/Form/classes/class.ilDateDurationInputGUI.php";
100 $dur = new ilDateDurationInputGUI($this->lng->txt('rep_visibility_until'), "access_period");
101 $dur->setShowTime(true);
102 $a_form->addItem($dur);
103
104
105 // period/results
106
108 $section->setTitle($this->lng->txt('poll_voting_period_and_results'));
109 $a_form->addItem($section);
110
111 $vdur = new ilDateDurationInputGUI($this->lng->txt('poll_voting_period_limited'), "voting_period");
112 $vdur->setShowTime(true);
113 $a_form->addItem($vdur);
114
115 $results = new ilRadioGroupInputGUI($lng->txt("poll_view_results"), "results");
116 $results->setRequired(true);
117 $results->addOption(new ilRadioOption(
118 $lng->txt("poll_view_results_always"),
120 ));
121 $results->addOption(new ilRadioOption(
122 $lng->txt("poll_view_results_never"),
124 ));
125 $results->addOption(new ilRadioOption(
126 $lng->txt("poll_view_results_after_vote"),
128 ));
129 $results->addOption(new ilRadioOption(
130 $lng->txt("poll_view_results_after_period"),
132 ));
133 $a_form->addItem($results);
134
135 $show_result_as = new ilRadioGroupInputGUI($lng->txt("poll_show_results_as"), "show_results_as");
136 $show_result_as->setRequired(true);
137 $result_bar = new ilRadioOption(
138 $lng->txt("poll_barchart"),
140 );
141 $show_result_as->addOption($result_bar);
142 $show_result_as->addOption(new ilRadioOption(
143 $lng->txt("poll_piechart"),
145 ));
146 $a_form->addItem($show_result_as);
147
148 $sort = new ilRadioGroupInputGUI($lng->txt("poll_result_sorting"), "sort");
149 $sort->setRequired(true);
150 $sort->addOption(new ilRadioOption($lng->txt("poll_result_sorting_answers"), 0));
151 $sort->addOption(new ilRadioOption($lng->txt("poll_result_sorting_votes"), 1));
152 $a_form->addItem($sort);
153
155 $section->setTitle($this->lng->txt('poll_comments'));
156 $a_form->addItem($section);
157
158 $comment = new ilCheckboxInputGUI($this->lng->txt('poll_comments'), 'comment');
159 //$comment->setInfo($this->lng->txt('poll_comments_info'));
160 $a_form->addItem($comment);
161 }
162
163 protected function getEditFormCustomValues(array &$a_values)
164 {
165 include_once "Services/Object/classes/class.ilObjectActivation.php";
166
167 $a_values["online"] = $this->object->IsOnline();
168 $a_values["results"] = $this->object->getViewResults();
169 $a_values["access_period"]["start"] = $this->object->getAccessBegin()
170 ? new ilDateTime($this->object->getAccessBegin(), IL_CAL_UNIX)
171 : null;
172 $a_values["access_period"]["end"] = $this->object->getAccessEnd()
173 ? new ilDateTime($this->object->getAccessEnd(), IL_CAL_UNIX)
174 : null;
175 $a_values["voting_period"]["start"] = $this->object->getVotingPeriodBegin()
176 ? new ilDateTime($this->object->getVotingPeriodBegin(), IL_CAL_UNIX)
177 : null;
178 $a_values["voting_period"]["end"] = $this->object->getVotingPeriodEnd()
179 ? new ilDateTime($this->object->getVotingPeriodEnd(), IL_CAL_UNIX)
180 : null;
181 $a_values["sort"] = $this->object->getSortResultByVotes();
182 $a_values["comment"] = $this->object->getShowComments();
183 $a_values["show_results_as"] = $this->object->getShowResultsAs();
184 }
185
186 protected function validateCustom(ilPropertyFormGUI $a_form)
187 {
188 #20594
189 if (!$a_form->getInput("voting_period") &&
190 $a_form->getInput("results") == ilObjPoll::VIEW_RESULTS_AFTER_PERIOD) {
191 ilUtil::sendFailure($this->lng->txt("form_input_not_valid"));
192 $a_form->getItemByPostVar("results")->setAlert($this->lng->txt("poll_view_results_after_period_impossible"));
193 return false;
194 }
195 return parent::validateCustom($a_form);
196 }
197
198 protected function updateCustom(ilPropertyFormGUI $a_form)
199 {
200 $this->object->setViewResults($a_form->getInput("results"));
201 $this->object->setOnline($a_form->getInput("online"));
202 $this->object->setSortResultByVotes($a_form->getInput("sort"));
203 $this->object->setShowComments($a_form->getInput("comment"));
204 $this->object->setShowResultsAs($a_form->getInput("show_results_as"));
205
206 include_once "Services/Object/classes/class.ilObjectActivation.php";
207 $period = $a_form->getItemByPostVar("access_period");
208 if ($period->getStart() && $period->getEnd()) {
209 $this->object->setAccessType(ilObjectActivation::TIMINGS_ACTIVATION);
210 $this->object->setAccessBegin($period->getStart()->get(IL_CAL_UNIX));
211 $this->object->setAccessEnd($period->getEnd()->get(IL_CAL_UNIX));
212 } else {
213 $this->object->setAccessType(ilObjectActivation::TIMINGS_DEACTIVATED);
214 }
215
216 $period = $a_form->getItemByPostVar("voting_period");
217 if ($period->getStart() && $period->getEnd()) {
218 $this->object->setVotingPeriod(1);
219 $this->object->setVotingPeriodBegin($period->getStart()->get(IL_CAL_UNIX));
220 $this->object->setVotingPeriodEnd($period->getEnd()->get(IL_CAL_UNIX));
221 } else {
222 $this->object->setVotingPeriodBegin(null);
223 $this->object->setVotingPeriodEnd(null);
224 $this->object->setVotingPeriod(0);
225 }
226 }
227
228 public function setTabs()
229 {
231 $ilHelp = $this->help;
232
233 $ilHelp->setScreenIdComponent("poll");
234
235 if ($this->checkPermissionBool("write")) {
236 $this->tabs_gui->addTab(
237 "content",
238 $lng->txt("content"),
239 $this->ctrl->getLinkTarget($this, "")
240 );
241 }
242
243 if ($this->checkPermissionBool("write")) {
244 $this->tabs_gui->addTab(
245 "settings",
246 $lng->txt("settings"),
247 $this->ctrl->getLinkTarget($this, "edit")
248 );
249
250 $this->tabs_gui->addTab(
251 "participants",
252 $lng->txt("poll_result"),
253 $this->ctrl->getLinkTarget($this, "showParticipants")
254 );
255
256 $this->tabs_gui->addTab(
257 "export",
258 $lng->txt("export"),
259 $this->ctrl->getLinkTargetByClass("ilexportgui", "")
260 );
261 }
262
263 // will add permissions if needed
264 parent::setTabs();
265 }
266
267 public function executeCommand()
268 {
271 $ilTabs = $this->tabs;
272 $ilNavigationHistory = $this->nav_history;
273
274 $next_class = $ilCtrl->getNextClass($this);
275 $cmd = $ilCtrl->getCmd();
276
277 $tpl->loadStandardTemplate();
278
279 // add entry to navigation history
280 if (!$this->getCreationMode() &&
281 $this->getAccessHandler()->checkAccess("read", "", $this->node_id)) {
282 $link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", "frameset");
283 $ilNavigationHistory->addItem($this->node_id, $link, "poll");
284 }
285
286 switch ($next_class) {
287 case "ilinfoscreengui":
288 $this->prepareOutput();
289 $this->infoScreenForward();
290 break;
291
292 case "ilcommonactiondispatchergui":
293 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
295 $this->ctrl->forwardCommand($gui);
296 break;
297
298 case "ilpermissiongui":
299 $this->prepareOutput();
300 $ilTabs->activateTab("id_permissions");
301 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
302 $perm_gui = new ilPermissionGUI($this);
303 $this->ctrl->forwardCommand($perm_gui);
304 break;
305
306 case "ilobjectcopygui":
307 include_once "./Services/Object/classes/class.ilObjectCopyGUI.php";
308 $cp = new ilObjectCopyGUI($this);
309 $cp->setType("poll");
310 $this->ctrl->forwardCommand($cp);
311 break;
312
313 case 'ilexportgui':
314 $this->prepareOutput();
315 $ilTabs->activateTab("export");
316 include_once("./Services/Export/classes/class.ilExportGUI.php");
317 $exp_gui = new ilExportGUI($this);
318 $exp_gui->addFormat("xml");
319 $ilCtrl->forwardCommand($exp_gui);
320 break;
321
322 default:
323 return parent::executeCommand();
324 }
325
326 return true;
327 }
328
329
330 // --- ObjectGUI End
331
332
336 public function render($a_form = null)
337 {
339 $ilTabs = $this->tabs;
342 $ilToolbar = $this->toolbar;
344 $ui = $this->ui;
345
346 if (!$this->checkPermissionBool("write")) {
347 ilUtil::sendInfo($lng->txt("no_permission"));
348 return;
349 }
350
351 $ilTabs->activateTab("content");
352
353 if (!$a_form) {
354 if ($this->object->countVotes()) {
355 $url = $ilCtrl->getLinkTarget($this, "showParticipants");
356
357 $mbox = $ui->factory()->messageBox()->info($lng->txt("poll_votes_no_edit"))
358 ->withLinks([$ui->factory()->link()->standard(
359 $lng->txt("poll_result"),
360 $url
361 )]);
362
363 $message = $ui->renderer()->render($mbox);
364 }
365
366 $a_form = $this->initQuestionForm($this->object->countVotes());
367 }
368
369 $tpl->setPermanentLink('poll', $this->node_id);
370
371 $tpl->setContent($message . $a_form->getHTML());
372 }
373
374 protected function initQuestionForm($a_read_only = false)
375 {
378
379 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
380 $form = new ilPropertyFormGUI();
381 $form->setFormAction($ilCtrl->getFormAction($this, "saveQuestion"));
382 $form->setTitle($lng->txt("obj_poll"));
383
384 $question = new ilTextAreaInputGUI($lng->txt("poll_question"), "question");
385 $question->setRequired(true);
386 $question->setCols(40);
387 $question->setRows(2);
388 $question->setValue($this->object->getQuestion());
389 $question->setDisabled($a_read_only);
390 $form->addItem($question);
391
392 $dimensions = " (" . ilObjPoll::getImageSize() . "px)";
393 $img = new ilImageFileInputGUI($lng->txt("poll_image") . $dimensions, "image");
394 $img->setDisabled($a_read_only);
395 $form->addItem($img);
396
397 // show existing file
398 $file = $this->object->getImageFullPath(true);
399 if ($file) {
400 $img->setImage($file);
401 }
402
403 $anonymous = new ilRadioGroupInputGUI($lng->txt("poll_mode"), "mode");
404 $anonymous->setRequired(true);
405 $option = new ilRadioOption($lng->txt("poll_mode_anonymous"), 0);
406 $option->setInfo($lng->txt("poll_mode_anonymous_info"));
407 $anonymous->addOption($option);
408 $option = new ilRadioOption($lng->txt("poll_mode_personal"), 1);
409 $option->setInfo($lng->txt("poll_mode_personal_info"));
410 $anonymous->addOption($option);
411 $anonymous->setValue($this->object->getNonAnonymous());
412 $anonymous->setDisabled($a_read_only);
413 $form->addItem($anonymous);
414
415 $nanswers = new ilNumberInputGUI($lng->txt("poll_max_number_of_answers"), "nanswers");
416 $nanswers->setRequired(true);
417 $nanswers->setMinValue(1);
418 $nanswers->setSize(3);
419 $nanswers->setValue($this->object->getMaxNumberOfAnswers());
420 $nanswers->setDisabled($a_read_only);
421 $form->addItem($nanswers);
422
423 $answers = new ilTextInputGUI($lng->txt("poll_answers"), "answers");
424 $answers->setRequired(true);
425 $answers->setMulti(true, true);
426 $answers->setDisabled($a_read_only);
427 $form->addItem($answers);
428
429 $multi_answers = array();
430 foreach ($this->object->getAnswers() as $idx => $item) {
431 if (!$idx) {
432 $answers->setValue($item["answer"]);
433 }
434 $multi_answers[] = $item["answer"];
435 }
436 $answers->setMultiValues($multi_answers);
437
438 if (!$a_read_only) {
439 $form->addCommandButton("saveQuestion", $lng->txt("save"));
440 }
441
442 return $form;
443 }
444
445 public function saveQuestion()
446 {
447 $form = $this->initQuestionForm();
448 if ($form->checkInput()) {
449 $this->object->setQuestion($form->getInput("question"));
450 $this->object->setNonAnonymous($form->getInput("mode"));
451
452 $image = $form->getItemByPostVar("image");
453 if ($_FILES["image"]["tmp_name"]) {
454 $this->object->uploadImage($_FILES["image"]);
455 } elseif ($image->getDeletionFlag()) {
456 $this->object->deleteImage();
457 }
458
459 $nr_of_anwers = $this->object->saveAnswers($form->getInput("answers"));
460
461 // #15073
462 $this->object->setMaxNumberOfAnswers(min($form->getInput("nanswers"), $nr_of_anwers));
463
464 if ($this->object->update()) {
465 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
466 $this->ctrl->redirect($this, "render");
467 }
468 }
469
470 $form->setValuesByPost();
471 $this->render($form);
472 }
473
474 protected function setParticipantsSubTabs($a_active)
475 {
476 $ilTabs = $this->tabs;
479
480 if (!$this->object->getNonAnonymous()) {
481 return;
482 }
483
484 $ilTabs->addSubTab(
485 "result_answers",
486 $lng->txt("poll_result_answers"),
487 $ilCtrl->getLinkTarget($this, "showParticipants")
488 );
489 $ilTabs->addSubTab(
490 "result_users",
491 $lng->txt("poll_result_users"),
492 $ilCtrl->getLinkTarget($this, "showParticipantVotes")
493 );
494
495 $ilTabs->activateSubTab($a_active);
496 }
497
498 public function showParticipants()
499 {
501 $ilTabs = $this->tabs;
503
504 if (!$this->checkPermissionBool("write")) {
505 ilUtil::sendInfo($lng->txt("no_permission"));
506 return;
507 }
508
509 $ilTabs->activateTab("participants");
510 $this->setParticipantsSubTabs("result_answers");
511
512 include_once "Modules/Poll/classes/class.ilPollAnswerTableGUI.php";
513 $tbl = new ilPollAnswerTableGUI($this, "showParticipants");
514 $tpl->setContent($tbl->getHTML());
515 }
516
517 public function showParticipantVotes()
518 {
519 $ilTabs = $this->tabs;
522
523 if (!$this->checkPermissionBool("write") ||
524 !$this->object->getNonAnonymous()) {
525 ilUtil::sendInfo($lng->txt("no_permission"));
526 return;
527 }
528
529 $ilTabs->activateTab("participants");
530 $this->setParticipantsSubTabs("result_users");
531
532 include_once "Modules/Poll/classes/class.ilPollUserTableGUI.php";
533 $tbl = new ilPollUserTableGUI($this, "showParticipantVotes");
534 $tpl->setContent($tbl->getHTML());
535 }
536
537 public function confirmDeleteAllVotes()
538 {
541 $ilTabs = $this->tabs;
542
543 if (!$this->checkPermissionBool("write")) {
544 ilUtil::sendInfo($lng->txt("no_permission"));
545 return;
546 }
547
548 $ilTabs->activateTab("participants");
549
550 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
551 $cgui = new ilConfirmationGUI();
552 $cgui->setHeaderText($lng->txt("poll_delete_votes_sure"));
553
554 $cgui->setFormAction($this->ctrl->getFormAction($this));
555 $cgui->setCancel($lng->txt("cancel"), "showParticipants");
556 $cgui->setConfirm($lng->txt("confirm"), "deleteAllVotes");
557
558 $tpl->setContent($cgui->getHTML());
559 }
560
561 public function deleteAllVotes()
562 {
565
566 if (!$this->checkPermissionBool("write")) {
567 ilUtil::sendInfo($lng->txt("no_permission"));
568 return;
569 }
570
571 $this->object->deleteAllVotes();
572
573 $ilCtrl->redirect($this, "showParticipants");
574 }
575
576 public function vote()
577 {
580
581 $valid = true;
582 if ($this->object->getMaxNumberOfAnswers() > 1) {
583 if (sizeof($_POST["aw"]) > $this->object->getMaxNumberOfAnswers()) {
584 $valid = false;
585 }
586 if (!sizeof($_POST["aw"])) {
587 $valid = false;
588 }
589 } else {
590 if ((int) !$_POST["aw"]) {
591 $valid = false;
592 }
593 }
594
595 if ($valid) {
596 unset($_SESSION["last_poll_vote"][$this->object->getId()]);
597 $this->object->saveVote($ilUser->getId(), $_POST["aw"]);
598
599 $this->sendNotifications();
600 } else {
601 $_SESSION["last_poll_vote"][$this->object->getId()] = $_POST["aw"];
602 }
603
604 include_once "Services/Link/classes/class.ilLink.php";
605 ilUtil::redirect(ilLink::_getLink($tree->getParentId($this->ref_id)));
606 }
607
608 public function subscribe()
609 {
613
614 include_once "./Services/Notification/classes/class.ilNotification.php";
615 ilNotification::setNotification(ilNotification::TYPE_POLL, $ilUser->getId(), $this->object->getId(), true);
616
617 ilUtil::sendSuccess($lng->txt("settings_saved"), true);
618 include_once "Services/Link/classes/class.ilLink.php";
619 ilUtil::redirect(ilLink::_getLink($tree->getParentId($this->ref_id)));
620 }
621
622 public function unsubscribe()
623 {
627
628 include_once "./Services/Notification/classes/class.ilNotification.php";
629 ilNotification::setNotification(ilNotification::TYPE_POLL, $ilUser->getId(), $this->object->getId(), false);
630
631 ilUtil::sendSuccess($lng->txt("settings_saved"), true);
632 include_once "Services/Link/classes/class.ilLink.php";
633 ilUtil::redirect(ilLink::_getLink($tree->getParentId($this->ref_id)));
634 }
635
636 protected function sendNotifications()
637 {
639
640 // recipients
641 include_once "./Services/Notification/classes/class.ilNotification.php";
644 $this->object->getId(),
645 null,
646 true
647 );
648 if (!sizeof($users)) {
649 return;
650 }
651
652 include_once "./Services/Notification/classes/class.ilSystemNotification.php";
653 $ntf = new ilSystemNotification();
654 $ntf->setLangModules(array("poll"));
655 $ntf->setRefId($this->ref_id);
656
657 if ($this->object->getNonAnonymous()) {
658 $ntf->setChangedByUserId($ilUser->getId());
659 }
660
661 $ntf->setSubjectLangId('poll_vote_notification_subject');
662 $ntf->setIntroductionLangId('poll_vote_notification_body');
663 $ntf->setGotoLangId('poll_vote_notification_link');
664 $ntf->setReasonLangId('poll_vote_notification_reason');
665
666 $notified = $ntf->sendMail($users, null, "read");
667
668 ilNotification::updateNotificationTime(ilNotification::TYPE_POLL, $this->object->getId(), $notified);
669 }
670
676 public function getHTML()
677 {
678 }
679
680 public function addLocatorItems()
681 {
682 $ilLocator = $this->locator;
683
684 if (is_object($this->object)) {
685 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""), "", $this->node_id);
686 }
687 }
688
694 public static function _goto($a_target)
695 {
696 global $DIC;
697
698 $tree = $DIC->repositoryTree();
699 $ilAccess = $DIC->access();
700
701 $id = explode("_", $a_target);
702 $ref_id = $id[0];
703
704 // #13728 - used in notification mostly
705 if ($ilAccess->checkAccess("write", "", $ref_id)) {
706 $_GET["baseClass"] = "ilRepositoryGUI";
707 $_GET["ref_id"] = $ref_id;
708 $_GET["cmd"] = "showParticipants";
709 include("ilias.php");
710 exit;
711 } else {
712 // is sideblock: so show parent instead
713 $container_id = $tree->getParentId($ref_id);
714
715 // #11810
716 include_once "Services/Link/classes/class.ilLink.php";
717 ilUtil::redirect(ilLink::_getLink($container_id) .
718 "#poll" . ilObject::_lookupObjId($id[0]));
719 }
720 }
721}
user()
Definition: user.php:4
$section
Definition: Utf8Test.php:83
$comment
Definition: buildRTE.php:83
$_GET["client_id"]
$_POST["username"]
$_SESSION["AccountId"]
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_UNIX
This class represents a checkbox property in a property form.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Confirmation screen class.
input GUI for a time span (start and end date)
@classDescription Date and time handling
Export User Interface Class.
This class represents a section header in a property form.
This class represents an image file property in a property form.
static setNotification($type, $user_id, $id, $status=true)
Set notification status for object and user.
static getNotificationsForObject($type, $id, $page_id=null, $ignore_threshold=false)
Get all users for given object.
static updateNotificationTime($type, $id, array $user_ids, $page_id=false)
Update the last mail timestamp for given object and users.
This class represents a number property in a property form.
Class ilObjPollGUI.
getHTML()
return user view
render($a_form=null)
Render object context.
static _goto($a_target)
Deep link.
initEditCustomForm(ilPropertyFormGUI $a_form)
Add custom fields to update form.
executeCommand()
execute command
updateCustom(ilPropertyFormGUI $a_form)
Insert custom update form values into object.
validateCustom(ilPropertyFormGUI $a_form)
Validate custom values (if not possible with checkInput())
setTabs()
create tabs (repository/workspace switch)
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
getType()
Functions that must be overwritten.
addLocatorItems()
Functions to be overwritten.
initQuestionForm($a_read_only=false)
getEditFormCustomValues(array &$a_values)
Add values to custom edit fields.
setParticipantsSubTabs($a_active)
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.
getAccessHandler()
Get access handler.
prepareOutput($a_show_subobjects=true)
prepare output
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
getCreationMode()
get creation mode
GUI class for the workflow of copying objects.
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
static _getAllReferences($a_id)
get all reference ids of object
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
TableGUI class for poll answers.
TableGUI class for poll users.
This class represents a property form user interface.
addItem($a_item)
Add Item (Property, SectionHeader).
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
getItemByPostVar($a_post_var)
Get Item by POST variable.
This class represents a property in a property form.
This class represents an option in a radio group.
Wrapper classes for system notifications.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$valid
help()
Definition: help.php:2
global $ilCtrl
Definition: ilias.php:18
exit
Definition: login.php:29
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$url
$results
$ilUser
Definition: imgupload.php:18
ui()
Definition: ui.php:5
$message
Definition: xapiexit.php:14
$DIC
Definition: xapitoken.php:46