Relative path ignored (but NOT only by HP or TC)

Relative path ignored (but NOT only by HP or TC)

by Philippe Decloitre -
Number of replies: 2

Hello Gordon and everyone,

I've hit on a problem which I've not been able to find an anwer for in other Moodle forums and now is also plaguing my HotPots.

I have html files (in this case HP's), that contain other embedded files (pics, videos and the like).

They work fine on one Moodle site (was my test Moodle) and don't on another (supposed to be my prod. Moodle.

The Moodles are the same (same builds), the server is the same.

Here is the issue:

When reaching for a relative path Moodle is statting from root level rather thant from the relative activitie's reference:

So, if I have a file refering to :  "img/my_image.jpg" instead of starting from 

https://mymoodle.com/pluginfile.php/965/mod_taskchain/sourcefile/.../

and then adding to the path the ressource: img/my_image.jpg

It just looks for:

 https://my moodle.com/im g/my_ima ge.jpg

...and of course finds nothing!

Have you ever seen anything like this??

Thank you so much!

Philippe

Average of ratings: -
In reply to Philippe Decloitre

Re: Relative path ignored (but NOT only by HP or TC)

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Phillipe,

could you rebuild your TaskChain on my test server.

If you have problems there, I will investigate. If not, please could you check the version of TaskChain being used on the site your are having problems with, and let me know what you find out.

regards
Gordon

In reply to Gordon Bateson

Re: Relative path ignored (but NOT only by HP or TC)

by Philippe Decloitre -

Many thanks Gordon!

I was about to go eahead and answer your (as usual) very nice proposal.

However Tim Hunt found the glitch: a parameter at admin level that says whether you need a slash or not before your relative paths.

His full answer can be found here.

Thanks again Gordon and as we say: "à charge de revanche*" smile

Philippe

*I owe you one