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 310 and 401] [Versions 39 and 401] [Versions 401 and 402] [Versions 401 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: 594 lines (21 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 repository/flickr_public/image.php

Defines 1 class


Class: repository_flickr_public  - X-Ref

repository_flickr_public class
This one is used to create public repository
You can set up a public account in admin page, so everyone can access
flickr photos from this plugin

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

param: int $repositoryid
param: int $context
param: array $options
param: boolean $readonly

set_option($options = array()   X-Ref
save api_key in config table

param: array $options
return: boolean

get_option($config = '')   X-Ref
get api_key from config table

param: string $config
return: mixed

global_search()   X-Ref
is global_search available?

return: boolean

check_login()   X-Ref
check if flickr account

return: boolean

print_login()   X-Ref
construct login form

param: boolean $ajax
return: array

logout()   X-Ref
destroy session

return: object

license4moodle($license_id)   X-Ref
No description

search($search_text, $page = 0)   X-Ref
search images on flickr

param: string $search_text
return: array

get_listing($path = '', $page = 1)   X-Ref
return an image list

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

build_list($photos, $page, &$ret)   X-Ref
build an image list

param: array $photos
param: int $page
return: array

print_search()   X-Ref
Print a search form

return: string

build_photo_url($photoid)   X-Ref
Return photo url by given photo id

param: string $photoid
return: string

get_best_size($photoid)   X-Ref
Returns the best size for a photo

param: string $photoid the photo identifier
return: array of information provided by the API

get_link($photoid)   X-Ref
No description

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

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

instance_config_form($mform)   X-Ref
Add Instance settings input to Moodle form

param: object $mform

get_instance_option_names()   X-Ref
Names of the instance settings

return: array

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

plugin_init()   X-Ref
is run when moodle administrator add the plugin


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 photo id
return: string|null

contains_private_data()   X-Ref
Is this repository accessing private data?

return: bool