23 public static function handleCode($a_ref_id,$a_type,$a_code)
26 include_once
'./Services/Link/classes/class.ilLink.php';
27 $lng->loadLanguageModule($a_type);
56 $GLOBALS[
'ilLog']->write($e->getCode().
': '.$e->getMessage());
58 $parent_id = $tree->getParentId($a_ref_id);
75 protected static function useCode($a_code,$a_endnode)
83 include_once
'./Services/Membership/exceptions/class.ilMembershipRegistrationException.php';
87 foreach($tree->getPathId($a_endnode) as
$ref_id)
93 $obj->register(
$ilUser->getId());
106 $map =
"23456789abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ";
109 $max = strlen($map)-1;
112 $code .= $map[mt_rand(0, $max)];
124 include_once
'./Modules/Group/classes/class.ilObjGroup.php';
125 include_once
'./Modules/Course/classes/class.ilObjCourse.php';
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
Stores registration keys for key based registration on courses and groups.
static handleCode($a_ref_id, $a_type, $a_code)
Handle target parameter.
static generateCode()
Generate new registration key.
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...
membership registration exception
static lookupObjectsByCode($a_code)
static lookupObjectsByCode($a_code)
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _lookupObjectId($a_ref_id)
lookup object id
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static redirect($a_script)
http redirect to other script
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.