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(
'usr_agreement'));
313 $fields =
new ilCustomInputGUI($this->lng->txt($this->type.
'_user_agreement'),
'');
314 $tpl =
new ilTemplate(
'tpl.agreement_form.html',
true,
true,
'Services/Membership');
315 $tpl->setVariable(
'TXT_INFO_AGREEMENT',$this->lng->txt($this->type.
'_info_agreement'));
316 foreach($fields_info->getExportableFields() as $field)
318 $tpl->setCurrentBlock(
'field_item');
319 $tpl->setVariable(
'FIELD_NAME',$this->lng->txt($field));
320 $tpl->parseCurrentBlock();
323 $this->form->addItem($fields);
328 if($this->privacy->confirmationRequired($this->type))
330 $agreement =
new ilCheckboxInputGUI($this->lng->txt($this->type.
'_agree'),
'agreement');
332 $agreement->setOptionTitle($this->lng->txt($this->type.
'_info_agree'));
333 $agreement->setValue(1);
334 $this->form->addItem($agreement);
349 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
350 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
358 $cdf->
setValue($this->lng->txt($this->type.
'_ps_cdf_info'));
359 $cdf->setRequired(
true);
361 foreach($cdf_fields as $field_obj)
363 $course_user_data =
new ilCourseUserData($ilUser->getId(),$field_obj->getId());
365 switch($field_obj->getType())
368 $select =
new ilSelectInputGUI($field_obj->getName(),
'cdf['.$field_obj->getId().
']');
370 $select->setOptions($field_obj->prepareSelectBox());
371 if($field_obj->isRequired())
373 $select->setRequired(
true);
376 $cdf->addSubItem($select);
382 $text =
new ilTextInputGUI($field_obj->getName(),
'cdf['.$field_obj->getId().
']');
385 $text->setMaxLength(255);
386 if($field_obj->isRequired())
388 $text->setRequired(
true);
390 $cdf->addSubItem($text);
394 $this->form->addItem($cdf);
412 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
413 if(!$this->privacy->confirmationRequired($this->type))
430 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
431 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
433 $all_required =
true;
436 switch($field_obj->getType())
441 foreach((array) $field_obj->getValues() as $v)
455 $course_user_data =
new ilCourseUserData($ilUser->getId(),$field_obj->getId());
456 $course_user_data->
setValue($value);
457 $course_user_data->update();
459 if($field_obj->isRequired() and (!strlen($value) or $value == -1))
461 $all_required =
false;
464 return $all_required;
477 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
483 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
484 $this->agreement =
new ilMemberAgreement($ilUser->getId(),$this->container->getId());
486 $this->agreement->setAcceptanceTime(time());
487 $this->agreement->save();
499 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
500 $tree->getParentId($this->container->getRefId()));
501 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
520 $this->tpl->setContent($this->form->getHTML());
566 if(is_object($this->form))
571 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
573 $this->form->setFormAction($this->ctrl->getFormAction($this,
'join'));
607 $this->form->addCommandButton(
'join',$this->lng->txt(
'mem_add_to_wl'));
608 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
612 $this->form->addCommandButton(
'join',$this->lng->txt(
'join'));
613 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
618 sprintf($this->lng->txt($this->container->getType().
'_cancel_waiting_list'),
619 $this->container->getTitle())
621 $this->form->addCommandButton(
'leaveWaitingList', $this->lng->txt(
'leave_waiting_list'));
622 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
636 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
637 $tree->getParentId($this->container->getRefId()));
638 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
646 $this->participants->deleteSubscriber($ilUser->getId());
649 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
650 $tree->getParentId($this->container->getRefId()));
651 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");