ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
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 ()
 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 458 of file class.ilGroupRegistrationGUI.php.

459 {
460 global $ilUser,$tree, $rbacreview, $lng, $ilCtrl;
461
462 // set aggreement accepted
463 $this->setAccepted(true);
464
465 include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
466 $free = max(0,$this->container->getMaxMembers() - $this->participants->getCountMembers());
467 $waiting_list = new ilGroupWaitingList($this->container->getId());
468 if(
469 $this->container->isMembershipLimited() and
470 $this->container->isWaitingListEnabled() and
471 (!$free or $waiting_list->getCountUsers()))
472 {
473 $waiting_list->addToList($ilUser->getId());
474 $info = sprintf($this->lng->txt('grp_added_to_list'),
475 $this->container->getTitle(),
476 $waiting_list->getPosition($ilUser->getId()));
477
478 $this->participants->sendNotification(
480 $ilUser->getId()
481 );
482 ilUtil::sendSuccess($info,true);
483 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id",
484 $tree->getParentId($this->container->getRefId()));
485 $ilCtrl->redirectByClass("ilrepositorygui", "");
486 }
487
488
489 switch($this->container->getRegistrationType())
490 {
492
493 $this->participants->addSubscriber($ilUser->getId());
494 $this->participants->updateSubscriptionTime($ilUser->getId(),time());
495 $this->participants->updateSubject($ilUser->getId(),ilUtil::stripSlashes($_POST['subject']));
496
497 $this->participants->sendNotification(
499 $ilUser->getId()
500 );
501
502 ilUtil::sendSuccess($this->lng->txt("application_completed"),true);
503 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id",
504 $tree->getParentId($this->container->getRefId()));
505 $ilCtrl->redirectByClass("ilrepositorygui", "");
506 break;
507
508 default:
509
510 $this->participants->add($ilUser->getId(),IL_GRP_MEMBER);
511 $this->participants->sendNotification(
513 $ilUser->getId()
514 );
515 $this->participants->sendNotification(
517 $ilUser->getId()
518 );
519
520 include_once './Modules/Forum/classes/class.ilForumNotification.php';
521 ilForumNotification::checkForumsExistsInsert($this->container->getRefId(), $ilUser->getId());
522
523 if(!$_SESSION["pending_goto"])
524 {
525 ilUtil::sendSuccess($this->lng->txt("grp_registration_completed"),true);
526 $this->ctrl->returnToParent($this);
527 }
528 else
529 {
530 $tgt = $_SESSION["pending_goto"];
531 unset($_SESSION["pending_goto"]);
532 ilUtil::redirect($tgt);
533 }
534 break;
535 }
536 }
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)
http redirect to other script
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$_POST['username']
Definition: cron.php:12
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15

References $_POST, $_SESSION, $ilCtrl, $ilUser, ilRegistrationGUI\$lng, ilRegistrationGUI\$waiting_list, ilForumNotification\checkForumsExistsInsert(), GRP_REGISTRATION_REQUEST, IL_GRP_MEMBER, ilUtil\redirect(), ilUtil\sendSuccess(), ilRegistrationGUI\setAccepted(), 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 371 of file class.ilGroupRegistrationGUI.php.

372 {
373 global $ilUser;
374
375 parent::addCommandButtons();
376
377
378 switch($this->container->getRegistrationType())
379 {
381 if($this->participants->isSubscriber($ilUser->getId()))
382 {
383 $this->form->clearCommandButtons();
384 $this->form->addCommandButton('updateSubscriptionRequest', $this->lng->txt('grp_update_subscr_request'));
385 $this->form->addCommandButton('cancelSubscriptionRequest', $this->lng->txt('grp_cancel_subscr_request'));
386 }
387 else
388 {
389 if(!$this->isRegistrationPossible())
390 {
391 return false;
392 }
393 $this->form->clearCommandButtons();
394 $this->form->addCommandButton('join', $this->lng->txt('grp_join_request'));
395 $this->form->addCommandButton('cancel',$this->lng->txt('cancel'));
396 }
397 break;
398 }
399 return true;
400 }
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 {
62 $ilTabs->activateTab('leave');
63 }
64
65 switch($next_class)
66 {
67 default:
68 $cmd = $this->ctrl->getCmd("show");
69 $this->$cmd();
70 break;
71 }
72 return true;
73 }
getWaitingList()
Get waiting list object.
$cmd
Definition: sahs_server.php:35

