Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 402] [Versions 310 and 403]

(no description)

File Size: 1190 lines (51 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: DataConnector_pdo  - X-Ref

Class to represent an LTI Data Connector for PDO connections

__construct($db, $dbTableNamePrefix = '')   X-Ref
Class constructor

param: object $db                 Database connection object
param: string $dbTableNamePrefix  Prefix for database table names (optional, default is none)

loadToolConsumer($consumer)   X-Ref
Load tool consumer object.

param: ToolConsumer $consumer ToolConsumer object
return: boolean True if the tool consumer object was successfully loaded

saveToolConsumer($consumer)   X-Ref
Save tool consumer object.

param: ToolConsumer $consumer Consumer object
return: boolean True if the tool consumer object was successfully saved

deleteToolConsumer($consumer)   X-Ref
Delete tool consumer object.

param: ToolConsumer $consumer Consumer object
return: boolean True if the tool consumer object was successfully deleted

getToolConsumers()   X-Ref
No description

loadToolProxy($toolProxy)   X-Ref
No description

saveToolProxy($toolProxy)   X-Ref
No description

deleteToolProxy($toolProxy)   X-Ref
No description

loadContext($context)   X-Ref
Load context object.

param: Context $context Context object
return: boolean True if the context object was successfully loaded

saveContext($context)   X-Ref
Save context object.

param: Context $context Context object
return: boolean True if the context object was successfully saved

deleteContext($context)   X-Ref
Delete context object.

param: Context $context Context object
return: boolean True if the Context object was successfully deleted

loadResourceLink($resourceLink)   X-Ref
Load resource link object.

param: ResourceLink $resourceLink Resource_Link object
return: boolean True if the resource link object was successfully loaded

saveResourceLink($resourceLink)   X-Ref
Save resource link object.

param: ResourceLink $resourceLink Resource_Link object
return: boolean True if the resource link object was successfully saved

deleteResourceLink($resourceLink)   X-Ref
Delete resource link object.

param: ResourceLink $resourceLink Resource_Link object
return: boolean True if the resource link object was successfully deleted

getUserResultSourcedIDsResourceLink($resourceLink, $localOnly, $idScope)   X-Ref
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.

param: ResourceLink $resourceLink      Resource link object
param: boolean     $localOnly True if only users within the resource link are to be returned (excluding users sharing this resource link)
param: int         $idScope     Scope value to use for user IDs
return: array Array of User objects

getSharesResourceLink($resourceLink)   X-Ref
Get array of shares defined for this resource link.

param: ResourceLink $resourceLink Resource_Link object
return: array Array of ResourceLinkShare objects

loadConsumerNonce($nonce)   X-Ref
Load nonce object.

param: ConsumerNonce $nonce Nonce object
return: boolean True if the nonce object was successfully loaded

saveConsumerNonce($nonce)   X-Ref
Save nonce object.

param: ConsumerNonce $nonce Nonce object
return: boolean True if the nonce object was successfully saved

loadResourceLinkShareKey($shareKey)   X-Ref
Load resource link share key object.

param: ResourceLinkShareKey $shareKey Resource_Link share key object
return: boolean True if the resource link share key object was successfully loaded

saveResourceLinkShareKey($shareKey)   X-Ref
Save resource link share key object.

param: ResourceLinkShareKey $shareKey Resource link share key object
return: boolean True if the resource link share key object was successfully saved

deleteResourceLinkShareKey($shareKey)   X-Ref
Delete resource link share key object.

param: ResourceLinkShareKey $shareKey Resource link share key object
return: boolean True if the resource link share key object was successfully deleted

loadUser($user)   X-Ref
Load user object.

param: User $user User object
return: boolean True if the user object was successfully loaded

saveUser($user)   X-Ref
Save user object.

param: User $user User object
return: boolean True if the user object was successfully saved

deleteUser($user)   X-Ref
Delete user object.

param: User $user User object
return: boolean True if the user object was successfully deleted