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