Differences Between: [Versions 39 and 403]
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 param: string $path param: mixed $page return: array |
supported_returntypes() X-Ref |
Supported equella file types return: int |
get_file_reference($source) X-Ref |
Prepare file reference information param: string $source return: string file referece |
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. param: int $errno omit if we just want to know the return value, the last curl_errno otherwise return: bool true if we had less than 3 failed connections, false if no more connections |
get_file($reference, $filename = '') X-Ref |
Download a file, this function can be overridden by subclass. {@link curl} param: string $reference the source of the file param: string $filename filename (without path) to save the downloaded file in the return: null|array null if download failed or array with elements: |
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 param: string $username param: string $shareid param: string $sharedsecret return: string |
appendtoken($url, $readwrite = null) X-Ref |
Append token param: string $url param: $readwrite return: string |
getssotoken($readwrite = 'read') X-Ref |
Generate equella sso token param: string $readwrite return: string |
get_all_editing_roles() X-Ref |
No description |
to_mime_type($value) X-Ref |
Convert moodle mimetypes list to equella format param: string $value return: string |
get_file_source_info($source) X-Ref |
Return the source information param: string $source return: string|null |
get_reference_details($reference, $filestatus = 0) X-Ref |
Return human readable reference information {@link stored_file::get_reference()} param: string $reference param: int $filestatus status of the file, 0 - ok, 666 - source missing return: string |
contains_private_data() X-Ref |
Is this repository accessing private data? return: bool |