ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilObjGroupGUI.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once "./Services/Container/classes/class.ilContainerGUI.php";
6 include_once('./Modules/Group/classes/class.ilObjGroup.php');
7 
27 {
32  public function __construct($a_data,$a_id,$a_call_by_reference,$a_prepare_output = false)
33  {
34  global $ilSetting;
35 
36  $this->type = "grp";
37  parent::__construct($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
38 
39  $this->lng->loadLanguageModule('grp');
40 
41  $this->setting = $ilSetting;
42  }
43 
44  function executeCommand()
45  {
46  global $ilUser,$rbacsystem,$ilAccess, $ilNavigationHistory,$ilErr, $ilToolbar;
47 
48  $next_class = $this->ctrl->getNextClass($this);
49  $cmd = $this->ctrl->getCmd();
50  $this->prepareOutput();
51  // show repository tree
52  $this->showRepTree();
53 
54  // add entry to navigation history
55  if (!$this->getCreationMode() &&
56  $ilAccess->checkAccess("read", "", $_GET["ref_id"]))
57  {
58  include_once("./Services/Link/classes/class.ilLink.php");
59  $ilNavigationHistory->addItem($_GET["ref_id"],
60  ilLink::_getLink($_GET["ref_id"], "grp"), "grp");
61  }
62 
63  // if news timeline is landing page, redirect if necessary
64  if ($next_class == "" && $cmd == "" && $this->object->isNewsTimelineLandingPageEffective()
65  && $ilAccess->checkAccess("read", "", $_GET["ref_id"]))
66  {
67  $this->ctrl->redirectbyclass("ilnewstimelinegui");
68  }
69 
70  switch($next_class)
71  {
72  case 'ilgroupmembershipgui':
73 
74  $this->tabs_gui->activateTab('members');
75 
76  include_once './Modules/Group/classes/class.ilGroupMembershipGUI.php';
77  $mem_gui = new ilGroupMembershipGUI($this, $this->object);
78  $this->ctrl->forwardCommand($mem_gui);
79  break;
80 
81 
82  case 'ilgroupregistrationgui':
83  $this->ctrl->setReturn($this,'');
84  $this->tabs_gui->setTabActive('join');
85  include_once('./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
86  $registration = new ilGroupRegistrationGUI($this->object);
87  $this->ctrl->forwardCommand($registration);
88  break;
89 
90  case 'ilusersgallerygui':
91  $is_participant = (bool)ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId());
92  if(!$ilAccess->checkAccess('manage_members', '', $this->ref_id) &&
93  (
94  $this->object->getShowMembers() == $this->object->SHOW_MEMBERS_DISABLED ||
95  !$is_participant
96  ))
97  {
98  $ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $ilErr->MESSAGE);
99  }
100 
101  $this->addMailToMemberButton($ilToolbar, 'jump2UsersGallery');
102 
103  require_once 'Services/User/classes/class.ilUsersGalleryParticipants.php';
104  require_once 'Services/User/classes/class.ilUsersGalleryGUI.php';
105  $this->setSubTabs('members');
106  $this->tabs_gui->setTabActive('members');
107  $this->tabs_gui->setSubTabActive('grp_members_gallery');
108 
109  $provider = new ilUsersGalleryParticipants($this->object->members_obj);
110  $gallery_gui = new ilUsersGalleryGUI($provider);
111  $this->ctrl->forwardCommand($gallery_gui);
112  break;
113 
114  case 'ilpermissiongui':
115  $this->tabs_gui->setTabActive('perm_settings');
116  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
117  $perm_gui = new ilPermissionGUI($this);
118  $ret =& $this->ctrl->forwardCommand($perm_gui);
119  break;
120 
121  case "ilinfoscreengui":
122  $ret =& $this->infoScreen();
123  break;
124 
125  case "illearningprogressgui":
126  include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
127 
129  $this->object->getRefId(),
130  $_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId());
131  $this->ctrl->forwardCommand($new_gui);
132  $this->tabs_gui->setTabActive('learning_progress');
133  break;
134 
135  case 'ilobjcoursegroupinggui':
136  $this->setSubTabs('settings');
137 
138  include_once './Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
139  $this->ctrl->setReturn($this,'edit');
140  $crs_grp_gui = new ilObjCourseGroupingGUI($this->object,(int) $_GET['obj_id']);
141  $this->ctrl->forwardCommand($crs_grp_gui);
142 
143  $this->tabs_gui->setTabActive('settings');
144  $this->tabs_gui->setSubTabActive('groupings');
145  break;
146 
147  case 'ilcoursecontentgui':
148 
149  include_once './Modules/Course/classes/class.ilCourseContentGUI.php';
150  $course_content_obj = new ilCourseContentGUI($this);
151  $this->ctrl->forwardCommand($course_content_obj);
152  break;
153 
154  case 'ilpublicuserprofilegui':
155  require_once './Services/User/classes/class.ilPublicUserProfileGUI.php';
156  $this->setSubTabs('members');
157  $this->tabs_gui->setTabActive('group_members');
158  $this->tabs_gui->setSubTabActive('grp_members_gallery');
159  $profile_gui = new ilPublicUserProfileGUI($_GET["user"]);
160  if ($_GET["back_url"] == "")
161  {
162  $profile_gui->setBackUrl($this->ctrl->getLinkTargetByClass(["ilGroupMembershipGUI", "ilUsersGalleryGUI"], 'view'));
163  }
164  $html = $this->ctrl->forwardCommand($profile_gui);
165  $this->tpl->setVariable("ADM_CONTENT", $html);
166  break;
167 
168  case "ilcolumngui":
169  $this->tabs_gui->setTabActive('none');
170  $this->checkPermission("read");
171  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
172  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
173  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
174  $this->renderObject();
175  break;
176 
177  // container page editing
178  case "ilcontainerpagegui":
179  $ret = $this->forwardToPageObject();
180  if ($ret != "")
181  {
182  $this->tpl->setContent($ret);
183  }
184  break;
185 
186  case 'ilobjectcopygui':
187  include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
188  $cp = new ilObjectCopyGUI($this);
189  $cp->setType('grp');
190  $this->ctrl->forwardCommand($cp);
191  break;
192 
193  case "ilobjstylesheetgui":
194  $this->forwardToStyleSheet();
195  break;
196 
197  case 'ilobjectcustomuserfieldsgui':
198  include_once './Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
199  $cdf_gui = new ilObjectCustomUserFieldsGUI($this->object->getId());
200  $this->setSubTabs('settings');
201  $this->tabs_gui->setTabActive('settings');
202  $this->ctrl->forwardCommand($cdf_gui);
203  break;
204 
205  case 'ilmemberagreementgui':
206  include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
207  $this->ctrl->setReturn($this,'');
208  $this->tabs_gui->setTabActive('view_content');
209  $agreement = new ilMemberAgreementGUI($this->object->getRefId());
210  $this->ctrl->forwardCommand($agreement);
211  break;
212 
213  case 'ilexportgui':
214  $this->tabs_gui->setTabActive('export');
215  include_once './Services/Export/classes/class.ilExportGUI.php';
216  $exp = new ilExportGUI($this);
217  $exp->addFormat('xml');
218  $this->ctrl->forwardCommand($exp);
219  break;
220 
221  case "ilcommonactiondispatchergui":
222  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
224  $this->ctrl->forwardCommand($gui);
225  break;
226 
227  case 'ilobjectservicesettingsgui':
228  $this->ctrl->setReturn($this,'edit');
229  $this->setSubTabs("settings");
230  $this->tabs_gui->activateTab('settings');
231  $this->tabs_gui->activateSubTab('tool_settings');
232 
233  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
234  $service = new ilObjectServiceSettingsGUI(
235  $this,
236  $this->object->getId(),
237  array(
239  ));
240  $this->ctrl->forwardCommand($service);
241  break;
242 
243  case 'ilmailmembersearchgui':
244  include_once 'Services/Mail/classes/class.ilMail.php';
245  $mail = new ilMail($ilUser->getId());
246 
247  if(!($ilAccess->checkAccess('manage_members','',$this->object->getRefId()) ||
248  $this->object->getMailToMembersType() == ilObjGroup::MAIL_ALLOWED_ALL) &&
249  $rbacsystem->checkAccess('internal_mail',$mail->getMailObjectReferenceId()))
250  {
251  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"),$ilErr->MESSAGE);
252  }
253 
254  $this->tabs_gui->setTabActive('members');
255 
256  include_once './Services/Contact/classes/class.ilMailMemberSearchGUI.php';
257  include_once './Services/Contact/classes/class.ilMailMemberGroupRoles.php';
258 
259  $mail_search = new ilMailMemberSearchGUI($this, $this->object->getRefId(), new ilMailMemberGroupRoles());
261  $this->ctrl->forwardCommand($mail_search);
262  break;
263 
264  case 'ilbadgemanagementgui':
265  $this->tabs_gui->setTabActive('obj_tool_setting_badges');
266  include_once 'Services/Badge/classes/class.ilBadgeManagementGUI.php';
267  $bgui = new ilBadgeManagementGUI($this->object->getRefId(), $this->object->getId(), 'grp');
268  $this->ctrl->forwardCommand($bgui);
269  break;
270 
271  case "ilcontainernewssettingsgui":
272  $this->setSubTabs("settings");
273  $this->tabs_gui->setTabActive('settings');
274  include_once("./Services/Container/classes/class.ilContainerNewsSettingsGUI.php");
275  $news_set_gui = new ilContainerNewsSettingsGUI($this);
276  $this->ctrl->forwardCommand($news_set_gui);
277  break;
278 
279  case "ilnewstimelinegui":
280  $this->checkPermission("read");
281  $this->tabs_gui->setTabActive('news_timeline');
282  include_once("./Services/News/classes/class.ilNewsTimelineGUI.php");
283  $t = ilNewsTimelineGUI::getInstance($this->object->getRefId(), $this->object->getNewsTimelineAutoENtries());
284  $t->setUserEditAll($ilAccess->checkAccess('write','',$this->object->getRefId(),'grp'));
285  $this->showPermanentLink($tpl);
286  $this->ctrl->forwardCommand($t);
287  break;
288 
289  default:
290 
291  // check visible permission
292  if (!$this->getCreationMode() and
293  !$ilAccess->checkAccess('visible','',$this->object->getRefId(),'grp') and
294  !$ilAccess->checkAccess('read','',$this->object->getRefId(),'grp') )
295  {
296  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"),$ilErr->MESSAGE);
297  }
298 
299  // #9401 - see also ilStartupGUI::_checkGoto()
300  if($cmd == 'infoScreenGoto')
301  {
302  if($this->object->isRegistrationEnabled())
303  {
304  $cmd = 'join';
305  }
306  else
307  {
308  $cmd = 'infoScreen';
309  }
310  }
311 
312  // check read permission
313  if ((!$this->getCreationMode()
314  && !$rbacsystem->checkAccess('read',$this->object->getRefId()) && $cmd != 'infoScreen')
315  || $cmd == 'join')
316  {
317  // no join permission -> redirect to info screen
318  if (!$rbacsystem->checkAccess('join',$this->object->getRefId()))
319  {
320  $this->ctrl->redirect($this, "infoScreen");
321  }
322  else // no read -> show registration
323  {
324  include_once('./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
325  $this->ctrl->redirectByClass("ilGroupRegistrationGUI", "show");
326  }
327  }
328  if(!$cmd)
329  {
330  $cmd = 'view';
331  }
332  $cmd .= 'Object';
333  $this->$cmd();
334  break;
335  }
336 
337  $this->addHeaderAction();
338  }
339 
340  function viewObject()
341  {
342  global $tree,$rbacsystem,$ilUser;
343 
344  include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
345  ilLearningProgress::_tracProgress($ilUser->getId(),$this->object->getId(),
346  $this->object->getRefId(),'grp');
347 
348  if (strtolower($_GET["baseClass"]) == "iladministrationgui")
349  {
350  parent::viewObject();
351  return true;
352  }
353 
354  if(!$this->checkAgreement())
355  {
356  include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
357  $this->tabs_gui->setTabActive('view_content');
358  $this->ctrl->setReturn($this,'view');
359  $agreement = new ilMemberAgreementGUI($this->object->getRefId());
360  $this->ctrl->setCmdClass(get_class($agreement));
361  $this->ctrl->forwardCommand($agreement);
362  return true;
363  }
364 
365  $this->tabs_gui->setTabActive('view_content');
366  $this->renderObject();
367  }
368 
372  function renderObject()
373  {
374  global $ilTabs;
375 
376  $ilTabs->activateTab("view_content");
377  $ret = parent::renderObject();
378  return $ret;
379 
380  }
381 
389  public function modifyItemGUI($a_item_list_gui, $a_item_data, $a_show_path)
390  {
391  global $tree;
392 
393  // if folder is in a course, modify item list gui according to course requirements
394  if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),'crs'))
395  {
396  include_once("./Modules/Course/classes/class.ilObjCourse.php");
397  include_once("./Modules/Course/classes/class.ilObjCourseGUI.php");
398  $course_obj_id = ilObject::_lookupObjId($course_ref_id);
400  $a_item_list_gui,
401  'ilcoursecontentgui',
402  $a_item_data,
403  $a_show_path,
404  ilObjCourse::_lookupAboStatus($course_obj_id),
405  $course_ref_id,
406  $course_obj_id,
407  $this->object->getRefId()
408  );
409  }
410  }
411 
416  public function afterSave(\ilObject $new_object)
417  {
418  global $ilUser, $ilSetting;
419 
420  $new_object->setRegistrationType(GRP_REGISTRATION_DIRECT);
421  $new_object->update();
422 
423  // check for parent group or course => SORT_INHERIT
424  $sort_mode = ilContainer::SORT_TITLE;
425  if(
426  $GLOBALS['tree']->checkForParentType($new_object->getRefId(),'crs',true) ||
427  $GLOBALS['tree']->checkForParentType($new_object->getRefId(),'grp',true)
428  )
429  {
430  $sort_mode = ilContainer::SORT_INHERIT;
431  }
432 
433  // Save sorting
434  include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
435  $sort = new ilContainerSortingSettings($new_object->getId());
436  $sort->setSortMode($sort_mode);
437  $sort->update();
438 
439 
440  // Add user as admin and enable notification
441  include_once './Modules/Group/classes/class.ilGroupParticipants.php';
442  $members_obj = ilGroupParticipants::_getInstanceByObjId($new_object->getId());
443  $members_obj->add($ilUser->getId(),IL_GRP_ADMIN);
444  $members_obj->updateNotification($ilUser->getId(),$ilSetting->get('mail_grp_admin_notification', true));
445 
446  ilUtil::sendSuccess($this->lng->txt("object_added"), true);
447  $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
448  $this->ctrl->redirect($this,'edit');
449  }
450 
458  public function editObject(ilPropertyFormGUI $a_form = null)
459  {
460  $this->checkPermission("write");
461 
462  $this->setSubTabs('settings');
463  $this->tabs_gui->setTabActive('settings');
464  $this->tabs_gui->setSubTabActive('grp_settings');
465 
466  if(!$a_form)
467  {
468  $a_form = $this->initForm('edit');
469  }
470 
471  $this->tpl->setVariable('ADM_CONTENT', $a_form->getHTML());
472  }
473 
481  public function updateGroupTypeObject()
482  {
483  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateUtils.php';
485  $this->object->getRefId(),
486  (int) $_REQUEST['grp_type']
487  );
488 
489  ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
490  $this->ctrl->redirect($this,'edit');
491  }
492 
493 
499  public function updateObject()
500  {
501  global $ilErr;
502 
503  $this->checkPermission('write');
504 
505  $form = $this->initForm();
506  if($form->checkInput())
507  {
508  // handle group type settings
509  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
510  $old_type = ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
511 
512  $modified = false;
513  $new_type_info = $form->getInput('didactic_type');
514  if($new_type_info)
515  {
516  $new_type = explode('_',$form->getInput('didactic_type'));
517  $new_type = $new_type[1];
518 
519  $modified = ($new_type != $old_type);
520  ilLoggerFactory::getLogger('grp')->info('Switched group type from '. $old_type .' to ' . $new_type);
521  }
522 
523  $old_autofill = $this->object->hasWaitingListAutoFill();
524 
525  $this->object->setTitle(ilUtil::stripSlashes($form->getInput('title')));
526  $this->object->setDescription(ilUtil::stripSlashes($form->getInput('desc')));
527  $this->object->setGroupType(ilUtil::stripSlashes($form->getInput('grp_type')));
528  $this->object->setRegistrationType(ilUtil::stripSlashes($form->getInput('registration_type')));
529  $this->object->setPassword(ilUtil::stripSlashes($form->getInput('password')));
530  $this->object->enableUnlimitedRegistration((bool) !$form->getInput('reg_limit_time'));
531  $this->object->enableMembershipLimitation((bool) $form->getInput('registration_membership_limited'));
532  $this->object->setMinMembers((int) $form->getInput('registration_min_members'));
533  $this->object->setMaxMembers((int) $form->getInput('registration_max_members'));
534  $this->object->enableRegistrationAccessCode((bool) $form->getInput('reg_code_enabled'));
535  $this->object->setRegistrationAccessCode($form->getInput('reg_code'));
536  $this->object->setViewMode($form->getInput('view_mode'));
537  $this->object->setMailToMembersType((int) $form->getInput('mail_type'));
538  $this->object->setShowMembers((int) $form->getInput('show_members'));
539 
540  $reg = $form->getItemByPostVar("reg");
541  if($reg->getStart() instanceof ilDateTime && $reg->getEnd() instanceof ilDateTime)
542  {
543  $this->object->enableUnlimitedRegistration(false);
544  }
545  else
546  {
547  $this->object->enableUnlimitedRegistration(true);
548  }
549 
550  $this->object->setRegistrationStart($reg->getStart());
551  $this->object->setRegistrationEnd($reg->getEnd());
552 
553  $cancel_end = $form->getItemByPostVar("cancel_end");
554  $this->object->setCancellationEnd($cancel_end->getDate());
555 
556  switch((int) $_POST['waiting_list'])
557  {
558  case 2:
559  $this->object->enableWaitingList(true);
560  $this->object->setWaitingListAutoFill(true);
561  break;
562 
563  case 1:
564  $this->object->enableWaitingList(true);
565  $this->object->setWaitingListAutoFill(false);
566  break;
567 
568  default:
569  $this->object->enableWaitingList(false);
570  $this->object->setWaitingListAutoFill(false);
571  break;
572  }
573 
574  // update object settings
575  $this->object->update();
576 
577 
578  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
580  $this->object->getId(), $form,
581  array(
587  )
588  );
589 
590  // Save sorting
591  $this->saveSortingSettings($form);
592  // if autofill has been activated trigger process
593  if(
594  !$old_autofill &&
595  $this->object->hasWaitingListAutoFill())
596  {
597  $this->object->handleAutoFill();
598  }
599 
600  // BEGIN ChangeEvents: Record update Object.
601  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
602  global $ilUser;
603  ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(),
604  'update');
605  ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
606  // END PATCH ChangeEvents: Record update Object.
607  // Update ecs export settings
608  include_once 'Modules/Group/classes/class.ilECSGroupSettings.php';
609  $ecs = new ilECSGroupSettings($this->object);
610  $ecs->handleSettingsUpdate();
611  }
612  else
613  {
614  ilUtil::sendFailure($GLOBALS['DIC']->language()->txt('err_check_input')); // #16975
615 
616  $form->setValuesByPost();
617  $this->editObject($form);
618  return true;
619  }
620 
621  // group type modified
622  if($modified)
623  {
624  if($new_type == 0)
625  {
626  $new_type_txt = $GLOBALS['lng']->txt('il_grp_status_open');
627  }
628  else
629  {
630  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateSetting.php';
631  $dtpl = new ilDidacticTemplateSetting($new_type);
632  $new_type_txt = $dtpl->getPresentationTitle($GLOBALS['lng']->getLangKey());
633  }
634 
635 
636  include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
637  ilUtil::sendQuestion($this->lng->txt('grp_warn_grp_type_changed'));
638  $confirm = new ilConfirmationGUI();
639  $confirm->setFormAction($this->ctrl->getFormAction($this));
640  $confirm->addItem(
641  'grp_type',
642  $new_type,
643  $this->lng->txt('grp_info_new_grp_type').': '. $new_type_txt
644  );
645  $confirm->addButton($this->lng->txt('grp_change_type'), 'updateGroupType');
646  $confirm->setCancel($this->lng->txt('cancel'), 'edit');
647 
648  $this->tpl->setContent($confirm->getHTML());
649  return true;
650  }
651  else
652  {
653  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
654  $this->ctrl->redirect($this,'edit');
655  return true;
656  }
657  }
658 
662  public function editGroupIconsObject($a_form = null)
663  {
664  global $tpl;
665 
666  $this->checkPermission('write');
667 
668  $this->setSubTabs("settings");
669  $this->tabs_gui->setTabActive('settings');
670  $this->tabs_gui->setSubTabActive('grp_icon_settings');
671 
672  if(!$a_form)
673  {
674  $a_form = $this->initGroupIconsForm();
675  }
676 
677  $tpl->setContent($a_form->getHTML());
678  }
679 
681  {
682  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
683  $form = new ilPropertyFormGUI();
684  $form->setFormAction($this->ctrl->getFormAction($this));
685 
686  $this->showCustomIconsEditing(1, $form);
687 
688  // $form->setTitle($this->lng->txt('edit_grouping'));
689  $form->addCommandButton('updateGroupIcons', $this->lng->txt('save'));
690 
691  return $form;
692  }
693 
700  public function updateGroupIconsObject()
701  {
702  global $ilSetting;
703 
704  $this->checkPermission('write');
705 
706  $form = $this->initGroupIconsForm();
707  if($form->checkInput())
708  {
709  //save custom icons
710  if ($ilSetting->get("custom_icons"))
711  {
712  if($_POST["cont_icon_delete"])
713  {
714  $this->object->removeCustomIcon();
715  }
716  $this->object->saveIcons($_FILES["cont_icon"]['tmp_name']);
717  }
718  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
719  $this->ctrl->redirect($this,"editGroupIcons");
720  }
721 
722  $form->setValuesByPost();
723  $this->editGroupIconsObject($form);
724  }
725 
729  public function editMapSettingsObject()
730  {
731  global $ilUser, $ilCtrl, $ilUser, $ilAccess;
732 
733  $this->setSubTabs("settings");
734  $this->tabs_gui->setTabActive('settings');
735  $this->tabs_gui->setSubTabActive('grp_map_settings');
736 
737  include_once('./Services/Maps/classes/class.ilMapUtil.php');
738  if (!ilMapUtil::isActivated() ||
739  !$ilAccess->checkAccess("write", "", $this->object->getRefId()))
740  {
741  return;
742  }
743 
744  $latitude = $this->object->getLatitude();
745  $longitude = $this->object->getLongitude();
746  $zoom = $this->object->getLocationZoom();
747 
748  // Get Default settings, when nothing is set
749  if ($latitude == 0 && $longitude == 0 && $zoom == 0)
750  {
752  $latitude = $def["latitude"];
753  $longitude = $def["longitude"];
754  $zoom = $def["zoom"];
755  }
756 
757 
758  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
759  $form = new ilPropertyFormGUI();
760  $form->setFormAction($ilCtrl->getFormAction($this));
761 
762  $form->setTitle($this->lng->txt("grp_map_settings"));
763 
764  // enable map
765  $public = new ilCheckboxInputGUI($this->lng->txt("grp_enable_map"),
766  "enable_map");
767  $public->setValue("1");
768  $public->setChecked($this->object->getEnableGroupMap());
769  $form->addItem($public);
770 
771  // map location
772  $loc_prop = new ilLocationInputGUI($this->lng->txt("grp_map_location"),
773  "location");
774  $loc_prop->setLatitude($latitude);
775  $loc_prop->setLongitude($longitude);
776  $loc_prop->setZoom($zoom);
777  $form->addItem($loc_prop);
778 
779  $form->addCommandButton("saveMapSettings", $this->lng->txt("save"));
780 
781  $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
782  }
783 
784  public function saveMapSettingsObject()
785  {
786  global $ilCtrl, $ilUser;
787 
788  $this->object->setLatitude(ilUtil::stripSlashes($_POST["location"]["latitude"]));
789  $this->object->setLongitude(ilUtil::stripSlashes($_POST["location"]["longitude"]));
790  $this->object->setLocationZoom(ilUtil::stripSlashes($_POST["location"]["zoom"]));
791  $this->object->setEnableGroupMap(ilUtil::stripSlashes($_POST["enable_map"]));
792  $this->object->update();
793 
794  $ilCtrl->redirect($this, "editMapSettings");
795  }
796 
797 
804  public function editInfoObject()
805  {
806  global $ilErr,$ilAccess;
807 
808  $this->checkPermission('write');
809 
810  $this->setSubTabs('settings');
811  $this->tabs_gui->setTabActive('settings');
812  $this->tabs_gui->setSubTabActive('grp_info_settings');
813 
814  $form = $this->initInfoEditor();
815  $this->tpl->setContent($form->getHTML());
816  }
817 
824  protected function initInfoEditor()
825  {
826  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
827  $form = new ilPropertyFormGUI();
828  $form->setFormAction($this->ctrl->getFormAction($this,'updateInfo'));
829  $form->setTitle($this->lng->txt('grp_general_informations'));
830  $form->addCommandButton('updateInfo',$this->lng->txt('save'));
831  $form->addCommandButton('cancel',$this->lng->txt('cancel'));
832 
833  $area = new ilTextAreaInputGUI($this->lng->txt('grp_information'),'important');
834  $area->setInfo($this->lng->txt('grp_information_info'));
835  $area->setValue($this->object->getInformation());
836  $area->setRows(8);
837  $area->setCols(80);
838  $form->addItem($area);
839 
840  return $form;
841  }
842 
849  public function updateInfoObject()
850  {
851  $this->checkPermission('manage_members');
852 
853  $this->object->setInformation(ilUtil::stripSlashes($_POST['important']));
854  $this->object->update();
855 
856  ilUtil::sendSuccess($this->lng->txt("settings_saved"));
857  $this->editInfoObject();
858  return true;
859  }
860 
862  public function readMemberData($ids,$selected_columns = null)
863  {
864  include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
865  $privacy = ilPrivacySettings::_getInstance();
866 
867  include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
868  $this->show_tracking =
871  );
872  if($this->show_tracking)
873  {
874  include_once('./Services/Object/classes/class.ilObjectLP.php');
875  $olp = ilObjectLP::getInstance($this->object->getId());
876  $this->show_tracking = $olp->isActive();
877  }
878 
879  if($this->show_tracking)
880  {
881  include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
882  $completed = ilLPStatusWrapper::_lookupCompletedForObject($this->object->getId());
883  $in_progress = ilLPStatusWrapper::_lookupInProgressForObject($this->object->getId());
885  }
886 
887  if($privacy->enabledGroupAccessTimes())
888  {
889  include_once('./Services/Tracking/classes/class.ilLearningProgress.php');
890  $progress = ilLearningProgress::_lookupProgressByObjId($this->object->getId());
891  }
892 
893  $do_prtf = (is_array($selected_columns) &&
894  in_array('prtf', $selected_columns) &&
895  is_array($ids));
896  if($do_prtf)
897  {
898  include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
900  $this->ctrl->getLinkTarget($this, "members"));
901  }
902 
903  $profile_data = ilObjUser::_readUsersProfileData($ids);
904  foreach($ids as $usr_id)
905  {
906  $name = ilObjUser::_lookupName($usr_id);
907  $tmp_data['firstname'] = $name['firstname'];
908  $tmp_data['lastname'] = $name['lastname'];
909  $tmp_data['login'] = ilObjUser::_lookupLogin($usr_id);
910  $tmp_data['notification'] = $this->object->members_obj->isNotificationEnabled($usr_id) ? 1 : 0;
911  $tmp_data['usr_id'] = $usr_id;
912  $tmp_data['login'] = ilObjUser::_lookupLogin($usr_id);
913 
914  foreach((array) $profile_data[$usr_id] as $field => $value)
915  {
916  $tmp_data[$field] = $value;
917  }
918 
919  if($this->show_tracking)
920  {
921  if(in_array($usr_id,$completed))
922  {
923  $tmp_data['progress'] = ilLPStatus::LP_STATUS_COMPLETED;
924  }
925  elseif(in_array($usr_id,$in_progress))
926  {
927  $tmp_data['progress'] = ilLPStatus::LP_STATUS_IN_PROGRESS;
928  }
929  elseif(in_array($usr_id,$failed))
930  {
931  $tmp_data['progress'] = ilLPStatus::LP_STATUS_FAILED;
932  }
933  else
934  {
935  $tmp_data['progress'] = ilLPStatus::LP_STATUS_NOT_ATTEMPTED;
936  }
937  }
938 
939  if($privacy->enabledGroupAccessTimes())
940  {
941  if(isset($progress[$usr_id]['ts']) and $progress[$usr_id]['ts'])
942  {
943  $tmp_data['access_time'] = ilDatePresentation::formatDate(
944  $tmp_date = new ilDateTime($progress[$usr_id]['ts'],IL_CAL_UNIX));
945  $tmp_data['access_time_unix'] = $tmp_date->get(IL_CAL_UNIX);
946  }
947  else
948  {
949  $tmp_data['access_time'] = $this->lng->txt('no_date');
950  $tmp_data['access_time_unix'] = 0;
951  }
952  }
953 
954  if($do_prtf)
955  {
956  $tmp_data['prtf'] = $all_prtf[$usr_id];
957  }
958 
959  $members[$usr_id] = $tmp_data;
960  }
961  return $members ? $members : array();
962  }
963 
968  public function leaveObject()
969  {
970  global $ilUser;
971 
972  $this->checkPermission('leave');
973 
974  $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
975  if($part->isLastAdmin($ilUser->getId()))
976  {
977  ilUtil::sendFailure($this->lng->txt('grp_err_administrator_required'));
978  $this->viewObject();
979  return false;
980  }
981 
982  $this->tabs_gui->setTabActive('grp_btn_unsubscribe');
983 
984  include_once "Services/Utilities/classes/class.ilConfirmationGUI.php";
985  $cgui = new ilConfirmationGUI();
986  $cgui->setHeaderText($this->lng->txt('grp_dismiss_myself'));
987  $cgui->setFormAction($this->ctrl->getFormAction($this));
988  $cgui->setCancel($this->lng->txt("cancel"), "cancel");
989  $cgui->setConfirm($this->lng->txt("grp_btn_unsubscribe"), "unsubscribe");
990  $this->tpl->setContent($cgui->getHTML());
991  }
992 
999  public function unsubscribeObject()
1000  {
1001  global $ilUser,$tree, $ilCtrl;
1002 
1003  $this->checkPermission('leave');
1004 
1005  $this->object->members_obj->delete($ilUser->getId());
1006 
1007  include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1008  $this->object->members_obj->sendNotification(
1010  $ilUser->getId()
1011  );
1012  $this->object->members_obj->sendNotification(
1014  $ilUser->getId()
1015  );
1016 
1017  ilUtil::sendSuccess($this->lng->txt('grp_msg_membership_annulled'),true);
1018  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id",
1019  $tree->getParentId($this->object->getRefId()));
1020  $ilCtrl->redirectByClass("ilrepositorygui", "");
1021  }
1022 
1029  function addContentTab()
1030  {
1031  $this->tabs_gui->addTab("view_content", $this->lng->txt("content"),
1032  $this->ctrl->getLinkTarget($this, "view"));
1033  }
1034 
1035 
1036  // get tabs
1037  function getTabs()
1038  {
1039  global $rbacsystem, $ilUser, $ilAccess, $lng, $ilHelp;
1040 
1041  $ilHelp->setScreenIdComponent("grp");
1042 
1043  if ($rbacsystem->checkAccess('read',$this->ref_id))
1044  {
1045  if ($this->object->isNewsTimelineEffective())
1046  {
1047  if (!$this->object->isNewsTimelineLandingPageEffective())
1048  {
1049  $this->addContentTab();
1050  }
1051  $this->tabs_gui->addTab("news_timeline", $lng->txt("cont_news_timeline_tab"),
1052  $this->ctrl->getLinkTargetByClass("ilnewstimelinegui", "show"));
1053  if ($this->object->isNewsTimelineLandingPageEffective())
1054  {
1055  $this->addContentTab();
1056  }
1057  }
1058  else
1059  {
1060  $this->addContentTab();
1061  }
1062  }
1063  if ($rbacsystem->checkAccess('visible',$this->ref_id))
1064  {
1065  $this->tabs_gui->addTarget("info_short",
1066  $this->ctrl->getLinkTargetByClass(
1067  array("ilobjgroupgui", "ilinfoscreengui"), "showSummary"),
1068  "infoScreen",
1069  "", "",false);
1070  }
1071 
1072 
1073  if ($ilAccess->checkAccess('write','',$this->object->getRefId()))
1074  {
1075  $this->tabs_gui->addTarget("settings",
1076  $this->ctrl->getLinkTarget($this, "edit"), array("edit", "editMapSettings"), get_class($this),
1077  "");
1078  }
1079 
1080  include_once './Modules/Group/classes/class.ilGroupParticipants.php';
1081  $is_participant = ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId());
1082 
1083  // Members
1084  include_once './Modules/Group/classes/class.ilGroupMembershipGUI.php';
1085  $membership_gui = new ilGroupMembershipGUI($this, $this->object);
1086  $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
1087 
1088 
1089  // badges
1090  if($ilAccess->checkAccess('write','',$this->ref_id))
1091  {
1092  include_once 'Services/Badge/classes/class.ilBadgeHandler.php';
1093  if(ilBadgeHandler::getInstance()->isObjectActive($this->object->getId()))
1094  {
1095  $this->tabs_gui->addTarget("obj_tool_setting_badges",
1096  $this->ctrl->getLinkTargetByClass("ilbadgemanagementgui", ""),
1097  "",
1098  "ilbadgemanagementgui");
1099  }
1100  }
1101 
1102  // learning progress
1103  include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
1104  if(ilLearningProgressAccess::checkAccess($this->object->getRefId(), $is_participant))
1105  {
1106  $this->tabs_gui->addTarget('learning_progress',
1107  $this->ctrl->getLinkTargetByClass(array('ilobjgroupgui','illearningprogressgui'),''),
1108  '',
1109  array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui'));
1110  }
1111 
1112 
1113  if($ilAccess->checkAccess('write','',$this->object->getRefId()))
1114  {
1115  $this->tabs_gui->addTarget(
1116  'export',
1117  $this->ctrl->getLinkTargetByClass('ilexportgui',''),
1118  'export',
1119  'ilexportgui'
1120  );
1121  }
1122 
1123  // parent tabs (all container: edit_permission, clipboard, trash
1124  parent::getTabs();
1125 
1126  if($ilAccess->checkAccess('join','',$this->object->getRefId()) and
1127  !$this->object->members_obj->isAssigned($ilUser->getId()))
1128  {
1129  include_once './Modules/Group/classes/class.ilGroupWaitingList.php';
1130  if(ilGroupWaitingList::_isOnList($ilUser->getId(), $this->object->getId()))
1131  {
1132  $this->tabs_gui->addTab(
1133  'leave',
1134  $this->lng->txt('membership_leave'),
1135  $this->ctrl->getLinkTargetByClass('ilgroupregistrationgui','show','')
1136  );
1137 
1138  }
1139  else
1140  {
1141 
1142  $this->tabs_gui->addTarget("join",
1143  $this->ctrl->getLinkTargetByClass('ilgroupregistrationgui', "show"),
1144  'show',
1145  "");
1146  }
1147  }
1148  if($ilAccess->checkAccess('leave','',$this->object->getRefId()) and
1149  $this->object->members_obj->isMember($ilUser->getId()))
1150  {
1151  $this->tabs_gui->addTarget("grp_btn_unsubscribe",
1152  $this->ctrl->getLinkTarget($this, "leave"),
1153  '',
1154  "");
1155  }
1156  }
1157 
1163  function infoScreenObject()
1164  {
1165  $this->ctrl->setCmd("showSummary");
1166  $this->ctrl->setCmdClass("ilinfoscreengui");
1167  $this->infoScreen();
1168  }
1169 
1173  function infoScreen()
1174  {
1175  global $rbacsystem, $ilUser, $ilSetting;
1176 
1177  $this->tabs_gui->setTabActive('info_short');
1178 
1179  if(!$rbacsystem->checkAccess("visible", $this->ref_id))
1180  {
1181  $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
1182  }
1183 
1184  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1185  $info = new ilInfoScreenGUI($this);
1186 
1187  if(strlen($this->object->getInformation()))
1188  {
1189  $info->addSection($this->lng->txt('grp_general_informations'));
1190  $info->addProperty($this->lng->txt('grp_information'), nl2br(
1191  ilUtil::makeClickable ($this->object->getInformation(), true)));
1192  }
1193 
1194  $info->enablePrivateNotes();
1195  $info->enableLearningProgress(true);
1196 
1197  $info->addSection($this->lng->txt('group_registration'));
1198  $info->showLDAPRoleGroupMappingInfo();
1199 
1200  if(!$this->object->isRegistrationEnabled())
1201  {
1202  $info->addProperty($this->lng->txt('group_registration_mode'),
1203  $this->lng->txt('grp_reg_deac_info_screen'));
1204 
1205  }
1206  else
1207  {
1208  switch($this->object->getRegistrationType())
1209  {
1211  $info->addProperty($this->lng->txt('group_registration_mode'),
1212  $this->lng->txt('grp_reg_direct_info_screen'));
1213  break;
1214 
1216  $info->addProperty($this->lng->txt('group_registration_mode'),
1217  $this->lng->txt('grp_reg_req_info_screen'));
1218  break;
1219 
1221  $info->addProperty($this->lng->txt('group_registration_mode'),
1222  $this->lng->txt('grp_reg_passwd_info_screen'));
1223  break;
1224 
1225  }
1226  /*
1227  $info->addProperty($this->lng->txt('group_registration_time'),
1228  ilDatePresentation::formatPeriod(
1229  $this->object->getRegistrationStart(),
1230  $this->object->getRegistrationEnd()));
1231  */
1232  if($this->object->isRegistrationUnlimited())
1233  {
1234  $info->addProperty($this->lng->txt('group_registration_time'),
1235  $this->lng->txt('grp_registration_unlimited'));
1236  }
1237  elseif($this->object->getRegistrationStart()->getUnixTime() < time())
1238  {
1239  $info->addProperty($this->lng->txt("group_registration_time"),
1240  $this->lng->txt('cal_until').' '.
1241  ilDatePresentation::formatDate($this->object->getRegistrationEnd()));
1242  }
1243  elseif($this->object->getRegistrationStart()->getUnixTime() >= time())
1244  {
1245  $info->addProperty($this->lng->txt("group_registration_time"),
1246  $this->lng->txt('cal_from').' '.
1247  ilDatePresentation::formatDate($this->object->getRegistrationStart()));
1248  }
1249  if ($this->object->isMembershipLimited())
1250  {
1251  if($this->object->getMinMembers())
1252  {
1253  $info->addProperty($this->lng->txt("mem_min_users"),
1254  $this->object->getMinMembers());
1255  }
1256  if($this->object->getMaxMembers())
1257  {
1258  include_once './Modules/Group/classes/class.ilObjGroupAccess.php';
1259  $reg_info = ilObjGroupAccess::lookupRegistrationInfo($this->object->getId());
1260 
1261  $info->addProperty(
1262  $this->lng->txt('mem_free_places'),
1263  $reg_info['reg_info_free_places']
1264  );
1265  }
1266  }
1267 
1268  if($this->object->getCancellationEnd())
1269  {
1270  $info->addProperty($this->lng->txt('grp_cancellation_end'),
1271  ilDatePresentation::formatDate( $this->object->getCancellationEnd()));
1272  }
1273  }
1274 
1275  // Confirmation
1276  include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1277  $privacy = ilPrivacySettings::_getInstance();
1278 
1279  include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1280  if($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_getFields($this->object->getId()) or $privacy->enabledGroupExport())
1281  {
1282  include_once('Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
1283 
1284  $field_info = ilExportFieldsInfo::_getInstanceByType($this->object->getType());
1285 
1286  $this->lng->loadLanguageModule('ps');
1287  $info->addSection($this->lng->txt('grp_user_agreement_info'));
1288  $info->addProperty($this->lng->txt('ps_export_data'),$field_info->exportableFieldsToInfoString());
1289 
1290  if($fields = ilCourseDefinedFieldDefinition::_fieldsToInfoString($this->object->getId()))
1291  {
1292  $info->addProperty($this->lng->txt('ps_grp_user_fields'),$fields);
1293  }
1294  }
1295 
1296 
1297  // forward the command
1298  $this->ctrl->forwardCommand($info);
1299  }
1300 
1305  {
1306  include_once "Services/Membership/classes/class.ilMembershipNotifications.php";
1307  $noti = new ilMembershipNotifications($this->ref_id);
1308  if($noti->canCurrentUserEdit())
1309  {
1310  if((bool)$_REQUEST["grp_ntf"])
1311  {
1312  $noti->activateUser();
1313  }
1314  else
1315  {
1316  $noti->deactivateUser();
1317  }
1318  }
1319  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
1320  $this->ctrl->redirect($this, "infoScreen");
1321  }
1322 
1326  protected function membersObject()
1327  {
1328  $GLOBALS['ilCtrl']->redirectByClass('ilgroupmembershipgui');
1329  }
1330 
1331 
1335  public static function _goto($a_target, $a_add = "")
1336  {
1337  global $ilAccess, $ilErr, $lng,$ilUser;
1338 
1339  include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1340  if(substr($a_add,0,5) == 'rcode')
1341  {
1342  if($ilUser->getId() == ANONYMOUS_USER_ID)
1343  {
1344  // Redirect to login for anonymous
1346  "login.php?target=".$_GET["target"]."&cmd=force_login&lang=".
1347  $ilUser->getCurrentLanguage()
1348  );
1349  }
1350 
1351  // Redirects to target location after assigning user to course
1353  $a_target,
1355  substr($a_add,5)
1356  );
1357  }
1358 
1359  if ($a_add == "mem" && $ilAccess->checkAccess("manage_members", "", $a_target))
1360  {
1361  ilObjectGUI::_gotoRepositoryNode($a_target, "members");
1362  }
1363 
1364  if ($ilAccess->checkAccess("read", "", $a_target))
1365  {
1367  }
1368  else
1369  {
1370  // to do: force flat view
1371  if ($ilAccess->checkAccess("visible", "", $a_target))
1372  {
1373  ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreenGoto");
1374  }
1375  else
1376  {
1377  if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
1378  {
1379  ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
1380  ilObject::_lookupTitle(ilObject::_lookupObjId($a_target))), true);
1382  }
1383  }
1384  }
1385  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1386  }
1387 
1388 
1396  protected function initForm($a_mode = 'edit')
1397  {
1398  global $ilUser,$tpl,$tree;
1399 
1400  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1401 
1402  $form = new ilPropertyFormGUI();
1403  switch($a_mode)
1404  {
1405  case 'edit':
1406  $form->setFormAction($this->ctrl->getFormAction($this,'update'));
1407  break;
1408 
1409  default:
1410  $form->setTableWidth('600px');
1411  $form->setFormAction($this->ctrl->getFormAction($this,'save'));
1412  break;
1413  }
1414 
1415  // title
1416  $title = new ilTextInputGUI($this->lng->txt('title'),'title');
1417  $title->setSubmitFormOnEnter(true);
1418  $title->setValue($this->object->getTitle());
1419  $title->setSize(min(40, ilObject::TITLE_LENGTH));
1420  $title->setMaxLength(ilObject::TITLE_LENGTH);
1421  $title->setRequired(true);
1422  $form->addItem($title);
1423 
1424  // desc
1425  $desc = new ilTextAreaInputGUI($this->lng->txt('description'),'desc');
1426  $desc->setValue($this->object->getLongDescription());
1427  $desc->setRows(2);
1428  $desc->setCols(40);
1429  $form->addItem($desc);
1430 
1431  $form = $this->initDidacticTemplate($form);
1432 
1433  if($a_mode == 'edit')
1434  {
1435  // Group registration ############################################################
1436  $pres = new ilFormSectionHeaderGUI();
1437  $pres->setTitle($this->lng->txt('grp_setting_header_registration'));
1438  $form->addItem($pres);
1439 
1440  // Registration type
1441  $reg_type = new ilRadioGroupInputGUI($this->lng->txt('group_registration_mode'),'registration_type');
1442  $reg_type->setValue($this->object->getRegistrationType());
1443 
1444  $opt_dir = new ilRadioOption($this->lng->txt('grp_reg_direct'),GRP_REGISTRATION_DIRECT);#$this->lng->txt('grp_reg_direct_info'));
1445  $reg_type->addOption($opt_dir);
1446 
1447  $opt_pass = new ilRadioOption($this->lng->txt('grp_pass_request'),GRP_REGISTRATION_PASSWORD);
1448  $pass = new ilTextInputGUI($this->lng->txt("password"),'password');
1449  $pass->setInfo($this->lng->txt('grp_reg_password_info'));
1450  $pass->setValue($this->object->getPassword());
1451  $pass->setSize(10);
1452  $pass->setMaxLength(32);
1453  $opt_pass->addSubItem($pass);
1454  $reg_type->addOption($opt_pass);
1455 
1456  $opt_req = new ilRadioOption($this->lng->txt('grp_reg_request'),GRP_REGISTRATION_REQUEST,$this->lng->txt('grp_reg_request_info'));
1457  $reg_type->addOption($opt_req);
1458 
1459  $opt_deact = new ilRadioOption($this->lng->txt('grp_reg_no_selfreg'),GRP_REGISTRATION_DEACTIVATED,$this->lng->txt('grp_reg_disabled_info'));
1460  $reg_type->addOption($opt_deact);
1461 
1462  // Registration codes
1463  $reg_code = new ilCheckboxInputGUI($this->lng->txt('grp_reg_code'),'reg_code_enabled');
1464  $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
1465  $reg_code->setValue(1);
1466  $reg_code->setInfo($this->lng->txt('grp_reg_code_enabled_info'));
1467  $form->addItem($reg_type);
1468 
1469  // Registration codes
1470  if(!$this->object->getRegistrationAccessCode())
1471  {
1472  include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1473  $this->object->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
1474  }
1475  $reg_link = new ilHiddenInputGUI('reg_code');
1476  $reg_link->setValue($this->object->getRegistrationAccessCode());
1477  $form->addItem($reg_link);
1478 
1479  $link = new ilCustomInputGUI($this->lng->txt('grp_reg_code_link'));
1480  include_once './Services/Link/classes/class.ilLink.php';
1481  $val = ilLink::_getLink($this->object->getRefId(),$this->object->getType(),array(),'_rcode'.$this->object->getRegistrationAccessCode());
1482  $link->setHTML('<font class="small">'.$val.'</font>');
1483  $reg_code->addSubItem($link);
1484  $form->addItem($reg_code);
1485 
1486  // time limit
1487  $this->lng->loadLanguageModule('dateplaner');
1488  include_once './Services/Form/classes/class.ilDateDurationInputGUI.php';
1489  $dur = new ilDateDurationInputGUI($this->lng->txt('grp_reg_limited'),'reg');
1490  $dur->setShowTime(true);
1491  $dur->setStart($this->object->getRegistrationStart());
1492  $dur->setEnd($this->object->getRegistrationEnd());
1493  $form->addItem($dur);
1494 
1495  // cancellation limit
1496  $cancel = new ilDateTimeInputGUI($this->lng->txt('grp_cancellation_end'), 'cancel_end');
1497  $cancel->setInfo($this->lng->txt('grp_cancellation_end_info'));
1498  $cancel->setDate($this->object->getCancellationEnd());
1499  $form->addItem($cancel);
1500 
1501  // max member
1502  $lim = new ilCheckboxInputGUI($this->lng->txt('reg_grp_max_members_short'),'registration_membership_limited');
1503  $lim->setValue(1);
1504 // $lim->setOptionTitle($this->lng->txt('reg_grp_max_members'));
1505  $lim->setChecked($this->object->isMembershipLimited());
1506 
1507  $min = new ilTextInputGUI($this->lng->txt('reg_grp_min_members'),'registration_min_members');
1508  $min->setSize(3);
1509  $min->setMaxLength(4);
1510  $min->setValue($this->object->getMinMembers() ? $this->object->getMinMembers() : '');
1511  $min->setInfo($this->lng->txt('grp_subscription_min_members_info'));
1512  $lim->addSubItem($min);
1513 
1514  $max = new ilTextInputGUI($this->lng->txt('reg_grp_max_members'),'registration_max_members');
1515  $max->setValue($this->object->getMaxMembers() ? $this->object->getMaxMembers() : '');
1516  //$max->setTitle($this->lng->txt('members'));
1517  $max->setSize(3);
1518  $max->setMaxLength(4);
1519  $max->setInfo($this->lng->txt('grp_reg_max_members_info'));
1520  $lim->addSubItem($max);
1521 
1522  /*
1523  $wait = new ilCheckboxInputGUI($this->lng->txt('grp_waiting_list'),'waiting_list');
1524  $wait->setValue(1);
1525  //$wait->setOptionTitle($this->lng->txt('grp_waiting_list'));
1526  $wait->setInfo($this->lng->txt('grp_waiting_list_info'));
1527  $wait->setChecked($this->object->isWaitingListEnabled() ? true : false);
1528  $lim->addSubItem($wait);
1529  $form->addItem($lim);
1530  */
1531 
1532  $wait = new ilRadioGroupInputGUI($this->lng->txt('grp_waiting_list'), 'waiting_list');
1533 
1534  $option = new ilRadioOption($this->lng->txt('none'), 0);
1535  $wait->addOption($option);
1536 
1537  $option = new ilRadioOption($this->lng->txt('grp_waiting_list_no_autofill'), 1);
1538  $option->setInfo($this->lng->txt('grp_waiting_list_info'));
1539  $wait->addOption($option);
1540 
1541  $option = new ilRadioOption($this->lng->txt('grp_waiting_list_autofill'), 2);
1542  $option->setInfo($this->lng->txt('grp_waiting_list_autofill_info'));
1543  $wait->addOption($option);
1544 
1545  if($this->object->hasWaitingListAutoFill())
1546  {
1547  $wait->setValue(2);
1548  }
1549  else if($this->object->isWaitingListEnabled())
1550  {
1551  $wait->setValue(1);
1552  }
1553 
1554  $lim->addSubItem($wait);
1555 
1556  $form->addItem($lim);
1557 
1558 
1559  // Group presentation
1560  $hasParentMembership =
1561  (
1562  $tree->checkForParentType($this->object->getRefId(),'crs',true) ||
1563  $tree->checkForParentType($this->object->getRefId(),'grp',true)
1564  );
1565 
1566  $pres = new ilFormSectionHeaderGUI();
1567  $pres->setTitle($this->lng->txt('grp_setting_header_presentation'));
1568  $form->addItem($pres);
1569 
1570  // presentation type
1571  $view_type = new ilRadioGroupInputGUI($this->lng->txt('grp_presentation_type'),'view_mode');
1572  if($hasParentMembership)
1573  {
1574  switch($this->object->getViewMode())
1575  {
1577  $course_view_mode = ': '.$this->lng->txt('cntr_view_sessions');
1578  break;
1579 
1581  $course_view_mode = ': '.$this->lng->txt('cntr_view_simple');
1582  break;
1583 
1585  $course_view_mode = ': '.$this->lng->txt('cntr_view_by_type');
1586  break;
1587  }
1588 
1589  $opt = new ilRadioOption($this->lng->txt('grp_view_inherit').$course_view_mode,ilContainer::VIEW_INHERIT);
1590  $opt->setInfo($this->lng->txt('grp_view_inherit_info'));
1591  $view_type->addOption($opt);
1592  }
1593 
1594  if($hasParentMembership &&
1595  $this->object->getViewMode() == ilContainer::VIEW_INHERIT)
1596  {
1597  $view_type->setValue(ilContainer::VIEW_INHERIT);
1598  }
1599  else
1600  {
1601  $view_type->setValue(
1603  $this->object->getId(),
1604  $this->object->getViewMode(),
1605  $this->object->getRefId()
1606  )
1607  );
1608  }
1609 
1610  $opt = new ilRadioOption($this->lng->txt('cntr_view_simple'),ilContainer::VIEW_SIMPLE);
1611  $opt->setInfo($this->lng->txt('grp_view_info_simple'));
1612  $view_type->addOption($opt);
1613 
1614  $opt = new ilRadioOption($this->lng->txt('cntr_view_by_type'), ilContainer::VIEW_BY_TYPE);
1615  $opt->setInfo($this->lng->txt('grp_view_info_by_type'));
1616  $view_type->addOption($opt);
1617  $form->addItem($view_type);
1618 
1619 
1620  // Sorting
1621  $sorting_settings = array();
1622  if($hasParentMembership)
1623  {
1624  $sorting_settings[] = ilContainer::SORT_INHERIT;
1625  }
1626  $sorting_settings[] = ilContainer::SORT_TITLE;
1627  $sorting_settings[] = ilContainer::SORT_CREATION;
1628  $sorting_settings[] = ilContainer::SORT_MANUAL;
1629  $this->initSortingForm($form, $sorting_settings);
1630 
1631  // additional features
1632  $feat = new ilFormSectionHeaderGUI();
1633  $feat->setTitle($this->lng->txt('obj_features'));
1634  $form->addItem($feat);
1635 
1636  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
1638  $this->object->getId(),
1639  $form,
1640  array(
1646  )
1647  );
1648 
1649  // Notification Settings
1650  /*$notification = new ilFormSectionHeaderGUI();
1651  $notification->setTitle($this->lng->txt('grp_notification'));
1652  $form->addItem($notification);*/
1653 
1654  $mem = new ilCheckboxInputGUI($this->lng->txt('grp_show_members'),'show_members');
1655  $mem->setChecked($this->object->getShowMembers());
1656  $mem->setInfo($this->lng->txt('grp_show_members_info'));
1657  $form->addItem($mem);
1658 
1659  // Show members type
1660  $mail_type = new ilRadioGroupInputGUI($this->lng->txt('grp_mail_type'), 'mail_type');
1661  $mail_type->setValue($this->object->getMailToMembersType());
1662 
1663  $mail_tutors = new ilRadioOption($this->lng->txt('grp_mail_tutors_only'), ilObjGroup::MAIL_ALLOWED_TUTORS,
1664  $this->lng->txt('grp_mail_tutors_only_info'));
1665  $mail_type->addOption($mail_tutors);
1666 
1667  $mail_all = new ilRadioOption($this->lng->txt('grp_mail_all'), ilObjGroup::MAIL_ALLOWED_ALL,
1668  $this->lng->txt('grp_mail_all_info'));
1669  $mail_type->addOption($mail_all);
1670  $form->addItem($mail_type);
1671  }
1672 
1673  switch($a_mode)
1674  {
1675  case 'create':
1676  $form->setTitle($this->lng->txt('grp_new'));
1677  $form->setTitleIcon(ilUtil::getImagePath('icon_grp.svg'));
1678 
1679  $form->addCommandButton('save',$this->lng->txt('grp_new'));
1680  $form->addCommandButton('cancel',$this->lng->txt('cancel'));
1681  break;
1682 
1683  case 'edit':
1684  $form->setTitle($this->lng->txt('grp_edit'));
1685  $form->setTitleIcon(ilUtil::getImagePath('icon_grp.svg'));
1686 
1687  // Edit ecs export settings
1688  include_once 'Modules/Group/classes/class.ilECSGroupSettings.php';
1689  $ecs = new ilECSGroupSettings($this->object);
1690  $ecs->addSettingsToForm($form, 'grp');
1691 
1692  $form->addCommandButton('update',$this->lng->txt('save'));
1693  $form->addCommandButton('cancel',$this->lng->txt('cancel'));
1694  break;
1695  }
1696  return $form;
1697  }
1698 
1706  protected function setSubTabs($a_tab)
1707  {
1708  global $rbacsystem,$ilUser,$ilAccess;
1709 
1710  switch($a_tab)
1711  {
1712 
1713  case 'settings':
1714  $this->tabs_gui->addSubTabTarget("grp_settings",
1715  $this->ctrl->getLinkTarget($this,'edit'),
1716  "edit", get_class($this));
1717 
1718  $this->tabs_gui->addSubTabTarget("grp_info_settings",
1719  $this->ctrl->getLinkTarget($this,'editInfo'),
1720  "editInfo", get_class($this));
1721 
1722  // custom icon
1723  if ($this->ilias->getSetting("custom_icons"))
1724  {
1725  $this->tabs_gui->addSubTabTarget("grp_icon_settings",
1726  $this->ctrl->getLinkTarget($this,'editGroupIcons'),
1727  "editGroupIcons", get_class($this));
1728  }
1729 
1730  include_once("./Services/Maps/classes/class.ilMapUtil.php");
1731  if (ilMapUtil::isActivated())
1732  {
1733  $this->tabs_gui->addSubTabTarget("grp_map_settings",
1734  $this->ctrl->getLinkTarget($this,'editMapSettings'),
1735  "editMapSettings", get_class($this));
1736  }
1737 
1738  $this->tabs_gui->addSubTabTarget('groupings',
1739  $this->ctrl->getLinkTargetByClass('ilobjcoursegroupinggui','listGroupings'),
1740  'listGroupings',
1741  get_class($this));
1742 
1743  include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1744  include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1745  // only show if export permission is granted
1746  if(ilPrivacySettings::_getInstance()->checkExportAccess($this->object->getRefId()) or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
1747  {
1748  $this->tabs_gui->addSubTabTarget('grp_custom_user_fields',
1749  $this->ctrl->getLinkTargetByClass('ilobjectcustomuserfieldsgui'),
1750  '',
1751  'ilobjectcustomuserfieldsgui');
1752  }
1753 
1754  // news settings
1755  if ($this->object->getUseNews())
1756  {
1757  $this->tabs_gui->addSubTab('obj_news_settings',
1758  $this->lng->txt("cont_news_settings"),
1759  $this->ctrl->getLinkTargetByClass('ilcontainernewssettingsgui'));
1760  }
1761 
1762  break;
1763 
1764 
1765  }
1766  }
1767 
1774  private function checkAgreement()
1775  {
1776  global $ilUser,$ilAccess;
1777 
1778  if($ilAccess->checkAccess('write','',$this->object->getRefId()))
1779  {
1780  return true;
1781  }
1782 
1783  // Disable aggrement if is not member of group
1784  if(!$this->object->members_obj->isAssigned($ilUser->getId()))
1785  {
1786  return true;
1787  }
1788 
1789  include_once './Services/Container/classes/class.ilMemberViewSettings.php';
1790  if(ilMemberViewSettings::getInstance()->isActive())
1791  {
1792  return true;
1793  }
1794 
1795  include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1796  include_once('Services/Membership/classes/class.ilMemberAgreement.php');
1797  $privacy = ilPrivacySettings::_getInstance();
1798 
1799  // Check agreement
1800  if(($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
1801  and !ilMemberAgreement::_hasAccepted($ilUser->getId(),$this->object->getId()))
1802  {
1803  return false;
1804  }
1805  // Check required fields
1806  include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
1807  if(!ilCourseUserData::_checkRequired($ilUser->getId(),$this->object->getId()))
1808  {
1809  return false;
1810  }
1811  return true;
1812  }
1813 
1814 
1819  public function prepareOutput($a_show_subobjects = true)
1820  {
1821  global $rbacsystem;
1822  if(!$this->getCreationMode())
1823  {
1824  /*
1825  include_once './Services/Container/classes/class.ilMemberViewSettings.php';
1826  $settings = ilMemberViewSettings::getInstance();
1827  if($settings->isActive() and $settings->getContainer() != $this->object->getRefId())
1828  {
1829  $settings->setContainer($this->object->getRefId());
1830  $rbacsystem->initMemberView();
1831  }
1832  */
1833  }
1834  parent::prepareOutput($a_show_subobjects);
1835  }
1836 
1841  public function createMailSignature()
1842  {
1843  $link = chr(13).chr(10).chr(13).chr(10);
1844  $link .= $this->lng->txt('grp_mail_permanent_link');
1845  $link .= chr(13).chr(10).chr(13).chr(10);
1846  include_once 'Services/Link/classes/class.ilLink.php';
1847  $link .= ilLink::_getLink($this->object->getRefId());
1848  return rawurlencode(base64_encode($link));
1849  }
1850 
1851  protected function initHeaderAction($a_sub_type = null, $a_sub_id = null)
1852  {
1853  global $ilSetting, $ilUser;
1854 
1855  $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
1856 
1857  include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
1858  if(ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId()))
1859  {
1860  include_once "Services/Membership/classes/class.ilMembershipNotifications.php";
1862  {
1863  $noti = new ilMembershipNotifications($this->ref_id);
1864  if(!$noti->isCurrentUserActive())
1865  {
1866  $lg->addHeaderIcon("not_icon",
1867  ilUtil::getImagePath("notification_off.svg"),
1868  $this->lng->txt("grp_notification_deactivated"));
1869 
1870  $this->ctrl->setParameter($this, "grp_ntf", 1);
1871  $caption = "grp_activate_notification";
1872  }
1873  else
1874  {
1875  $lg->addHeaderIcon("not_icon",
1876  ilUtil::getImagePath("notification_on.svg"),
1877  $this->lng->txt("grp_notification_activated"));
1878 
1879  $this->ctrl->setParameter($this, "grp_ntf", 0);
1880  $caption = "grp_deactivate_notification";
1881  }
1882 
1883  if($noti->canCurrentUserEdit())
1884  {
1885  $lg->addCustomCommand($this->ctrl->getLinkTarget($this, "saveNotification"),
1886  $caption);
1887  }
1888 
1889  $this->ctrl->setParameter($this, "grp_ntf", "");
1890  }
1891  }
1892 
1893  return $lg;
1894  }
1895 
1896 
1901  public function addCustomData($a_data)
1902  {
1903  // object defined fields
1904  include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
1905  $odfs = ilCourseUserData::_getValuesByObjId($this->object->getId());
1906 
1907  $res_data = array();
1908  foreach($a_data as $usr_id => $user_data)
1909  {
1910  $res_data[$usr_id] = $user_data;
1911 
1912  // udf
1913  include_once './Services/User/classes/class.ilUserDefinedData.php';
1914  $udf_data = new ilUserDefinedData($usr_id);
1915  foreach($udf_data->getAll() as $field => $value)
1916  {
1917  list($f,$field_id) = explode('_', $field);
1918  $res_data[$usr_id]['udf_'.$field_id] = (string) $value;
1919  }
1920 
1921  foreach((array) $odfs[$usr_id] as $cdf_field => $cdf_value)
1922  {
1923  $res_data[$usr_id]['cdf_'.$cdf_field] = (string) $cdf_value;
1924  }
1925  }
1926 
1927  return $res_data;
1928  }
1929 
1934  public function getLocalRoles()
1935  {
1936  $local_roles = $this->object->getLocalGroupRoles(false);
1937  $grp_member = $this->object->getDefaultMemberRole();
1938  $grp_roles = array();
1939 
1940  //put the group member role to the top of the crs_roles array
1941  if(in_array($grp_member, $local_roles))
1942  {
1943  $grp_roles[$grp_member] = ilObjRole::_getTranslation(array_search ($grp_member, $local_roles));
1944  unset($local_roles[$grp_roles[$grp_member]]);
1945  }
1946 
1947  foreach($local_roles as $title => $role_id)
1948  {
1949  $grp_roles[$role_id] = ilObjRole::_getTranslation($title);
1950  }
1951  return $grp_roles;
1952  }
1953 
1957  protected function jump2UsersGalleryObject()
1958  {
1959  $this->ctrl->redirectByClass('ilUsersGalleryGUI');
1960  }
1961 
1966  {
1967  $this->ctrl->setReturn($this, "view");
1968  }
1969 
1970 } // END class.ilObjGroupGUI
1971 ?>
static lookupTemplateId($a_ref_id)
Lookup template id ilDB $ilDB.
static _modifyItemGUI($a_item_list_gui, $a_cmd_class, $a_item_data, $a_show_path, $a_abo_status, $a_course_ref_id, $a_course_obj_id, $a_parent_ref_id=0)
We need a static version of this, e.g.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _lookupLogin($a_user_id)
lookup login
static _lookupName($a_user_id)
lookup user name
prepareOutput($a_show_subobjects=true)
Handle member view.
setLatitude($a_latitude)
Set Latitude.
global $ilErr
Definition: raiseError.php:16
This class represents an option in a radio group.
setTitle($a_title)
Set Title.
$lg
Definition: example_018.php:62
static isActive()
Is feature active?
renderObject()
Render group.
setSideColumnReturn()
Set return point for side column actions.
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.
Class ilInfoScreenGUI.
Class ilObjGroupGUI.
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
static _fieldsToInfoString($a_obj_id)
Fields to info string.
editInfoObject()
edit info
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
Class ilUserDefinedData.
const GRP_REGISTRATION_DEACTIVATED
This class represents a property form user interface.
addContentTab()
Add content tab.
GUI class for the workflow of copying objects.
getLocalRoles()
returns all local roles [role_id] => title
const TITLE_LENGTH
max length of object title
const IL_GRP_ADMIN
$_GET["client_id"]
initInfoEditor()
init info editor
This class represents a section header in a property form.
static _getValuesByObjId($a_obj_id)
Get values by obj_id (for all users)
const LP_STATUS_NOT_ATTEMPTED
Class ilObject Basic functions for all objects.
editGroupIconsObject($a_form=null)
edit container icons
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
unsubscribeObject()
unsubscribe from group
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
updateInfoObject()
update info
$cmd
Definition: sahs_server.php:35
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
setValue($a_value)
Set Value.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
ilUsersGalleryGUI: ilPublicUserProfileGUI ilUsersGalleryGUI: ilCourseMembershipGUI, ilGroupMembershipGUI
static _lookupFailedForObject($a_obj_id, $a_user_ids=null)
Get failed users for object.
static _tracProgress($a_user_id, $a_obj_id, $a_ref_id, $a_obj_type='')
This class represents a checkbox property in a property form.
static _lookupTitle($a_id)
lookup object title
Add rich text string
The name of the decorator.
editMapSettingsObject()
Edit Map Settings.
Class ilMailMemberSearchGUI.
afterSave(\ilObject $new_object)
After object creation.
__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output=false)
Constructor public.
static handleCode($a_ref_id, $a_type, $a_code)
Handle target parameter.
const IL_CAL_UNIX
const GRP_REGISTRATION_PASSWORD
setInfo($a_info)
Set Info.
initForm($a_mode='edit')
init create/edit form
updateGroupTypeObject()
change group type
const GRP_REGISTRATION_REQUEST
static _readUsersProfileData($a_user_ids)
STATIC METHOD get user data of selected users.
static _hasAccepted($a_usr_id, $a_obj_id)
Check if user has accepted agreement.
Class ilMailMemberCourseRoles.
setSubTabs($a_tab)
set sub tabs
const LP_STATUS_IN_PROGRESS
This class represents a date/time property in a property form.
static _catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
global $ilCtrl
Definition: ilias.php:18
setInfo($a_info)
Set Information Text.
infoScreen()
show information screen
setChecked($a_checked)
Set Checked.
Export User Interface Class.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
static _enabledUserRelatedData()
check wether user related tracking is enabled or not
This class represents a hidden form property in a property form.
$info
Definition: example_052.php:80
static switchTemplate($a_ref_id, $a_new_tpl_id)
input GUI for a time span (start and end date)
GUI class for public user profile presentation.
static _enabledLearningProgress()
check wether learing progress is enabled or not
static lookupRegistrationInfo($a_obj_id)
Lookup registration info ilDB $ilDB ilObjUser $ilUser ilLanguage $lng.
This class represents a property in a property form.
setValue($a_value)
Set Value.
const LP_STATUS_FAILED
static _lookupProgressByObjId($a_obj_id)
lookup progress for a specific object
showPermanentLink(&$tpl)
show permanent link
getId()
get object id public
addSubItem($a_item)
Add Subitem.
const MAIL_ALLOWED_TUTORS
showCustomIconsEditing($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
show edit section of custom icons for container
static _getInstanceByType($a_type)
Get Singleton Instance.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Class ilECSGroupSettings.
This class handles base functions for mail handling.
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
static _lookupObjId($a_id)
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
setValue($a_value)
Set Value.
static getDefaultSettings()
Get default longitude, latitude and zoom.
This class represents a location property in a property form.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
forwardToStyleSheet()
Forward to style object.
& forwardToPageObject()
forward command to page object
$ilUser
Definition: imgupload.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...
editObject()
edit object
setShowTime($a_showtime)
Set Show Time Information.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
static getAvailablePortfolioLinksForUserIds(array $a_owner_ids, $a_back_url=null)
GUI class for group registrations.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
static _checkRequired($a_usr_id, $a_obj_id)
Check required fields.
static _isOnList($a_usr_id, $a_obj_id)
Check if a user on the waiting list.
Class ilUsersGalleryParticipants.
$failed
Definition: Utf8Test.php:85
static _getTranslation($a_role_title)
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
Class ilObjCourseGroupingGUI.
static _hasFields($a_container_id)
Check if there are any define fields.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
modifyItemGUI($a_item_list_gui, $a_item_data, $a_show_path)
Modify Item ListGUI for presentation in container type $tree.
GUI class for membership features.
static _lookupInProgressForObject($a_obj_id, $a_user_ids=null)
Get in progress users for object.
createMailSignature()
Create a course mail signature.
updateObject()
update group settings
static isActivated()
Checks whether Map feature is activated.
static getContentStylePath($a_style_id)
get content style path
This class represents a custom property in a property form.
checkAgreement()
Check agreement and redirect if it is not accepted.
static generateCode()
Generate new registration key.
initHeaderAction($a_sub_type=null, $a_sub_id=null)
static _lookupAboStatus($a_id)
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
static translateViewMode($a_obj_id, $a_view_mode, $a_ref_id=null)
translate view mode
static _goto($a_target, $a_add="")
goto target group
Create new PHPExcel object
obj_idprivate
global $ilSetting
Definition: privfeed.php:17
readMemberData($ids, $selected_columns=null)
static getInstance()
Get instance.
const MAIL_ALLOWED_ALL
This class represents a text area property in a property form.
Class ilCourseContentGUI.
$ret
Definition: parser.php:6
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
getCreationMode()
get creation mode
getRefId()
get reference id public
Class ilContainerGUI.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
updateGroupIconsObject()
update group icons
static getLogger($a_component_id)
Get component logger.
static _getInstance()
Get instance of ilPrivacySettings.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
GUI class for service settings (calendar, notes, comments)
static _lookupCompletedForObject($a_obj_id, $a_user_ids=null)
Get completed users for object.
update()
update object in db
setValue($a_value)
Set Value.
static redirect($a_script)
http redirect to other script
const LP_STATUS_COMPLETED
const GRP_REGISTRATION_DIRECT
static getInstance($a_obj_id)
addHeaderAction()
Add header action menu.
leaveObject()
leave Group public
Membership notification settings.
Class ilObjUserTrackingGUI.
$_POST["username"]
$html
Definition: example_001.php:87
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
editObject(ilPropertyFormGUI $a_form=null)
Edit object.
membersObject()
Called from goto?
Confirmation screen class.
static getInstance()
Constructor.
static getInstance($a_ref_id, $a_include_auto_entries)
Get instance.
static _getFields($a_container_id, $a_sort=IL_CDF_SORT_NAME)
Get all fields of a container.
saveNotificationObject()
:TEMP: Save notification setting (from infoscreen)