Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 403]

(no description)

File Size: 156 lines (6 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 0 files

Defines 1 class


Class: repository_googledocs_testcase  - X-Ref

Base class for the googledoc repository unit tests.

create_folder_content_node_array(string $id, string $name, string $path,string $modified = '')   X-Ref
Create an array that would replicate the structure of a repository folder node array.

return: array The repository folder node array
param: string $id The ID of the folder
param: string $name The name of the folder
param: string $path The root path
param: string $modified The date of the last modification

create_file_content_node_array(string $id, string $name, string $title, ?string $size = null,string $modified = '', string $thumbnail = '' , string $link = '', string $exportformat = '',?string $googledoctype = null)   X-Ref
Create an array that would replicate the structure of a repository file node array.

return: array The repository file node array
param: string $id The ID of the file
param: string $name The name of the file
param: string $title The title of the file node
param: string|null $size The size of the file
param: string $modified The date of the last modification
param: string $thumbnail The thumbnail of the file
param: string|null $link The external link to the file
param: string|null $exportformat The export format of the file
param: string|null $googledoctype The type of the Google Doc file (if applicable)

create_google_drive_shared_drive_object(string $id, string $name)   X-Ref
Create an object that would replicate the metadata for a shared drive returned by the Google Drive API call.

return: \stdClass The shared drive object
param: string $id The ID of the shared drive
param: string $name The name of the shared drive

create_google_drive_folder_object(string $id, string $name, ?string $modified = null)   X-Ref
Create an object that would replicate the metadata for a folder returned by the Google Drive API call.

return: \stdClass The folder object
param: string $id The ID of the folder
param: string $name The name of the folder
param: string|null $modified The date of the last modification

create_google_drive_file_object(string $id, string $name, string $mimetype,?string $extension = null, ?string $size = null, ?string $modified = null, ?string $webcontentlink = null,?string $webviewlink = null)   X-Ref
Create an object that would replicate the metadata for a file returned by the Google Drive API call.

return: \stdClass The file object
param: string $id The ID of the file
param: string $name The name of the file
param: string $mimetype The mimetype of the file
param: string|null $extension The extension of the file
param: string|null $size The size of the file
param: string|null $modified The date of the last modification
param: string|null $webcontentlink The link for downloading the content of the file
param: string|null $webviewlink The link for opening the file in a browser