audio files in HotPot

audio files in HotPot

by Paul Allum -
Number of replies: 25

I'm ashamed to ask such a basic question but using Moodle 2.0 I cannot see how to upload the audio file that accompnaies a Hotpot exercise.  The only upload option seems to be through the 'add an activity' option on a course page.  such an activity then appears in the course e.g. adding a JQuiz activity 'Listening' results in a link to that appearing on the course page.  obvioulsy I don't want the audio file to appear as a link on the course page.  so how do I upload it so that the HotPot exercise can access it.  it seems the 'files' area has gone...

sorry I cannot find the answer in any FAQ etc.

Average of ratings: -
In reply to Paul Allum

Re: audio files in HotPot

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

Hi Paul,
welcome to the brave new world. Files in Moodle 2.x are different, very different from Moodle 1.x.

In Moodle 2.x land, we are encouraged to disgard the notion of "Course files" containing files that may or may not be shared between activities.

Instead, each activity has it's own files area. If you want a HotPot JQuiz to use an audio file, you should add both the JQuiz files and the audio file into the "Source file" upload area for the HotPot.

If you want to use the same audio file in several HotPots, you have to upload it to each of the HotPots. If you change the audio file, you must upload it again to each HotPot in which it is used. If you also want to offer the audio file to the students as a resource, then you have to upload it again, separately, to the resource.

Similarly and thusly, if your HotPot uses several images or sound files, you have to upload them all to the "Source file" area for that HotPot.

In Moodle 2.3 you can supposedly "link" files to a single source file, and you can also supposedly keep your files in a folder on the server's hard disk and use that as a "repository". That should allow you keep a single source folder on your server's hard disk to which you can upload files, and then the latest versions of the files should appear in your HotPots and Moodle resources. Unfortunately, it doesn't work, at least it doesn't work as I expect it to. Somewhere along the way the files get cached, and so although you update the source files in the "repository" folder on the server's hard disk, Moodle will cheerfully offer up the out-of-date version of the file, apprently completely unaware that there is a new version of the file in the repository. 

That is my experience anyway. YMMV.

I am still searching for way to do in Modole 2.x what we were able to do very easily in Moodle 1.9, namely to upload files to a place on the server from where they could be shared between several Moodle activities, and from where the latest version of a file was always available and was used as soon as it was updated. I haven't been able to do that yet in Moodle 2.x. If anyone finds a way, I would be very grateful if they could share their knowledge on this forum.

regards
Gordon

In reply to Gordon Bateson

Re: audio files in HotPot

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hello Gordon. (I just learned YMMV from you by the way) Are you saying that linking from Private files doesn't work either  -or that if you do, Moodle is caching the files so it doesn't work? I keep meaning to try this with HotPot files in 2.3 but haven't got round to it yet.

In reply to Gordon Bateson

Re: audio files in HotPot

by Paul Allum -

Hi Gordon,

Thanks for a really quick reply.  But I regret to say my aging wits cannot work out how to a'dd both the JQuiz files and the audio file into the "Source file" upload area for the HotPot'.  The only way to upload offered to me is through the 'Add an activity' or 'add a resource' in the course page.  I'm sure I'm missing something obvious.  So sorry to ask but wouyld appreciate directions.

Paul

In reply to Paul Allum

Re: audio files in HotPot

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

Hi Paul,

you know the "Add ..." button that you used to add the JQuiz file to the "Source file" area of the HotPot activity? Well, click it again and you can add the audio file too smile

cheers
Gordon

In reply to Gordon Bateson

Re: audio files in HotPot

by Paul Allum -

Hi Gordon,

I know how busy you are so hesitate to pursue this as I'm sure I've got a blind spot.  However, adding the file as you suggest results in no sound.  The media player object is there and the file is saved and uploaded with the HP exercise.  Everything works fine on my own computer or on my web page outside of Moodle.


At a loss.


Paul

In reply to Paul Allum

Re: audio files in HotPot

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

Hi Paul,
could you possible upload your JQuiz and audio file to my website so we can look at it together ?

