"Displaying a website index page" not working

"Displaying a website index page" not working

by Philippe Decloitre -
Number of replies: 6

Hello everyone,

This post is a duplicate (though reworded) to my latest in "repository", but since no one ever visits that one, and since I cannot delete it, I figured I might as well take a chance here (if Mary allows..Lol)

Here we go:

http://docs.moodle.org/27/en/File_resource_settings states that it is possible to have an index.html page that links to other sub-folders.

It it usually works pretty well.

Except that on the latest install of Moodle at our uni, I encouter this porblem:

Instead of going relative from the index file, Moodle looks for the sub folders at root level (and obviously sends an error message).

'file not found"

And (in the browser) the path  its looking for is : 

https://mymoodle.com/co/guideWeb.html

https://mymoodle.com  : that is the root (and correct)

co/guideWeb.html  : this is the relative path where the sub folders are.

On other intallations of Moolde I usally get something like

/pluginfile.php/1034/mod_resource

in between...

Is there anything that may cause this "Moodle-centric" behaviour? smile

Thanks for your help!


Average of ratings: -
In reply to Philippe Decloitre

Re: "Displaying a website index page" not working

by Philippe Decloitre -

Hello everyone,

Jsut trying to know:

Is my question too difficult to answer or in the wrong forum?


Thanks

In reply to Philippe Decloitre

Re: "Displaying a website index page" not working

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Your question is fine smile I personally don't have a good answer. The only think I can think of is that years back in Moodle 1.9 I used to upload games which were basically a swf file, an html file and another file (some CSS probably) all linked together like yours. I uploaded exactly the same game into two Moodles of the same version and in the same way. In one Moodle the game displayed perfectly but in the other Moodle the paths just did not connect and I never found out why sad All I could think of, and all I can think of now, is there is some difference in the way the files are hosted or displayed or with permissions on different servers.

In reply to Mary Cooch

Re: "Displaying a website index page" not working

by Philippe Decloitre -

Thanks Marry,

I was so impatient for an answer, I though you were away wink

You answer shows It's not just me...

I know you're very up to date on this, so if anything comes up think of me...

Thanks anyway.

In reply to Philippe Decloitre

Re: "Displaying a website index page" not working

by Christoph Ruda -

Hi Philippe,

Could you please provide a little more detail about the versions of Moodle you're referring to (latest install, versions that worked)? I had a bit of trouble myself understanding the way Moodle 2 display 'mini websites'. The link to the docs page you've included describes how to create a file resource that consists of a number of files with one 'main' file being the one that's called when the resource is accessed. If this main file is an index page of a web site and the other files of that web site are part of the same file resource then calling the index page will enable the mini web site contained within the file resource.

This is how I got it working. I am currently not aware of another way of achieving this. Creating a fie resource containing an index page that points to a subdirectory on the site isn't working for me, but perhaps there is a way of achieving this.

Hope this helps.


Christoph

In reply to Christoph Ruda

Re: "Displaying a website index page" not working

by Philippe Decloitre -

Hi Christoph,

Thanks for stepping in!

I am problably not being very clear: the "subdirectories" are folders that are in the same "ressource".

In other words, I upload the whole minisite as a *.zip file into a "file ressource" I have created in the course, just ike any other ressource.

So, to have a minisite working  (one index.html page and a number of folders), I work the same way you describe .

My problem is that though I am working with indentical Moodles (2.6) on the same server, one is working the other is not.

The one that is not working is going straight to the root of moodle.

When the index file calls for "/thisfolder/this file", Moodle goes to http://mymoodel.com/this folder/this file.

When it should go: http://mymoodle.com/pluginfile.php/1034/mod_resource/content/7/ this folder/this file.

The part in blue in made up just for the sake of the example.

But some kind of internal database info should be there to tell Moodle where to start from,

Because it's missing, it's going straight from the root (and fails of course).


The problem is: how is it that it works just fine on my dev moodle and not on the prod one.

They are the same, run by the same admin...

Anyone for an answer?

Thanks to all!




In reply to Philippe Decloitre

Re: "Displaying a website index page" not working

by Philippe Decloitre -

For those interested...

Thanks to Tim Hunt the answer can now be found here.


Average of ratings: Useful (1)