Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402] [Versions 402 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: 251 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