Class to represent a tool consumer context
| deprecated | Use LTI_Resource_Link instead |
|---|---|
| see | |
| author | Stephen P Vickers |
| version | 2.5.00 |
| license | GNU Lesser General Public License, version 3 |
| package | LTI |
| inherited_from | \LTI_Resource_Link |
__construct(string $consumer, string $id)
| inherited_from | \LTI_Resource_Link::__construct() |
|---|
stringConsumer key value
stringResource link ID value
__construct(string $consumer, string $id, string $current_id = NULL)
stringConsumer key value
stringResource link ID value
stringCurrent ID of resource link (optional, default is NULL)
delete() : boolean
booleanTrue if the resource link was successfully deleted.doMembershipsService(boolean $withGroups = FALSE) : mixed
booleanTrue is group information is to be requested as well
mixedArray of LTI_User objects or False if the request was not successfuldoOutcomesService(integer $action, \LTI_Outcome $lti_outcome, \LTI_User $user = NULL) : boolean
integerThe action type constant
\LTI_OutcomeOutcome object
\LTI_UserUser object
booleanTrue if the request was successfully processeddoSettingService(integer $action, string $value = NULL) : mixed
integerThe action type constant
stringThe setting value (optional, default is null)
mixedThe setting value for a read action, true if a write or delete action was successful, otherwise falsegetConsumer() : object
objectLTI_Tool_Consumer object for this resource link.getId(string $previous = FALSE) : string
stringTRUE if previous ID value is to be returned (optional, default is FALSE)
stringID for this resource link.getKey() : string
stringConsumer key value for this resource link.getSetting(string $name, string $default = '') : string
stringName of setting
stringValue to return if the setting does not exist (optional, default is an empty string)
stringSetting valuegetSettings() : array
arrayAssociative array of setting valuesgetShares() : array
arrayArray of LTI_Resource_Link_Share objectsgetUserResultSourcedIDs(boolean $local_only= FALSE, integer $id_scope= NULL) : array
booleanTrue if only users from this resource link are to be returned, not users from shared resource links (optional, default is false)
integerScope to use for ID values (optional, default is null for consumer default)
arrayArray of LTI_User objectshasMembershipsService() : boolean
booleanTrue if this resource link supports the Memberships servicehasOutcomesService() : boolean
booleanTrue if this resource link supports the Outcomes service (either the LTI 1.1 or extension service)hasSettingService() : boolean
booleanTrue if this resource link supports the Setting serviceinitialise()
save() : boolean
booleanTrue if the resource link was successfully saved.saveSettings() : boolean
booleanTrue if the settings were successfully savedsetSetting(string $name, string $value = NULL)
stringName of setting
stringValue to set, use an empty value to delete a setting (optional, default is null)
checkValueType(\LTI_Outcome $lti_outcome, array<mixed,string> $supported_types = NULL) : boolean
\LTI_OutcomeOutcome object
array<mixed,string>Array of outcome types to be supported (optional, default is null to use supported types reported in the last launch for this resource link)
booleanTrue if the type/value are valid and supporteddoLTI11Service(string $type, string $url, string $xml) : boolean
stringMessage type value
stringURL to send request to
stringXML of message request
booleanTrue if the request successfully obtained a responsedoService(string $type, string $url, array $params) : boolean
stringMessage type value
stringURL to send request to
arrayAssociative array of parameter values to be passed
booleanTrue if the request successfully obtained a responsedomnode_to_array(\DOMElement $node) : array
\DOMElementXML element
arrayArray of XML document elementsload() : boolean
booleanTrue if resource link was successfully loaded$created : object
NULL$ext_request : string
NULL$ext_request_headers : array
NULL$ext_response : string
NULL$ext_response_headers : array
NULL$group_sets : array
NULL$groups : array
NULL$lti_context_id : string
NULL$lti_resource_id : string
NULL$primary_consumer_key : string
NULL$primary_context_id
NULL$primary_resource_link_id : string
NULL$settings : array
NULL$share_approved : boolean
NULL$title : string
NULL$updated : object
NULL$consumer : \LTI_Tool_Consumer
NULL$ext_doc : string
NULL$ext_nodes : array
NULL$id : string
NULL$previous_id : string
NULL$settings_changed : boolean
FALSEEXT_DELETE = 3
EXT_READ = 1
EXT_TYPE_DECIMAL = 'decimal'
EXT_TYPE_LETTER_AF = 'letteraf'
EXT_TYPE_LETTER_AF_PLUS = 'letterafplus'
EXT_TYPE_PASS_FAIL = 'passfail'
EXT_TYPE_PERCENTAGE = 'percentage'
EXT_TYPE_RATIO = 'ratio'
EXT_TYPE_TEXT = 'freetext'
EXT_WRITE = 2