How to locate/find a file (Moodle 2.2)

How to locate/find a file (Moodle 2.2)

by Ulrike Albers -
Number of replies: 12

Hallo,

I'm new to Moodle 2.2, and I find it a little difficult to understand the repository system. As I can't see in the path to a file where it is located (or can I ?), could anybody help me with the following:

I need to find out why some files aren't shown, so the first thing I should do is look if the file is where it is supposed to be. But how can I access it ? How can I locate it ?

Thank you for your help, it must be a quite stupid question but I just can't figure it out  sad

Ulrike

Average of ratings: -
In reply to Ulrike Albers

Re: How to locate/find a file (Moodle 2.2)

by Frédéric Massart ⭐ -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hello Ulrike,

when you mention repository, do you mean a specific one or the whole system in general?

If you are talking about the repository system itself, files are stored in the moodledata folder under filedir. But, you won't be able to find them as they are stored using their hash and not their file name.

Some files/repositories do not show up in certain circonstances depending on:

  • The repository being browsed
  • The area you are picking a file to
  • The type of the file

Let's say you are editing a description and click to add an image, the file picker will not displays files which are not images.

If you feel comfortable browsing your database, you can explore the table mdl_site and identify the hash those files are stored under. Then you will be able to find them in the moodledata directory.

Cheers!

Fred

Average of ratings: Useful (1)
In reply to Frédéric Massart ⭐

Re: How to locate/find a file (Moodle 2.2)

by Ulrike Albers -

Hello Frederic,

Thanks a lot for your answer !

I see here are two problems

1. me understanding the system (I start to understand the principles though, thanks !)

2. the Moodle site/configuration I have to work with (I can't see any files)


But maybe someone can help me with one thing:

I have to "repare" a lot of files (images, videos, pages) which won't show. But I don't even know what each file is, and I can't see (not from the URL, not by Moodle browsing either) where it is. Would anybody be able to help me so I'll be able to find them ???


Thank you !

Ulrike

 

PS: there is no direct acces to the files anymore, is there ?

Sorry about all these questions...

 

In reply to Ulrike Albers

Re: How to locate/find a file (Moodle 2.2)

by Frédéric Massart ⭐ -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Ulrike,

What do you mean by 'repare' a lot of files?

Why did they become anavailable?

Where were they displayed/used (activity, description, file resource, repository, ...)?

Fred

In reply to Frédéric Massart ⭐

Re: How to locate/find a file (Moodle 2.2)

by Ulrike Albers -

Hallo !

'Repare" is quite wrong, I'm sorry. It's just files which don't display (I can't know if the path is wrong, or if they are not on the platform any more, I can't even know what each file is).

They are usually in labels, and probably became unavailable when copying the course for this semester. I just arrive on that platform, I have admin access (only to be able to register students and give them roles). I should wait for an answer by the real site admin... I just wanted to understand what's wrong.

Thank you so much for your help !

Ulrike

In reply to Frédéric Massart ⭐

Re: How to locate/find a file (Moodle 2.2)

by chris dennison -

Table mdl_files contains the list of hash's original path and real file names.  Not easy to use for more than one or two files!

In reply to chris dennison

Re: How to locate/find a file (Moodle 2.2)

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
In reply to Visvanath Ratnaweera

Re: How to locate/find a file (Moodle 2.2)

by Ulrike Albers -

Hallo, thanks a lot for you messages !!!

I really have to say I'm sorry, especially for Visvanath who already helped me on another post... I come back only now...

I just wonder if REALLY (can you confirm this), with Moodle 2.2, we cannot see the files (even as a site admin) except when they appear by chance in "recently uploaded" ?

Because if that is true, we have to upload the same file 10 times if we need to use it 10 times - it seems just illogical...

- how to indicate the location of a file in htm code (for example, script for a small player)
- how to replace an icon
- how to remove a file (if we have to change it)
- how to help the course creators when one of their files don't show (I don't have their files)

and other issues of the same kind...

Thank you very much !

 

PS: For that site, I don't have an FTP  access

In reply to Ulrike Albers

Re: How to locate/find a file (Moodle 2.2)

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Ulrike

I don't mind understanding the new repository system myself. The way I understood it sofar it would break the work flow of most of my collegues who use Moodle actively. It has already happened to a customer. In the hope, that I'm not seeing right, I express my understanding here, so that the experts can correct me.

Looking at your work flow I dare to say: Even if you had FTP access, you can not do what you intend to do in the new repository system. Well, you may do that once or twice by following the reverse engineering recipe by Ken (link in my previous post), but definitely not on a daily basis!
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: How to locate/find a file (Moodle 2.2)

by Ulrike Albers -

Reading all posts again, I see that Fred says "the file picker will not displays files which are not images." I hadn't payed attention because by then I thaught it was a bug on our platform, but now I wonder: If he says that, well it means that SOME FILES ARE DISPLAYED, doesn't it ???

In reply to Ulrike Albers

Re: How to locate/find a file (Moodle 2.2)

by Nigel Irwin -

Ulrike, if you are looking for files that had been uploaded under Moodle 1.9 or earlier then you need to get admin to switch on allow access to legacy files. Otherwise, in file picker, if you look in server files and then in the respective course you should see the files listed.

HTH

In reply to Ulrike Albers

Re: How to locate/find a file (Moodle 2.2)

by Frédéric Massart ⭐ -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Ulrike,

what I meant here is that depending of the context in which you are trying to pick a files, some repositories might show up or not, and the ones that are showing up might not display all the files.

As I used as an example, if you are trying to add a picture to a Page resource for example, the repository will not display the files which are not images. It would not make sense to display PDFs or ZIPs in that context.

However, when you browse your repository through your Private Files, you should be able to see all the files that a repository give access to. But you might not see all the repositories available depending on permissions, and multiple other reasons.

I understand you are using Moodle 2.2, and I see that quite a few comparison have been made with Moodle 1.9. I am afraid that my knowledge of Moodle prior to version 2.2 is really small, and even though I have mostly worked with Moodle 2.3 which is quite different regarding the repositories.

I try to find some time to have a look at your questions directly in Moodle 2.2 context.

Average of ratings: Useful (2)
In reply to Frédéric Massart ⭐

Re: How to locate/find a file (Moodle 2.2)

by Ulrike Albers -

Hello,

I now understand (at the end !!!) that something's wrong.

I actually don't see ANY files in the picker (except recently uploaded by myself, sometimes) - nothing at all. Our site admin told me that that was just like that in Moodle 2.2, but well, he's not right then. I've got admin rights (technically) but I'm not allowed to do any changes, I will contact him again.

Thank you for your explanations ! These will help me in the future too (I hope that the issue will be repared).

Ulrike