Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 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 39 and 402] [Versions 39 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

param: array $options
return: mixed

get_option($config = '')   X-Ref

param: string $config
return: mixed

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

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

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

param: int $licenseid
return: string

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

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

get_link($photoid)   X-Ref
No description

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

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

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

param: string $photoid
return: string|null

callback()   X-Ref
Handle the oauth authorize callback

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