Best way to add mp3 to hotpot in moodle

Best way to add mp3 to hotpot in moodle

Barfuss Ruge
Vastuste arv 13

- multimedia (images, audio, video, links) can be inserted with square bracket notation, e.g. [mysoundfile.mp3]

This sounds REALLY nice, but I figure that it is not an option on moodle 2.0 right now.

Så for hotpot activities added from the front page what would be the best way to add mp3?

I have a vague idea that there's at least3 ways:

  • Like this: http://hotpot.uvic.ca/howto/audio.htm (using local flash player and embed code) (That's how the exercises/mp3's that I want to add to moodle are done by now. I use a different code and player, though.)
  • Using "Insert media object" inside the hotpot interface when making the hotpot exercise
  • There's something called "filters" in moodle. I get the impression that I should more or less just write the filename with extension as a link and it will work.

I have experimented a little with all 3 ways, but none of them have worked for me up til now. So whitch method should I go for?

Thanks in advance.

Barfuss

Keskmine hinnang: -
Vastuses Barfuss Ruge

Re: Best way to add mp3 to hotpot in moodle

Stan Bogdanov

Hi Barfuss,

You're asking a tough question!

Adding audio and video in HotPotatoes is not 100% the same as adding audio and video to Moodle or to Moodle through HotPot and through QuizPort, (as Deborah found recently)  i.e. there are some differences that people need to be aware of. We all want to have THE one and only universal method but it's not happening yet.

So, the official tutorials (http://hotpot.uvic.ca/howto/audio.htm) tell you how to insert a flash player for the Web using their player, or another one. Players, however, don't differ much in that they should basically play the sound by using just the minimum necessary code. I have a small collection of players and the minimum code for each is downloadable (including the player).

Here we come to filters. If you want to include sound in Moodle, you can use the Moodle filters and the players that go with Moodle. Moodle uses filters to serve you the sound with a player. The code differs slightly in the URLs.

You can tell Moodle not to use filters and use the player you want and the one which you upload.

HotPot and QuizPort have 3 or 4 players available and you can use the square bracket notation (if you don't know or don't want to write the player embed code). Or you can tell HotPot and QuizPort to serve your hotpotatoes exercises with your player, in which case you also tell the Module (in the settings) NOT to use the HotPot filter; or you tell the Module to use the Moodle filter.

People who tried using javascript to dynamically display the player and the sound found that it's not working, for various reasons. So most of us now go the simple way: inserting an object with the minimal code for their players (without any filters) or the square bracket notatin method provided by HotPot and QuizPort (with the HotPot/QuizPort filters).

Hope this clears some of the confusion.

(I feel I should offer some examples, though.)

Cheers

Stan

Vastuses Stan Bogdanov

Re: Best way to add mp3 to hotpot in moodle

Gordon Bateson
Core developers pilt Peer reviewers pilt Plugin developers pilt

Barfuss

>> multimedia (images, audio, video, links) can be inserted
>> with square bracket notation, e.g. [mysoundfile.mp3]

> This sounds REALLY nice, but I figure that
> it is not an option on moodle 2.0 right now.

I have some good news for you - the square bracket notation is alive an well in the HotPot module for Moodle 2.0. If you are having problems with it, please upload a file to my testing server, so we can all work on it together.

cheers
Gordon

Vastuses Gordon Bateson

Ang: Re: Best way to add mp3 to hotpot in moodle

Barfuss Ruge

Glenys, Stan and Gordon - thanks so much for your help, I appreciate it a lot!

I have been too busy for a while, but now I'm back working on it nõustub. However I'm afraid that the work of the day have produced more questions than answers näitab keelt.

1) I have tested the brackets, and they work... but not the way I wanted them to. They make a link which opens the file in a separate player on my PC. Is there some setting which could give me an embedded player using square brackets?

2) There's filter settings in two places when I edit the exercise. A) In the screen I get when I create the activity (hotpot administration->settings). B) In the hotpot administration->filters (above logs). How do they interrelate? 

3) Can anyone see something wrong with this code? It works outside of moodle, but inside moodle the player doesn't show. There's just a small grey field the size of the player. (If I could get this code to work it would save me from rewriting the code for like 400 soundfiles in the exercises.)

<EMBED pluginspage=http://www.macromedia.com/go/getflashplayer align=6 src=ekstern_mp3_player_1.swf width=30 height=30 type=application/x-shockwave-flash FlashVars="TheSound=atuarpusi.mp3" loop="false" menu="false" quality="high" salign="LT" bgcolor="#e7e8e9"></embed>

