24 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
67 $this->lng->loadLanguageModule(
'crs');
68 $this->lng->loadLanguageModule(
'grp');
69 $this->lng->loadLanguageModule(
'ps');
74 $this->container = $a_container;
75 $this->ref_id = $this->container->getRefId();
126 $this->registration_possible = $a_status;
170 $parent = $tree->getParentId($this->container->getRefId());
172 $message = sprintf($this->lng->txt($this->container->getType().
'_removed_from_waiting_list'),
173 $this->container->getTitle());
176 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $parent);
177 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
231 include_once(
'Modules/Course/classes/class.ilObjCourseGrouping.php');
239 $tpl =
new ilTemplate(
'tpl.membership_limitation_form.html',
true,
true,
'Services/Membership');
240 $tpl->setVariable(
'LIMIT_INTRO',$this->lng->txt($this->type.
'_grp_info_reg'));
248 if($ilAccess->checkAccess(
'visible',
'',$ref_id,$type))
250 include_once(
'./Services/Link/classes/class.ilLink.php');
251 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $ref_id);
252 $tpl->setVariable(
'LINK_ITEM',
253 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
""));
254 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
255 $tpl->setVariable(
'ITEM_LINKED_TITLE',$title);
259 $tpl->setVariable(
'ITEM_TITLE');
261 $tpl->setCurrentBlock(
'items');
263 $tpl->setVariable(
'ALT_ICON',$this->lng->txt(
'obj_'.$type));
264 $tpl->parseCurrentBlock();
272 $mem->setAlert($this->container->getMessage());
275 $this->form->addItem($mem);
293 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
299 $this->lng->loadLanguageModule(
'ps');
301 include_once(
'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
304 if(!count($fields_info->getExportableFields()))
310 $section->setTitle($this->lng->txt($this->type.
'_usr_agreement'));
313 include_once
'./Services/Membership/classes/class.ilMemberAgreementGUI.php';
320 if($this->privacy->confirmationRequired($this->type))
336 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
337 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
345 $cdf->
setValue($this->lng->txt($this->type.
'_ps_cdf_info'));
346 $cdf->setRequired(
true);
348 foreach($cdf_fields as $field_obj)
350 $course_user_data =
new ilCourseUserData($ilUser->getId(),$field_obj->getId());
352 switch($field_obj->getType())
355 $select =
new ilSelectInputGUI($field_obj->getName(),
'cdf['.$field_obj->getId().
']');
357 $select->setOptions($field_obj->prepareSelectBox());
358 if($field_obj->isRequired())
360 $select->setRequired(
true);
363 $cdf->addSubItem($select);
369 $text =
new ilTextInputGUI($field_obj->getName(),
'cdf['.$field_obj->getId().
']');
372 $text->setMaxLength(255);
373 if($field_obj->isRequired())
375 $text->setRequired(
true);
377 $cdf->addSubItem($text);
381 $this->form->addItem($cdf);
399 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
400 if(!$this->privacy->confirmationRequired($this->type))
418 $required_fullfilled =
true;
421 switch($field_obj->getType())
426 list($field_id,$option_id) = explode(
'_',
$_POST[
'cdf_'.$field_obj->getId()]);
428 #$GLOBALS['ilLog']->write(__METHOD__.': '.print_r($field_id,TRUE).' '.print_r($option_id,TRUE).' '.print_r($_POST,TRUE));
430 $open_answer_indexes = (array) $field_obj->getValueOptions();
431 if(in_array($option_id, $open_answer_indexes))
433 $value =
$_POST[
'cdf_oa_'.$field_obj->getId().
'_'.$option_id];
437 $value = $field_obj->getValueById($option_id);
442 $value =
$_POST[
'cdf_'.$field_obj->getId()];
446 $GLOBALS[
'ilLog']->write(__METHOD__.
': new value '. $value);
449 $course_user_data =
new ilCourseUserData($ilUser->getId(),$field_obj->getId());
450 $course_user_data->
setValue($value);
451 $course_user_data->update();
453 if($field_obj->isRequired() and !$value)
455 $required_fullfilled =
false;
459 return $required_fullfilled;
472 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
478 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
479 $this->agreement =
new ilMemberAgreement($ilUser->getId(),$this->container->getId());
481 $this->agreement->setAcceptanceTime(time());
482 $this->agreement->save();
494 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
495 $tree->getParentId($this->container->getRefId()));
496 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
515 $this->tpl->setContent($this->form->getHTML());
561 if(is_object($this->form))
566 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
568 $this->form->setFormAction($this->ctrl->getFormAction($this,
'join'));
602 $this->form->addCommandButton(
'join',$this->lng->txt(
'mem_add_to_wl'));
603 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
607 $this->form->addCommandButton(
'join',$this->lng->txt(
'join'));
608 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
613 sprintf($this->lng->txt($this->container->getType().
'_cancel_waiting_list'),
614 $this->container->getTitle())
616 $this->form->addCommandButton(
'leaveWaitingList', $this->lng->txt(
'leave_waiting_list'));
617 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
631 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
632 $tree->getParentId($this->container->getRefId()));
633 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
641 $this->participants->deleteSubscriber($ilUser->getId());
644 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
645 $tree->getParentId($this->container->getRefId()));
646 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");