ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilGroupRegistrationGUI Class Reference

GUI class for group registrations. More...

+ Inheritance diagram for ilGroupRegistrationGUI:
+ Collaboration diagram for ilGroupRegistrationGUI:

Public Member Functions

 __construct ($a_container)
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
- Public Member Functions inherited from ilRegistrationGUI
 __construct ($a_container)
 Constructor. More...
 
 getContainer ()
 Parent object. More...
 
 getRefId ()
 Get ref. More...
 
 cancel ()
 cancel subscription More...
 
 show (ilPropertyFormGUI $form=null)
 show registration form More...
 
 join ()
 join More...
 

Protected Member Functions

 getFormTitle ()
 get form title More...
 
 fillInformations ()
 fill informations More...
 
 fillRegistrationPeriod ()
 show informations about the registration period More...
 
 fillMaxMembers ()
 fill max member informations More...
 
 fillRegistrationType ()
 fill registration procedure More...
 
 addCommandButtons ()
 Add group specific command buttons. More...
 
 validate ()
 validate join request More...
 
 add ()
 add user More...
 
 initParticipants ()
 Init course participants. More...
 
 initWaitingList ()
 
 isWaitingListActive ()
 
- Protected Member Functions inherited from ilRegistrationGUI
 isRegistrationPossible ()
 check if registration is possible More...
 
 enableRegistration ($a_status)
 set registration disabled More...
 
 initParticipants ()
 Init participants object (course or group participants) More...
 
 initWaitingList ()
 Init waiting list (course or group waiting list) More...
 
 isWaitingListActive ()
 Check if the waiting list is active Maximum of members exceeded or any user on the waiting list. More...
 
 getWaitingList ()
 Get waiting list object. More...
 
 leaveWaitingList ()
 
 getFormTitle ()
 Get title for property form. More...
 
 fillInformations ()
 fill informations More...
 
 fillRegistrationPeriod ()
 show informations about the registration period More...
 
 fillMaxMembers ()
 show informations about the maximum number of user. More...
 
 fillRegistrationType ()
 show informations about registration procedure More...
 
 fillMembershipLimitation ()
 Show membership limitations. More...
 
 fillAgreement ()
 Show user agreement. More...
 
 showCustomFields ()
 Show course defined fields. More...
 
 validateAgreement ()
 Check Agreement. More...
 
 validateCustomFields ()
 Check required course fields. More...
 
 setAccepted ($a_status)
 Set Agreement accepted. More...
 
 validate ()
 validate join request More...
 
 initForm ()
 init registration form More...
 
 addCommandButtons ()
 Add command buttons. More...
 
 updateSubscriptionRequest ()
 Update subscription message. More...
 
 cancelSubscriptionRequest ()
 

Additional Inherited Members

- Protected Attributes inherited from ilRegistrationGUI
 $privacy = null
 
 $container = null
 
 $ref_id
 
 $obj_id
 
 $participants
 
 $waiting_list = null
 
 $form
 
 $registration_possible = true
 
 $join_error = ''
 
 $tpl
 
 $lng
 
 $ctrl
 

Detailed Description

GUI class for group registrations.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 36 of file class.ilGroupRegistrationGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilGroupRegistrationGUI::__construct (   $a_container)

Constructor.

@access public

Parameters
objectcontainer object

Reimplemented from ilRegistrationGUI.

Definition at line 44 of file class.ilGroupRegistrationGUI.php.

45 {
46 parent::__construct($a_container);
47 }

Member Function Documentation

◆ add()

ilGroupRegistrationGUI::add ( )
protected

add user

@access protected

Parameters

return

Definition at line 424 of file class.ilGroupRegistrationGUI.php.