I do this: I upload a zip with my test jqz, test mp3 and the .swf player (using hotpot activity from the front page). I unzip it in the same folder and set the jqz as main file.

I also tried to upload the zip to gordons server (quiz->eksternmp3), but there it wouldn't even load properly segaduses.

I attach the .zip.

Best regards

Barfuss

Vastuses Barfuss Ruge

Re: Ang: Re: Best way to add mp3 to hotpot in moodle

Stan Bogdanov

Hi Barfuss,

EMBED is ancient and not standard compliant! Don't use it.

Your GOOD code is this:

1: Single line without carriage returns in JQuiz!

<object type="application/x-shockwave-flash" data="ekstern_mp3_player_1.swf" width="30" height="30">
<param name="movie" value="ekstern_mp3_player_1.swf" />
<param name="FlashVars" value="TheSound=Atuarpusi.mp3&amp;width=30&amp;height=20" />
<param name="loop" value="false" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="bgcolor" value="#f2ebe3">
</object>

2: loop, menu, quality are optional and you can safely remove them.

3: file names are case sensitive

4: changed the background colour to yours to blend with the exercise page.

5: mind the quotations.

BTW, what does 'atuarpusi' mean?

Cheers

Stan

Vastuses Stan Bogdanov

Ang: Re: Ang: Re: Best way to add mp3 to hotpot in moodle

Barfuss Ruge

Thanks so much naeratus. This REALLY brought me a large step forward.

I guess I should keep myself updated about codes and stuff, but as long as it woks...

"Atuarpusi" means "You read" in Greenlandic. The materials I develop are (mainly) for teaching Greenlandic.

I understand that I will have to change the code in my exercises. Does anyone know a good tool for replace in multiple files silmapilgutus?

Best regards

Barfuss

Vastuses Barfuss Ruge

Re: Ang: Re: Ang: Re: Best way to add mp3 to hotpot in moodle

Gordon Bateson
Core developers pilt Peer reviewers pilt Plugin developers pilt

Search and replace tools (for Windows), in order of my personal preference

  • dnGrep
    open-source and free (Yay!). Allows regular expressoins in search and matched expressions in replace. lahe
  • InfoRapid
    freeware (if not used "commercially", otherwise 25 Euros). Slightly clunky interface, but does the job. Allows regular expressions in search.
  • WinGrep
    commercial ($30). nice interface, but doesn't handle multi-byte chars (e.g. Japanese, Hebrew). Can use regular expressions in search but cannot use matched expressions in replace kurvastab Keeps nagging "Do you want to save results?" tige
Vastuses Gordon Bateson

Ang: Re: Ang: Re: Ang: Re: Best way to add mp3 to hotpot in moodle

Barfuss Ruge

Thanks a lot naeratus!

Vastuses Barfuss Ruge

Ang: Re: Ang: Re: Ang: Re: Best way to add mp3 to hotpot in moodle

Barfuss Ruge

Thanks a lot naeratus!

I'm still wondering about the square brackets. According to this 1.9/ quizport answer http://moodle.org/mod/forum/discuss.php?d=117855 square brackets should insert the standard moodle player. But both on my server and on gordons test server square brackets opened the file in a player om ny computer.

The moodle media filter works in my html editor (moodle media button) so it's not because my moodle player is broken.

Maybe the feature isn't ready yet?

Best regards

Barfuss

Vastuses Barfuss Ruge

Re: Ang: Re: Ang: Re: Ang: Re: Best way to add mp3 to hotpot in moodle

Gordon Bateson
Core developers pilt Peer reviewers pilt Plugin developers pilt

Hi Barfuss,
could you give me a link to the specific activity on my server that doesn't behave the way you expect.

thanks
Gordon

Vastuses Gordon Bateson

Ang: Re: Ang: Re: Ang: Re: Ang: Re: Best way to add mp3 to hotpot in moodle

Barfuss Ruge

It's the 2.0 server:

Could it be some setting on my computer?

Best regards

Barfuss

Vastuses Barfuss Ruge

Re: Ang: Re: Ang: Re: Ang: Re: Ang: Re: Best way to add mp3 to hotpot in moodle

Gordon Bateson
Core developers pilt Peer reviewers pilt Plugin developers pilt

Thanks Barfuss. I see exactly what you mean. The media player is not being inserted. I will look at the that tomorrow. Out for now, Gordon

Vastuses Gordon Bateson

Ang: Re: Ang: Re: Ang: Re: Ang: Re: Ang: Re: Best way to add mp3 to hotpot in moodle

Barfuss Ruge

Hi Gordon

Thanks, that sounds great.

I'm not going to need the filter though, I was just testing. So it's no hurry for me.

Best Regards

Barfuss