Custom repository does not appear in the file picker

Custom repository does not appear in the file picker

by O xydium -
Number of replies: 6

Hi everyone,

First of all, sorry for my english, I'm french...

I'm new in moodle and I have a really big problem for 5 hours. I searched on google, and I think I read all the documentation, but I haven't found yet a solution to my problem. Maybe you could help me.

My aim is to create my own repository plugin and to see it in the file picker. It will use after a web service to get files. (not implemented yet).

For the moment, I'm just trying to make my custom repository appear in the file picker, but I'm not abble to do that, and I really don't understand why. Maybe I missed something...

Here what I did:

I took a template on a github, and I edited it. I put my repository in /path_to/moodle/repository.

Then, my plugin appear in the repositories managment. I turned my plugin to enabled and visible, but it is not visible in the file picker...

Something I saw in the general plugin list, my plugin appear as an "extension", I don't know if it is normal.

I can't see my plugin in the role definition too.

How can I do ? Please could you give me some help, I'm really desperate, I really have no idea..

I join a zip file where you can find my code.

Thanks in advance

Oxydium

Average of ratings: -
In reply to O xydium

Re: Custom repository does not appear in the file picker

by John St -

Have you gone to the notifications page and made sure the plugin 'installed'? Just uploading it does not install it, it needs to go through the moodle install process. 

In reply to John St

Re: Custom repository does not appear in the file picker

by O xydium -

Yes I dit it and nothing appear :/

In reply to O xydium

Re: Custom repository does not appear in the file picker

by Kevin Ryan -

Be careful. There is a directory called repository, but you have to make another one in a different place (in your moodledata, or uploaddata folder) and then activate that for you to be able to see it in your file picker. 

In reply to Kevin Ryan

Re: Custom repository does not appear in the file picker

by Daniel B -
@kevin, what do you mean by this?


We are talking about a repository plugin, no code pointing to actual location yet, just getting it to appear


Moving the plugin to the moodledata folder just gave errors from trying to find moodle/plugins/repository/xx/lib.php and such

In reply to O xydium

Re: Custom repository does not appear in the file picker

by Akinsaya Delamarre -

What file types did you set your repository plug-in to support? (look in the supported_filetypes() function).  If it's 'web_video' then your need to click the film reel of the WYSIWYG editor.  If it's set to 'web_image' then click on the tree icon of your WYSIWYG.

In reply to O xydium

Re: Custom repository does not appear in the file picker

by Daniel B -

@Oxydium,

I had this problem, but then found out it was one of the functions returning invalid or not returning.

I changed the return types to defaults, notably i commented out supported_filetypes and supported_returntypes so they used base class values, and it appeared

A lot more to do now though


Btw - in my case i already have a browser interface that is created dynamically via a hotlinked js file, in other applications i just extend tinymce media plugin by overwritting filebrowser option there (loads html page that with <script> and <css> tags pointing to right location, passes back url on selection using tinymce_popup code). 

Now i gota find out how to make this work here