24include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
70 $this->lng->loadLanguageModule(
'crs');
71 $this->lng->loadLanguageModule(
'grp');
72 $this->lng->loadLanguageModule(
'ps');
73 $this->lng->loadLanguageModule(
'membership');
78 $this->container = $a_container;
79 $this->ref_id = $this->container->getRefId();
130 $this->registration_possible = $a_status;
174 $parent = $tree->getParentId($this->container->getRefId());
177 $this->lng->txt($this->container->getType() .
'_removed_from_waiting_list'),
178 $this->container->getTitle()
182 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $parent);
183 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
237 include_once(
'Modules/Course/classes/class.ilObjCourseGrouping.php');
244 $tpl =
new ilTemplate(
'tpl.membership_limitation_form.html',
true,
true,
'Services/Membership');
245 $tpl->setVariable(
'LIMIT_INTRO', $this->lng->txt($this->type .
'_grp_info_reg'));
252 if ($ilAccess->checkAccess(
'visible',
'',
$ref_id,
$type)) {
253 include_once(
'./Services/Link/classes/class.ilLink.php');
254 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$ref_id);
257 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"")
259 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
260 $tpl->setVariable(
'ITEM_LINKED_TITLE',
$title);
262 $tpl->setVariable(
'ITEM_TITLE');
264 $tpl->setCurrentBlock(
'items');
266 $tpl->setVariable(
'ALT_ICON', $this->lng->txt(
'obj_' .
$type));
267 $tpl->parseCurrentBlock();
270 $mem->setHtml(
$tpl->get());
274 $mem->setAlert($this->container->getMessage());
277 $this->form->addItem($mem);
294 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())) {
309 $section->setTitle($this->lng->txt($this->type .
'_usr_agreement'));
312 include_once
'./Services/Membership/classes/class.ilMemberAgreementGUI.php';
319 if ($this->privacy->confirmationRequired($this->type)) {
334 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
335 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
342 $cdf->setValue($this->lng->txt($this->type .
'_ps_cdf_info'));
343 $cdf->setRequired(
true);
345 foreach ($cdf_fields as $field_obj) {
348 switch ($field_obj->getType()) {
350 $select =
new ilSelectInputGUI($field_obj->getName(),
'cdf[' . $field_obj->getId() .
']');
352 $select->setOptions($field_obj->prepareSelectBox());
353 if ($field_obj->isRequired()) {
354 $select->setRequired(
true);
357 $cdf->addSubItem($select);
366 $text->setMaxLength(255);
367 if ($field_obj->isRequired()) {
368 $text->setRequired(
true);
370 $cdf->addSubItem(
$text);
374 $this->form->addItem($cdf);
388 if (
$_POST[
'agreement']) {
391 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
392 if (!$this->privacy->confirmationRequired($this->type)) {
409 $required_fullfilled =
true;
411 switch ($field_obj->getType()) {
415 list($field_id, $option_id) = explode(
'_',
$_POST[
'cdf_' . $field_obj->getId()]);
417 #$GLOBALS['ilLog']->write(__METHOD__.': '.print_r($field_id,TRUE).' '.print_r($option_id,TRUE).' '.print_r($_POST,TRUE));
419 $open_answer_indexes = (array) $field_obj->getValueOptions();
420 if (in_array($option_id, $open_answer_indexes)) {
421 $value =
$_POST[
'cdf_oa_' . $field_obj->getId() .
'_' . $option_id];
423 $value = $field_obj->getValueById($option_id);
428 $value =
$_POST[
'cdf_' . $field_obj->getId()];
432 $GLOBALS[
'ilLog']->write(__METHOD__ .
': new value ' . $value);
436 $course_user_data->setValue($value);
437 $course_user_data->update();
440 if ($field_obj->isRequired() and $value ==
"") {
441 $required_fullfilled =
false;
445 return $required_fullfilled;
458 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
463 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
465 $this->agreement->setAccepted($a_status);
466 $this->agreement->setAcceptanceTime(time());
467 $this->agreement->save();
482 $tree->getParentId($this->container->getRefId())
484 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
504 $this->tpl->setContent($this->form->getHTML());
518 if (!
$form->checkInput() || !$this->validate()) {
519 $form->setValuesByPost();
520 if ($this->join_error) {
554 if (is_object($this->form)) {
558 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
560 $this->form->setFormAction($this->ctrl->getFormAction($this,
'join'));
590 $this->form->addCommandButton(
'join', $this->lng->txt(
'mem_add_to_wl'));
591 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
593 $this->form->addCommandButton(
'join', $this->lng->txt(
'join'));
594 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
599 $this->lng->txt($this->container->getType() .
'_cancel_waiting_list'),
600 $this->container->getTitle()
603 $this->form->addCommandButton(
'leaveWaitingList', $this->lng->txt(
'leave_waiting_list'));
604 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
621 $tree->getParentId($this->container->getRefId())
623 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
630 $this->participants->deleteSubscriber(
$ilUser->getId());
636 $tree->getParentId($this->container->getRefId())
638 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
sprintf('%.4f', $callTime)
An exception for terminatinating execution or to throw for unit testing.
static _getFields($a_container_id, $a_sort=IL_CDF_SORT_NAME)
Get all fields of a container.
static _hasFields($a_container_id)
Check if there are any define fields.
static _getInstanceByType($a_type)
Get Singleton Instance.
static addExportFieldInfo($form, $a_obj_id, $a_type)
Add export field info to form @global type $lng.
static addCustomFields($form, $a_obj_id, $a_type, $a_mode='user')
Add custom course fields.
static addAgreement($form, $a_obj_id, $a_type)
Add agreement to form.
This class represents a non editable value in a property form.
static _checkGroupingDependencies(&$container_obj, $a_user_id=null)
static _getGroupingItems($container_obj)
Get courses/groups that are assigned to the same membership limitation.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static _lookupType($a_id, $a_reference=false)
lookup object type
static _getInstance()
Get instance of ilPrivacySettings.
Base class for Course and Group registration.
showCustomFields()
Show course defined fields.
fillRegistrationType()
show informations about registration procedure
getContainer()
Parent object.
initParticipants()
Init participants object (course or group participants)
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.
updateSubscriptionRequest()
Update subscription message.
fillRegistrationPeriod()
show informations about the registration period
fillAgreement()
Show user agreement.
addCommandButtons()
Add command buttons.
__construct($a_container)
Constructor.
validateAgreement()
Check Agreement.
setAccepted($a_status)
Set Agreement accepted.
cancel()
cancel subscription
validateCustomFields()
Check required course fields.
cancelSubscriptionRequest()
fillInformations()
fill informations
enableRegistration($a_status)
set registration disabled
initForm()
init registration form
validate()
validate join request
fillMembershipLimitation()
Show membership limitations.
getWaitingList()
Get waiting list object.
show(ilPropertyFormGUI $form=null)
show registration form
initWaitingList()
Init waiting list (course or group waiting list)
isRegistrationPossible()
check if registration is possible
fillMaxMembers()
show informations about the maximum number of user.
special template class to simplify handling of ITX/PEAR
This class represents a text property in a property form.
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
catch(Exception $e) $message