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 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

return: array list of recent files
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

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

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

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

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

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