425 {
426 global $ilUser,$tree, $rbacreview, $lng, $ilCtrl;
427
428 // set aggreement accepted
429 $this->setAccepted(true);
430
431 include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
432 $free = max(0, $this->container->getMaxMembers() - $this->participants->getCountMembers());
433 $waiting_list = new ilGroupWaitingList($this->container->getId());
434 if (
435 $this->container->isMembershipLimited() and
436 $this->container->isWaitingListEnabled() and
437 (!$free or $waiting_list->getCountUsers())) {
438 $waiting_list->addToList($ilUser->getId());
439 $info = sprintf(
440 $this->lng->txt('grp_added_to_list'),
441 $this->container->getTitle(),
442 $waiting_list->getPosition($ilUser->getId())
443 );
444
445 $this->participants->sendNotification(
447 $ilUser->getId()
448 );
450 $ilCtrl->setParameterByClass(
451 "ilrepositorygui",
452 "ref_id",
453 $tree->getParentId($this->container->getRefId())
454 );
455 $ilCtrl->redirectByClass("ilrepositorygui", "");
456 }
457
458
459 switch ($this->container->getRegistrationType()) {
461
462 $this->participants->addSubscriber($ilUser->getId());
463 $this->participants->updateSubscriptionTime($ilUser->getId(), time());
464 $this->participants->updateSubject($ilUser->getId(), ilUtil::stripSlashes($_POST['subject']));
465
466 $this->participants->sendNotification(
468 $ilUser->getId()
469 );
470
471 ilUtil::sendSuccess($this->lng->txt("application_completed"), true);
472 $ilCtrl->setParameterByClass(
473 "ilrepositorygui",
474 "ref_id",
475 $tree->getParentId($this->container->getRefId())
476 );
477 $ilCtrl->redirectByClass("ilrepositorygui", "");
478 break;
479
480 default:
481
482 $this->participants->add($ilUser->getId(), IL_GRP_MEMBER);
483 $this->participants->sendNotification(
485 $ilUser->getId()
486 );
487 $this->participants->sendNotification(
489 $ilUser->getId()
490 );
491
492 include_once './Modules/Forum/classes/class.ilForumNotification.php';
493 ilForumNotification::checkForumsExistsInsert($this->container->getRefId(), $ilUser->getId());
494
495 if (!$_SESSION["pending_goto"]) {
496 ilUtil::sendSuccess($this->lng->txt("grp_registration_completed"), true);
497 $this->ctrl->returnToParent($this);
498 } else {
499 $tgt = $_SESSION["pending_goto"];
500 unset($_SESSION["pending_goto"]);
501 ilUtil::redirect($tgt);
502 }
503 break;
504 }
505 }
sprintf('%.4f', $callTime)
$_POST["username"]
$_SESSION["AccountId"]
const GRP_REGISTRATION_REQUEST
const IL_GRP_MEMBER
static checkForumsExistsInsert($ref_id, $user_id=0)
Waiting list for groups.
setAccepted($a_status)
Set Agreement accepted.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static redirect($a_script)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
global $ilCtrl
Definition: ilias.php:18
$info
Definition: index.php:5
$ilUser
Definition: imgupload.php:18

References $_POST, $_SESSION, $ilCtrl, $ilUser, $info, ilRegistrationGUI\$lng, ilRegistrationGUI\$waiting_list, ilForumNotification\checkForumsExistsInsert(), GRP_REGISTRATION_REQUEST, IL_GRP_MEMBER, ilUtil\redirect(), ilUtil\sendSuccess(), ilRegistrationGUI\setAccepted(), sprintf, ilUtil\stripSlashes(), ilGroupMembershipMailNotification\TYPE_NOTIFICATION_REGISTRATION, ilGroupMembershipMailNotification\TYPE_NOTIFICATION_REGISTRATION_REQUEST, ilGroupMembershipMailNotification\TYPE_SUBSCRIBE_MEMBER, and ilGroupMembershipMailNotification\TYPE_WAITING_LIST_MEMBER.

+ Here is the call graph for this function:

◆ addCommandButtons()

ilGroupRegistrationGUI::addCommandButtons ( )
protected

Add group specific command buttons.

Returns

Reimplemented from ilRegistrationGUI.

Definition at line 349 of file class.ilGroupRegistrationGUI.php.

350 {
351 global $ilUser;
352
353 parent::addCommandButtons();
354
355
356 switch ($this->container->getRegistrationType()) {
358 if ($this->participants->isSubscriber($ilUser->getId())) {
359 $this->form->clearCommandButtons();
360 $this->form->addCommandButton('updateSubscriptionRequest', $this->lng->txt('grp_update_subscr_request'));
361 $this->form->addCommandButton('cancelSubscriptionRequest', $this->lng->txt('grp_cancel_subscr_request'));
362 } else {
363 if (!$this->isRegistrationPossible()) {
364 return false;
365 }
366 $this->form->clearCommandButtons();
367 $this->form->addCommandButton('join', $this->lng->txt('grp_join_request'));
368 $this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
369 }
370 break;
371 }
372 return true;
373 }
isRegistrationPossible()
check if registration is possible

