extra characters added -- breaks image src link .jmt

Re: extra characters added -- breaks image src link .jmt

by Gordon Bateson -
Number of replies: 0
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Tim,
could you clarify what the exactly the problem is that you're experiencing. Do I understand correctly that images in your JMatch are not displaying when you add the JMatch to your Moodle course as a Hotpot activity?

In that case, please ensure you have uploaded the images to the same place that you uploaded the JMatch file to (i.e. the "Source file" area of you HotPot activity).

Another thing you could try, is to enable the "Use slash arguments" setting (Site administration -> Server -> HTTP).

> However (broken) source on the server is compromised thus:
> <img src="http://moodle2.ischolars.net/pluginfile.php?file=/514/mod_hotpot/sourcefile/4thjuly.jpg" ... >

Actually, this is not compromised or broken. This is the abolute URL required to access the jpg file for your HotPot activity. If you put the jpg file in the "Source file" area for the HotPot activity, it becomes accessible to the web via this URL.

FYI, if the URL was left as a relative URL, i.e. "4thjuly.jpg", then your browser would send a request to the server for the following file:

  • http://moodle2.ischolars.net/mod/hotpot/4thjuly.jpg

As you can see, this URL points to the HotPot module scripts folder, which is not what we want. That is why the HotPot module converts all relative URLs to absolute URLs that point to the "Source file" area for the relevant HotPot activity.

> The setting that said "Breaks XHTML, JS, and your HotPotato images"

There is no such setting. Perhaps you mean the "Display debug messages" (Site administration -> Development -> Debugging) which says it "breaks XHTML, JS, cookies and HTTP headers in general" ?

regards
Gordon