Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

(no description)

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

Defines 1 class


Class: file_node  - X-Ref

Class used to represent a file node in the googledocs repository.

__construct(\stdClass $gdfile)   X-Ref
Constructor.

param: \stdClass $gdfile The Google Drive file object

create_node_array()   X-Ref
Create a repository file array.

This method returns an array which structure is compatible to represent a file node in the repository.

return: array|null The node array or null if the node could not be created

generate_file_title(\stdClass $gdfile)   X-Ref
Generates and returns the title for the file node depending on the type of the Google drive file.

param: \stdClass $gdfile The Google Drive file object
return: string The file title

generate_file_export_format(\stdClass $gdfile)   X-Ref
Generates and returns the file export format depending on the type of the Google drive file.

param: \stdClass $gdfile The Google Drive file object
return: string The file export format

generate_file_link(\stdClass $gdfile)   X-Ref
Generates and returns the external link to the file.

param: \stdClass $gdfile The Google Drive file object
return: string The link to the file