References $cmd, $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 100 of file class.ilGroupRegistrationGUI.php.

101 {
102 if($this->container->getInformation())
103 {
104 $imp = new ilNonEditableValueGUI($this->lng->txt('crs_important_info'),'',true);
105 $value = nl2br(ilUtil::makeClickable($this->container->getInformation(), true));
106 $imp->setValue($value);
107 $this->form->addItem($imp);
108 }
109 }
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 181 of file class.ilGroupRegistrationGUI.php.

182 {
183 global $ilUser;
184
185 if(!$this->container->isMembershipLimited())
186 {
187 return true;
188 }
189 $tpl = new ilTemplate('tpl.max_members_form.html',true,true,'Services/Membership');
190 $tpl->setVariable('TXT_MAX',$this->lng->txt('mem_max_users'));
191 $tpl->setVariable('NUM_MAX',$this->container->getMaxMembers());
192
193 $tpl->setVariable('TXT_FREE',$this->lng->txt('mem_free_places').":");
194
195 include_once './Modules/Group/classes/class.ilObjGroupAccess.php';
196 $reg_info = ilObjGroupAccess::lookupRegistrationInfo($this->getContainer()->getId());
197 $free = $reg_info['reg_info_free_places'];
198
199
200 if($free)
201 {
202 $tpl->setVariable('NUM_FREE',$free);
203 }
204 else
205 {
206 $tpl->setVariable('WARN_FREE',$free);
207 }
208
209 include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
210 $waiting_list = new ilGroupWaitingList($this->container->getId());
211
212 if(
213 $this->container->isWaitingListEnabled() and
214 $this->container->isMembershipLimited() and
215 (!$free or $waiting_list->getCountUsers()))
216 {
217 if($waiting_list->isOnList($ilUser->getId()))
218 {
219 $tpl->setVariable('TXT_WAIT',$this->lng->txt('mem_waiting_list_position'));
220 $tpl->setVariable('NUM_WAIT',$waiting_list->getPosition($ilUser->getId()));
221
222 }
223 else
224 {
225 $tpl->setVariable('TXT_WAIT',$this->lng->txt('mem_waiting_list'));
226 if($free and $waiting_list->getCountUsers())
227 $tpl->setVariable('WARN_WAIT',$waiting_list->getCountUsers());
228 else
229 $tpl->setVariable('NUM_WAIT',$waiting_list->getCountUsers());
230
231 }
232 }
233
234 $alert = '';
235 if(
236 !$free and
237 !$this->container->isWaitingListEnabled())
238 {
239 // Disable registration
240 $this->enableRegistration(false);
241 $alert = $this->lng->txt('mem_alert_no_places');
242 }
243 elseif(
244 $this->container->isWaitingListEnabled() and
245 $this->container->isMembershipLimited() and
246 $waiting_list->isOnList($ilUser->getId()))
247 {
248 // Disable registration
249 $this->enableRegistration(false);
250 }
251 elseif(
252 !$free and
253 $this->container->isWaitingListEnabled() and
254 $this->container->isMembershipLimited())
255 {
256 $alert = $this->lng->txt('grp_warn_no_max_set_on_waiting_list');
257 }
258 elseif(
259 $free and
260 $this->container->isWaitingListEnabled() and
261 $this->container->isMembershipLimited() and
262 $this->getWaitingList()->getCountUsers())
263 {
264 $alert = $this->lng->txt('grp_warn_wl_set_on_waiting_list');
265 }
266
267 $max = new ilCustomInputGUI($this->lng->txt('mem_participants'));
268 $max->setHtml($tpl->get());
269 if(strlen($alert))
270 {
271 #$max->setAlert($alert);
272 ilUtil::sendFailure($alert);
273 }
274 $this->form->addItem($max);
275 }
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 116 of file class.ilGroupRegistrationGUI.php.