regards
Gordon

In reply to Gordon Bateson

Re: audio files in HotPot

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

Hi Paul,
thanks for letting me have a look at the JQuiz html file.

The reason that the audio file does not play is because you have used the following URL to specify mp3 file:

  • ../0507/disabled _doll.mp3

What you are specifying here is that in order to locate the mp3 file, the server should go up one level (that's what the ".." means) in the folder hierarchy, then down into a folder called "0507" and finally fetch a file called "disabled _doll.mp3".

However, when you set the files up for the HotPot activity, you simply uploaded both the html file and mp3 file into the top level of the HotPot source file area. The server can find the html file, but it can't go up a level, and it can't find a folder called "0507", so it is unable to find the audio file.

To remedy this situation then we can do either of the following:

  • EITHER modify the URL used to specify the mp3 file so that it matches the way the files are set up in the HotPot activity
    • i.e. use just "disabled _doll.mp3"
  • OR rearrange the files in the HotPot activity so that the folder hierarchy there mirrors the set up you use on your computer. Probably this means ...
    • create two folders called "htmlfiles" and "0507"
    • put the html file into the "htmlfiles" folder
    • put the mp3 file into the "0507" folder.

In the place on the "Updating HotPot" page on my server where you uploaded the two files, I think you can see the "Create folder" button? You can use that to create the folders. Then if you click on the little icon to the right of the each of the html and mp3 files you will see a submenu of actions you can do with the file. One of those actions is "move" so click that and then move the file into the appropriate folder.

Once you have moved the files, I believe the audio file will play.

Oh, you may need to change the "Use media filter" in the "Display" section of the "Updating HotPot" page to "Moodle standard media filters" or "HotPot media filter".

If you need more help, doesn't hesitate to ask smile

regards
Gordon

In reply to Gordon Bateson

Re: audio files in HotPot

by Paul Allum -

Hi Gordon,

I realized how the path error occurred but it's an error on my part so not of general interest.  However, the remedy you suggested above has not worked.  The HP quiz and sound file are now at the same level and the path is correct.  And the filter is set to HotPot.  but no sound.


I have uploaded the latest versions.  Sorry this is so intractable and still feel it must be me but cannot see how.

Paul

In reply to Paul Allum

Re: audio files in HotPot

by Stan Bogdanov -

Hi Paul,

You're using the quicktime plugin to play mp3. Unless you have a good reason, you're leaving behind a lot of users.

Media plugins filters may not be able to handle quicktime that well (though I may be wrong in this assumption), so I'd suggest you 'switch over to flash, which has become sort of ubiquitous.

Just a suggestion.

Cheers

Stan

Average of ratings: Useful (1)
In reply to Stan Bogdanov

Re: audio files in HotPot

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

Paul,
I wrote a reply earlier to your post, but it was written in haste and not well thought out or researched, so I deleted it.

Instead, I would like to offer the following response ...

Having fixed the folder path, the next problem that the HotPot module had was finding the URL of the mp3 file. The file name, "disabled _doll.mp3" contains a space, and the HotPot module mistankenly thinks this is the end of the meda file name. The reason it behaves like is so that it can detect the situation where people have specified the mediafile name without quotes.

So, the solution to this problem is to rename "disabled _doll.mp3" to "disabled_doll.mp3", i.e. remove the space before the underscore, and then in the htm document change all "disabled _doll.mp3" to "disabled_doll.mp3"

There is one last piece to the puzzle. As Stan pointed out, the media player that you have chosen is not available in all browsers on all platforms. To ensure maximum accessibility, I suggest you set the HotPot "Use media filter" setting to either "Moodle's standard media filters" or "HotPot media filter" (see screenshot)

I have changed the settings and files on my server (in the "revised" folder for the HotPot activity called simply "HotPot" in section 3 of the "Course Fullname 101" course) so you can see exactly what changes I have made to get the quiz working.

regards
Gordon

Attachment hotpot.mediafilter.jpg
In reply to Gordon Bateson

Re: audio files in HotPot

by Paul Allum -

Gordon,

That is indeed the solution.  Thank you for really rapid and effective help.  I'd almsot say I'm in awe when I see how much support you give, but that might appear exaggerated to British sensibilities....  Thank you, too, to Stan for a good suggestion.

I had used an underline to join the two word file name specifically to avoid this problem.  But I failed to see the unintended space.

Paul

Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: audio files in HotPot

by John Partain -

Hi Gordon, Good evening! smile

I have a similar problem as the first post in this thread. I'm pulling my hair out trying to get a simple mp3 file to play in a listening exam in jquiz in Moodle 2.2.3

Reading your reply post this is what I've tried with zero results:

  • open jquiz and type a title in the title area "Please listen to the audio and answer the question below"
  •  After below click on "insert" and then "media file"
  • go to my private files in moodle> right click and "copy and paste the mp3 link in media file area"
  • add "windows media player" and "flash player"
  • click ok
  • save data file in a folder with the mp3 file
  • go to my moodle course and add an activity "hot pot"
  • type in a title
  • in the source file area upload the data file and the mp3 file
  • click on save and display
  • exercise appears but no audio file

To do the same type of activity in 1.9;  I just uploaded the mp3 to my course files and copied and pasted the link from my course file into the media link box in jquiz> saved the data file> uploaded the activity into my course and bingo no problem.

Please help, I work as an EFL teacher in a University in Mexico and I've been pushing the teachers to do their listening exams in Moodle and now we can't get these to work using hot potatoes.

John smile

In reply to John Partain

Re: audio files in HotPot

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

Hi John,

you've made things more complicated than they need to be. Keep it simple.

Put the mp3 file, let's say its called "myaudio.mp3" in the same folder as your Hot Potatoes file. In your Hot Potatoes file, you don't really need to bother with the "INesrt" menu, just copy and paste the following HTML and change the file name to be the name of the mp3 file you are using.

  • <a href="myaudio.mp3">MP3 file</a>

Now upload the Hot Potatoes file and and mp3 file to the "Source file" area of your HotPot activity in Moodle. Set the "Use media players" setting to "Moodle's standard media filters". Then click the "Save changes" button.

If you continue to have problems, please attach a zip file containing your Hot Potatoes file, and your audio file to your next post to this forum.

thanks
Gordon

In reply to Gordon Bateson

Re: audio files in HotPot

by John Partain -

Hi Gordon, smile

Thanks for the quick reply! wink I followed your instructions and still no luck. Here is a screen capture of the activity once uploaded:

test listening exam

The problem I see is that I did this in the title area of the jquiz file and that doesn't appear here. What appears are the instructions that I didn't change in the "configure output settings". Could that be the problem? Can I add the html tag in the "configure output" instruction area?

What I want the activity to do, is for the audio to play and the students be able to answer three questions. I could make the audio play if I put it in the question area using Stan's instructions adding the mp3 player and the mp3 file, but I want the audio file to play above the questions. This worked fine in 1.9, I'm sure I'm missing something but I'm at my wits end.

I've attached the file as requested. Thanks a million for your help! smile

John

In reply to John Partain

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: audio files in HotPot

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Thanks Antonio approve

If you have time, please could you let us know what you changed in the file to get it working, so that John - and the rest of us smile, know how to fix similar issues in the future.

TIA
Gordon
In reply to Gordon Bateson

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to John Partain

Re: audio files in HotPot

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
John,
if you want to keep the audio player in the title area (where is says "Test Listening Exam" on your screenshot) that I think you need to go to the HotPot settings page (click the edit icon next to "Test Listening Exam" in your screenshot) and change the "Title" setting to "Get from source file". The "Title" setting is in the "Display" section fo the settings page. You may have to click "Show advanced" button in order to see the "Title" setting.

Otherwise, you could move your audio link to the instructions part of the quiz (where it says "Please look at the answer and choose the correct answer" on your screenshot).

BTW, shouldn't those instructions be "Look at the question ..."?

cheers
Gordon
Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: audio files in HotPot

by John Partain -

HI Gordon & Antonio, smile

Thanks to both of you for your help! I now have a listening exam working with audio. I took Gordon's suggestion and put html tag in the instruction area, seemed like an easier fix and better appearance. Here is an image of how I did it.

configuration

Then in my Moodle course I uploaded the audio and the jquiz in the source file area and set the jquiz as the main file.

Next I set the configuration in the activity to use Moodle media> save and display> and wala exercise is working with audio.

I wanted to upload the screen captures, but I can't for some reason. I get an error saying the png & jpeg are not correct formats, strange.thoughtful

Thanks to both of you for taking the time to work me through this. I really liked your method as well Antonio. wink It's great to be part of this wonderful Moodle community. cool

By the way Gordon, I did note in my original post that I didn't change the instructions, "What appears are the instructions that I didn't change". wink

Once again thanks a million! There will be a lot of happy teachers at the University thanks to you two! wink

John

In reply to John Partain

Re: audio files in HotPot

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

Well done John - glad to hear it is working.

I have one final suggestion, and that is to use [square brackets] notation instead of the link.

OLD: <a href="30Pista30.mp3">MP3 file</a>
NEW: [30Pista30.mp3]

The square bracket notation will only be affective when you deliver the quiz via Moodle, but I think it is a little more human readable, and therefore easy to maintain and modify.

all the best
Gordon

In reply to Gordon Bateson

Re: audio files in HotPot

by Patrick Verguet -

Hello Gordon

A great many thanks for this discussion and your last post which will save me a lot of trouble. smile

Being new to 2.x I had not realised there was an "advanced setting" to play an audio file directly through Moodle from an HP module, and had gone through a complex procedure of copying URLs from Moodle-rendered html files. Silly me ... blush

Still, I confirm what is said elsewhere: if I update the file in the source files box, the sound played is the initial version. thoughtful

Best regards

Patrick Verguet

In reply to Gordon Bateson

Re: audio files in HotPot

by John Partain -

Hi Gordon, smile

Sorry for the delay replying. Thanks for the advice, I will pass this on to my fellow professors as well. wink

I do have another issue though, When the students start listening to the audio and then click on the first answer, the feedback from the exercise appears "correct", "sorry try again" and then the audio disappears.

How can I resolve this? Use Antonio's suggestion or try moving it back to the title area as you suggested first?

I wanted to attach both the MP3 and the jquiz, but it exceeded the file size allowed, so I just uploaded the jquiz.

Thanks in advance! wink

John

 

In reply to John Partain

Re: audio files in HotPot

by Glenys Hanson -

Hi John,

I don't find the Instructions Field a good place to insert Audio, Video or Image files essential to the exercise for the reason you point out: the audio (or video or image) disappears as soon as the student replies.

I find it's better to insert them either in the Exercise Subtitle Field, the Reading Text  Field or the Question Field. Each can be more suitable depending on the type of exercise. I've learnt, through bitter experience, never to put anything but text in the Title field.

Cheers,

Glenys

Average of ratings: Useful (1)
In reply to Glenys Hanson

Re: audio files in HotPot

by John Partain -

Hi Glenys, smile

Thanks for the advice! I'll work on that right now and report back with my results.

I'm uploading listening exams in both 1.9 and 2.2.3, so all the help I can get now is more than welcome. I really don't have problems with 1.9 though. As a matter of fact reading your posts about ESL/EFL teaching using Moodle and comments and tips regarding John Stanford's, "Moodle 1.9 for Second Language Teaching" inspired me to start integrating Moodle into my language courses at the University.

Cheers! wink

John

In reply to John Partain

Re: audio files in HotPot

by John Partain -

Hi Glenys, smile

Well you were right now the exam is working without any problems. Thanks a million for the advice.

Actually Antonio suggested this as an alternative, but I thought the appearance of the activity was better in the instruction area, just doesn't work.

Here is how the activity looks:

test listening exam

Cheers,

John