24 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
74 $this->lng->loadLanguageModule(
'crs');
75 $this->lng->loadLanguageModule(
'grp');
76 $this->lng->loadLanguageModule(
'ps');
77 $this->lng->loadLanguageModule(
'membership');
82 $this->container = $a_container;
83 $this->ref_id = $this->container->getRefId();
134 $this->registration_possible = $a_status;
178 $tree = $DIC[
'tree'];
182 $parent =
$tree->getParentId($this->container->getRefId());
185 $this->lng->txt($this->container->getType() .
'_removed_from_waiting_list'),
186 $this->container->getTitle()
188 ilUtil::sendSuccess(
$message,
true);
190 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $parent);
191 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
245 $ilAccess = $DIC[
'ilAccess'];
248 include_once(
'Modules/Course/classes/class.ilObjCourseGrouping.php');
255 $tpl =
new ilTemplate(
'tpl.membership_limitation_form.html',
true,
true,
'Services/Membership');
256 $tpl->setVariable(
'LIMIT_INTRO', $this->lng->txt($this->type .
'_grp_info_reg'));
263 if ($ilAccess->checkAccess(
'visible',
'', $ref_id,
$type)) {
264 include_once(
'./Services/Link/classes/class.ilLink.php');
265 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $ref_id);
268 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"")
270 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
271 $tpl->setVariable(
'ITEM_LINKED_TITLE',
$title);
273 $tpl->setVariable(
'ITEM_TITLE');
275 $tpl->setCurrentBlock(
'items');
276 $tpl->setVariable(
'TYPE_ICON', ilObject::_getIcon(
$obj_id,
'tiny',
$type));
277 $tpl->setVariable(
'ALT_ICON', $this->lng->txt(
'obj_' .
$type));
278 $tpl->parseCurrentBlock();
285 $mem->setAlert($this->container->getMessage());
288 $this->form->addItem($mem);
307 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
312 $this->lng->loadLanguageModule(
'ps');
314 include_once(
'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
317 if (!count($fields_info->getExportableFields())) {
322 $section->setTitle($this->lng->txt($this->type .
'_usr_agreement'));
325 include_once
'./Services/Membership/classes/class.ilMemberAgreementGUI.php';
332 if ($this->privacy->confirmationRequired($this->type)) {
349 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
350 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
357 $cdf->
setValue($this->lng->txt($this->type .
'_ps_cdf_info'));
358 $cdf->setRequired(
true);
360 foreach ($cdf_fields as $field_obj) {
363 switch ($field_obj->getType()) {
365 $select =
new ilSelectInputGUI($field_obj->getName(),
'cdf[' . $field_obj->getId() .
']');
367 $select->setOptions($field_obj->prepareSelectBox());
368 if ($field_obj->isRequired()) {
369 $select->setRequired(
true);
372 $cdf->addSubItem($select);
381 $text->setMaxLength(255);
382 if ($field_obj->isRequired()) {
383 $text->setRequired(
true);
385 $cdf->addSubItem(
$text);
389 $this->form->addItem($cdf);
405 if (
$_POST[
'agreement']) {
408 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
409 if (!$this->privacy->confirmationRequired($this->type)) {
428 $required_fullfilled =
true;
430 switch ($field_obj->getType()) {
434 list($field_id, $option_id) = explode(
'_',
$_POST[
'cdf_' . $field_obj->getId()]);
436 $open_answer_indexes = (array) $field_obj->getValueOptions();
437 if (in_array($option_id, $open_answer_indexes)) {
438 $value =
$_POST[
'cdf_oa_' . $field_obj->getId() .
'_' . $option_id];
440 $value = $field_obj->getValueById($option_id);
445 $value =
$_POST[
'cdf_' . $field_obj->getId()];
450 $course_user_data->
setValue($value);
451 $course_user_data->update();
454 if ($field_obj->isRequired()
and $value ==
"") {
455 $required_fullfilled =
false;
459 return $required_fullfilled;
474 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
479 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
482 $this->agreement->setAcceptanceTime(time());
483 $this->agreement->save();
495 $tree = $DIC[
'tree'];
501 $tree->getParentId($this->container->getRefId())
503 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
523 $this->tpl->setContent($this->form->getHTML());
538 $form->setValuesByPost();
539 if ($this->join_error) {
575 if (is_object($this->form)) {
579 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
581 $this->form->setFormAction($this->ctrl->getFormAction($this,
'join'));
613 $this->form->addCommandButton(
'join', $this->lng->txt(
'mem_add_to_wl'));
614 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
616 $this->form->addCommandButton(
'join', $this->lng->txt(
'join'));
617 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
622 $this->lng->txt($this->container->getType() .
'_cancel_waiting_list'),
623 $this->container->getTitle()
626 $this->form->addCommandButton(
'leaveWaitingList', $this->lng->txt(
'leave_waiting_list'));
627 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
640 $tree = $DIC[
'tree'];
644 ilUtil::sendSuccess($this->lng->txt(
'sub_request_saved'),
true);
648 $tree->getParentId($this->container->getRefId())
650 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
658 $tree = $DIC[
'tree'];
661 $this->participants->deleteSubscriber(
$ilUser->getId());
662 ilUtil::sendSuccess($this->lng->txt(
'sub_request_deleted'),
true);
667 $tree->getParentId($this->container->getRefId())
669 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
show(ilPropertyFormGUI $form=null)
show registration form
fillAgreement()
Show user agreement.
setValue($a_value)
Set Value.
static addExportFieldInfo($form, $a_obj_id, $a_type)
Add export field info to form type $lng.
cancelSubscriptionRequest()
initForm()
init registration form
getWaitingList()
Get waiting list object.
fillRegistrationPeriod()
show informations about the registration period
fillRegistrationType()
show informations about registration procedure
updateSubscriptionRequest()
Update subscription message.
static _lookupTitle($a_id)
lookup object title
isWaitingListActive()
Check if the waiting list is active Maximum of members exceeded or any user on the waiting list...
getFormTitle()
Get title for property form.
Base class for Course and Group registration.
static addCustomFields($form, $a_obj_id, $a_type, $a_mode='user')
Add custom course fields.
showCustomFields()
Show course defined fields.
setAccepted($a_status)
set accepted
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
validateAgreement()
Check Agreement.
setAccepted($a_status)
Set Agreement accepted.
catch(Exception $e) $message
initWaitingList()
Init waiting list (course or group waiting list)
enableRegistration($a_status)
set registration disabled
static _getInstanceByType($a_type)
Get Singleton Instance.
validate()
validate join request
static _lookupObjId($a_id)
special template class to simplify handling of ITX/PEAR
isRegistrationPossible()
check if registration is possible
static addAgreement($form, $a_obj_id, $a_type)
Add agreement to form.
This class represents a text property in a property form.
validateCustomFields()
Check required course fields.
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 _lookupType($a_id, $a_reference=false)
lookup object type
static _hasFields($a_container_id)
Check if there are any define fields.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static _checkGroupingDependencies(&$container_obj, $a_user_id=null)
cancel()
cancel subscription
This class represents a non editable value in a property form.
fillMembershipLimitation()
Show membership limitations.
fillInformations()
fill informations
addCommandButtons()
Add command buttons.
static _getGroupingItems($container_obj)
Get courses/groups that are assigned to the same membership limitation.
fillMaxMembers()
show informations about the maximum number of user.
__construct($a_container)
Constructor.
static _getInstance()
Get instance of ilPrivacySettings.
getContainer()
Parent object.
initParticipants()
Init participants object (course or group participants)
static _getFields($a_container_id, $a_sort=IL_CDF_SORT_NAME)
Get all fields of a container.