ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilObjLTIConsumer Class Reference
+ Inheritance diagram for ilObjLTIConsumer:
+ Collaboration diagram for ilObjLTIConsumer:

Public Member Functions

 __construct (int $a_id=0, bool $a_reference=true)
 ilObjLTIConsumer constructor. More...
 
 isActivationLimited ()
 
 setActivationLimited (bool $activationLimited)
 
 getActivationStartingTime ()
 
 setActivationStartingTime (?int $activationStartingTime=null)
 
 getActivationEndingTime ()
 
 setActivationEndingTime (?int $activationEndingTime=null)
 
 getActivationVisibility ()
 
 setActivationVisibility (bool $activationVisibility)
 
 getMasteryScore ()
 
 setMasteryScore (float $mastery_score)
 
 getMasteryScorePercent ()
 
 setMasteryScorePercent (float $mastery_score_percent)
 
 getProviderId ()
 
 setProviderId (int $providerId)
 
 initProvider ()
 
 getProvider ()
 
 setProvider (ilLTIConsumeProvider $provider)
 
 isLaunchMethodOwnWin ()
 
 isLaunchMethodEmbedded ()
 
 getLaunchMethod ()
 
 setLaunchMethod (string $launchMethod)
 
 getCustomLaunchKey ()
 
 setCustomLaunchKey (string $customLaunchKey)
 
 getCustomLaunchSecret ()
 
 setCustomLaunchSecret (string $customLaunchSecret)
 
 getCustomParams ()
 
 setCustomParams (string $customParams)
 
 getLaunchKey ()
 
 getLaunchSecret ()
 
 getUseXapi ()
 
 setUseXapi (bool $use_xapi)
 
 getCustomActivityId ()
 
 setCustomActivityId (string $custom_activity_id)
 
 getActivityId ()
 
 isStatementsReportEnabled ()
 
 setStatementsReportEnabled (bool $statementsReportEnabled)
 
 getCustomParamsArray ()
 
 load ()
 
 save ()
 
 setHighscoreEnabled (bool $a_enabled)
 HIGHSCORE. More...
 
 getHighscoreEnabled ()
 Gets the setting which determines if the highscore feature is enabled. More...
 
 setHighscoreAchievedTS (bool $a_achieved_ts)
 Sets if the date and time of the scores achievement should be displayed. More...
 
 getHighscoreAchievedTS ()
 Returns if date and time of the scores achievement should be displayed. More...
 
 setHighscorePercentage (bool $a_percentage)
 Sets if the percentages of the scores pass should be shown. More...
 
 getHighscorePercentage ()
 Gets if the percentage column should be shown. More...
 
 setHighscoreWTime (bool $a_wtime)
 Sets if the workingtime of the scores should be shown. More...
 
 getHighscoreWTime ()
 Gets if the column with the workingtime should be shown. More...
 
 setHighscoreOwnTable (bool $a_own_table)
 Sets if the table with the own ranking should be shown. More...
 
 getHighscoreOwnTable ()
 Gets if the own rankings table should be shown. More...
 
 setHighscoreTopTable (bool $a_top_table)
 Sets if the top-rankings table should be shown. More...
 
 getHighscoreTopTable ()
 Gets, if the top-rankings table should be shown. More...
 
 setHighscoreTopNum (int $a_top_num)
 Sets the number of entries which are to be shown in the top-rankings table. More...
 
 getHighscoreTopNum (int $a_retval=10)
 Gets the number of entries which are to be shown in the top-rankings table. More...
 
 getHighscoreMode ()
 
 setHighscoreMode (int $mode)
 
 buildLaunchParameters (ilCmiXapiUser $cmixUser, string $token, string $contextType, string $contextId, string $contextTitle, ?string $returnUrl='')
 
 buildLaunchParametersLTI13 (ilCmiXapiUser $cmixUser, string $endpoint, string $clientId, int $deploymentId, string $nonce, string $contextType, string $contextId, string $contextTitle, ?string $returnUrl='')
 
 isMixedContentType ()
 
- Public Member Functions inherited from ilObject2
 __construct (int $a_id=0, bool $a_reference=true)
 Constructor. More...
 
 read ()
 
 create (bool $a_clone_mode=false)
 
 update ()
 
 delete ()
 
 cloneMetaData (ilObject $target_obj)
 
 cloneObject (int $target_id, int $copy_id=0, bool $omit_tree=false)
 
