Where is the dataroot on Moodle 2.0?

Where is the dataroot on Moodle 2.0?

by J. Chan -
Number of replies: 44
Hi I have just installed the latest Moodle 2.0 for trial yesterday.

I installed the system the same as version 1.9

However, I found three things:

  1. the Moodle data directory is different from version 1.9x when I try to FTP some files directly to the dataroot. How to find the parent folder of, say course #2
  2. the new HTML editor does not support the output of bullets on the page. It shows the bullet in editing mode, but not on the page output mode on Safari
  3. no matter which topic section I am, when I add a page as a resource to, say topic 3, the page appears in Topic section 0.
Looking forward to the solutions to the above problems. Thanks

James
Average of ratings: -
In reply to J. Chan

Re: Where is the dataroot on Moodle 2.0?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
1. You can't do that any more. Moodle 2 has a proper file repository and information about the files is stored in the database too.

2. I would file this as a bug (and/or search to see if it is already reported)

3. ditto

Do remember that 2.0 is still work in progress.
In reply to Howard Miller

Re: Where is the dataroot on Moodle 2.0?

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi James,

Thanks for your help in testing Moodle 2.0. As Howard says, it's still a work in progress, though hopefully 2.0 beta will be released one day soon. wink

I'm just going to move this discussion to the testing and QA forum...
In reply to Howard Miller

Re: Where is the dataroot on Moodle 2.0?

by J. Chan -
Thanks for your reply.
#1 is not user-friendly to FTP uploader, especially file of large size, and when we consider the time --- it is much faster for uploading and downloading.

Also, when we assign special FTP account to a teacher panel to handle the datafile of that particular course, he/she can work on the FTP directly. None can. Wow! We have to change lots of daily school Moodle operation routine!
In reply to J. Chan

Re: Where is the dataroot on Moodle 2.0?

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Hi James -re #1 - as I understand it there might be the possiblity to use webdav - that might help? Re #3 - I have this problem/bug also with my current version of Moodle (from last week)
In reply to Mary Cooch

Re: Where is the dataroot on Moodle 2.0?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Has anyone reported bug #3 yet ?
In reply to Joseph Rézeau

Re: Where is the dataroot on Moodle 2.0?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Oops, just noticed my previous post has been automatically transformed. What I wanted to write was:
Has anyone reported yet the bug mentioned as number 3 in the OP's list, i.e. "no matter which topic section I am, when I add a page as a resource to, say topic 3, the page appears in Topic section 0."
Joseph
In reply to Joseph Rézeau

Re: Where is the dataroot on Moodle 2.0?

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Looks like it has http://tracker.moodle.org/browse/MDL-21798
Found that when I went to report it myself.
In reply to Mary Cooch

Re: Where is the dataroot on Moodle 2.0?

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Howard (and others) - I second the ftp concern.
In reply to Mary Cooch

Re: Where is the dataroot on Moodle 2.0?

by Stephen Bourget -
Picture of Core developers Picture of Plugin developers Picture of Testers
There is a "File System" repository type included with the current version of 2.0 Dev.

From what it looks like you simply need to manually create a directory in moddata called repository and any sub directories in there can be treated as individual repository instances. (Managed through the Repositories Admin UI)

I think that this method may allow your users to upload their files using an FTP client

-Steve
In reply to Stephen Bourget

Re: Where is the dataroot on Moodle 2.0?

by J. Chan -
Hi, can't find "moddata"

Sorry, any help

James
In reply to J. Chan

Re: Where is the dataroot on Moodle 2.0?

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
I think he might mean moodledata (or uploaddata depending on your host) Moddata (at least in Moodle 1.9) is where students upload their work to in a course
In reply to Mary Cooch

Re: Where is the dataroot on Moodle 2.0?

by Stephen Bourget -
Picture of Core developers Picture of Plugin developers Picture of Testers
Yes, I had meant the moodledata directory ($CFG->dataroot)

