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() |
---|
string
Consumer key value
string
Resource link ID value
__construct(string $consumer, string $id, string $current_id = NULL
)
string
Consumer key value
string
Resource link ID value
string
Current ID of resource link (optional, default is NULL)
delete() : boolean
boolean
True if the resource link was successfully deleted.doMembershipsService(boolean $withGroups = FALSE
) : mixed
boolean
True is group information is to be requested as well
mixed
Array of LTI_User objects or False if the request was not successfuldoOutcomesService(integer $action, \LTI_Outcome $lti_outcome, \LTI_User $user = NULL
) : boolean
integer
The action type constant
\LTI_Outcome
Outcome object
\LTI_User
User object
boolean
True if the request was successfully processeddoSettingService(integer $action, string $value = NULL
) : mixed
integer
The action type constant
string
The setting value (optional, default is null)
mixed
The setting value for a read action, true if a write or delete action was successful, otherwise falsegetConsumer() : object
object
LTI_Tool_Consumer object for this resource link.getId(string $previous = FALSE
) : string
string
TRUE if previous ID value is to be returned (optional, default is FALSE)
string
ID for this resource link.getKey() : string
string
Consumer key value for this resource link.getSetting(string $name, string $default = ''
) : string
string
Name of setting
string
Value to return if the setting does not exist (optional, default is an empty string)
string
Setting valuegetSettings() : array
array
Associative array of setting valuesgetShares() : array
array
Array of LTI_Resource_Link_Share objectsgetUserResultSourcedIDs(boolean $local_only= FALSE
, integer $id_scope= NULL
) : array
boolean
True if only users from this resource link are to be returned, not users from shared resource links (optional, default is false)
integer
Scope to use for ID values (optional, default is null for consumer default)
array
Array of LTI_User objectshasMembershipsService() : boolean
boolean
True if this resource link supports the Memberships servicehasOutcomesService() : boolean
boolean
True if this resource link supports the Outcomes service (either the LTI 1.1 or extension service)hasSettingService() : boolean
boolean
True if this resource link supports the Setting serviceinitialise()
save() : boolean
boolean
True if the resource link was successfully saved.saveSettings() : boolean
boolean
True if the settings were successfully savedsetSetting(string $name, string $value = NULL
)
string
Name of setting
string
Value 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_Outcome
Outcome 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)
boolean
True if the type/value are valid and supporteddoLTI11Service(string $type, string $url, string $xml) : boolean
string
Message type value
string
URL to send request to
string
XML of message request
boolean
True if the request successfully obtained a responsedoService(string $type, string $url, array $params) : boolean
string
Message type value
string
URL to send request to
array
Associative array of parameter values to be passed
boolean
True if the request successfully obtained a responsedomnode_to_array(\DOMElement $node) : array
\DOMElement
XML element
array
Array of XML document elementsload() : boolean
boolean
True 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
FALSE
EXT_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