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.

Differences Between: [Versions 311 and 402] [Versions 311 and 403]

This plugin is used to access recent used files

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

Defines 1 class


Class: repository_recent  - X-Ref

DEFAULT_RECENT_FILES_TIME_LIMIT - default time limit.

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

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

print_login()   X-Ref
recent plugin doesn't require login, so list all files

return: mixed

get_recent_files($limitfrom = 0, $limit = DEFAULT_RECENT_FILES_NUM, $timelimit = 0)   X-Ref
Only return files within the time limit

param: int $limitfrom retrieve the files from
param: int $limit limit number of the files
param: int $timelimit only return files with the time limit
return: array list of recent files

get_listing($encodedpath = '', $page = '')   X-Ref
Get file listing

param: string $encodedpath
param: string $path not used by this plugin
return: mixed

get_type_option_names()   X-Ref
No description

type_config_form($mform, $classname = 'repository')   X-Ref
No description

supported_returntypes()   X-Ref
This plugin doesn't support to link to external links

return: int

file_is_accessible($source)   X-Ref
Repository method to make sure that user can access particular file.

This is checked when user tries to pick the file from repository to deal with
potential parameter substitutions is request

param: string $source
return: bool whether the file is accessible by current user

has_moodle_files()   X-Ref
Does this repository used to browse moodle files?

return: boolean

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

return: bool