References $ilUser, GRP_REGISTRATION_REQUEST, and ilRegistrationGUI\isRegistrationPossible().

+ Here is the call graph for this function:

◆ executeCommand()

ilGroupRegistrationGUI::executeCommand ( )

Execute command.

@access public

Definition at line 54 of file class.ilGroupRegistrationGUI.php.

55 {
56 global $ilUser,$ilTabs;
57
58 $next_class = $this->ctrl->getNextClass($this);
59
60 if ($this->getWaitingList()->isOnList($ilUser->getId())) {
61 $ilTabs->activateTab('leave');
62 }
63
64 switch ($next_class) {
65 default:
66 $cmd = $this->ctrl->getCmd("show");
67 $this->$cmd();
68 break;
69 }
70 return true;
71 }
getWaitingList()
Get waiting list object.

References $ilUser, and ilRegistrationGUI\getWaitingList().

+ Here is the call graph for this function:

◆ fillInformations()

ilGroupRegistrationGUI::fillInformations ( )
protected

fill informations

@access protected

Parameters

return

Reimplemented from ilRegistrationGUI.

Definition at line 97 of file class.ilGroupRegistrationGUI.php.

98 {
99 if ($this->container->getInformation()) {
100 $imp = new ilNonEditableValueGUI($this->lng->txt('crs_important_info'), '', true);
101 $value = nl2br(ilUtil::makeClickable($this->container->getInformation(), true));
102 $imp->setValue($value);
103 $this->form->addItem($imp);
104 }
105 }
This class represents a non editable value in a property form.
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen

References ilUtil\makeClickable().

+ Here is the call graph for this function:

◆ fillMaxMembers()

ilGroupRegistrationGUI::fillMaxMembers ( )
protected

fill max member informations

@access protected

Returns

Reimplemented from ilRegistrationGUI.

Definition at line 170 of file class.ilGroupRegistrationGUI.php.

171 {
172 global $ilUser;
173
174 if (!$this->container->isMembershipLimited()) {
175 return true;
176 }
177
178 $tpl = new ilTemplate('tpl.max_members_form.html', true, true, 'Services/Membership');
179
180 if ($this->container->getMinMembers()) {
181 $tpl->setVariable('TXT_MIN', $this->lng->txt('mem_min_users'));
182 $tpl->setVariable('NUM_MIN', $this->container->getMinMembers());
183 }
184
185 if ($this->container->getMaxMembers()) {
186 $tpl->setVariable('TXT_MAX', $this->lng->txt('mem_max_users'));
187 $tpl->setVariable('NUM_MAX', $this->container->getMaxMembers());
188
189 include_once './Modules/Group/classes/class.ilObjGroupAccess.php';
190 $reg_info = ilObjGroupAccess::lookupRegistrationInfo($this->getContainer()->getId());
191 $free = $reg_info['reg_info_free_places'];
192
193
194 if ($free) {
195 $tpl->setVariable('NUM_FREE', $free);
196 } else {
197 $tpl->setVariable('WARN_FREE', $free);
198 }
199
200 include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
201 $waiting_list = new ilGroupWaitingList($this->container->getId());
202
203 if (
204 $this->container->isWaitingListEnabled() and
205 $this->container->isMembershipLimited() and
206 (!$free or $waiting_list->getCountUsers())) {
207 if ($waiting_list->isOnList($ilUser->getId())) {
208 $tpl->setVariable('TXT_WAIT', $this->lng->txt('mem_waiting_list_position'));
209 $tpl->setVariable('NUM_WAIT', $waiting_list->getPosition($ilUser->getId()));
210 } else {
211 $tpl->setVariable('TXT_WAIT', $this->lng->txt('mem_waiting_list'));
212 if ($free and $waiting_list->getCountUsers()) {
213 $tpl->setVariable('WARN_WAIT', $waiting_list->getCountUsers());
214 } else {
215 $tpl->setVariable('NUM_WAIT', $waiting_list->getCountUsers());
216 }
217 }
218 }
219
220 $alert = '';
221 if (
222 !$free and
223 !$this->container->isWaitingListEnabled()) {
224 // Disable registration
225 $this->enableRegistration(false);
226 $alert = $this->lng->txt('mem_alert_no_places');
227 } elseif (
228 $this->container->isWaitingListEnabled() and
229 $this->container->isMembershipLimited() and
230 $waiting_list->isOnList($ilUser->getId())) {
231 // Disable registration
232 $this->enableRegistration(false);
233 } elseif (
234 !$free and
235 $this->container->isWaitingListEnabled() and
236 $this->container->isMembershipLimited()) {
237 $alert = $this->lng->txt('grp_warn_no_max_set_on_waiting_list');
238 } elseif (
239 $free and
240 $this->container->isWaitingListEnabled() and
241 $this->container->isMembershipLimited() and
242 $this->getWaitingList()->getCountUsers()) {
243 $alert = $this->lng->txt('grp_warn_wl_set_on_waiting_list');
244 }
245 }
246
247 $max = new ilCustomInputGUI($this->lng->txt('mem_participants'));
248 $max->setHtml($tpl->get());
249 if (strlen($alert)) {
250 #$max->setAlert($alert);
251 ilUtil::sendFailure($alert);
252 }
253 $this->form->addItem($max);
254 }
This class represents a custom property in a property form.
static lookupRegistrationInfo($a_obj_id)
Lookup registration info @global ilDB $ilDB @global ilObjUser $ilUser @global ilLanguage $lng.
getContainer()
Parent object.
enableRegistration($a_status)
set registration disabled
special template class to simplify handling of ITX/PEAR
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.

