26 include_once
'./Services/Link/classes/class.ilLink.php';
27 $lng->loadLanguageModule(
$a_type);
29 self::useCode($a_code, $a_ref_id);
34 switch ($e->getCode()) {
57 $parent_id = $tree->getParentId($a_ref_id);
74 protected static function useCode($a_code, $a_endnode)
78 $obj_ids = self::lookupObjectsByCode($a_code);
81 include_once
'./Services/Membership/exceptions/class.ilMembershipRegistrationException.php';
85 foreach ($tree->getPathId($a_endnode) as $ref_id) {
88 $member_obj =
$factory->getInstanceByRefId($ref_id,
false);
106 $map =
"23456789abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ";
109 $max = strlen($map)-1;
110 for ($loop = 1; $loop <= self::CODE_LENGTH; $loop++) {
111 $code .= $map[mt_rand(0, $max)];
123 include_once
'./Modules/Group/classes/class.ilObjGroup.php';
124 include_once
'./Modules/Course/classes/class.ilObjCourse.php';
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
const ADDED_TO_WAITINGLIST
static lookupObjectsByCode($a_code)
Stores registration keys for key based registration on courses and groups.
static lookupObjectsByCode($a_code)
Get all objects with enabled access codes.
static useCode($a_code, $a_endnode)
Use a registration code and assign the logged in user to the (parent) course/group that offer the cod...
const REGISTRATION_INVALID_OFFLINE
const OUT_OF_REGISTRATION_PERIOD
static _lookupTitle($a_id)
lookup object title
static handleCode($a_ref_id, $a_type, $a_code)
Handle target parameter.
static _lookupObjectId($a_ref_id)
lookup object id
static _lookupObjId($a_id)
const ADMISSION_LINK_INVALID
membership registration exception
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static generateCode()
Generate new registration key.
const REGISTRATION_INVALID_AVAILABILITY
static lookupObjectsByCode($a_code)
static redirect($a_script)
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")