Differences Between: [Versions 39 and 400]
This plugin is used to access equella repositories.
Copyright: | 2012 Dongsheng Cai {@link http://dongsheng.org} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 439 lines (17 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
repository_equella:: (18 methods):
__construct()
get_listing()
supported_returntypes()
get_file_reference()
connection_result()
get_file()
sync_reference()
send_file()
instance_config_form()
get_instance_option_names()
getssotoken_raw()
appendtoken()
getssotoken()
get_all_editing_roles()
to_mime_type()
get_file_source_info()
get_reference_details()
contains_private_data()
Class: repository_equella - X-Ref
repository_equella class implements equella_client__construct($repositoryid, $context = SYSCONTEXTID, $options = array() X-Ref |
Constructor param: int $repositoryid repository instance id param: int|stdClass $context a context id or context object param: array $options repository options |
get_listing($path = null, $page = null) X-Ref |
Display embedded equella interface return: array param: string $path param: mixed $page |
supported_returntypes() X-Ref |
Supported equella file types return: int |
get_file_reference($source) X-Ref |
Prepare file reference information return: string file referece param: string $source |
connection_result($errno = null) X-Ref |
Counts the number of failed connections. If we received the connection timeout more than 3 times in a row, we don't attemt to connect to the server any more during this request. This function is used by {@link repository_equella::sync_reference()} that synchronises the file size of referenced files. return: bool true if we had less than 3 failed connections, false if no more connections param: int $errno omit if we just want to know the return value, the last curl_errno otherwise |
get_file($reference, $filename = '') X-Ref |
Download a file, this function can be overridden by subclass. {@link curl} return: null|array null if download failed or array with elements: param: string $reference the source of the file param: string $filename filename (without path) to save the downloaded file in the |
sync_reference(stored_file $file) X-Ref |
No description |
send_file($stored_file, $lifetime=null , $filter=0, $forcedownload=false, array $options = null) X-Ref |
Repository method to serve the referenced file param: stored_file $storedfile the file that contains the reference param: int $lifetime Number of seconds before the file should expire from caches (null means $CFG->filelifetime) param: int $filter 0 (default)=no filtering, 1=all files, 2=html files only param: bool $forcedownload If true (default false), forces download of file rather than view in browser/plugin param: array $options additional options affecting the file serving |
instance_config_form($mform) X-Ref |
Add Instance settings input to Moodle form param: moodleform $mform |
get_instance_option_names() X-Ref |
Names of the instance settings return: array |
getssotoken_raw($username, $shareid, $sharedsecret) X-Ref |
Generate equella token return: string param: string $username param: string $shareid param: string $sharedsecret |
appendtoken($url, $readwrite = null) X-Ref |
Append token return: string param: string $url param: $readwrite |
getssotoken($readwrite = 'read') X-Ref |
Generate equella sso token return: string param: string $readwrite |
get_all_editing_roles() X-Ref |
No description |
to_mime_type($value) X-Ref |
Convert moodle mimetypes list to equella format return: string param: string $value |
get_file_source_info($source) X-Ref |
Return the source information return: string|null param: string $source |
get_reference_details($reference, $filestatus = 0) X-Ref |
Return human readable reference information {@link stored_file::get_reference()} return: string param: string $reference param: int $filestatus status of the file, 0 - ok, 666 - source missing |
contains_private_data() X-Ref |
Is this repository accessing private data? return: bool |