If you manually create a folder in there called "repository" any folders contained inside of this "repository" folder will be available for the "File System" repository plugin. (The names of the folders will appear as options when you create the individual instances from the site administration block.

For example:

If I have my moodledata folder located at:

C:\Moodle\MoodleData

If I create two folders:

C:\Moodle\MoodleData\repository\videofiles
C:\Moodle\MoodleData\repositoty\images

When I go to configure the "File System" repository site from the site administration block

(http://localhost/moodle/moodle20/admin/repository.php?edit=filesystem)

and click on the "create a repository instance" button the two folders I had created earlier (videofiles and images) will appear in the dropdown menu.

Any repository created here will show up to all users in the filemanager (Where they would normally upload a file / image etc through the moodle UI)

This repository type doesn't seem to be documented anywhere yet.

Hope this helps

-Steve
In reply to Stephen Bourget

Re: Where is the dataroot on Moodle 2.0?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Ahhh ok. That's interesting. Thanks for the info.
In reply to Stephen Bourget

Re: Where is the dataroot on Moodle 2.0?

by J. Chan -
Thx.
But I am not sure of where I can put the folders. Here is my filing system:
I only create 1 course in my Moodle 2.0
When I go to the server > dataroot
I find a directory, "filedir"
in it, there are many folders, see the screenshot:
Screenshot
and many downunder.
I only have 1 course.

In previous version of Moodle, there would be only one or two folder, labelled according to the course id. For front page, course id is 1. If we upload files, they would be found in folder named "1". If I create a course, normally the course id would be 2. So if I upload files to that course from forum, or assignment, all files would be stored in folder named "2". It's simple, clean, clear and user-friendly.

In a school administration, we always assign independent FTP account to different course admin teacher so that they can use FTP client software to access the folder, and then upload and download files (many at once or of large file size) to and from their own course folder.

But now, which folder should I assign them for the FTP access right?

Headache!

James
In reply to J. Chan

Re: Where is the dataroot on Moodle 2.0?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You can't give people FTP access in Moodle 2.0.

You can give them WebDAV access.
In reply to Tim Hunt

Re: Where is the dataroot on Moodle 2.0?

by J. Chan -
Sorry. Absolutely no idea on WebDAV even after I check out at their website at webdav.org.

That means if our school decides to upgrade to version 2, we cannot continue our 4-year practice in using FTP, but to learn some kind of FTP replacement before we can continue our daily school work. In this case, I think no schools will upgrade to version 2, at least quite sure locally.

It doesn't mean that we don't want to learn new thing. But version 2 is no more a user-friendly system. Frankly speaking, dataroot filing system is an important issue. I use Moodle because I can use a wide range of activities and plugins. When I design activities, I always have to upload files of different file size. As school servers usually has a file size limit policy which is mostly beyond the control of teachers, I, as a teacher myself, find it easy to upload many files, like images, ppt and videos, onto the file server course folder with a FTP client before I link these resources in Moodle.

If it is not possible to use FTP, and if it is difficult to find a simple replacement, I will definitely vote for staying with version 1.9x.
In reply to J. Chan

Re: Where is the dataroot on Moodle 2.0?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
So, of the basis you know nothing about WebDAV, you are dismissing the whole idea?

Webdav support is built into windows, linux and MacOS. Using it is as easy as connecting to a network share in windows (just search for webdav in the windows help).

It has the added advantage that Moodle can enforce the same access controls as when adding files via a web browser, so a teacher can automatically only access files they are supposed to be able to access.
In reply to Tim Hunt

Re: Where is the dataroot on Moodle 2.0?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
I used to use WebDav when we had WebCT at my university and I've been lamenting all those years that WebDav was not available in Moodle. I have not tried it yet but I will very shortly and will report here. As Tim says, once you've understood how webdav works, it's very simple to use; you no longer need to compress your files to upload them and unzip them in your course files. You just drag and drop them as you would in Window explorer. It's great!
I'm really looking forward to using it in Moodle 2.0.
Joseph
In reply to Joseph Rézeau

Re: Where is the dataroot on Moodle 2.0?

by Dan Poltawski -
I don't really want to say anything but agree, but...

We've been providing access to files for the past two years using webdav (and Martin Langhoff's patch to 1.9) and there are some caveats to watch out for - some versions of windows get a bit picky about their support for webdav.

There is a microsoft hotfix which seems to address the problem in most cases (search the forums, i'm sure i've linked to it before). But its not all smooth sailing in windows land.

Having said considering we have over 900 moodles and 230,000 users - there haven't been that many problems so it can't be that bad..
In reply to Dan Poltawski

Re: Where is the dataroot on Moodle 2.0?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Dan,

On my local machine, test version of Moodle 2.0 I am trying to use webdav, but have not the faintest idea of what I should enter in the WebDav configuration form. Also, I'm using Windows XP, do I have to install anything special on my machine to get WebDav to work or not?

The WebDav Moodle documentation is scarce and rather cryptic (to me). In the forums, I see that a number of moodlers ask for "instructions on how to use webdav" but they get no answer.

Please, can you explain it all in simple words? TIA!

Joseph

Attachment image00.jpg
In reply to Joseph Rézeau

Re: Where is the dataroot on Moodle 2.0?

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Yes please Dan - what he said; me too!smile
In reply to Joseph Rézeau

Re: Where is the dataroot on Moodle 2.0?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Wrong webdav. That screen is for configuring some other webdav server as a repository, so you can get files form there into your Moodle.

I don't know how the webdav for getting files out of your Moodle works.
In reply to Tim Hunt

Re: Where is the dataroot on Moodle 2.0?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Thanks Tim.

Actually I don't want to get files out of my moodle but into it... Anyway, does anyone actually know how to use a webdav interface a la Windows explorer (or a la FTP) to drag-and-drop files or whole folders from a local machine to one's Moodle course files (and, possibly, from the Moolde courses to a local machine). That's what I found very useful in my day-to-day use of WebCT and am still missing in Moodle 2.0.

Joseph (who understands less and less)wink

In reply to Joseph Rézeau

Re: Where is the dataroot on Moodle 2.0?

by J. Chan -
Hi, finally my Macbook has a built in webdav in the finder.

First in the server host, I created a webdisk with username and password.
Then I assign which folder the user can access. (But what's the difference does it make when compared with FTP client, like FileZilla)

Anyway, I click go in Finder > connect > http://mymoodle site: 2077 > username > password > bingo!

The Finder becomes a FTP client.

The problem still exists --- I want to assign a course folder to my teacher who is responsible for the course id = 2, I still can't find course id =2 folder for him, what should I do?

But anyway, thanks for mentioning of webdav ---- an alternative to my Filezilla FTP client, and now what's next?
In reply to Dan Poltawski

Re: Where is the dataroot on Moodle 2.0?

by Michal Paraschidis -
Hi Dan,

Got a webdav question. I just set installed webdav patch but when I try to connect to resources it says that it can't find collection resourses:

domain01@localhost:~/user/htdocs/moodle195/webdav$ cadaver http://localhost/moodle195/webdav/moodledata-server.php/
Could not access /moodle195/webdav/moodledata-server.php/ (not WebDAV-enabled?):
Did not find a collection resource.
Connection to `localhost' closed.
dav:!>


In reply to Dan Poltawski

Re: Where is the dataroot on Moodle 2.0? -- PLease help

by Michele Balazs -
Hi Dan

I am desperate to get webdav working on the latest version of moodle. I have applied the 1.9 patch but no permissions appear in the list.

Also when I try to connect, I keep getting prompted for a password and then sent to a default view.

I have set installed the approp modules in apache but not sure what I need to add to apache conf to enable for moodledata directory

regards

Mich
In reply to Michele Balazs

Re: Where is the dataroot on Moodle 2.0? -- PLease help

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Is there anyone who can give us - in plain English - a step-by-step procedure to get webdav working in Moodle 2.0 ? I'm interested, as I've been waiting for this feature ever since we gave up WebCT for Moodle at my institution about 6 years ago!
Joseph
In reply to J. Chan

Re: Where is the dataroot on Moodle 2.0?

by Alan Thompson -
In my local install, i created 1 course and uploaded 1 file.
There was then created under filedir a single file warning which states

"This directory contains the content of uploaded files and is controlled by Moodle code.
Do not manually move, change or rename any of the files and subdirectories here".

Also, the PDF file i manually uplaoaded is nowhere to be seen, but the file does exist, with an encrypted name, and no file extension.

It would appear that currently at least there is no bulk file upload or move facility.



In reply to Stephen Bourget

Re: Where is the dataroot on Moodle 2.0?

by Gavin Henrick -
Picture of Plugin developers
Adding here too, so people can see this in practice how to enable to FTP and how it works from admin, ftp and teacher points of view - its very easy.

Welcome back FTP! smile

http://moodle.drupalgardens.com/article/tue-06152010-1918/ftp-files-moodle-20-repository-api

Its sorta hidden gem of functionality which needs some thought in implementing but once done is quite superb.
In reply to Stephen Bourget

Re: Where is the dataroot on Moodle 2.0?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Indeed there appears to be. This must be a separate thing from the "normal" repository (where uploaded files go). Unfortunately, save for a few bug reports, it seems to be largely undocumented.

So, I assume, neither moodledata nor moddata then.

This is all I could find about it...
http://tracker.moodle.org/browse/MDL-18520
In reply to J. Chan

Re: Where is the dataroot on Moodle 2.0?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Yeh - I think this is going to be a big issue for people dealing with large files. I could have missed something but there will be a requirement for a "non-web" way to upload large files. Mary, I don't think webdav makes any difference as this is really only an alternative to FTP - it doesn't solve the problem of Moodle having to "know about" the file.

One simple option I have seen in other applications is that when "uploading" a file there is an option to find the file on the local filesystem. So, you upload the file using FTP and then go to Moodle to add it into the Moodle file repository (and attache the metadata etc.).

Maybe someone is thinking about all this and I have missed it? Don't know....

I have a feeling that the "new stuff only created in Topic 0" thing has been around for quite a while. I was beginning to think it was a "feature".

BTW... did I mention how much I hate not being able to name topics, especially as they are now heavily used for navigation big grin
In reply to Howard Miller

Re: Where is the dataroot on Moodle 2.0?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Howard

BTW... did I mention how much I hate not being able to name topics, especially as they are now heavily used for navigation

Oops, I had not noticed this new "feature". I would at least expect the topics' names in the navigation to be named after their "summary" name...
In reply to Joseph Rézeau

Re: Where is the dataroot on Moodle 2.0?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
In reply to Howard Miller

Re: Where is the dataroot on Moodle 2.0?

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Looks like I've already voted - pity you can't vote twice.....
In reply to Mary Cooch

Re: Where is the dataroot on Moodle 2.0?

by J. Chan -
In reply to J. Chan

Re: Where is the dataroot on Moodle 2.0?

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Hi,

today I've released a desktop application I've made in my spare time.

It's a webservice Moodle 2 client and multiple file uploader (nowadays single files not full directories but I'm working on it)

http://sites.google.com/site/mooconsole/

It's not a FTP client, it uploads multiple files using the File Browser repository so the file size it's limited by Moodle configuration/server configuration.

One of the advantages is that any moodle user can upload files using this application without server configuration changes

It should be plenty of bugs, please, notice is an alpha version

It's multiplatform (windows,linux,mac) thanks to python smile

Regards
Average of ratings: Useful (1)
In reply to Juan Leyva

Re: Where is the dataroot on Moodle 2.0?

by Haitham El-Ghareeb -
Hi Juan

Nice application. Thanks for your time and sharing. I really have some questions about the application and how you use Moodle 2.0 Web services:

1 - The application didn't work with Web services when I provided only Web services username and Password, it needed the token too. Not a problem actually, I just thought about sharing the notice.

2 - My main question goes here: I would like some help from you regarding how can I add a reference to those Web services in Netbeans. I am trying to write a Web application (Java EE) that utilizes those Web services, and I couldn't add the Web services to my IDE.

I have downloaded your app, and it is working fine with me. Moodle 2.0 Test client is working fine with me too.

Simply: I don't know the Web service URL to utilize in Netbeans.

Would you please help me ?

Thanks
In reply to Haitham El-Ghareeb

Re: Where is the dataroot on Moodle 2.0?

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Hi Haitham,

take a look at:

http://docs.moodle.org/en/Development:Creating_a_web_service_client

  • SOAP: the current SOAP server is based on the Zend SOAP sever (itself based on the PHP SOAP sever). Zend publishes a Zend SAOP client. The current server implementation doesn't work with Java/.Net because we didn't generated a fully describe WSDL yet. If you are working on a Java/.Net client, follow or participate to the tracker issue MDL-20804
I think this is the problem you have

I recommend you implement the WS client using REST. I'm sure you will find a lot of tutorials in Google regarding JAVA + REST

Regards
In reply to Juan Leyva

Re: Where is the dataroot on Moodle 2.0?

by Haitham El-Ghareeb -

Hello Juan

Exactly ! This is what I have came up too after almost a week of research and working..

Thank you so Much...

I really appreciate your response.

In reply to Juan Leyva

Re: Where is the dataroot on Moodle 2.0?

by Nicolás Gómez -

Hello Juan,


As far as I have tested, it seems a great application, but I still can't upload any file. I have tried with a local instalation (i.e. my own computer) and with a "remote" instalation (with my SaaS provider). Is there any aditional configuration prior to upload files? Thanks and best regards.