Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 401 and 403]

(no description)

File Size: 156 lines (6 kb)
Included or required:0 times
Referenced: 4 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.

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
return: array The repository folder node array

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.

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)
return: array The repository file node array

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.

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

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.

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
return: \stdClass The folder object

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.

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
return: \stdClass The file object