- Public Member Functions inherited from ilObject
 getObjectProperties ()
 
 flushObjectProperties ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 processAutoRating ()
 
 read ()
 
 getId ()
 
 setId (int $id)
 
 setRefId (int $ref_id)
 
 getRefId ()
 
 getType ()
 
 setType (string $type)
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 
 getUntranslatedTitle ()
 Get untranslated object title WebDAV needs to access the untranslated title of an object. More...
 
 setTitle (string $title)
 
 getDescription ()
 
 setDescription (string $description)
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 
 setImportId (string $import_id)
 
 setOfflineStatus (bool $status)
 
 getOfflineStatus ()
 
 supportsOfflineHandling ()
 
 getOwner ()
 
 getOwnerName ()
 get full name of object owner More...
 
 setOwner (int $usr_id)
 
 getCreateDate ()
 Get create date in YYYY-MM-DD HH-MM-SS format. More...
 
 getLastUpdateDate ()
 Get last update date in YYYY-MM-DD HH-MM-SS format. More...
 
 create ()
 note: title, description and type should be set when this function is called More...
 
 update ()
 
 MDUpdateListener (string $element)
 Metadata update listener. More...
 
 createMetaData ()
 
 updateMetaData ()
 
 deleteMetaData ()
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree (int $parent_ref_id)
 maybe this method should be in tree object!? More...
 
 setPermissions (int $parent_ref_id)
 
 setParentRolePermissions (int $parent_ref_id)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type. More...
 
 applyDidacticTemplate (int $tpl_id)
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo (int $target_id, int $copy_id, int $new_obj_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies (int $target_id, int $copy_id)
 Clone object dependencies. More...
 
 cloneMetaData (ilObject $target_obj)
 Copy meta data. More...
 
 selfOrParentWithRatingEnabled ()
 
 getPossibleSubObjects (bool $filter=true)
 get all possible sub objects of this type the object can decide which types of sub objects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static getProviderCustomParamsArray (ilLTIConsumeProvider $provider)
 
static buildContentSelectionParameters (ilLTIConsumeProvider $provider, int $refId, string $returnUrl, string $nonce)
 
static LTISignJWT (array $parms, string $endpoint, string $oAuthConsumerKey, $typeId=0, string $nonce='')
 
static getPrivateKey ()
 
static verifyPrivateKey ()
 
static getPublicKey ()
 
static getJwks ()
 
static getIliasHttpPath ()
 
static getPlattformId ()
 
static getAuthenticationRequestUrl ()
 
static getAccessTokenUrl ()
 
static getPublicKeysetUrl ()
 
static getRegistrationUrl ()
 
static getRegistrationStartUrl ()
 
static getRegistrationEndUrl ()
 
static getOpenidConfigUrl ()
 
static getOpenidConfig ()
 
static registerClient (array $data, object $tokenObj)
 
static getNewClientId ()
 
static sendResponseError (int $code, string $message, $log=true)
 
static sendResponseJson (array $obj)
 
static getInstance (int $a_id=0, bool $a_reference=true)
 
static getRawData ()
 
static getTokenObject (string $token)
 
static verifyToken ()
 
static getLogger ()
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId (string $import_id)
 Get (latest) object id for an import id. More...
 
static _lookupImportId (int $obj_id)
 
static _lookupOwnerName (int $owner_id)
 Lookup owner name for owner id. More...
 
static _getIdForImportId (string $import_id)
 
static _getAllReferences (int $id)
 get all reference ids for object ID More...
 
static _lookupTitle (int $obj_id)
 
static lookupOfflineStatus (int $obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner (int $obj_id)
 Lookup owner user ID for object ID. More...
 
static _getIdsForTitle (string $title, string $type='', bool $partial_match=false)
 
static _lookupDescription (int $obj_id)
 
static _lookupLastUpdate (int $obj_id, bool $formatted=false)
 
static _getLastUpdateOfObjects (array $obj_ids)
 
static _lookupObjId (int $ref_id)
 
static _setDeletedDate (int $ref_id, int $deleted_by)
 
static setDeletedDates (array $ref_ids, int $user_id)
 
static _resetDeletedDate (int $ref_id)
 
static _lookupDeletedDate (int $ref_id)
 
static _writeTitle (int $obj_id, string $title)
 write title to db (static) More...
 
static _writeDescription (int $obj_id, string $desc)
 write description to db (static) More...
 
static _writeImportId (int $obj_id, string $import_id)
 write import id to db (static) More...
 
static _lookupType (int $id, bool $reference=false)
 
static _isInTrash (int $ref_id)
 
static _hasUntrashedReference (int $obj_id)
 checks whether an object has at least one reference that is not in trash More...
 
static _lookupObjectId (int $ref_id)
 
static _getObjectsDataForType (string $type, bool $omit_trash=false)
 get all objects of a certain type More...
 
static _exists (int $id, bool $reference=false, ?string $type=null)
 checks if an object exists in object_data More...
 
static _getObjectsByType (string $obj_type="", ?int $owner=null)
 
static _prepareCloneSelection (array $ref_ids, string $new_type, bool $show_path=true)
 Prepare copy wizard object selection. More...
 
static getIconForType (string $type)
 
static _getIcon (int $obj_id=0, string $size="big", string $type="", bool $offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (array &$deps, int $ref_id, int $obj_id, string $type, int $depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies (int $obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $obj_ids)
 
static getAllOwnedRepositoryObjects (int $user_id)
 
static fixMissingTitles ($type, array &$obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate (int $obj_id)
 
static _getObjectTypeIdByTitle (string $type, ?\ilDBInterface $ilDB=null)
 

Data Fields

const DB_TABLE_NAME = 'lti_consumer_settings'
 
const LAUNCH_METHOD_OWN_WIN = 'ownWin'
 
const LAUNCH_METHOD_NEW_WIN = 'newWin'
 
const LAUNCH_METHOD_EMBEDDED = 'embedded'
 
const HIGHSCORE_SHOW_ALL_TABLES = 1
 
const HIGHSCORE_SHOW_TOP_TABLE = 2
 
const HIGHSCORE_SHOW_OWN_TABLE = 3
 
const LTI_JWT_CLAIM_PREFIX = 'https://purl.imsglobal.org/spec/lti'
 
const LTI_1_3_KID = 'lti_1_3_kid'
 
const LTI_1_3_PRIVATE_KEY = 'lti_1_3_privatekey'
 
const ERROR_OPEN_SSL_CONF = 'error openssl config invalid'
 
const OPENSSL_KEYTYPE_RSA = ''
 
const REG_TOKEN_OP_NEW_REG = 'reg'
 
const REG_TOKEN_OP_UPDATE_REG = 'reg-update'
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 
const DESC_LENGTH = 128
 
const LONG_DESC_LENGTH = 4000
 
const TABLE_OBJECT_DATA = "object_data"
 
array $objectList
 
string $untranslatedTitle
 

Protected Member Functions

 initType ()
 
 doRead ()
 
 doUpdate ()
 
 loadRepositoryActivationSettings ()
 
 saveRepositoryActivationSettings ()
 
 dbTableName ()
 
- Protected Member Functions inherited from ilObject2
 initType ()
 
 doRead ()
 
 doCreate (bool $clone_mode=false)
 
 beforeCreate ()
 If overwritten this method should return true, there is currently no "abort" handling for cases where "false" is returned. More...
 
 doUpdate ()
 
 beforeUpdate ()
 
 doDelete ()
 
 beforeDelete ()
 
 doCloneObject (ilObject2 $new_obj, int $a_target_id, ?int $a_copy_id=null)
 
 beforeCloneObject ()
 
- Protected Member Functions inherited from ilObject
 doMDUpdateListener (string $a_element)
 
 beforeMDUpdateListener (string $a_element)
 
 doCreateMetaData ()
 
 beforeCreateMetaData ()
 
 doUpdateMetaData ()
 
 beforeUpdateMetaData ()
 
 doDeleteMetaData ()
 
 beforeDeleteMetaData ()
 
 handleAutoRating ()
 
 hasAutoRating ()
 

Protected Attributes

bool $activationLimited = false
 repository object activation settings (handled by ilObject) More...
 
int $activationStartingTime = null
 
int $activationEndingTime = null
 
bool $activationVisibility = null
 
int $providerId = 0
 
ilLTIConsumeProvider $provider = null
 
bool $use_xapi = false
 
string $custom_activity_id = ''
 
bool $statementsReportEnabled = false
 
float $mastery_score = 0.5
 
string $launchMethod = self::LAUNCH_METHOD_NEW_WIN
 
string $customLaunchKey = ''
 
string $customLaunchSecret = ''
 
string $customParams = ''
 
int $ref_id = 0
 
bool $_highscore_enabled = false
 
int $anonymity = 0
 
bool $_highscore_achieved_ts = true
 
bool $_highscore_percentage = true
 
bool $_highscore_wtime = true
 
bool $_highscore_own_table = true
 
bool $_highscore_top_table = true
 
int $_highscore_top_num = 10
 
- Protected Attributes inherited from ilObject
ilLogger $obj_log
 
ILIAS $ilias
 
ilObjectDefinition $obj_definition
 
ilDBInterface $db
 
ilLogger $log
 
ilErrorHandling $error
 
ilTree $tree
 
ilAppEventHandler $app_event_handler
 
ilRbacAdmin $rbac_admin
 
ilRbacReview $rbac_review
 
ilObjUser $user
 
ilLanguage $lng
 
LOMServices $lom_services
 
bool $call_by_reference
 
int $max_title = self::TITLE_LENGTH
 
int $max_desc = self::DESC_LENGTH
 
bool $add_dots = true
 
int $ref_id = null
 
string $type = ""
 
string $title = ""
 
string $desc = ""
 
string $long_desc = ""
 
int $owner = 0
 
string $create_date = ""
 
string $last_update = ""
 
string $import_id = ""
 
bool $register = false
 

Detailed Description

Definition at line 35 of file class.ilObjLTIConsumer.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjLTIConsumer::__construct ( int  $a_id = 0,
bool  $a_reference = true 
)

ilObjLTIConsumer constructor.

Definition at line 104 of file class.ilObjLTIConsumer.php.

References ILIAS\GlobalScreen\Provider\__construct().

105  {
106  parent::__construct($a_id, $a_reference);
107  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ buildContentSelectionParameters()

static ilObjLTIConsumer::buildContentSelectionParameters ( ilLTIConsumeProvider  $provider,
int  $refId,
string  $returnUrl,
string  $nonce 
)
static
Exceptions
ilWACException

Definition at line 937 of file class.ilObjLTIConsumer.php.

References $clientId, $context, $DIC, CLIENT_ID, ilLTIConsumeProvider\getClientId(), ilLTIConsumeProvider\getId(), ilCmiXapiUser\getIdent(), ilCmiXapiUser\getIdentAsId(), ilLTIConsumeProvider\getIncludeUserPicture(), ilLTIConsumeProvider\getLaunchMethod(), ilLTIConsumeProvider\getPrivacyIdent(), ilLTIConsumeProvider\getPrivacyName(), ILIAS_VERSION, null, ilLTIConsumeProvider\PRIVACY_NAME_FIRSTNAME, ilLTIConsumeProvider\PRIVACY_NAME_FULLNAME, ilLTIConsumeProvider\PRIVACY_NAME_LASTNAME, and ROOT_FOLDER_ID.

Referenced by ilObjLTIConsumerGUI\contentSelectionRequest().

942  : ?array {
943  global $DIC;
944 
945  $clientId = $provider->getClientId();
946  $deploymentId = $provider->getId();
947  $ilLTIConsumerLaunch = new ilLTIConsumerLaunch($refId);
948  $context = $ilLTIConsumerLaunch->getContext();
949  $contextType = $ilLTIConsumerLaunch::getLTIContextType($context["type"]);
950  $contextId = $context["id"];
951  $contextTitle = $context["title"];
952 
953  $roles = "Instructor";
954  $usrImage = '';
955  if ($provider->getIncludeUserPicture()) {
956  $usrImage = self::getIliasHttpPath() . "/" . $DIC->user()->getPersonalPicturePath("small");
957  }
958  $documentTarget = "window";
959  if ($provider->getLaunchMethod() == self::LAUNCH_METHOD_EMBEDDED) {
960  $documentTarget = "iframe";
961  }
962  $nameGiven = '-';
963  $nameFamily = '-';
964  $nameFull = '-';
965  switch ($provider->getPrivacyName()) {
967  $nameGiven = $DIC->user()->getFirstname();
968  $nameFull = $DIC->user()->getFirstname();
969  break;
971  $usrName = $DIC->user()->getUTitle() ? $DIC->user()->getUTitle() . ' ' : '';
972  $usrName .= $DIC->user()->getLastname();
973  $nameFamily = $usrName;
974  $nameFull = $usrName;
975  break;
977  $nameGiven = $DIC->user()->getFirstname();
978  $nameFamily = $DIC->user()->getLastname();
979  $nameFull = $DIC->user()->getFullname();
980  break;
981  }
982 
983  $userIdLTI = ilCmiXapiUser::getIdentAsId($provider->getPrivacyIdent(), $DIC->user());
984  $emailPrimary = ilCmiXapiUser::getIdent($provider->getPrivacyIdent(), $DIC->user());
985  $toolConsumerInstanceGuid = CLIENT_ID . ".";
986  $parseIliasUrl = parse_url(self::getIliasHttpPath());
987  if (array_key_exists("path", $parseIliasUrl)) {
988  $toolConsumerInstanceGuid .= implode(".", array_reverse(explode("/", $parseIliasUrl["path"])));
989  }
990  $toolConsumerInstanceGuid .= $parseIliasUrl["host"];
991 
992  $content_select_vars = [
993  "lti_message_type" => "ContentItemSelectionRequest",
994  "lti_version" => "1.3.0",
995  "user_id" => (string) $userIdLTI,
996  "user_image" => $usrImage,
997  "roles" => $roles,
998  "lis_person_name_given" => $nameGiven,
999  "lis_person_name_family" => $nameFamily,
1000  "lis_person_name_full" => $nameFull,
1001  "lis_person_contact_email_primary" => $emailPrimary,
1002  "context_id" => (string) $contextId,
1003  "context_type" => $contextType,
1004  "context_title" => $contextTitle,
1005  "context_label" => $contextType . " " . $contextId,
1006  "launch_presentation_locale" => $DIC->language()->getLangKey(),
1007  "launch_presentation_document_target" => $documentTarget,
1008  "launch_presentation_width" => "",
1009  //recommended
1010  "launch_presentation_height" => "",
1011  //recommended
1012  "tool_consumer_instance_guid" => $toolConsumerInstanceGuid,
1013  "tool_consumer_instance_name" => $DIC->settings()->get("short_inst_name") ? $DIC->settings()->get(
1014  "short_inst_name"
1015  ) : CLIENT_ID,
1016  "tool_consumer_instance_description" => ilObjSystemFolder::_getHeaderTitle(),
1017  "tool_consumer_instance_url" => ilLink::_getLink(ROOT_FOLDER_ID, "root"),
1018  //ToDo? "https://vb52p70.example.com/release_5-3/goto.php?target=root_1&client_id=inno",
1019  "tool_consumer_instance_contact_email" => $DIC->settings()->get("admin_email"),
1020  "tool_consumer_info_product_family_code" => "ilias",
1021  "tool_consumer_info_version" => ILIAS_VERSION,
1022  "content_item_return_url" => $returnUrl,
1023  "accept_types" => "ltiResourceLink",
1024  "accept_presentation_document_targets" => "iframe,window,embed",
1025  "accept_multiple" => true,
1026  "auto_create" => true,
1027  ];
1028  $provider_custom_params = self::getProviderCustomParamsArray($provider);
1029  foreach ($provider_custom_params as $key => $value) {
1030  $content_select_vars['custom_' . $key] = $value;
1031  }
1032 
1033  if (!empty(self::verifyPrivateKey())) {
1034  $DIC->ui()->mainTemplate()->setOnScreenMessage('failure', 'ERROR_OPEN_SSL_CONF', true);
1035  return null;
1036  }
1037  return self::LTISignJWT($content_select_vars, '', $clientId, $deploymentId, $nonce);
1038  }
static getIdentAsId(int $userIdentMode, ilObjUser $user)
$context
Definition: webdav.php:31
const ROOT_FOLDER_ID
Definition: constants.php:32
$clientId
Definition: ltiregend.php:25
$refId
Definition: xapitoken.php:58
static getIdent(int $userIdentMode, ilObjUser $user)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
const ILIAS_VERSION
const CLIENT_ID
Definition: constants.php:41
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildLaunchParameters()

ilObjLTIConsumer::buildLaunchParameters ( ilCmiXapiUser  $cmixUser,
string  $token,
string  $contextType,
string  $contextId,
string  $contextTitle,
?string  $returnUrl = '' 
)
Exceptions
ilWACException

Definition at line 661 of file class.ilObjLTIConsumer.php.

References $DIC, $token, CLIENT_ID, ilLTIConsumerResult\getByKeys(), getCustomParamsArray(), ilObject\getDescription(), ilObject\getId(), ilCmiXapiUser\getIdentAsId(), ilCmiXapiUser\getIliasUuid(), getLaunchKey(), getLaunchMethod(), getLaunchSecret(), getProvider(), ilObject\getRefId(), ilObject\getTitle(), ilCmiXapiUser\getUsrIdent(), ILIAS_VERSION, ILIAS\Repository\lng(), null, ilObjCmiXapi\PRIVACY_IDENT_IL_UUID_RANDOM, ilLTIConsumeProvider\PRIVACY_NAME_FIRSTNAME, ilLTIConsumeProvider\PRIVACY_NAME_FULLNAME, ilLTIConsumeProvider\PRIVACY_NAME_LASTNAME, ROOT_FOLDER_ID, and ilLTIConsumerLaunch\signOAuth().

668  : array {
669  global $DIC;
670  /* @var \ILIAS\DI\Container $DIC */
671 
672  $roles = $DIC->access()->checkAccess('write', '', $this->getRefId()) ? "Instructor" : "Learner";
673  //todo if object is in course or group, roles would have to be taken from there s. Mantis 35435 - if necessary Jour Fixe topic
674  //$roles = "Administrator";
675 
676  if ($this->getProvider()->getAlwaysLearner() == true) {
677  $roles = "Learner";
678  }
679 
680  $resource_link_id = $this->getRefId();
681  if ($this->getProvider()->getUseProviderId() == true) {
682  $resource_link_id = 'p' . $this->getProvider()->getId();
683  }
684 
685  $usrImage = '';
686  if ($this->getProvider()->getIncludeUserPicture()) {
687  $usrImage = self::getIliasHttpPath() . "/" . $DIC->user()->getPersonalPicturePath("small");
688  }
689 
690  $documentTarget = "window";
691  if ($this->getLaunchMethod() == self::LAUNCH_METHOD_EMBEDDED) {
692  $documentTarget = "iframe";
693  }
694 
695  $nameGiven = '-';
696  $nameFamily = '-';
697  $nameFull = '-';
698  switch ($this->getProvider()->getPrivacyName()) {
700  $nameGiven = $DIC->user()->getFirstname();
701  $nameFull = $DIC->user()->getFirstname();
702  break;
704  $usrName = $DIC->user()->getUTitle() ? $DIC->user()->getUTitle() . ' ' : '';
705  $usrName .= $DIC->user()->getLastname();
706  $nameFamily = $usrName;
707  $nameFull = $usrName;
708  break;
710  $nameGiven = $DIC->user()->getFirstname();
711  $nameFamily = $DIC->user()->getLastname();
712  $nameFull = $DIC->user()->getFullname();
713  break;
714  }
715 
716  $userIdLTI = ilCmiXapiUser::getIdentAsId($this->getProvider()->getPrivacyIdent(), $DIC->user());
717 
718  $emailPrimary = $cmixUser->getUsrIdent();
719  if ($this->getProvider()->getPrivacyIdent() == ilObjCmiXapi::PRIVACY_IDENT_IL_UUID_RANDOM) {
720  $userIdLTI = strstr($emailPrimary, '@' . ilCmiXapiUser::getIliasUuid(), true);
721  }
722 
723  ilLTIConsumerResult::getByKeys($this->getId(), $DIC->user()->getId(), true);
724 
725  //ToDo: Check!
726  $provider_custom_params = self::getProviderCustomParamsArray($this->getProvider());
727  $custom_params = $this->getCustomParamsArray();
728  $merged_params = array_merge($provider_custom_params, $custom_params);
729 
730  $toolConsumerInstanceGuid = CLIENT_ID . ".";
731  $parseIliasUrl = parse_url(self::getIliasHttpPath());
732  if (array_key_exists("path", $parseIliasUrl)) {
733  $toolConsumerInstanceGuid .= implode(".", array_reverse(explode("/", $parseIliasUrl["path"])));
734  }
735  $toolConsumerInstanceGuid .= $parseIliasUrl["host"];
736  $launch_vars = [
737  "lti_message_type" => "basic-lti-launch-request",
738  "lti_version" => "LTI-1p0",
739  "resource_link_id" => $resource_link_id,
740  "resource_link_title" => $this->getTitle(),
741  "resource_link_description" => $this->getDescription(),
742  "user_id" => $userIdLTI,
743  "user_image" => $usrImage,
744  "roles" => $roles,
745  "lis_person_name_given" => $nameGiven,
746  "lis_person_name_family" => $nameFamily,
747  "lis_person_name_full" => $nameFull,
748  "lis_person_contact_email_primary" => $emailPrimary,
749  "context_id" => $contextId,
750  "context_type" => $contextType,
751  "context_title" => $contextTitle,
752  "context_label" => $contextType . " " . $contextId,
753  "launch_presentation_locale" => $this->lng->getLangKey(),
754  "launch_presentation_document_target" => $documentTarget,
755  "launch_presentation_width" => "",
756  //recommended
757  "launch_presentation_height" => "",
758  //recommended
759  "launch_presentation_return_url" => $returnUrl,
760  "tool_consumer_instance_guid" => $toolConsumerInstanceGuid,
761  "tool_consumer_instance_name" => $DIC->settings()->get("short_inst_name") ? $DIC->settings()->get(
762  "short_inst_name"
763  ) : CLIENT_ID,
764  "tool_consumer_instance_description" => ilObjSystemFolder::_getHeaderTitle(),
765  "tool_consumer_instance_url" => ilLink::_getLink(ROOT_FOLDER_ID, "root"),
766  //ToDo? "https://vb52p70.example.com/release_5-3/goto.php?target=root_1&client_id=inno",
767  "tool_consumer_instance_contact_email" => $DIC->settings()->get("admin_email"),
768  "launch_presentation_css_url" => "",
769  "tool_consumer_info_product_family_code" => "ilias",
770  "tool_consumer_info_version" => ILIAS_VERSION,
771  "lis_result_sourcedid" => $token,
772  "lis_outcome_service_url" => self::getIliasHttpPath(
773  ) . "/components/ILIAS/LTIConsumer/result.php?client_id=" . CLIENT_ID,
774  "role_scope_mentor" => ""
775  ];
776 
777  $OAuthParams = [
778  "url" => $this->getProvider()->getProviderUrl(),
779  "key" => $this->getLaunchKey(),
780  "secret" => $this->getLaunchSecret(),
781  "callback" => "about:blank",
782  "http_method" => "POST",
783  "sign_method" => "HMAC_SHA1",
784  "token" => null,
785  "data" => ($launch_vars + $merged_params)
786  ];
787 
788  return ilLTIConsumerLaunch::signOAuth($OAuthParams);
789  }
static getIdentAsId(int $userIdentMode, ilObjUser $user)
const ROOT_FOLDER_ID
Definition: constants.php:32
const PRIVACY_IDENT_IL_UUID_RANDOM
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
const ILIAS_VERSION
$token
Definition: xapitoken.php:70
const CLIENT_ID
Definition: constants.php:41
global $DIC
Definition: shib_login.php:26
static getByKeys(int $a_obj_id, int $a_usr_id, ?bool $a_create=false)
Get a result by object and user key.
static signOAuth(array $a_params)
sign request data with OAuth
+ Here is the call graph for this function:

◆ buildLaunchParametersLTI13()

ilObjLTIConsumer::buildLaunchParametersLTI13 ( ilCmiXapiUser  $cmixUser,
string  $endpoint,
string  $clientId,
int  $deploymentId,
string  $nonce,
string  $contextType,
string  $contextId,
string  $contextTitle,
?string  $returnUrl = '' 
)
Exceptions
ilWACException

Definition at line 795 of file class.ilObjLTIConsumer.php.

References $DIC, CLIENT_ID, ilLTIConsumerResult\getByKeys(), getCustomParamsArray(), ilObject\getDescription(), ilObject\getId(), ilCmiXapiUser\getIdentAsId(), getLaunchMethod(), getProvider(), ilObject\getRefId(), ilObject\getTitle(), ilCmiXapiUser\getUsrIdent(), ILIAS_VERSION, ILIAS\Repository\lng(), null, ilLTIConsumeProvider\PRIVACY_NAME_FIRSTNAME, ilLTIConsumeProvider\PRIVACY_NAME_FULLNAME, ilLTIConsumeProvider\PRIVACY_NAME_LASTNAME, and ROOT_FOLDER_ID.

805  : ?array {
806  global $DIC;
807  /* @var \ILIAS\DI\Container $DIC */
808 
809  $roles = $DIC->access()->checkAccess('write', '', $this->getRefId()) ? "Instructor" : "Learner";
810  if ($this->getProvider()->getAlwaysLearner() == true) {
811  $roles = "Learner";
812  }
813 
814  $resource_link_id = $this->getRefId();
815  if ($this->getProvider()->getUseProviderId() == true) {
816  $resource_link_id = 'p' . $this->getProvider()->getId();
817  }
818 
819  $usrImage = '';
820  if ($this->getProvider()->getIncludeUserPicture()) {
821  $usrImage = self::getIliasHttpPath() . "/" . $DIC->user()->getPersonalPicturePath("small");
822  }
823 
824  $documentTarget = "window";
825  if ($this->getLaunchMethod() == self::LAUNCH_METHOD_EMBEDDED) {
826  $documentTarget = "iframe";
827  }
828 
829  $nameGiven = '-';
830  $nameFamily = '-';
831  $nameFull = '-';
832  switch ($this->getProvider()->getPrivacyName()) {
834  $nameGiven = $DIC->user()->getFirstname();
835  $nameFull = $DIC->user()->getFirstname();
836  break;
838  $usrName = $DIC->user()->getUTitle() ? $DIC->user()->getUTitle() . ' ' : '';
839  $usrName .= $DIC->user()->getLastname();
840  $nameFamily = $usrName;
841  $nameFull = $usrName;
842  break;
844  $nameGiven = $DIC->user()->getFirstname();
845  $nameFamily = $DIC->user()->getLastname();
846  $nameFull = $DIC->user()->getFullname();
847  break;
848  }
849 
850  $userIdLTI = ilCmiXapiUser::getIdentAsId($this->getProvider()->getPrivacyIdent(), $DIC->user());
851 
852  $emailPrimary = $cmixUser->getUsrIdent();
853 
854  ilLTIConsumerResult::getByKeys($this->getId(), $DIC->user()->getId(), true);
855 
856  $toolConsumerInstanceGuid = CLIENT_ID . ".";
857  $parseIliasUrl = parse_url(self::getIliasHttpPath());
858  if (array_key_exists("path", $parseIliasUrl)) {
859  $toolConsumerInstanceGuid .= implode(".", array_reverse(explode("/", $parseIliasUrl["path"])));
860  }
861  $toolConsumerInstanceGuid .= $parseIliasUrl["host"];
862  $launch_vars = [
863  "lti_message_type" => "basic-lti-launch-request",
864  "lti_version" => "1.3.0",
865  "resource_link_id" => (string) $resource_link_id,
866  "resource_link_title" => $this->getTitle(),
867  "resource_link_description" => $this->getDescription(),
868  "user_id" => (string) $userIdLTI,
869  "user_image" => $usrImage,
870  "roles" => $roles,
871  "lis_person_name_given" => $nameGiven,
872  "lis_person_name_family" => $nameFamily,
873  "lis_person_name_full" => $nameFull,
874  "lis_person_contact_email_primary" => $emailPrimary,
875  "context_id" => $contextId,
876  "context_type" => $contextType,
877  "context_title" => $contextTitle,
878  "context_label" => $contextType . " " . $contextId,
879  "launch_presentation_locale" => $this->lng->getLangKey(),
880  "launch_presentation_document_target" => $documentTarget,
881  "launch_presentation_width" => "",
882  //recommended
883  "launch_presentation_height" => "",
884  //recommended
885  "launch_presentation_return_url" => $returnUrl,
886  "tool_consumer_instance_guid" => $toolConsumerInstanceGuid,
887  "tool_consumer_instance_name" => $DIC->settings()->get("short_inst_name") ? $DIC->settings()->get(
888  "short_inst_name"
889  ) : CLIENT_ID,
890  "tool_consumer_instance_description" => ilObjSystemFolder::_getHeaderTitle(),
891  "tool_consumer_instance_url" => ilLink::_getLink(ROOT_FOLDER_ID, "root"),
892  //ToDo? "https://vb52p70.example.com/release_5-3/goto.php?target=root_1&client_id=inno",
893  "tool_consumer_instance_contact_email" => $DIC->settings()->get("admin_email"),
894  "launch_presentation_css_url" => "",
895  "tool_consumer_info_product_family_code" => "ilias",
896  "tool_consumer_info_version" => ILIAS_VERSION,
897  "lis_result_sourcedid" => "",
898  //$token,
899  "lis_outcome_service_url" => self::getIliasHttpPath(
900  ) . "/components/ILIAS/LTIConsumer/result.php?client_id=" . CLIENT_ID,
901  "role_scope_mentor" => ""
902  ];
903 
904  $provider_custom_params = self::getProviderCustomParamsArray($this->getProvider());
905  $custom_params = $this->getCustomParamsArray();
906  $merged_params = array_merge($provider_custom_params, $custom_params);
907  foreach ($merged_params as $key => $value) {
908  $launch_vars['custom_' . $key] = $value;
909  }
910 
911  if ($this->getProvider()->isGradeSynchronization()) {
912  $gradeservice = new ilLTIConsumerGradeService();
913  $launch_vars['custom_lineitem_url'] = self::getIliasHttpPath(
914  ) . "/components/ILIAS/LTIConsumer/ltiservices.php/gradeservice/" . $contextId . "/lineitems/" . $this->id . "/lineitem";
915 
916  // ! Moodle as tool provider requires a custom_lineitems_url even though this should be optional in launch request, especially if only posting score scope is permitted by platform
917  // http://www.imsglobal.org/spec/lti-ags/v2p0#example-link-has-a-single-line-item-tool-can-only-post-score
918  $launch_vars['custom_lineitems_url'] = self::getIliasHttpPath(
919  ) . "/components/ILIAS/LTIConsumer/ltiservices.php/gradeservice/" . $contextId . "/linetitems/";
920 
921  $launch_vars['custom_ags_scopes'] = implode(",", $gradeservice->getPermittedScopes());
922  }
923 
924  if (!empty(self::verifyPrivateKey())) {
925  $DIC->ui()->mainTemplate()->setOnScreenMessage('failure', 'ERROR_OPEN_SSL_CONF', true);
926  return null;
927  }
928  return self::LTISignJWT($launch_vars, $endpoint, $clientId, $deploymentId, $nonce);
929  }
static getIdentAsId(int $userIdentMode, ilObjUser $user)
const ROOT_FOLDER_ID
Definition: constants.php:32
$clientId
Definition: ltiregend.php:25
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
const ILIAS_VERSION
const CLIENT_ID
Definition: constants.php:41
global $DIC
Definition: shib_login.php:26
static getByKeys(int $a_obj_id, int $a_usr_id, ?bool $a_create=false)
Get a result by object and user key.
+ Here is the call graph for this function:

◆ dbTableName()

ilObjLTIConsumer::dbTableName ( )
protected

Definition at line 472 of file class.ilObjLTIConsumer.php.

Referenced by save().

472  : string
473  {
474  return self::DB_TABLE_NAME;
475  }
+ Here is the caller graph for this function:

◆ doRead()

ilObjLTIConsumer::doRead ( )
protected

Definition at line 352 of file class.ilObjLTIConsumer.php.

References load().

352  : void
353  {
354  $this->load();
355  }
+ Here is the call graph for this function:

◆ doUpdate()

ilObjLTIConsumer::doUpdate ( )
protected

Definition at line 394 of file class.ilObjLTIConsumer.php.

References save().

394  : void
395  {
396  $this->save();
397  }
+ Here is the call graph for this function:

◆ getAccessTokenUrl()

static ilObjLTIConsumer::getAccessTokenUrl ( )
static

Definition at line 1241 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumeProviderFormGUI\initForm(), and ilLTIConsumeProviderFormGUI\initToolConfigForm().

1241  : string
1242  {
1243  return self::getIliasHttpPath() . "/components/ILIAS/LTIConsumer/ltitoken.php";
1244  }
+ Here is the caller graph for this function:

◆ getActivationEndingTime()

ilObjLTIConsumer::getActivationEndingTime ( )

Definition at line 134 of file class.ilObjLTIConsumer.php.

References $activationEndingTime.

Referenced by saveRepositoryActivationSettings().

134  : ?int
135  {
137  }
+ Here is the caller graph for this function:

◆ getActivationStartingTime()

ilObjLTIConsumer::getActivationStartingTime ( )

Definition at line 124 of file class.ilObjLTIConsumer.php.

References $activationStartingTime.

Referenced by saveRepositoryActivationSettings().

124  : ?int
125  {
127  }
+ Here is the caller graph for this function:

◆ getActivationVisibility()

ilObjLTIConsumer::getActivationVisibility ( )

Definition at line 144 of file class.ilObjLTIConsumer.php.

References $activationVisibility.

Referenced by saveRepositoryActivationSettings().

144  : ?bool
145  {
147  }
+ Here is the caller graph for this function:

◆ getActivityId()

ilObjLTIConsumer::getActivityId ( )

Definition at line 287 of file class.ilObjLTIConsumer.php.

References $custom_activity_id, and getProvider().

287  : string
288  {
289  if (strlen($this->getProvider()->getXapiActivityId())) {
290  return $this->getProvider()->getXapiActivityId();
291  }
292 
294  }
+ Here is the call graph for this function:

◆ getAuthenticationRequestUrl()

static ilObjLTIConsumer::getAuthenticationRequestUrl ( )
static

Definition at line 1236 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumeProviderFormGUI\initForm(), and ilLTIConsumeProviderFormGUI\initToolConfigForm().

1236  : string
1237  {
1238  return self::getIliasHttpPath() . "/components/ILIAS/LTIConsumer/ltiauth.php";
1239  }
+ Here is the caller graph for this function:

◆ getCustomActivityId()

ilObjLTIConsumer::getCustomActivityId ( )

Definition at line 277 of file class.ilObjLTIConsumer.php.

References $custom_activity_id.

Referenced by save().

277  : string
278  {
280  }
+ Here is the caller graph for this function:

◆ getCustomLaunchKey()

ilObjLTIConsumer::getCustomLaunchKey ( )

Definition at line 219 of file class.ilObjLTIConsumer.php.

References $customLaunchKey.

Referenced by getLaunchKey(), and save().

219  : string
220  {
221  return $this->customLaunchKey;
222  }
+ Here is the caller graph for this function:

◆ getCustomLaunchSecret()

ilObjLTIConsumer::getCustomLaunchSecret ( )

Definition at line 229 of file class.ilObjLTIConsumer.php.

References $customLaunchSecret.

Referenced by getLaunchSecret(), and save().

229  : string
230  {
232  }
+ Here is the caller graph for this function:

◆ getCustomParams()

ilObjLTIConsumer::getCustomParams ( )

Definition at line 239 of file class.ilObjLTIConsumer.php.

References $customParams.

Referenced by getCustomParamsArray(), and save().

239  : string
240  {
241  return $this->customParams;
242  }
+ Here is the caller graph for this function:

◆ getCustomParamsArray()

ilObjLTIConsumer::getCustomParamsArray ( )
Returns
string[]

Definition at line 309 of file class.ilObjLTIConsumer.php.

References $param, $params, and getCustomParams().

Referenced by buildLaunchParameters(), and buildLaunchParametersLTI13().

309  : array
310  {
311  $paramsAsArray = [];
312 
313  $params = $this->getCustomParams();
314  // allows foo=bar;foo2=baz2; foo3=baz3
315  $params = preg_split('/; ?/', $params);
316 
317  foreach ($params as $param) {
318  $param = explode('=', $param);
319  // empty field, duplicate/leading/trailing semicolon?
320  if ($param[0] != '') {
321  $value = isset($param[1]) ? $param[1] : '';
322  $paramsAsArray[$param[0]] = $value;
323  }
324  }
325 
326  return $paramsAsArray;
327  }
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
$param
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getHighscoreAchievedTS()

ilObjLTIConsumer::getHighscoreAchievedTS ( )

Returns if date and time of the scores achievement should be displayed.

Returns
bool True, if column should be shown.

Definition at line 511 of file class.ilObjLTIConsumer.php.

References $_highscore_achieved_ts.

Referenced by save().

511  : bool
512  {
514  }
+ Here is the caller graph for this function:

◆ getHighscoreEnabled()

ilObjLTIConsumer::getHighscoreEnabled ( )

Gets the setting which determines if the highscore feature is enabled.

Returns
bool True, if highscore is enabled.

Definition at line 493 of file class.ilObjLTIConsumer.php.

References $_highscore_enabled.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and save().

493  : bool
494  {
496  }
+ Here is the caller graph for this function:

◆ getHighscoreMode()

ilObjLTIConsumer::getHighscoreMode ( )

Definition at line 619 of file class.ilObjLTIConsumer.php.

References getHighscoreOwnTable(), and getHighscoreTopTable().

619  : int
620  {
621  switch (true) {
622  case $this->getHighscoreOwnTable() && $this->getHighscoreTopTable():
624 
625  case $this->getHighscoreTopTable():
627 
628  case $this->getHighscoreOwnTable():
629  default:
631  }
632  }
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getHighscoreTopTable()
Gets, if the top-rankings table should be shown.
getHighscoreOwnTable()
Gets if the own rankings table should be shown.
+ Here is the call graph for this function:

◆ getHighscoreOwnTable()

ilObjLTIConsumer::getHighscoreOwnTable ( )

Gets if the own rankings table should be shown.

Returns
bool True, if the own rankings table should be shown.

Definition at line 567 of file class.ilObjLTIConsumer.php.

References $_highscore_own_table.

Referenced by getHighscoreMode(), and save().

567  : bool
568  {
570  }
+ Here is the caller graph for this function:

◆ getHighscorePercentage()

ilObjLTIConsumer::getHighscorePercentage ( )

Gets if the percentage column should be shown.

Returns
bool True, if percentage column should be shown.

Definition at line 529 of file class.ilObjLTIConsumer.php.

References $_highscore_percentage.

Referenced by save().

529  : bool
530  {
532  }
+ Here is the caller graph for this function:

◆ getHighscoreTopNum()

ilObjLTIConsumer::getHighscoreTopNum ( int  $a_retval = 10)

Gets the number of entries which are to be shown in the top-rankings table.

Default: 10 entries

Parameters
integer$a_retvalOptional return value if nothing is set, defaults to 10.
Returns
integer Number of entries to be shown in the top-rankings table.

Definition at line 609 of file class.ilObjLTIConsumer.php.

References $_highscore_top_num.

Referenced by save().

609  : int
610  {
611  $retval = $a_retval;
612  if ($this->_highscore_top_num != 0) {
613  $retval = $this->_highscore_top_num;
614  }
615 
616  return $retval;
617  }
+ Here is the caller graph for this function:

◆ getHighscoreTopTable()

ilObjLTIConsumer::getHighscoreTopTable ( )

Gets, if the top-rankings table should be shown.

Returns
bool True, if top-rankings table should be shown.

Definition at line 585 of file class.ilObjLTIConsumer.php.

References $_highscore_top_table.

Referenced by getHighscoreMode(), and save().

585  : bool
586  {
588  }
+ Here is the caller graph for this function:

◆ getHighscoreWTime()

ilObjLTIConsumer::getHighscoreWTime ( )

Gets if the column with the workingtime should be shown.

Returns
bool True, if the workingtime column should be shown.

Definition at line 547 of file class.ilObjLTIConsumer.php.

References $_highscore_wtime.

Referenced by save().

547  : bool
548  {
550  }
+ Here is the caller graph for this function:

◆ getIliasHttpPath()

static ilObjLTIConsumer::getIliasHttpPath ( )
static

Definition at line 1199 of file class.ilObjLTIConsumer.php.

References $_SERVER, $DIC, Vendor\Package\$f, $path, and ilContext\modifyHttpPath().

Referenced by ilObjLTIConsumerGUI\contentSelectionRequest(), ilLTIConsumerContentGUI\getEmbeddedAutoStartFormular(), ilLTIConsumerContentGUI\getStartButtonTxt11(), ilLTIConsumerContentGUI\getStartButtonTxt13(), and ilObjLTIConsumerGUI\saveContentSelection().

1199  : string
1200  {
1201  global $DIC;
1202 
1203  if ($DIC['https']->isDetected()) {
1204  $protocol = 'https://';
1205  } else {
1206  $protocol = 'http://';
1207  }
1208  $host = $_SERVER['HTTP_HOST'];
1209 
1210  $rq_uri = strip_tags($_SERVER['REQUEST_URI']);
1211 
1212  // security fix: this failed, if the URI contained "?" and following "/"
1213  // -> we remove everything after "?"
1214  if (is_int($pos = strpos($rq_uri, "?"))) {
1215  $rq_uri = substr($rq_uri, 0, $pos);
1216  }
1217 
1218  $path = pathinfo($rq_uri);
1219  if (isset($path['extension']) && $path['extension'] !== '') {
1220  $uri = dirname($rq_uri);
1221  } else {
1222  $uri = $rq_uri;
1223  }
1224  $uri = str_replace("components/ILIAS/LTIConsumer", "", $uri);
1225  $iliasHttpPath = ilContext::modifyHttpPath(implode('', [$protocol, $host, $uri]));
1226  $f = new \ILIAS\Data\Factory();
1227  $uri = $f->uri(rtrim($iliasHttpPath, "/"));
1228  return $uri->getBaseURI();
1229  }
static modifyHttpPath(string $httpPath)
$path
Definition: ltiservices.php:29
$_SERVER['HTTP_HOST']
Definition: raiseError.php:26
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInstance()

static ilObjLTIConsumer::getInstance ( int  $a_id = 0,
bool  $a_reference = true 
)
static

Definition at line 1383 of file class.ilObjLTIConsumer.php.

Referenced by ilCmiXapiStatementsReport\__construct(), ilCmiXapiAbstractReportLinkBuilder\getObj(), and ilCmiXapiHighscoreReport\initTableData().

1384  {
1385  return new self($a_id, $a_reference);
1386  }
+ Here is the caller graph for this function:

◆ getJwks()

static ilObjLTIConsumer::getJwks ( )
static

Definition at line 1179 of file class.ilObjLTIConsumer.php.

References $res.

1179  : array
1180  {
1181  $jwks = ['keys' => []];
1182 
1183  $privatekey = self::getPrivateKey();
1184  $res = openssl_pkey_get_private($privatekey['key']);
1185  $details = openssl_pkey_get_details($res);
1186 
1187  $jwk = [];
1188  $jwk['kty'] = 'RSA';
1189  $jwk['alg'] = 'RS256';
1190  $jwk['kid'] = $privatekey['kid'];
1191  $jwk['e'] = rtrim(strtr(base64_encode($details['rsa']['e']), '+/', '-_'), '=');
1192  $jwk['n'] = rtrim(strtr(base64_encode($details['rsa']['n']), '+/', '-_'), '=');
1193  $jwk['use'] = 'sig';
1194 
1195  $jwks['keys'][] = $jwk;
1196  return $jwks;
1197  }
$res
Definition: ltiservices.php:66

◆ getLaunchKey()

ilObjLTIConsumer::getLaunchKey ( )

Definition at line 249 of file class.ilObjLTIConsumer.php.

References getCustomLaunchKey(), and getProvider().

Referenced by buildLaunchParameters().

249  : string
250  {
251  if ($this->getProvider()->isProviderKeyCustomizable()) {
252  return $this->getCustomLaunchKey();
253  }
254 
255  return $this->getProvider()->getProviderKey();
256  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLaunchMethod()

ilObjLTIConsumer::getLaunchMethod ( )

Definition at line 209 of file class.ilObjLTIConsumer.php.

References $launchMethod.

Referenced by buildLaunchParameters(), buildLaunchParametersLTI13(), and save().

209  : string
210  {
211  return $this->launchMethod;
212  }
+ Here is the caller graph for this function:

◆ getLaunchSecret()

ilObjLTIConsumer::getLaunchSecret ( )

Definition at line 258 of file class.ilObjLTIConsumer.php.

References getCustomLaunchSecret(), and getProvider().

Referenced by buildLaunchParameters().

258  : string
259  {
260  if ($this->getProvider()->isProviderKeyCustomizable()) {
261  return $this->getCustomLaunchSecret();
262  }
263 
264  return $this->getProvider()->getProviderSecret();
265  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLogger()

static ilObjLTIConsumer::getLogger ( )
static

Definition at line 1423 of file class.ilObjLTIConsumer.php.

References ilLoggerFactory\getLogger().

Referenced by ilLTIConsumerGradeServiceScores\checkScore(), ilLTIConsumerGradeServiceScores\execute(), invalidRequest(), ilLTIConsumerServiceResponse\send(), sendAccessToken(), serverError(), and validateServiceToken().

1423  : ilLogger
1424  {
1425  return ilLoggerFactory::getLogger('lti');
1426  }
static getLogger(string $a_component_id)
Get component logger.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMasteryScore()

ilObjLTIConsumer::getMasteryScore ( )

Definition at line 154 of file class.ilObjLTIConsumer.php.

References $mastery_score.

Referenced by save().

154  : float
155  {
156  return $this->mastery_score;
157  }
+ Here is the caller graph for this function:

◆ getMasteryScorePercent()

ilObjLTIConsumer::getMasteryScorePercent ( )

Definition at line 164 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerPlaceholderValues\getMasteryScore().

164  : float
165  {
166  return $this->mastery_score * 100;
167  }
+ Here is the caller graph for this function:

◆ getNewClientId()

static ilObjLTIConsumer::getNewClientId ( )
static

Definition at line 1345 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumeProvider\getClientId().

1345  : string
1346  {
1347  return Util::getRandomString(15);
1348  }
+ Here is the caller graph for this function:

◆ getOpenidConfig()

static ilObjLTIConsumer::getOpenidConfig ( )
static

Definition at line 1271 of file class.ilObjLTIConsumer.php.

References ILIAS_VERSION.

1271  : array
1272  {
1273  $scopesSupported = array('openid');
1274  $gradeservice = new ilLTIConsumerGradeService();
1275  $scopesSupported = array_merge($scopesSupported, $gradeservice->getPermittedScopes());
1276  return [
1277  "issuer" => self::getPlattformId(),
1278  "authorization_endpoint" => self::getAuthenticationRequestUrl(),
1279  "token_endpoint" => self::getAccessTokenUrl(),
1280  "token_endpoint_auth_methods_supported" => ["private_key_jwt"],
1281  "token_endpoint_auth_signing_alg_values_supported" => ["RS256"],
1282  "jwks_uri" => self::getPublicKeysetUrl(),
1283  "registration_endpoint" => self::getRegistrationUrl(),
1284  "scopes_supported" => $scopesSupported,
1285  "response_types_supported" => ["id_token"],
1286  "subject_types_supported" => ["public", "pairwise"],
1287  "id_token_signing_alg_values_supported" => ["RS256"],
1288  "claims_supported" => ["iss", "aud"],
1289  "https://purl.imsglobal.org/spec/lti-platform-configuration" => [
1290  "product_family_code" => "ilias.de",
1291  "version" => ILIAS_VERSION,
1292  "messages_supported" => [
1293  [
1294  "type" => "LtiResourceLinkRequest",
1295  "placements" => [
1296  ]
1297  ],
1298  [
1299  "type" => "LtiDeepLinkingRequest",
1300  "placements" => [
1301  ]
1302  ]
1303  ]
1304  ]
1305  ];
1306  }
const ILIAS_VERSION

◆ getOpenidConfigUrl()

static ilObjLTIConsumer::getOpenidConfigUrl ( )
static

Definition at line 1266 of file class.ilObjLTIConsumer.php.

1266  : string
1267  {
1268  return self::getIliasHttpPath() . "/components/ILIAS/LTIConsumer/lticonfig.php";
1269  }

◆ getPlattformId()

static ilObjLTIConsumer::getPlattformId ( )
static

Definition at line 1231 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumeProviderFormGUI\initForm(), and ilLTIConsumeProviderFormGUI\initToolConfigForm().

1231  : string
1232  {
1233  return self::getIliasHttpPath();
1234  }
+ Here is the caller graph for this function:

◆ getPrivateKey()

static ilObjLTIConsumer::getPrivateKey ( )
static

Definition at line 1128 of file class.ilObjLTIConsumer.php.

References $ilSetting.

Referenced by sendAccessToken().

1128  : array
1129  {
1130  global $ilSetting;
1131  $err = self::verifyPrivateKey();
1132  if (!empty($err)) {
1133  return [];
1134  }
1135  $privatekey = $ilSetting->get(self::LTI_1_3_PRIVATE_KEY);
1136  $kid = $ilSetting->get(self::LTI_1_3_KID);
1137  return [
1138  "key" => $privatekey,
1139  "kid" => $kid
1140  ];
1141  }
global $ilSetting
Definition: privfeed.php:31
+ Here is the caller graph for this function:

◆ getProvider()

ilObjLTIConsumer::getProvider ( )

Definition at line 189 of file class.ilObjLTIConsumer.php.

References $provider.

Referenced by buildLaunchParameters(), buildLaunchParametersLTI13(), getActivityId(), getLaunchKey(), getLaunchSecret(), and ilLTIConsumerSettingsFormGUI\initObject().

190  {
191  return $this->provider;
192  }
ilLTIConsumeProvider $provider
+ Here is the caller graph for this function:

◆ getProviderCustomParamsArray()

static ilObjLTIConsumer::getProviderCustomParamsArray ( ilLTIConsumeProvider  $provider)
static
Returns
string[]

Definition at line 332 of file class.ilObjLTIConsumer.php.

References $param, $params, and ilLTIConsumeProvider\getCustomParams().

332  : array
333  {
334  $paramsAsArray = [];
335 
336  $params = $provider->getCustomParams();
337  // allows foo=bar;foo2=baz2; foo3=baz3
338  $params = preg_split('/; ?/', $params);
339 
340  foreach ($params as $param) {
341  $param = explode('=', $param);
342  // empty field, duplicate/leading/trailing semicolon?
343  if ($param[0] != '') {
344  $value = isset($param[1]) ? $param[1] : '';
345  $paramsAsArray[$param[0]] = $value;
346  }
347  }
348 
349  return $paramsAsArray;
350  }
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
$param
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ getProviderId()

ilObjLTIConsumer::getProviderId ( )

Definition at line 174 of file class.ilObjLTIConsumer.php.

References $providerId.

Referenced by initProvider(), and save().

174  : int
175  {
176  return $this->providerId;
177  }
+ Here is the caller graph for this function:

◆ getPublicKey()

static ilObjLTIConsumer::getPublicKey ( )
static

Definition at line 1167 of file class.ilObjLTIConsumer.php.

References $privateKey, $res, and null.

1167  : string
1168  {
1169  $publicKey = null;
1170  $privateKey = self::getPrivateKey();
1171  $res = openssl_pkey_get_private($privateKey['key']);
1172  if ($res !== false) {
1173  $details = openssl_pkey_get_details($res);
1174  $publicKey = $details['key'];
1175  }
1176  return $publicKey;
1177  }
$res
Definition: ltiservices.php:66
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$privateKey
Definition: ltiregstart.php:62

◆ getPublicKeysetUrl()

static ilObjLTIConsumer::getPublicKeysetUrl ( )
static

Definition at line 1246 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumeProviderFormGUI\initForm(), and ilLTIConsumeProviderFormGUI\initToolConfigForm().

1246  : string
1247  {
1248  return self::getIliasHttpPath() . "/components/ILIAS/LTIConsumer/lticerts.php";
1249  }
+ Here is the caller graph for this function:

◆ getRawData()

static ilObjLTIConsumer::getRawData ( )
static

Definition at line 1393 of file class.ilObjLTIConsumer.php.

1393  : ?string
1394  {
1395  return file_get_contents('php://input');
1396  }

◆ getRegistrationEndUrl()

static ilObjLTIConsumer::getRegistrationEndUrl ( )
static

Definition at line 1261 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumeProviderFormGUI\getDynRegRequest().

1261  : string
1262  {
1263  return self::getIliasHttpPath() . "/components/ILIAS/LTIConsumer/ltiregend.php";
1264  }
+ Here is the caller graph for this function:

◆ getRegistrationStartUrl()

static ilObjLTIConsumer::getRegistrationStartUrl ( )
static

Definition at line 1256 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumeProviderFormGUI\getDynRegRequest().

1256  : string
1257  {
1258  return self::getIliasHttpPath() . "/components/ILIAS/LTIConsumer/ltiregstart.php";
1259  }
+ Here is the caller graph for this function:

◆ getRegistrationUrl()

static ilObjLTIConsumer::getRegistrationUrl ( )
static

Definition at line 1251 of file class.ilObjLTIConsumer.php.

1251  : string
1252  {
1253  return self::getIliasHttpPath() . "/components/ILIAS/LTIConsumer/ltiregistration.php";
1254  }

◆ getTokenObject()

static ilObjLTIConsumer::getTokenObject ( string  $token)
static

Definition at line 1398 of file class.ilObjLTIConsumer.php.

References Vendor\Package\$e, and null.

1398  : ?object
1399  {
1400  try {
1401  $keys = JWK::parseKeySet(self::getJwks());
1402  return JWT::decode($token, $keys);
1403  } catch (Exception $e) {
1404  return null;
1405  }
1406  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$token
Definition: xapitoken.php:70

◆ getUseXapi()

ilObjLTIConsumer::getUseXapi ( )

Definition at line 267 of file class.ilObjLTIConsumer.php.

References $use_xapi.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and save().

267  : bool
268  {
269  return $this->use_xapi;
270  }
+ Here is the caller graph for this function:

◆ initProvider()

ilObjLTIConsumer::initProvider ( )

Definition at line 184 of file class.ilObjLTIConsumer.php.

References getProviderId().

184  : void
185  {
186  $this->provider = new ilLTIConsumeProvider($this->getProviderId());
187  }
+ Here is the call graph for this function:

◆ initType()

ilObjLTIConsumer::initType ( )
protected

Definition at line 109 of file class.ilObjLTIConsumer.php.

109  : void
110  {
111  $this->type = "lti";
112  }

◆ isActivationLimited()

ilObjLTIConsumer::isActivationLimited ( )

Definition at line 114 of file class.ilObjLTIConsumer.php.

References $activationLimited.

Referenced by saveRepositoryActivationSettings().

114  : bool
115  {
117  }
bool $activationLimited
repository object activation settings (handled by ilObject)
+ Here is the caller graph for this function:

◆ isLaunchMethodEmbedded()

ilObjLTIConsumer::isLaunchMethodEmbedded ( )

Definition at line 204 of file class.ilObjLTIConsumer.php.

204  : bool
205  {
206  return $this->launchMethod == self::LAUNCH_METHOD_EMBEDDED;
207  }

◆ isLaunchMethodOwnWin()

ilObjLTIConsumer::isLaunchMethodOwnWin ( )

Definition at line 199 of file class.ilObjLTIConsumer.php.

199  : bool
200  {
201  return $this->launchMethod == self::LAUNCH_METHOD_OWN_WIN;
202  }

◆ isMixedContentType()

ilObjLTIConsumer::isMixedContentType ( )

Definition at line 1388 of file class.ilObjLTIConsumer.php.

1388  : bool
1389  {
1390  return true;
1391  }

◆ isStatementsReportEnabled()

ilObjLTIConsumer::isStatementsReportEnabled ( )

Definition at line 296 of file class.ilObjLTIConsumer.php.

References $statementsReportEnabled.

Referenced by save().

296  : bool
297  {
299  }
+ Here is the caller graph for this function:

◆ load()

ilObjLTIConsumer::load ( )

Definition at line 357 of file class.ilObjLTIConsumer.php.

References $DIC, $res, ilObject\getId(), loadRepositoryActivationSettings(), setCustomActivityId(), setCustomLaunchKey(), setCustomLaunchSecret(), setCustomParams(), setHighscoreAchievedTS(), setHighscoreEnabled(), setHighscoreOwnTable(), setHighscorePercentage(), setHighscoreTopNum(), setHighscoreTopTable(), setHighscoreWTime(), setLaunchMethod(), setMasteryScore(), setProvider(), setProviderId(), setStatementsReportEnabled(), and setUseXapi().

Referenced by doRead().

357  : void
358  {
359  global $DIC;
360  /* @var \ILIAS\DI\Container $DIC */
361 
362  $query = "SELECT * FROM {$this->dbTableName()} WHERE obj_id = %s";
363  $res = $DIC->database()->queryF($query, ['integer'], [$this->getId()]);
364 
365  while ($row = $DIC->database()->fetchAssoc($res)) {
366  // if ($row['provider_id']) { //always set
367  $this->setProviderId((int) $row['provider_id']);
368  $this->setProvider(new ilLTIConsumeProvider((int) $row['provider_id']));
369  // }
370 
371  $this->setLaunchMethod($row['launch_method']);
372 
373  $this->setCustomLaunchKey((string) $row['launch_key']);
374  $this->setCustomLaunchSecret((string) $row['launch_secret']);
375  $this->setCustomParams((string) $row['custom_params']);
376 
377  $this->setUseXapi((bool) $row['use_xapi']);
378  $this->setCustomActivityId((string) $row['activity_id']);
379  $this->setStatementsReportEnabled((bool) $row['show_statements']);
380  $this->setHighscoreEnabled((bool) $row['highscore_enabled']);
381  $this->setHighscoreAchievedTS((bool) $row['highscore_achieved_ts']);
382  $this->setHighscorePercentage((bool) $row['highscore_percentage']);
383  $this->setHighscoreWTime((bool) $row['highscore_wtime']);
384  $this->setHighscoreOwnTable((bool) $row['highscore_own_table']);
385  $this->setHighscoreTopTable((bool) $row['highscore_top_table']);
386  $this->setHighscoreTopNum((int) $row['highscore_top_num']);
387 
388  $this->setMasteryScore((float) $row['mastery_score']);
389  }
390 
392  }
setUseXapi(bool $use_xapi)
$res
Definition: ltiservices.php:66
setCustomActivityId(string $custom_activity_id)
setCustomParams(string $customParams)
setHighscoreEnabled(bool $a_enabled)
HIGHSCORE.
setStatementsReportEnabled(bool $statementsReportEnabled)
setHighscoreWTime(bool $a_wtime)
Sets if the workingtime of the scores should be shown.
setHighscoreAchievedTS(bool $a_achieved_ts)
Sets if the date and time of the scores achievement should be displayed.
setHighscoreTopTable(bool $a_top_table)
Sets if the top-rankings table should be shown.
setCustomLaunchSecret(string $customLaunchSecret)
setLaunchMethod(string $launchMethod)
setHighscoreOwnTable(bool $a_own_table)
Sets if the table with the own ranking should be shown.
global $DIC
Definition: shib_login.php:26
setHighscorePercentage(bool $a_percentage)
Sets if the percentages of the scores pass should be shown.
setCustomLaunchKey(string $customLaunchKey)
setHighscoreTopNum(int $a_top_num)
Sets the number of entries which are to be shown in the top-rankings table.
setMasteryScore(float $mastery_score)
setProviderId(int $providerId)
setProvider(ilLTIConsumeProvider $provider)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadRepositoryActivationSettings()

ilObjLTIConsumer::loadRepositoryActivationSettings ( )
protected

Definition at line 428 of file class.ilObjLTIConsumer.php.

References ilObjectActivation\getItem(), ILIAS\Repository\int(), setActivationEndingTime(), setActivationLimited(), setActivationStartingTime(), setActivationVisibility(), and ilObjectActivation\TIMINGS_ACTIVATION.

Referenced by load().

428  : void
429  {
430  if ($this->ref_id > 0) {
431  $activation = ilObjectActivation::getItem($this->ref_id);
432  switch ($activation["timing_type"]) {
434  $this->setActivationLimited(true);
435  if (!is_null($activation["timing_start"])) {
436  $activation["timing_start"] = (int) $activation["timing_start"];
437  }
438  $this->setActivationStartingTime($activation["timing_start"]);
439  if (!is_null($activation["timing_end"])) {
440  $activation["timing_end"] = (int) $activation["timing_end"];
441  }
442  $this->setActivationEndingTime($activation["timing_end"]);
443  $this->setActivationVisibility((bool) $activation["visible"]);
444  break;
445 
446  default:
447  $this->setActivationLimited(false);
448  break;
449  }
450  }
451  }
setActivationEndingTime(?int $activationEndingTime=null)
setActivationLimited(bool $activationLimited)
setActivationVisibility(bool $activationVisibility)
static getItem(int $ref_id)
setActivationStartingTime(?int $activationStartingTime=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LTISignJWT()

static ilObjLTIConsumer::LTISignJWT ( array  $parms,
string  $endpoint,
string  $oAuthConsumerKey,
  $typeId = 0,
string  $nonce = '' 
)
static

Definition at line 1040 of file class.ilObjLTIConsumer.php.

References $privateKey, $typeId, and ILIAS\UI\examples\Symbol\Glyph\Sort\sort().

1046  : array {
1047  if (empty($typeId)) {
1048  $typeId = 0;
1049  }
1050  $messageTypeMapping = Util::MESSAGE_TYPE_MAPPING;
1051  if (isset($parms['lti_message_type']) && array_key_exists($parms['lti_message_type'], $messageTypeMapping)) {
1052  $parms['lti_message_type'] = $messageTypeMapping[$parms['lti_message_type']];
1053  }
1054  if (isset($parms['roles'])) {
1055  $roles = explode(',', $parms['roles']);
1056  $newRoles = array();
1057  foreach ($roles as $role) {
1058  if (strpos($role, 'urn:lti:role:ims/lis/') === 0) {
1059  $role = 'http://purl.imsglobal.org/vocab/lis/v2/membership#' . substr($role, 21);
1060  } elseif (strpos($role, 'urn:lti:instrole:ims/lis/') === 0) {
1061  $role = 'http://purl.imsglobal.org/vocab/lis/v2/institution/person#' . substr($role, 25);
1062  } elseif (strpos($role, 'urn:lti:sysrole:ims/lis/') === 0) {
1063  $role = 'http://purl.imsglobal.org/vocab/lis/v2/system/person#' . substr($role, 24);
1064  } elseif ((strpos($role, '://') === false) && (strpos($role, 'urn:') !== 0)) {
1065  $role = "http://purl.imsglobal.org/vocab/lis/v2/membership#{$role}";
1066  }
1067  $newRoles[] = $role;
1068  }
1069  $parms['roles'] = implode(',', $newRoles);
1070  }
1071  $now = time();
1072  if (empty($nonce)) {
1073  $nonce = bin2hex(openssl_random_pseudo_bytes(10));
1074  }
1075  $claimMapping = Util::JWT_CLAIM_MAPPING;
1076  $payLoad = array(
1077  'nonce' => $nonce,
1078  'iat' => $now,
1079  'exp' => $now + 60,
1080  );
1081  $payLoad['iss'] = self::getIliasHttpPath();
1082  $payLoad['aud'] = $oAuthConsumerKey;
1083  $payLoad[self::LTI_JWT_CLAIM_PREFIX . '/claim/deployment_id'] = strval($typeId);
1084  if (!empty($endpoint)) { // only for launch request
1085  $payLoad[self::LTI_JWT_CLAIM_PREFIX . '/claim/target_link_uri'] = $endpoint;
1086  }
1087 
1088  foreach ($parms as $key => $value) {
1089  $claim = self::LTI_JWT_CLAIM_PREFIX;
1090  if (array_key_exists($key, $claimMapping)) {
1091  $mapping = $claimMapping[$key];
1092 
1093  if (isset($mapping['isArray']) && $mapping['isArray']) {
1094  $value = explode(',', $value);
1095  sort($value);
1096  } elseif (isset($mapping['isBoolean'])) {
1097  $value = $mapping['isBoolean'];
1098  }
1099  if (!empty($mapping['suffix'])) {
1100  $claim .= "-{$mapping['suffix']}";
1101  }
1102  $claim .= '/claim/';
1103  if (is_null($mapping['group'])) {
1104  $payLoad[$mapping['claim']] = $value;
1105  } elseif (empty($mapping['group'])) {
1106  $payLoad["{$claim}{$mapping['claim']}"] = $value;
1107  } else {
1108  $claim .= $mapping['group'];
1109  $payLoad[$claim][$mapping['claim']] = $value;
1110  }
1111  } elseif (strpos($key, 'custom_') === 0) {
1112  $payLoad["{$claim}/claim/custom"][substr($key, 7)] = $value;
1113  } elseif (strpos($key, 'ext_') === 0) {
1114  $payLoad["{$claim}/claim/ext"][substr($key, 4)] = $value;
1115  }
1116  }
1117  //self::getLogger()->debug(json_encode($payLoad,JSON_PRETTY_PRINT));
1118  if (!empty(self::verifyPrivateKey())) {
1119  throw new DomainException(self::ERROR_OPEN_SSL_CONF);
1120  }
1121  $privateKey = self::getPrivateKey();
1122  $jwt = Firebase\JWT\JWT::encode($payLoad, $privateKey['key'], 'RS256', $privateKey['kid']);
1123  $newParms = array();
1124  $newParms['id_token'] = $jwt;
1125  return $newParms;
1126  }
sort()
description: > Example for rendering a Sort Glyph.
Definition: sort.php:41
$privateKey
Definition: ltiregstart.php:62
$typeId
Definition: ltiregstart.php:34
+ Here is the call graph for this function:

◆ registerClient()

static ilObjLTIConsumer::registerClient ( array  $data,
object  $tokenObj 
)
static

Definition at line 1308 of file class.ilObjLTIConsumer.php.

References $data, $DIC, $message, ilLTIConsumeProvider\AVAILABILITY_CREATE, ilLTIConsumeProvider\getId(), ilLTIConsumeProvider\insert(), ilLTIConsumeProvider\setAvailability(), ilLTIConsumeProvider\setClientId(), ilLTIConsumeProvider\setContentItemUrl(), ilLTIConsumeProvider\setCreator(), ilLTIConsumeProvider\setInitiateLogin(), ilLTIConsumeProvider\setIsGlobal(), ilLTIConsumeProvider\setKeyType(), ilLTIConsumeProvider\setLtiVersion(), ilLTIConsumeProvider\setProviderUrl(), ilLTIConsumeProvider\setPublicKeyset(), ilLTIConsumeProvider\setRedirectionUris(), and ilLTIConsumeProvider\setTitle().

1308  : array
1309  {
1310  // first analyse tool_config and filter only accepted params
1311  // append client_id (required) and deployment_id(=provider_id in ILIAS) (optional) to tool_config response
1312  global $DIC;
1313  $reponseData = $data;
1315  $toolConfig = $data['https://purl.imsglobal.org/spec/lti-tool-configuration'];
1316  $provider->setTitle(strip_tags($data['client_name'], ilObjectGUI::ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION));
1317  $provider->setProviderUrl($toolConfig['target_link_uri']);
1318  $provider->setInitiateLogin($data['initiate_login_uri']);
1319  $provider->setRedirectionUris(implode(",", $data['redirect_uris']));
1320  if (isset($data['jwks_uri'])) {
1321  $provider->setPublicKeyset($data['jwks_uri']);
1322  }
1323  foreach ($toolConfig['messages'] as $message) {
1324  if (isset($message['type']) && $message['type'] === 'LtiDeepLinkingRequest') {
1325  $provider->setContentItemUrl($message['target_link_uri']);
1326  }
1327  }
1328  /*
1329  if (isset($data['logo_uri'])) { // needs to be uploaded and then assign filepath
1330  $provider->setProviderIconFilename($data['logo_uri']);
1331  }
1332  */
1333  $provider->setKeyType('JWK_KEYSET');
1334  $provider->setLtiVersion('1.3.0');
1335  $provider->setClientId((string) $tokenObj->aud); //client_id
1336  $provider->setCreator((int) $tokenObj->sub); // user_id
1338  $provider->setIsGlobal(false);
1339  $provider->insert();
1340  $reponseData['client_id'] = $tokenObj->aud;
1341  $reponseData['https://purl.imsglobal.org/spec/lti-tool-configuration']['deployment_id'] = $provider->getId();
1342  return $reponseData;
1343  }
setInitiateLogin(string $initiate_login)
setPublicKeyset(string $public_keyset)
setContentItemUrl(string $content_item_url)
setRedirectionUris(string $redirection_uris)
global $DIC
Definition: shib_login.php:26
ilLTIConsumeProvider $provider
setLtiVersion(string $lti_version)
$message
Definition: xapiexit.php:31
setProviderUrl(string $provider_url)
+ Here is the call graph for this function:

◆ save()

ilObjLTIConsumer::save ( )

Definition at line 399 of file class.ilObjLTIConsumer.php.

References $DIC, dbTableName(), getCustomActivityId(), getCustomLaunchKey(), getCustomLaunchSecret(), getCustomParams(), getHighscoreAchievedTS(), getHighscoreEnabled(), getHighscoreOwnTable(), getHighscorePercentage(), getHighscoreTopNum(), getHighscoreTopTable(), getHighscoreWTime(), ilObject\getId(), getLaunchMethod(), getMasteryScore(), getProviderId(), getUseXapi(), isStatementsReportEnabled(), and saveRepositoryActivationSettings().

Referenced by doUpdate().

399  : void
400  {
401  global $DIC;
402  /* @var \ILIAS\DI\Container $DIC */
403 
404  $DIC->database()->replace($this->dbTableName(), [
405  'obj_id' => ['integer', $this->getId()]
406  ], [
407  'provider_id' => ['integer', $this->getProviderId()],
408  'launch_method' => ['text', $this->getLaunchMethod()],
409  'launch_key' => ['text', $this->getCustomLaunchKey()],
410  'launch_secret' => ['text', $this->getCustomLaunchSecret()],
411  'custom_params' => ['text', $this->getCustomParams()],
412  'use_xapi' => ['integer', $this->getUseXapi()],
413  'activity_id' => ['text', $this->getCustomActivityId()],
414  'show_statements' => ['integer', $this->isStatementsReportEnabled()],
415  'highscore_enabled' => ['integer', (int) $this->getHighscoreEnabled()],
416  'highscore_achieved_ts' => ['integer', (int) $this->getHighscoreAchievedTS()],
417  'highscore_percentage' => ['integer', (int) $this->getHighscorePercentage()],
418  'highscore_wtime' => ['integer', (int) $this->getHighscoreWTime()],
419  'highscore_own_table' => ['integer', (int) $this->getHighscoreOwnTable()],
420  'highscore_top_table' => ['integer', (int) $this->getHighscoreTopTable()],
421  'highscore_top_num' => ['integer', $this->getHighscoreTopNum()],
422  'mastery_score' => ['float', $this->getMasteryScore()]
423  ]);
424 
426  }
getHighscoreWTime()
Gets if the column with the workingtime should be shown.
getHighscorePercentage()
Gets if the percentage column should be shown.
getHighscoreEnabled()
Gets the setting which determines if the highscore feature is enabled.
getHighscoreTopNum(int $a_retval=10)
Gets the number of entries which are to be shown in the top-rankings table.
global $DIC
Definition: shib_login.php:26
getHighscoreTopTable()
Gets, if the top-rankings table should be shown.
getHighscoreAchievedTS()
Returns if date and time of the scores achievement should be displayed.
getHighscoreOwnTable()
Gets if the own rankings table should be shown.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveRepositoryActivationSettings()

ilObjLTIConsumer::saveRepositoryActivationSettings ( )
protected

Definition at line 453 of file class.ilObjLTIConsumer.php.

References getActivationEndingTime(), getActivationStartingTime(), getActivationVisibility(), ilObjectActivation\getItem(), isActivationLimited(), ilObjectActivation\TIMINGS_ACTIVATION, and ilObjectActivation\TIMINGS_DEACTIVATED.

Referenced by save().

453  : void
454  {
455  if ($this->ref_id > 0) {
456  ilObjectActivation::getItem($this->ref_id);
457 
458  $item = new ilObjectActivation();
459  if (!$this->isActivationLimited()) {
460  $item->setTimingType(ilObjectActivation::TIMINGS_DEACTIVATED);
461  } else {
462  $item->setTimingType(ilObjectActivation::TIMINGS_ACTIVATION);
463  $item->setTimingStart($this->getActivationStartingTime());
464  $item->setTimingEnd($this->getActivationEndingTime());
465  $item->toggleVisible($this->getActivationVisibility());
466  }
467 
468  $item->update($this->ref_id);
469  }
470  }
static getItem(int $ref_id)
Class ilObjectActivation.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sendResponseError()

static ilObjLTIConsumer::sendResponseError ( int  $code,
string  $message,
  $log = true 
)
static

Definition at line 1350 of file class.ilObjLTIConsumer.php.

References $DIC, Vendor\Package\$e, and ilObject\$log.

Referenced by invalidRequest(), and serverError().

1350  : void
1351  {
1352  global $DIC;
1353  try {
1354  if ($log) {
1355  self::getLogger()->error("$code $message");
1356  }
1357  $DIC->http()->saveResponse(
1358  $DIC->http()->response()
1359  ->withStatus($code)
1360  ->withBody(Streams::ofString($message))
1361  );
1362  $DIC->http()->sendResponse();
1363  $DIC->http()->close();
1364  } catch (Exception $e) {
1365  $DIC->http()->close();
1366  }
1367  }
global $DIC
Definition: shib_login.php:26
ilLogger $log
$message
Definition: xapiexit.php:31
+ Here is the caller graph for this function:

◆ sendResponseJson()

static ilObjLTIConsumer::sendResponseJson ( array  $obj)
static

Definition at line 1369 of file class.ilObjLTIConsumer.php.

References $DIC, Vendor\Package\$e, and ILIAS\UI\examples\Symbol\Glyph\Header\header().

Referenced by sendAccessToken().

1369  : void
1370  {
1371  global $DIC;
1372  try {
1373  header('Content-Type: application/json; charset=utf-8');
1374  header('Cache-Control: no-store');
1375  header('Pragma: no-cache');
1376  echo json_encode($obj, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
1377  } catch (Exception $e) {
1378  self::sendResponseError(500, "error in sendResponseJson");
1379  $DIC->http()->close();
1380  }
1381  }
global $DIC
Definition: shib_login.php:26
header()
expected output: > ILIAS shows the rendered Component.
Definition: header.php:29
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setActivationEndingTime()

ilObjLTIConsumer::setActivationEndingTime ( ?int  $activationEndingTime = null)

Definition at line 139 of file class.ilObjLTIConsumer.php.

References $activationEndingTime.

Referenced by loadRepositoryActivationSettings().

139  : void
140  {
141  $this->activationEndingTime = $activationEndingTime;
142  }
+ Here is the caller graph for this function:

◆ setActivationLimited()

ilObjLTIConsumer::setActivationLimited ( bool  $activationLimited)

Definition at line 119 of file class.ilObjLTIConsumer.php.

References $activationLimited.

Referenced by loadRepositoryActivationSettings().

119  : void
120  {
121  $this->activationLimited = $activationLimited;
122  }
bool $activationLimited
repository object activation settings (handled by ilObject)
+ Here is the caller graph for this function:

◆ setActivationStartingTime()

ilObjLTIConsumer::setActivationStartingTime ( ?int  $activationStartingTime = null)

Definition at line 129 of file class.ilObjLTIConsumer.php.

References $activationStartingTime.

Referenced by loadRepositoryActivationSettings().

129  : void
130  {
131  $this->activationStartingTime = $activationStartingTime;
132  }
+ Here is the caller graph for this function:

◆ setActivationVisibility()

ilObjLTIConsumer::setActivationVisibility ( bool  $activationVisibility)

Definition at line 149 of file class.ilObjLTIConsumer.php.

References $activationVisibility.

Referenced by loadRepositoryActivationSettings().

149  : void
150  {
151  $this->activationVisibility = $activationVisibility;
152  }
+ Here is the caller graph for this function:

◆ setCustomActivityId()

ilObjLTIConsumer::setCustomActivityId ( string  $custom_activity_id)

Definition at line 282 of file class.ilObjLTIConsumer.php.

References $custom_activity_id.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

282  : void
283  {
284  $this->custom_activity_id = $custom_activity_id;
285  }
+ Here is the caller graph for this function:

◆ setCustomLaunchKey()

ilObjLTIConsumer::setCustomLaunchKey ( string  $customLaunchKey)

Definition at line 224 of file class.ilObjLTIConsumer.php.

References $customLaunchKey.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

224  : void
225  {
226  $this->customLaunchKey = $customLaunchKey;
227  }
+ Here is the caller graph for this function:

◆ setCustomLaunchSecret()

ilObjLTIConsumer::setCustomLaunchSecret ( string  $customLaunchSecret)

Definition at line 234 of file class.ilObjLTIConsumer.php.

References $customLaunchSecret.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

234  : void
235  {
236  $this->customLaunchSecret = $customLaunchSecret;
237  }
+ Here is the caller graph for this function:

◆ setCustomParams()

ilObjLTIConsumer::setCustomParams ( string  $customParams)

Definition at line 244 of file class.ilObjLTIConsumer.php.

References $customParams.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

244  : void
245  {
246  $this->customParams = $customParams;
247  }
+ Here is the caller graph for this function:

◆ setHighscoreAchievedTS()

ilObjLTIConsumer::setHighscoreAchievedTS ( bool  $a_achieved_ts)

Sets if the date and time of the scores achievement should be displayed.

Definition at line 501 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

501  : void
502  {
503  $this->_highscore_achieved_ts = $a_achieved_ts;
504  }
+ Here is the caller graph for this function:

◆ setHighscoreEnabled()

ilObjLTIConsumer::setHighscoreEnabled ( bool  $a_enabled)

HIGHSCORE.

Sets if the highscore feature should be enabled.

Definition at line 483 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

483  : void
484  {
485  $this->_highscore_enabled = $a_enabled;
486  }
+ Here is the caller graph for this function:

◆ setHighscoreMode()

ilObjLTIConsumer::setHighscoreMode ( int  $mode)
Parameters
$modeint

Definition at line 637 of file class.ilObjLTIConsumer.php.

References setHighscoreOwnTable(), and setHighscoreTopTable().

Referenced by ilLTIConsumerSettingsFormGUI\initObject().

637  : void
638  {
639  switch ($mode) {
640  case self::HIGHSCORE_SHOW_ALL_TABLES:
641  $this->setHighscoreTopTable(true);
642  $this->setHighscoreOwnTable(true);
643  break;
644 
645  case self::HIGHSCORE_SHOW_TOP_TABLE:
646  $this->setHighscoreTopTable(true);
647  $this->setHighscoreOwnTable(false);
648  break;
649 
650  case self::HIGHSCORE_SHOW_OWN_TABLE:
651  default:
652  $this->setHighscoreTopTable(false);
653  $this->setHighscoreOwnTable(true);
654  break;
655  }
656  }
setHighscoreTopTable(bool $a_top_table)
Sets if the top-rankings table should be shown.
setHighscoreOwnTable(bool $a_own_table)
Sets if the table with the own ranking should be shown.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setHighscoreOwnTable()

ilObjLTIConsumer::setHighscoreOwnTable ( bool  $a_own_table)

Sets if the table with the own ranking should be shown.

Parameters
bool$a_own_tableTrue, if table with own ranking should be shown.

Definition at line 557 of file class.ilObjLTIConsumer.php.

Referenced by load(), and setHighscoreMode().

557  : void
558  {
559  $this->_highscore_own_table = $a_own_table;
560  }
+ Here is the caller graph for this function:

◆ setHighscorePercentage()

ilObjLTIConsumer::setHighscorePercentage ( bool  $a_percentage)

Sets if the percentages of the scores pass should be shown.

Definition at line 519 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

519  : void
520  {
521  $this->_highscore_percentage = $a_percentage;
522  }
+ Here is the caller graph for this function:

◆ setHighscoreTopNum()

ilObjLTIConsumer::setHighscoreTopNum ( int  $a_top_num)

Sets the number of entries which are to be shown in the top-rankings table.

Parameters
integer$a_top_numNumber of entries in the top-rankings table.

Definition at line 596 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

596  : void
597  {
598  $this->_highscore_top_num = $a_top_num;
599  }
+ Here is the caller graph for this function:

◆ setHighscoreTopTable()

ilObjLTIConsumer::setHighscoreTopTable ( bool  $a_top_table)

Sets if the top-rankings table should be shown.

Definition at line 575 of file class.ilObjLTIConsumer.php.

Referenced by load(), and setHighscoreMode().

575  : void
576  {
577  $this->_highscore_top_table = $a_top_table;
578  }
+ Here is the caller graph for this function:

◆ setHighscoreWTime()

ilObjLTIConsumer::setHighscoreWTime ( bool  $a_wtime)

Sets if the workingtime of the scores should be shown.

Definition at line 537 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

537  : void
538  {
539  $this->_highscore_wtime = $a_wtime;
540  }
+ Here is the caller graph for this function:

◆ setLaunchMethod()

ilObjLTIConsumer::setLaunchMethod ( string  $launchMethod)

Definition at line 214 of file class.ilObjLTIConsumer.php.

References $launchMethod.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

214  : void
215  {
216  $this->launchMethod = $launchMethod;
217  }
+ Here is the caller graph for this function:

◆ setMasteryScore()

ilObjLTIConsumer::setMasteryScore ( float  $mastery_score)

Definition at line 159 of file class.ilObjLTIConsumer.php.

References $mastery_score.

Referenced by load().

159  : void
160  {
161  $this->mastery_score = $mastery_score;
162  }
+ Here is the caller graph for this function:

◆ setMasteryScorePercent()

ilObjLTIConsumer::setMasteryScorePercent ( float  $mastery_score_percent)

Definition at line 169 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initObject().

169  : void
170  {
171  $this->mastery_score = $mastery_score_percent / 100;
172  }
+ Here is the caller graph for this function:

◆ setProvider()

ilObjLTIConsumer::setProvider ( ilLTIConsumeProvider  $provider)

Definition at line 194 of file class.ilObjLTIConsumer.php.

References $provider.

Referenced by load().

194  : void
195  {
196  $this->provider = $provider;
197  }
ilLTIConsumeProvider $provider
+ Here is the caller graph for this function:

◆ setProviderId()

ilObjLTIConsumer::setProviderId ( int  $providerId)

Definition at line 179 of file class.ilObjLTIConsumer.php.

References $providerId.

Referenced by load().

179  : void
180  {
181  $this->providerId = $providerId;
182  }
+ Here is the caller graph for this function:

◆ setStatementsReportEnabled()

ilObjLTIConsumer::setStatementsReportEnabled ( bool  $statementsReportEnabled)

Definition at line 301 of file class.ilObjLTIConsumer.php.

References $statementsReportEnabled.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

301  : void
302  {
303  $this->statementsReportEnabled = $statementsReportEnabled;
304  }
+ Here is the caller graph for this function:

◆ setUseXapi()

ilObjLTIConsumer::setUseXapi ( bool  $use_xapi)

Definition at line 272 of file class.ilObjLTIConsumer.php.

References $use_xapi.

Referenced by ilLTIConsumerSettingsFormGUI\initObject(), and load().

272  : void
273  {
274  $this->use_xapi = $use_xapi;
275  }
+ Here is the caller graph for this function:

◆ verifyPrivateKey()

static ilObjLTIConsumer::verifyPrivateKey ( )
static

Definition at line 1143 of file class.ilObjLTIConsumer.php.

References $ilSetting, and $res.

1143  : string
1144  {
1145  global $ilSetting;
1146  $key = $ilSetting->get(self::LTI_1_3_PRIVATE_KEY);
1147 
1148  if (empty($key)) {
1149  $kid = bin2hex(openssl_random_pseudo_bytes(10));
1150  $ilSetting->set(self::LTI_1_3_KID, $kid);
1151  $config = array(
1152  "digest_alg" => "sha256",
1153  "private_key_bits" => 2048,
1154  "private_key_type" => self::OPENSSL_KEYTYPE_RSA
1155  );
1156  $res = openssl_pkey_new($config);
1157  openssl_pkey_export($res, $privatekey);
1158  if (!empty($privatekey)) {
1159  $ilSetting->set(self::LTI_1_3_PRIVATE_KEY, $privatekey);
1160  } else {
1161  return self::ERROR_OPEN_SSL_CONF;
1162  }
1163  }
1164  return '';
1165  }
$res
Definition: ltiservices.php:66
global $ilSetting
Definition: privfeed.php:31

◆ verifyToken()

static ilObjLTIConsumer::verifyToken ( )
static

Definition at line 1408 of file class.ilObjLTIConsumer.php.

References $DIC, and $token.

Referenced by ilLTIConsumerServiceBase\checkTool().

1408  : ?object
1409  {
1410  global $DIC;
1411  $auth = $DIC->http()->request()->getHeader("Authorization");
1412  if (count($auth) < 1) {
1413  self::sendResponseError(405, "missing Authorization header");
1414  }
1415  preg_match('/Bearer\s+(.+)$/i', $auth[0], $matches);
1416  if (count($matches) != 2) {
1417  self::sendResponseError(405, "missing required Authorization Baerer token");
1418  }
1419  $token = $matches[1];
1420  return self::getTokenObject($token);
1421  }
$token
Definition: xapitoken.php:70
global $DIC
Definition: shib_login.php:26
+ Here is the caller graph for this function:

Field Documentation

◆ $_highscore_achieved_ts

bool ilObjLTIConsumer::$_highscore_achieved_ts = true
protected

Definition at line 76 of file class.ilObjLTIConsumer.php.

Referenced by getHighscoreAchievedTS().

◆ $_highscore_enabled

bool ilObjLTIConsumer::$_highscore_enabled = false
protected

Definition at line 72 of file class.ilObjLTIConsumer.php.

Referenced by getHighscoreEnabled().

◆ $_highscore_own_table

bool ilObjLTIConsumer::$_highscore_own_table = true
protected

Definition at line 82 of file class.ilObjLTIConsumer.php.

Referenced by getHighscoreOwnTable().

◆ $_highscore_percentage

bool ilObjLTIConsumer::$_highscore_percentage = true
protected

Definition at line 78 of file class.ilObjLTIConsumer.php.

Referenced by getHighscorePercentage().

◆ $_highscore_top_num

int ilObjLTIConsumer::$_highscore_top_num = 10
protected

Definition at line 86 of file class.ilObjLTIConsumer.php.

Referenced by getHighscoreTopNum().

◆ $_highscore_top_table

bool ilObjLTIConsumer::$_highscore_top_table = true
protected

Definition at line 84 of file class.ilObjLTIConsumer.php.

Referenced by getHighscoreTopTable().

◆ $_highscore_wtime

bool ilObjLTIConsumer::$_highscore_wtime = true
protected

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

Referenced by getHighscoreWTime().

◆ $activationEndingTime

int ilObjLTIConsumer::$activationEndingTime = null
protected

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

Referenced by getActivationEndingTime(), and setActivationEndingTime().

◆ $activationLimited

bool ilObjLTIConsumer::$activationLimited = false
protected

repository object activation settings (handled by ilObject)

Definition at line 42 of file class.ilObjLTIConsumer.php.

Referenced by isActivationLimited(), and setActivationLimited().

◆ $activationStartingTime

int ilObjLTIConsumer::$activationStartingTime = null
protected

◆ $activationVisibility

bool ilObjLTIConsumer::$activationVisibility = null
protected

Definition at line 45 of file class.ilObjLTIConsumer.php.

Referenced by getActivationVisibility(), and setActivationVisibility().

◆ $anonymity

int ilObjLTIConsumer::$anonymity = 0
protected

Definition at line 74 of file class.ilObjLTIConsumer.php.

◆ $custom_activity_id

string ilObjLTIConsumer::$custom_activity_id = ''
protected

◆ $customLaunchKey

string ilObjLTIConsumer::$customLaunchKey = ''
protected

Definition at line 63 of file class.ilObjLTIConsumer.php.

Referenced by getCustomLaunchKey(), and setCustomLaunchKey().

◆ $customLaunchSecret

string ilObjLTIConsumer::$customLaunchSecret = ''
protected

Definition at line 65 of file class.ilObjLTIConsumer.php.

Referenced by getCustomLaunchSecret(), and setCustomLaunchSecret().

◆ $customParams

string ilObjLTIConsumer::$customParams = ''
protected

Definition at line 67 of file class.ilObjLTIConsumer.php.

Referenced by getCustomParams(), and setCustomParams().

◆ $launchMethod

string ilObjLTIConsumer::$launchMethod = self::LAUNCH_METHOD_NEW_WIN
protected

Definition at line 61 of file class.ilObjLTIConsumer.php.

Referenced by getLaunchMethod(), and setLaunchMethod().

◆ $mastery_score

float ilObjLTIConsumer::$mastery_score = 0.5
protected

Definition at line 59 of file class.ilObjLTIConsumer.php.

Referenced by getMasteryScore(), and setMasteryScore().

◆ $provider

ilLTIConsumeProvider ilObjLTIConsumer::$provider = null
protected

Definition at line 49 of file class.ilObjLTIConsumer.php.

Referenced by getProvider(), and setProvider().

◆ $providerId

int ilObjLTIConsumer::$providerId = 0
protected

Definition at line 47 of file class.ilObjLTIConsumer.php.

Referenced by getProviderId(), and setProviderId().

◆ $ref_id

int ilObjLTIConsumer::$ref_id = 0
protected

Definition at line 69 of file class.ilObjLTIConsumer.php.

◆ $statementsReportEnabled

bool ilObjLTIConsumer::$statementsReportEnabled = false
protected

◆ $use_xapi

bool ilObjLTIConsumer::$use_xapi = false
protected

Definition at line 55 of file class.ilObjLTIConsumer.php.

Referenced by getUseXapi(), and setUseXapi().

◆ DB_TABLE_NAME

const ilObjLTIConsumer::DB_TABLE_NAME = 'lti_consumer_settings'

Definition at line 37 of file class.ilObjLTIConsumer.php.

◆ ERROR_OPEN_SSL_CONF

const ilObjLTIConsumer::ERROR_OPEN_SSL_CONF = 'error openssl config invalid'

Definition at line 95 of file class.ilObjLTIConsumer.php.

◆ HIGHSCORE_SHOW_ALL_TABLES

const ilObjLTIConsumer::HIGHSCORE_SHOW_ALL_TABLES = 1

Definition at line 88 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initForm().

◆ HIGHSCORE_SHOW_OWN_TABLE

const ilObjLTIConsumer::HIGHSCORE_SHOW_OWN_TABLE = 3

Definition at line 90 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initForm().

◆ HIGHSCORE_SHOW_TOP_TABLE

const ilObjLTIConsumer::HIGHSCORE_SHOW_TOP_TABLE = 2

Definition at line 89 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initForm().

◆ LAUNCH_METHOD_EMBEDDED

const ilObjLTIConsumer::LAUNCH_METHOD_EMBEDDED = 'embedded'

Definition at line 53 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initForm().

◆ LAUNCH_METHOD_NEW_WIN

const ilObjLTIConsumer::LAUNCH_METHOD_NEW_WIN = 'newWin'

Definition at line 52 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initForm().

◆ LAUNCH_METHOD_OWN_WIN

const ilObjLTIConsumer::LAUNCH_METHOD_OWN_WIN = 'ownWin'

Definition at line 51 of file class.ilObjLTIConsumer.php.

Referenced by ilLTIConsumerSettingsFormGUI\initForm().

◆ LTI_1_3_KID

const ilObjLTIConsumer::LTI_1_3_KID = 'lti_1_3_kid'

Definition at line 93 of file class.ilObjLTIConsumer.php.

◆ LTI_1_3_PRIVATE_KEY

const ilObjLTIConsumer::LTI_1_3_PRIVATE_KEY = 'lti_1_3_privatekey'

Definition at line 94 of file class.ilObjLTIConsumer.php.

◆ LTI_JWT_CLAIM_PREFIX

const ilObjLTIConsumer::LTI_JWT_CLAIM_PREFIX = 'https://purl.imsglobal.org/spec/lti'

Definition at line 92 of file class.ilObjLTIConsumer.php.

◆ OPENSSL_KEYTYPE_RSA

const ilObjLTIConsumer::OPENSSL_KEYTYPE_RSA = ''

Definition at line 96 of file class.ilObjLTIConsumer.php.

◆ REG_TOKEN_OP_NEW_REG

const ilObjLTIConsumer::REG_TOKEN_OP_NEW_REG = 'reg'

Definition at line 98 of file class.ilObjLTIConsumer.php.

◆ REG_TOKEN_OP_UPDATE_REG

const ilObjLTIConsumer::REG_TOKEN_OP_UPDATE_REG = 'reg-update'

Definition at line 99 of file class.ilObjLTIConsumer.php.


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