extra characters added -- breaks image src link .jmt

extra characters added -- breaks image src link .jmt

por Tim Burns -
Número de respostas: 2

Dear Group,

The closest I could find searching was    http://tech.groups.yahoo.com/group/hotpotatoesusers/message/18210

Here's my problem:

The drag & drop matching activity is built and displayed on my local machine. One I upload it to a repository, or to the activity directly (using the picker), it breaks. When I look at the source local, it's what we would expect

<img src="4thjuly.jpg" ... >

However (broken) source on the server is compromised thus:

<img src="http://moodle2.ischolars.net/pluginfile.php?file=/514/mod_hotpot/sourcefile/4thjuly.jpg" ... >

where the "... >" is attributes & agree in both locations. (yes the slash is between the equal sign and 514)

Tb

Em resposta a 'Tim Burns'

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

por Tim Burns -

Possibly fixed... 

Debugging was on. The setting that said "Breaks XHTML, JS, and your HotPotato images" was checked.

still a few other images not displayed, but possibly leftover from 1.9 upgrade. (some are in "Books", a whole different beast.)

sorriso

Em resposta a 'Tim Burns'

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

por Gordon Bateson -
Foto de Core developers Foto de Peer reviewers Foto de 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