Moodle data directory on local network whilst moodle running online

Moodle data directory on local network whilst moodle running online

by Xenothan Hojem -
Number of replies: 5
Hi

We are trying to configure moodle to run online but access the data directory of the local network.

For example: the moodle site will be hosted at http://www.domain.com/moodle

And then the datadirectory will be located on \\servername\moodledata

The reasoning here is that we are launching their moodle of our own site

This will mean that even though the website is hosted outside the network, users can only access the moodle from within their network. Also, this would reduce the amount of bandwidth used when displaying e-content

Is this possible?


Average of ratings: -
In reply to Xenothan Hojem

Re: Moodle data directory on local network whilst moodle running online

by Richard Enison -
XH,

The answer is yes and no, if I understand your question correctly.

Yes, I believe you can have the data folder (directory) on a different machine than Moodle, as long as it is addressable through the file system as a member of the same LAN. But no, I don't believe that access to that folder through Moodle would automatically be denied to users on the Internet. One could cause that to happen by modifying the source code of Moodle to detect whether the web browser was in the LAN or not, and refuse to serve files from or upload to the data folder if not. Then you would have to make sure that the modified code was included every time you upgrade Moodle, as with any custom code.

RLE
In reply to Richard Enison

Re: Moodle data directory on local network whilst moodle running online

by Xenothan Hojem -

Hi

I have been trying and having no success, it seems moodle can't write to a network share, unless that share has some sort of permissions on it to allow this.

The main reason for this whole exercise is to limit b/a usage by storing all the content locally at the client. hmmmmm.

Can one only store the content elsewhere, whils all session data, logs, etc remain on the moodle server?

Thanks for your input

In reply to Xenothan Hojem

Re: Moodle data directory on local network whilst moodle running online

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
"it seems moodle can't write to a network share, unless that share has some sort of permissions on it to allow this."

That would be a good thing surely smile

It depends what you mean by "the client". Are you trying to store information on user's local machines? Even if you could, that doesn't make sense to me at all.

You can only have one $CFG->dataroot, of course *that* could be a network share if you wished. You need to make sure that the connection is fast enough. I know next to nothing about Windows, but I understand that this can be a bottleneck.
In reply to Howard Miller

Re: Moodle data directory on local network whilst moodle running online

by Xenothan Hojem -
Perhaps I can change all the $CFG->dataroot references in the SCORM component to read from the network share?

Now just to figure out what to change, and what to leave...


In reply to Xenothan Hojem

Re: Moodle data directory on local network whilst moodle running online

by Richard Enison -
XH,

I think you will find that such an endeavor can only end in disaster, because there are indirect references to $CFG->dataroot in every component of Moodle, through function calls and classes and methods that are defined in other components. Fortunately, when you discover this, you can always go back to the original code, by downloading it again, if necessary.

RLE