Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Extends the IMS Tool provider library data connector for moodle. More...
Public Member Functions | |
__construct () | |
data_connector constructor. | |
deleteContext ($context) | |
Delete context object. More... | |
deleteResourceLink ($resourcelink) | |
Delete resource link object. More... | |
deleteResourceLinkShareKey ($sharekey) | |
Delete resource link share key object. More... | |
deleteToolConsumer ($consumer) | |
Delete tool consumer object and related records. More... | |
deleteToolProxy ($toolproxy) | |
Delete the tool proxy from the database. More... | |
deleteUser ($user) | |
Delete user object. More... | |
get_consumers_mapped_to_tool ($toolid) | |
Fetches the list of ToolConsumer objects that are linked to a tool. More... | |
get_contexts_from_consumer (ToolConsumer $consumer) | |
Fetches the list of Context objects that are linked to a ToolConsumer. More... | |
get_resourcelink_from_consumer (ToolConsumer $consumer) | |
Fetches a resource link record that is associated with a ToolConsumer. More... | |
get_resourcelink_from_context (Context $context) | |
Fetches a resource link record that is associated with a Context object. More... | |
getSharesResourceLink ($resourcelink) | |
Get array of shares defined for this resource link. More... | |
getToolConsumers () | |
Load all tool consumers from the database. More... | |
getUserResultSourcedIDsResourceLink ($resourcelink, $localonly, $idscope) | |
Get array of user objects. More... | |
loadConsumerNonce ($nonce) | |
Load nonce object. More... | |
loadContext ($context) | |
Load context object. More... | |
loadResourceLink ($resourcelink) | |
Load resource link object. More... | |
loadResourceLinkShareKey ($sharekey) | |
Load resource link share key object. More... | |
loadToolConsumer ($consumer) | |
Load tool consumer object. More... | |
loadToolProxy ($toolproxy) | |
Load the tool proxy from the database. More... | |
loadUser ($user) | |
Load user object. More... | |
saveConsumerNonce ($nonce) | |
Save nonce object. More... | |
saveContext ($context) | |
Save context object. More... | |
saveResourceLink ($resourcelink) | |
Save resource link object. More... | |
saveResourceLinkShareKey ($sharekey) | |
Save resource link share key object. More... | |
saveToolConsumer ($consumer) | |
Save tool consumer object. More... | |
saveToolProxy ($toolproxy) | |
Save the tool proxy to the database. More... | |
saveUser ($user) | |
Save user object. More... | |
Protected Member Functions | |
build_tool_consumer_object ($record, ToolConsumer $consumer) | |
Builds a ToolConsumer object from a record object from the DB. More... | |
Extends the IMS Tool provider library data connector for moodle.
|
protected |
Builds a ToolConsumer object from a record object from the DB.
stdClass | $record | The DB record object. |
ToolConsumer | $consumer |
enrol_lti\data_connector::deleteContext | ( | $context | ) |
Delete context object.
Context | $context | Context object |
boolean | True if the Context object was successfully deleted |
enrol_lti\data_connector::deleteResourceLink | ( | $resourcelink | ) |
Delete resource link object.
ResourceLink | $resourcelink | ResourceLink object |
boolean | True if the resource link object and its related records were successfully deleted. Otherwise, a DML exception is thrown. |
enrol_lti\data_connector::deleteResourceLinkShareKey | ( | $sharekey | ) |
Delete resource link share key object.
ResourceLinkShareKey | $sharekey | Resource link share key object |
boolean | True if the resource link share key object was successfully deleted |
enrol_lti\data_connector::deleteToolConsumer | ( | $consumer | ) |
Delete tool consumer object and related records.
ToolConsumer | $consumer | Consumer object |
boolean | True if the tool consumer object was successfully deleted |
enrol_lti\data_connector::deleteToolProxy | ( | $toolproxy | ) |
Delete the tool proxy from the database.
ToolProxy | $toolproxy |
bool |
enrol_lti\data_connector::deleteUser | ( | $user | ) |
Delete user object.
User | $user | User object |
boolean | True if the user object was successfully deleted |
enrol_lti\data_connector::get_consumers_mapped_to_tool | ( | $toolid | ) |
Fetches the list of ToolConsumer objects that are linked to a tool.
int | $toolid |
ToolConsumer[] |
enrol_lti\data_connector::get_contexts_from_consumer | ( | ToolConsumer | $consumer | ) |
Fetches the list of Context objects that are linked to a ToolConsumer.
ToolConsumer | $consumer |
Context[] |
enrol_lti\data_connector::get_resourcelink_from_consumer | ( | ToolConsumer | $consumer | ) |
Fetches a resource link record that is associated with a ToolConsumer.
ToolConsumer | $consumer |
ResourceLink |
enrol_lti\data_connector::get_resourcelink_from_context | ( | Context | $context | ) |
Fetches a resource link record that is associated with a Context object.
Context | $context |
ResourceLink |
enrol_lti\data_connector::getSharesResourceLink | ( | $resourcelink | ) |
Get array of shares defined for this resource link.
ResourceLink | $resourcelink | ResourceLink object |
array | Array of ResourceLinkShare objects |
enrol_lti\data_connector::getToolConsumers | ( | ) |
Load all tool consumers from the database.
array |
enrol_lti\data_connector::getUserResultSourcedIDsResourceLink | ( | $resourcelink, | |
$localonly, | |||
$idscope | |||
) |
Get array of user objects.
Obtain an array of User objects for users with a result sourcedId. The array may include users from other resource links which are sharing this resource link. It may also be optionally indexed by the user ID of a specified scope.
ResourceLink | $resourcelink | Resource link object |
boolean | $localonly | True if only users within the resource link are to be returned (excluding users sharing this resource link) |
int | $idscope | Scope value to use for user IDs |
array | Array of User objects |
enrol_lti\data_connector::loadConsumerNonce | ( | $nonce | ) |
Load nonce object.
ConsumerNonce | $nonce | Nonce object |
boolean | True if the nonce object was successfully loaded |
enrol_lti\data_connector::loadContext | ( | $context | ) |
Load context object.
Context | $context | Context object |
boolean | True if the context object was successfully loaded |
enrol_lti\data_connector::loadResourceLink | ( | $resourcelink | ) |
Load resource link object.
ResourceLink | $resourcelink | ResourceLink object |
boolean | True if the resource link object was successfully loaded |
enrol_lti\data_connector::loadResourceLinkShareKey | ( | $sharekey | ) |
Load resource link share key object.
ResourceLinkShareKey | $sharekey | ResourceLink share key object |
boolean | True if the resource link share key object was successfully loaded |
enrol_lti\data_connector::loadToolConsumer | ( | $consumer | ) |
Load tool consumer object.
ToolConsumer | $consumer | ToolConsumer object |
boolean | True if the tool consumer object was successfully loaded |
enrol_lti\data_connector::loadToolProxy | ( | $toolproxy | ) |
Load the tool proxy from the database.
ToolProxy | $toolproxy |
bool |
enrol_lti\data_connector::loadUser | ( | $user | ) |
Load user object.
User | $user | User object |
boolean | True if the user object was successfully loaded |
enrol_lti\data_connector::saveConsumerNonce | ( | $nonce | ) |
Save nonce object.
ConsumerNonce | $nonce | Nonce object |
boolean | True if the nonce object was successfully saved |
enrol_lti\data_connector::saveContext | ( | $context | ) |
Save context object.
Context | $context | Context object |
boolean | True if the context object was successfully saved |
enrol_lti\data_connector::saveResourceLink | ( | $resourcelink | ) |
Save resource link object.
ResourceLink | $resourcelink | Resource_Link object |
boolean | True if the resource link object was successfully saved |
enrol_lti\data_connector::saveResourceLinkShareKey | ( | $sharekey | ) |
Save resource link share key object.
ResourceLinkShareKey | $sharekey | Resource link share key object |
boolean | True if the resource link share key object was successfully saved |
enrol_lti\data_connector::saveToolConsumer | ( | $consumer | ) |
Save tool consumer object.
ToolConsumer | $consumer | Consumer object |
boolean | True if the tool consumer object was successfully saved |
enrol_lti\data_connector::saveToolProxy | ( | $toolproxy | ) |
Save the tool proxy to the database.
ToolProxy | $toolproxy |
bool |
enrol_lti\data_connector::saveUser | ( | $user | ) |
Save user object.
User | $user | User object |
boolean | True if the user object was successfully saved |