images do not show and audio won't play

images do not show and audio won't play

by Zeshan Bilal -
Number of replies: 6
Hi,

Thank you for this excellent hotpot module.

I have to use a http static(http://www.yourdomain.com/folder/file) url for the images and sound to work. I have tried to upload the image and sound files in the hotpot folder where the hotpot quizes are stored but it doesn't work.

When viewing the hotpot activity I see a place holders for images but no images. hotpot is trying to locate the images in a url like this:

I think a wrong slashargument is being used in hotpot module. It needs to be file.php?file=/






Average of ratings: -
In reply to Zeshan Bilal

Re: images do not show and audio won't play

by Thomas Robb -
Could you please try this modified version of hotpot.php and see if this solves the problem? I can't easily test it, so I'm relying on you!

It replaces the hotpot.php file found in moodle/mod/hotpot/
In reply to Thomas Robb

Re: images do not show and audio won't play

by Zeshan Bilal -

Now hotpot is trying to locate the image at this url:

http://www.mydomainname.com/moodle/bed.jpg

The image isn't there so it doesn't show. Same go's for mp3 file.

In reply to Zeshan Bilal

Re: images do not show and audio won't play

by Thomas Robb -
Please send me an e-mail directly and provide access information to the course where you have placed the hotpot module.
In reply to Zeshan Bilal

Re: images do not show and audio won't play

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

Hi Zeshan,

from my experiments (using Moodle 1.4.3 and the HotPot module v.20040305), the graphics and videos work OK in a HotPot quiz as long as you have the mediaplugin installed (download from http://moodle.org/download/modules/#filters) and enabled (add to the list of Filters in Admin Configuration Variables) and use a <BASE> tag in the head of the HotPot quiz. 

I tried creating a HotPot quiz using a gif in one question and an mpg in another. The links were specified relative to the quiz file, like this

  • insert a <BASE> tag into the HotPot quiz
    • Options->Configure Output->Custom, Code for insertion into <HEAD> tag
    • <BASE href="http://your-server/moodle/file.php/xx/">
    • "xx" is the course number, and I think the trailing slash, "/", is important
  • link for the image file:
    <IMG src="images/images-and-videos/q1.gif"></IMG>
  • link for the video clip:
    Watch <A href="images/images-and-videos/q2.mpg" target="_blank">this video</A>

I uploaded the quiz and media files to the Moodle server using the "Files" menu option for the course.

I could then view the quiz "raw" (i.e. not via the HotPot module)
http://bateson.kanazawa-gu.ac.jp/moodle/file.php/12/images-and-videos.html

... but the mpg file did not play sad

The key to solving that problem was to ensure the media plugin was installed (check there is a "mediapugin" folder in Moodle's "filters" folder) and then enable it (from the site's front page, choose Configuration->Filters, then move "Multimedia Plugins" to the "Active" list)

I was then able to view the video clip smile

Next, I used Tom's HotPot module (not the most recent one) to add the quiz to the course as a "Hot Potatoes Quiz". Both the image and the video clip displayed wihtout a hitch. Here's the quiz:
http://bateson.kanazawa-gu.ac.jp/moodle/mod/hotpot/view.php?id=97

hope this helps, and if you have time to report back to this thread on what happened, I would be very interested to read about it smile

In reply to Gordon Bateson

Re: images do not show and audio won't play

by Dave Ray -

Hi Gorden,
         Can the grading be incorporated into the moodle
data-base? This file loaded in about 3 min. with cable
modem in US. Thanks.

Dave

In reply to Zeshan Bilal

Re: images do not show and audio won't play

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

Hello Zeshan,

this Gordon Bateson again. I have been in contact (offlist) with Tom and am working with him to try to find a way round this problem.

I would like to see the phenomena you are describing first hand, and so I wonder if you could pass on the URL of your website to me, either via this list or a personal email to gordon at-sign kanazawa hyphen gu dot ac dot jp ?

many thanks in advance
Gordon