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 402] [Versions 400 and 403]

This plugin is used to access flickr pictures

Copyright: 2010 Dongsheng Cai {@link http://dongsheng.org}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 397 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

repository_flickr:: (18 methods):
  __construct()
  check_login()
  logout()
  set_option()
  get_option()
  global_search()
  print_login()
  search()
  license4moodle()
  get_listing()
  get_link()
  get_file()
  type_config_form()
  get_type_option_names()
  supported_filetypes()
  supported_returntypes()
  get_file_source_info()
  callback()


Class: repository_flickr  - X-Ref

This plugin is used to access user's private flickr repository

__construct($repositoryid, $context = SYSCONTEXTID, $options = array()   X-Ref

param: int $repositoryid
param: object $context
param: array $options

check_login()   X-Ref
Check if the user has authorized us to make requests to Flickr API.

return: bool

logout()   X-Ref
Purge the stored access token and related user data.

return: string

set_option($options = array()   X-Ref

return: mixed
param: array $options

get_option($config = '')   X-Ref

return: mixed
param: string $config

global_search()   X-Ref

return: bool

print_login()   X-Ref
Show the interface to log in to Flickr..

return: string|array

search($searchtext, $page = 0)   X-Ref
Search for the user's photos at Flickr

return: array
param: string $searchtext Photos with title, description or tags containing the text will be returned
param: int $page Page number to load

license4moodle(int $licenseid)   X-Ref
Map Flickr license ID to those used internally by Moodle

return: string
param: int $licenseid

get_listing($path = '', $page = '')   X-Ref

return: array
param: string $path
param: int $page

get_link($photoid)   X-Ref
No description

get_file($photoid, $file = '')   X-Ref

return: string
param: string $photoid
param: string $file

type_config_form($mform, $classname = 'repository')   X-Ref
Add Plugin settings input to Moodle form

param: object $mform

get_type_option_names()   X-Ref
Names of the plugin settings

return: array

supported_filetypes()   X-Ref
No description

supported_returntypes()   X-Ref
No description

get_file_source_info($photoid)   X-Ref
Return the source information

return: string|null
param: string $photoid

callback()   X-Ref
Handle the oauth authorize callback

This is to exchange the approved request token for an access token.