Reading Text Doesn't Show Image in Moodle

Re: Reading Text Doesn't Show Image in Moodle

by Gordon Bateson -
Number of replies: 0
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Thanks for uploading your quiz files and the image to my server.

I noticed that you had specified the url of the image as:
But actually at the moment there is no file in that location, which is why no image appears in the quiz. If you specify a valid absolute URL (one that starts with "http://") for the image, it will display as required.

If you want to use the image that is in the same folder as the quiz file, I recommend you use a relative URL to specify the image. In this case, you can use simply "shgingerpg3.jpg", so the <img> tag would be:

<img src="shgingerpg3.jpg" alt="Shorthand Gingerbread Story" title="Gingerbread" width="435" height="775">

On the JQuiz page with a "reading", the two columns require just under 50% of the page width each. If the reading contains an image, then the left hand column cannot be any less than than the width of the image. If the width of the image is greater than 50% of the page width, then the right-hand column begins to slide on top of the image. At the moment, the image is a little to wide for many screens, so I suggest you reduce it in size to 410 x 698.

Finally, you had used a style setting of "float: left;" on the <img> tag and surrounded the whole tag in a table, neither of which is really necessary.

Putting that all together I suggest you use the following to insert the image into the reading text:

<div style="text-align:center;"><img src="shgingerpg3.jpg" width="410" height="698" title="Gingerbread" alt="Shorthand Gingerbread Story"></img></div>

You can see the result in the attached screeenshot.

Happy Easter!
Gordon
Attachment jquiztest.screenshot.gif