117 {
118 include_once('./Services/Calendar/classes/class.ilDateTime.php');
119 $now = new ilDateTime(time(),IL_CAL_UNIX,'UTC');
120
121 if($this->container->isRegistrationUnlimited())
122 {
123 $reg = new ilNonEditableValueGUI($this->lng->txt('mem_reg_period'));
124 $reg->setValue($this->lng->txt('mem_unlimited'));
125 $this->form->addItem($reg);
126 return true;
127 }
128
129 $start = $this->container->getRegistrationStart();
130 $end = $this->container->getRegistrationEnd();
131
132
133 if(ilDateTime::_before($now,$start))
134 {
135 $tpl = new ilTemplate('tpl.registration_period_form.html',true,true,'Services/Membership');
136 $tpl->setVariable('TXT_FIRST',$this->lng->txt('mem_start'));
137 $tpl->setVariable('FIRST',ilDatePresentation::formatDate($start));
138
139 $tpl->setVariable('TXT_END',$this->lng->txt('mem_end'));
140 $tpl->setVariable('END',ilDatePresentation::formatDate($end));
141
142 $warning = $this->lng->txt('mem_reg_not_started');
143 }
144 elseif(ilDateTime::_after($now,$end))
145 {
146 $tpl = new ilTemplate('tpl.registration_period_form.html',true,true,'Services/Membership');
147 $tpl->setVariable('TXT_FIRST',$this->lng->txt('mem_start'));
148 $tpl->setVariable('FIRST',ilDatePresentation::formatDate($start));
149
150 $tpl->setVariable('TXT_END',$this->lng->txt('mem_end'));
151 $tpl->setVariable('END',ilDatePresentation::formatDate($end));
152
153 $warning = $this->lng->txt('mem_reg_expired');
154 }
155 else
156 {
157 $tpl = new ilTemplate('tpl.registration_period_form.html',true,true,'Services/Membership');
158 $tpl->setVariable('TXT_FIRST',$this->lng->txt('mem_end'));
159 $tpl->setVariable('FIRST',ilDatePresentation::formatDate($end));
160 }
161
162 $reg = new ilCustomInputGUI($this->lng->txt('mem_reg_period'));
163 $reg->setHtml($tpl->get());
164 if(strlen($warning))
165 {
166 // Disable registration
167 $this->enableRegistration(false);
168 #$reg->setAlert($warning);
169 ilUtil::sendFailure($warning);
170 }
171 $this->form->addItem($reg);
172 return true;
173 }
const IL_CAL_UNIX
static formatDate(ilDateTime $date)
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.

References ilRegistrationGUI\$tpl, 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 284 of file class.ilGroupRegistrationGUI.php.