References $ilUser, ilRegistrationGUI\$tpl, ilRegistrationGUI\$waiting_list, ilRegistrationGUI\enableRegistration(), ilRegistrationGUI\getContainer(), ilObjGroupAccess\lookupRegistrationInfo(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ fillRegistrationPeriod()

ilGroupRegistrationGUI::fillRegistrationPeriod ( )
protected

show informations about the registration period

@access protected

Reimplemented from ilRegistrationGUI.

Definition at line 112 of file class.ilGroupRegistrationGUI.php.

113 {
114 include_once('./Services/Calendar/classes/class.ilDateTime.php');
115 $now = new ilDateTime(time(), IL_CAL_UNIX, 'UTC');
116
117 if ($this->container->isRegistrationUnlimited()) {
118 $reg = new ilNonEditableValueGUI($this->lng->txt('mem_reg_period'));
119 $reg->setValue($this->lng->txt('mem_unlimited'));
120 $this->form->addItem($reg);
121 return true;
122 }
123
124 $start = $this->container->getRegistrationStart();
125 $end = $this->container->getRegistrationEnd();
126
127
128 if (ilDateTime::_before($now, $start)) {
129 $tpl = new ilTemplate('tpl.registration_period_form.html', true, true, 'Services/Membership');
130 $tpl->setVariable('TXT_FIRST', $this->lng->txt('mem_start'));
131 $tpl->setVariable('FIRST', ilDatePresentation::formatDate($start));
132
133 $tpl->setVariable('TXT_END', $this->lng->txt('mem_end'));
134 $tpl->setVariable('END', ilDatePresentation::formatDate($end));
135
136 $warning = $this->lng->txt('mem_reg_not_started');
137 } elseif (ilDateTime::_after($now, $end)) {
138 $tpl = new ilTemplate('tpl.registration_period_form.html', true, true, 'Services/Membership');
139 $tpl->setVariable('TXT_FIRST', $this->lng->txt('mem_start'));
140 $tpl->setVariable('FIRST', ilDatePresentation::formatDate($start));
141
142 $tpl->setVariable('TXT_END', $this->lng->txt('mem_end'));
143 $tpl->setVariable('END', ilDatePresentation::formatDate($end));
144
145 $warning = $this->lng->txt('mem_reg_expired');
146 } else {
147 $tpl = new ilTemplate('tpl.registration_period_form.html', true, true, 'Services/Membership');
148 $tpl->setVariable('TXT_FIRST', $this->lng->txt('mem_end'));
149 $tpl->setVariable('FIRST', ilDatePresentation::formatDate($end));
150 }
151
152 $reg = new ilCustomInputGUI($this->lng->txt('mem_reg_period'));
153 $reg->setHtml($tpl->get());
154 if (strlen($warning)) {
155 // Disable registration
156 $this->enableRegistration(false);
157 #$reg->setAlert($warning);
159 }
160 $this->form->addItem($reg);
161 return true;
162 }
$warning
Definition: X509warning.php:13
const IL_CAL_UNIX
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date @access public.
@classDescription Date and time handling
static _after(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is after end This method does not consider tz offsets.
static _before(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
$end
Definition: saml1-acs.php:18

References $end, ilRegistrationGUI\$tpl, $warning, ilDateTime\_after(), ilDateTime\_before(), ilRegistrationGUI\enableRegistration(), ilDatePresentation\formatDate(), IL_CAL_UNIX, and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ fillRegistrationType()

ilGroupRegistrationGUI::fillRegistrationType ( )
protected

fill registration procedure

@access protected

Parameters

return

Reimplemented from ilRegistrationGUI.

Definition at line 263 of file class.ilGroupRegistrationGUI.php.

264 {
265 global $ilUser;
266
267 if ($this->getWaitingList()->isOnList($ilUser->getId())) {
268 return true;
269 }
270
271 switch ($this->container->getRegistrationType()) {
273 $reg = new ilNonEditableValueGUI($this->lng->txt('mem_reg_type'));
274 $reg->setValue($this->lng->txt('grp_reg_disabled'));
275 #$reg->setAlert($this->lng->txt('grp_reg_deactivated_alert'));
276 $this->form->addItem($reg);
277
278 // Disable registration
279 $this->enableRegistration(false);
280
281 break;
282
284 $txt = new ilNonEditableValueGUI($this->lng->txt('mem_reg_type'));
285 $txt->setValue($this->lng->txt('grp_pass_request'));
286
287
288 $pass = new ilTextInputGUI($this->lng->txt('passwd'), 'grp_passw');
289 $pass->setInputType('password');
290 $pass->setSize(12);
291 $pass->setMaxLength(32);
292 #$pass->setRequired(true);
293 $pass->setInfo($this->lng->txt('group_password_registration_msg'));
294
295 $txt->addSubItem($pass);
296 $this->form->addItem($txt);
297 break;
298
300
301 // no "request" info if waiting list is active
302 if ($this->isWaitingListActive()) {
303 return true;
304 }
305
306 $txt = new ilNonEditableValueGUI($this->lng->txt('mem_reg_type'));
307 $txt->setValue($this->lng->txt('grp_reg_request'));
308
309 $sub = new ilTextAreaInputGUI($this->lng->txt('grp_reg_subject'), 'subject');
310 $sub->setValue($_POST['subject']);
311 $sub->setInfo($this->lng->txt('group_req_registration_msg'));
312 $sub->setCols(40);
313 $sub->setRows(5);
314 if ($this->participants->isSubscriber($ilUser->getId())) {
315 $sub_data = $this->participants->getSubscriberData($ilUser->getId());
316 $sub->setValue($sub_data['subject']);
317 $sub->setInfo('');
318 ilUtil::sendFailure($this->lng->txt('grp_already_assigned'));
319 $this->enableRegistration(false);
320 }
321 $txt->addSubItem($sub);
322 $this->form->addItem($txt);
323 break;
324
326
327 // no "direct registration" info if waiting list is active
328 if ($this->isWaitingListActive()) {
329 return true;
330 }
331
332 $txt = new ilNonEditableValueGUI($this->lng->txt('mem_reg_type'));
333 $txt->setValue($this->lng->txt('group_req_direct'));
334
335 $this->form->addItem($txt);
336 break;
337
338 default:
339 return true;
340 }
341
342 return true;
343 }
const GRP_REGISTRATION_DIRECT
const GRP_REGISTRATION_PASSWORD
const GRP_REGISTRATION_DEACTIVATED
This class represents a text area property in a property form.
This class represents a text property in a property form.
$txt
Definition: error.php:11

References $_POST, $ilUser, $pass, $txt, ilRegistrationGUI\enableRegistration(), ilRegistrationGUI\getWaitingList(), GRP_REGISTRATION_DEACTIVATED, GRP_REGISTRATION_DIRECT, GRP_REGISTRATION_PASSWORD, GRP_REGISTRATION_REQUEST, isWaitingListActive(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ getFormTitle()

ilGroupRegistrationGUI::getFormTitle ( )
protected

get form title

@access protected

Returns
string title

Reimplemented from ilRegistrationGUI.

Definition at line 80 of file class.ilGroupRegistrationGUI.php.

81 {
82 global $ilUser;
83
84 if ($this->getWaitingList()->isOnList($ilUser->getId())) {
85 return $this->lng->txt('member_status');
86 }
87 return $this->lng->txt('grp_registration');
88 }

References $ilUser, and ilRegistrationGUI\getWaitingList().

+ Here is the call graph for this function:

◆ initParticipants()

ilGroupRegistrationGUI::initParticipants ( )
protected

Init course participants.

@access protected

Reimplemented from ilRegistrationGUI.

Definition at line 513 of file class.ilGroupRegistrationGUI.php.

514 {
515 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
516 $this->participants = ilGroupParticipants::_getInstanceByObjId($this->obj_id);
517 }
static _getInstanceByObjId($a_obj_id)
Get singleton instance.

References ilGroupParticipants\_getInstanceByObjId().

+ Here is the call graph for this function:

◆ initWaitingList()

ilGroupRegistrationGUI::initWaitingList ( )
protected
See also
ilRegistrationGUI::initWaitingList() @access protected

Reimplemented from ilRegistrationGUI.

Definition at line 523 of file class.ilGroupRegistrationGUI.php.

524 {
525 include_once './Modules/Group/classes/class.ilGroupWaitingList.php';
526 $this->waiting_list = new ilGroupWaitingList($this->container->getId());
527 }

◆ isWaitingListActive()

ilGroupRegistrationGUI::isWaitingListActive ( )
protected
See also
ilRegistrationGUI::isWaitingListActive()

Reimplemented from ilRegistrationGUI.

Definition at line 532 of file class.ilGroupRegistrationGUI.php.

533 {
534 global $ilUser;
535 static $active = null;
536
537 if ($active !== null) {
538 return $active;
539 }
540 if (!$this->container->getMaxMembers()) {
541 return $active = false;
542 }
543 if (
544 !$this->container->isWaitingListEnabled() or
545 !$this->container->isMembershipLimited()) {
546 return $active = false;
547 }
548
549 $free = max(0, $this->container->getMaxMembers() - $this->participants->getCountMembers());
550 return $active = (!$free or $this->getWaitingList()->getCountUsers());
551 }

References $ilUser, and ilRegistrationGUI\getWaitingList().

Referenced by fillRegistrationType().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validate()

ilGroupRegistrationGUI::validate ( )
protected

validate join request

@access protected

Returns

Reimplemented from ilRegistrationGUI.

Definition at line 382 of file class.ilGroupRegistrationGUI.php.

383 {
384 global $ilUser;
385
386 if ($ilUser->getId() == ANONYMOUS_USER_ID) {
387 $this->join_error = $this->lng->txt('permission_denied');
388 return false;
389 }
390
391 if (!$this->isRegistrationPossible()) {
392 $this->join_error = $this->lng->txt('mem_error_preconditions');
393 return false;
394 }
395 if ($this->container->getRegistrationType() == GRP_REGISTRATION_PASSWORD) {
396 if (!strlen($pass = ilUtil::stripSlashes($_POST['grp_passw']))) {
397 $this->join_error = $this->lng->txt('err_wrong_password');
398 return false;
399 }
400 if (strcmp($pass, $this->container->getPassword()) !== 0) {
401 $this->join_error = $this->lng->txt('err_wrong_password');
402 return false;
403 }
404 }
405 if (!$this->validateCustomFields()) {
406 $this->join_error = $this->lng->txt('fill_out_all_required_fields');
407 return false;
408 }
409 if (!$this->validateAgreement()) {
410 $this->join_error = $this->lng->txt($this->type . '_agreement_required');
411 return false;
412 }
413
414 return true;
415 }
validateAgreement()
Check Agreement.
validateCustomFields()
Check required course fields.

References $_POST, $ilUser, $pass, GRP_REGISTRATION_PASSWORD, ilRegistrationGUI\isRegistrationPossible(), ilUtil\stripSlashes(), ilRegistrationGUI\validateAgreement(), and ilRegistrationGUI\validateCustomFields().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: