General developer forum

 
 
Picture of Nuno Horta
Repository plugin issues
 

I'm planning on developing a repository plugin to use and external repo of mine. I have some doubts that i can't seem to get an answer for...

1. which protocol is used to communicate between moodle and the external repo?

2. i have an uploader on this external repo, can i use that one on this plugin? Some guidelines or examples?

thank you !

 
Average of ratings: -
Davo
Re: Repository plugin issues
Group DevelopersGroup Particularly helpful Moodlers

1. Whatever communication method you want to code into plugin; your plugin handles the communication between itself and the external repository - the communication between the plugin and the Moodle filepicker is defined in the docs http://docs.moodle.org/dev/Repository_plugins

2. You can embed an external page in your repo results and upload to that ( http://docs.moodle.org/dev/Repository_plugins_embedding_external_file_chooser ), but it is hard to combine that with returning standard results to be displayed by the Moodle filepicker. See the Alfresco repository for an example.

 
Average of ratings: -
Picture of Nuno Horta
Re: Repository plugin issues
 

thank you for your answer!

the second one it's really cool, i think it will do. About the first it still have some doubts. Basically i will need to return, among with other properties, the url for each file/item and it will upload using http or https...

Anyway, the first link I already had a read and it doesn't say anything about protocol. Is not that specific because that's the all point of an API, to make our life easier. I would just like to find some details on that process.

 
Average of ratings: -
Davo
Re: Repository plugin issues
Group DevelopersGroup Particularly helpful Moodlers

As already stated - there is no specification for the protocol between your plugin and the external repository, as that is entirely dependent on the external repository and your plugin. I've seen repository plugins that use SOAP or REST, but it is up to you to decide what protocol is right for your situation (you could use FTP, or even RFC1149, if you aren't too worried about latency). As a default, Moodle will use CURL to download the URL returned by your plugin, if the user asks to copy the file, but even that can be overridden by your plugin (the get_file() function).

 
Average of ratings: -
Picture of Nuno Horta
Re: Repository plugin issues
 

okay cool! this was very useful, thank you!

 
Average of ratings: -