285 {
286 global $ilUser;
287
288 if($this->getWaitingList()->isOnList($ilUser->getId()))
289 {
290 return true;
291 }
292
293 switch($this->container->getRegistrationType())
294 {
296 $reg = new ilNonEditableValueGUI($this->lng->txt('mem_reg_type'));
297 $reg->setValue($this->lng->txt('grp_reg_disabled'));
298 #$reg->setAlert($this->lng->txt('grp_reg_deactivated_alert'));
299 $this->form->addItem($reg);
300
301 // Disable registration
302 $this->enableRegistration(false);
303
304 break;
305
307 $txt = new ilNonEditableValueGUI($this->lng->txt('mem_reg_type'));
308 $txt->setValue($this->lng->txt('grp_pass_request'));
309
310
311 $pass = new ilTextInputGUI($this->lng->txt('passwd'),'grp_passw');
312 $pass->setInputType('password');
313 $pass->setSize(12);
314 $pass->setMaxLength(32);
315 #$pass->setRequired(true);
316 $pass->setInfo($this->lng->txt('group_password_registration_msg'));
317
318 $txt->addSubItem($pass);
319 $this->form->addItem($txt);
320 break;
321
323
324 // no "request" info if waiting list is active
325 if($this->isWaitingListActive())
326 return true;
327
328 $txt = new ilNonEditableValueGUI($this->lng->txt('mem_reg_type'));
329 $txt->setValue($this->lng->txt('grp_reg_request'));
330
331 $sub = new ilTextAreaInputGUI($this->lng->txt('grp_reg_subject'),'subject');
332 $sub->setValue($_POST['subject']);
333 $sub->setInfo($this->lng->txt('group_req_registration_msg'));
334 $sub->setCols(40);
335 $sub->setRows(5);
336 if($this->participants->isSubscriber($ilUser->getId()))
337 {
338 $sub_data = $this->participants->getSubscriberData($ilUser->getId());
339 $sub->setValue($sub_data['subject']);
340 $sub->setInfo('');
341 ilUtil::sendFailure($this->lng->txt('grp_already_assigned'));
342 $this->enableRegistration(false);
343 }
344 $txt->addSubItem($sub);
345 $this->form->addItem($txt);
346 break;
347
349
350 // no "direct registration" info if waiting list is active
351 if($this->isWaitingListActive())
352 return true;
353
354 $txt = new ilNonEditableValueGUI($this->lng->txt('mem_reg_type'));
355 $txt->setValue($this->lng->txt('group_req_direct'));
356
357 $this->form->addItem($txt);
358 break;
359
360 default:
361 return true;
362 }
363
364 return true;
365 }
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:10

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 82 of file class.ilGroupRegistrationGUI.php.

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

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 544 of file class.ilGroupRegistrationGUI.php.

545 {
546 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
547 $this->participants = ilGroupParticipants::_getInstanceByObjId($this->obj_id);
548 }
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 554 of file class.ilGroupRegistrationGUI.php.

555 {
556 include_once './Modules/Group/classes/class.ilGroupWaitingList.php';
557 $this->waiting_list = new ilGroupWaitingList($this->container->getId());
558 }

◆ isWaitingListActive()

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

Reimplemented from ilRegistrationGUI.

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

564 {
565 global $ilUser;
566 static $active = null;
567
568 if($active !== null)
569 {
570 return $active;
571 }
572 if(!$this->container->getMaxMembers())
573 {
574 return $active = false;
575 }
576 if(
577 !$this->container->isWaitingListEnabled() or
578 !$this->container->isMembershipLimited())
579 {
580 return $active = false;
581 }
582
583 $free = max(0,$this->container->getMaxMembers() - $this->participants->getCountMembers());
584 return $active = (!$free or $this->getWaitingList()->getCountUsers());
585 }

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 409 of file class.ilGroupRegistrationGUI.php.

410 {
411 global $ilUser;
412
413 if($ilUser->getId() == ANONYMOUS_USER_ID)
414 {
415 $this->join_error = $this->lng->txt('permission_denied');
416 return false;
417 }
418
419 if(!$this->isRegistrationPossible())
420 {
421 $this->join_error = $this->lng->txt('mem_error_preconditions');
422 return false;
423 }
424 if($this->container->getRegistrationType() == GRP_REGISTRATION_PASSWORD)
425 {
426 if(!strlen($pass = ilUtil::stripSlashes($_POST['grp_passw'])))
427 {
428 $this->join_error = $this->lng->txt('err_wrong_password');
429 return false;
430 }
431 if(strcmp($pass,$this->container->getPassword()) !== 0)
432 {
433 $this->join_error = $this->lng->txt('err_wrong_password');
434 return false;
435 }
436 }
437 if(!$this->validateCustomFields())
438 {
439 $this->join_error = $this->lng->txt('fill_out_all_required_fields');
440 return false;
441 }
442 if(!$this->validateAgreement())
443 {
444 $this->join_error = $this->lng->txt($this->type.'_agreement_required');
445 return false;
446 }
447
448 return true;
449 }
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: