3 declare(strict_types=1);
    41         $this->ref_id = $a_ref_id;
    52     public function getContext(?array $a_valid_types = array(
'crs', 
'grp', 
'cat', 
'root')): ?array
    55         $tree = $DIC->repositoryTree();
    57         if (!isset($this->context)) {
    58             $this->context = array();
    61             $path = array_reverse($tree->getPathFull($this->ref_id));
    62             foreach (
$path as $row) {
    63                 if (in_array($row[
'type'], $a_valid_types)) {
    65                     if (in_array($row[
'type'], array(
'cat', 
'root')) && !empty($this->context)) {
    69                     $this->context[
'id'] = (string) $row[
'child'];
    70                     $this->context[
'title'] = $row[
'title'];
    71                     $this->context[
'type'] = $row[
'type'];
    87                 return "CourseOffering";
    91                 return "urn:lti:context-type:ilias/RootNode";
    94                 return "urn:lti:context-type:ilias/Category";
   115         switch ($a_params[
'sign_method']) {
   117                 $method = 
new ILIAS\LTIOAuth\OAuthSignatureMethod_HMAC_SHA1();
   120                 $method = 
new ILIAS\LTIOAuth\OAuthSignatureMethod_PLAINTEXT();
   127                 return "ERROR: unsupported signature method!";
   130         $request = ILIAS\LTIOAuth\OAuthRequest::from_consumer_and_token($consumer, $a_params[
"token"], $a_params[
"http_method"], $a_params[
"url"], $a_params[
"data"]);
   131         $request->sign_request($method, $consumer, $a_params[
"token"]);
   137         return $request->get_parameters();
 
getContext(?array $a_valid_types=array('crs', 'grp', 'cat', 'root'))
get info about the context in which the link is used The most outer matching course or group is used ...
 
__construct(int $a_ref_id)
ilObjLTIConsumerLaunch constructor. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static getLTIContextType(string $a_type)
 
static signOAuth(array $a_params)
sign request data with OAuth