Embed audio in Quizzes?

Embed audio in Quizzes?

by rick shepherd -
Number of replies: 44
In the new features for 1.2, I see:

* MP3 files are now streamed using a built-in Flash MP3 player
* Video files (Media player, Quicktime) are embedded using local plugins

However, this is in the "Resource" module. I would so like to embed media in Quiz exercises, so, for example, Sts can listen to something (or even watch, mpg or Flash) and then answer questions.

Is there:

a) a workaround?
b) a plan to implement this in future releases. If so, how soon?

Cheers

Rick

Average of ratings: -
In reply to rick shepherd

Re: Embed audio in Quizzes?

by Bryan Williams -
You mean like this!
In reply to Bryan Williams

Re: Embed audio in Quizzes?

by Marc Dastous -

Will video work in the same manner? For example, having the movie play above the question.

Marc

In reply to Marc Dastous

Re: Embed audio in Quizzes?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
The 'mediaplugins' filter (which is what adds the MP3 player) will support video too soon ... for some formats anyway.  What format were you planning to use?
In reply to Martin Dougiamas

Re: Embed audio in Quizzes?

by Marc Dastous -

I'm pretty flexible.  Right now, I have been creating *.ram files, embedding RP in a webpage and then linking to the pages.

Obviously, any format that is involved should allow for streamed video.

Marc

In reply to Martin Dougiamas

Re: Embed audio in Quizzes?

by Don Hinkelman -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Here in Sapporo, at least three of us are planning to use embedded video in quizzes and other activities. We are also flexible about format. Our order of preference is...
1. Quicktime
2. Realplayer
3. Mediaplayer
But any one is OK. Is that the question of format you were asking about?
In reply to Don Hinkelman

Re: Embed audio in Quizzes?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
OK, Moodle's mediaplugins filter now supports Quicktime (.mov) and Media Player (.wmv) files. It was a quick job so it probably needs testing and debugging in different situations.

Here is an
In reply to Martin Dougiamas

Re: Embed audio in Quizzes?

by Marc Dastous -

That is wonderful Martin;

Now my comments and questions are:

  1. I like that the image is not right clickable.
  2. How large is that file?
  3. Is is streamed?  And if it is, did you FTP the file or use the Moodle upload feature?

Realizing that multimedia files, especially video with sound can get very large very fast, this couls eventually become a concern.

Marc

In reply to Marc Dastous

Re: Embed audio in Quizzes?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
The file is 750k and yes, I uploaded it using Moodle. One wouldn't have to of course, you just have to put it somewhere on the web. As you can see here in this example I've linked to a movie file on a completely different site.

Video is large, there's no getting around it ... you can compress things as much as possible but to get certain levels of quality you need lots of bytes.

Quicktime can start playing files as soon as a small amount is downloaded.  (This is not exactly streaming, it is technically called "progressive display" but to the end user it works and looks about the same.)

Also, the movie should be right-clickable - it is for me.  Note that the link points directly to the file anyway.
In reply to Marc Dastous

Re: Embed audio in Quizzes?

by rick shepherd -
Martin, this is , as was said, great. However you say:

All you do is make an ordinary link to it. The plugin looks for links to media, then replaces the link with a embedded plugin

I am a complete newbie to this having only installed for the first time Friday last, so how do I:

"make an ordinary link to it"?

Also, the video types you have used for your demo, are mov and wmv. These don't appear under Mozilla under Linux, but are fine under IE under Win (the mp3 also works fine under Linux/Mozilla). As the mojority of my users have Linux (Debian) client machines with Mozilla, I would really like to be able to embed mpeg, as mpeg is the most generic media file format, part from avi. Any chance of being able to do this? And SWF?

Once this has been done, how do I "add" the necessary bits (or modify stuff) to/in my existing 1.2 install?

One last question, I haven't done a trial yet, but as Quiz supports images straight off,am I correct in assuming it will also support animated gifs?

Sorry to be a leech, but as I get into my project I promise to share any and everything I come up with that I feel will be useful, for the moment, I am at the beginnings of the learning curve.


Cheers

Rick
In reply to rick shepherd

Re: Embed audio in Quizzes?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

I don't know what plugins Mozilla on Debian has to play mpeg at all (if any) ... can you find out?

Supporting SWF is a good idea, I'll add that.

To install the latest filter, get the mediaplugin filter from the modules download page and unzip it into your Moodle "filter" folder (replacing the existing mediaplugin folder).

The filter needs to be enabled, as Moodle admin go to Admin -> Configuration -> Filters.

Adding links to content is as easy as pressing the Link button button in the HTML editor, then typing or pasting in a URL into the dialog.  Otherwise, you can manually type in HTML code that looks like:

<a href="http://somepathnamehere/file.mov">name of the link</a>

In reply to Martin Dougiamas

Re: Embed audio in Quizzes?

by rick shepherd -
Mozilla uses:

MozPlugger 1.3.1

for mpeg and ogg


Many thanks for all the help. Aren't there a lot of other folks out there developing using Moodle for Linux clients? Or am I on my ownsome here?

Rick


In reply to Martin Dougiamas

Re: Embed audio in Quizzes? Where is html editor?

by rick shepherd -
Sorry, but I'm in the Quiz editor and I don't see the html editor toolbar anywhere. Have I done something wrong? Rick
In reply to Martin Dougiamas

Re: Embed audio in Quizzes?

by rick shepherd -
It occurs to me that *.mid would be a useful format to support without using external applications. Very light and good enough for basic melodies. Plus there are lots of classical MIDs out there for free use.

Just a thought

Rick
In reply to rick shepherd

Re: Embed audio in Quizzes?

by Steve Garcia -
I've had trouble seeing anything "embedded" when I'm using Linux.  I think the problem is that embedding assumes that you will be using a specific application to view the content, whereas although we have applications that play the content just fine, it's not necessarily the same application the page designer had in mind.  A plain link often works, but an embedded link seldom does.

Which is why I was pretty surprised that the quicktime file in the above message seemed to work just fine for me here.
In reply to Steve Garcia

Re: Embed audio in Quizzes?

by rick shepherd -
Weird. Embedded mp3 works fine, as does Flash. it the videos which are a problem.

I've got Debian/Knoppix/Gnome

Rick
In reply to Martin Dougiamas

Re: Embed audio in Quizzes?

by Steven Day -
Brilliant! This solves my little problem with Quicktime and audio files. Now to change the autoplay and loop settings in the filter.php file.

I'm also wondering what might be a nice size compromise. For audio files saved as .mov a lot of negative space is occupied with the default settings. Yet making the size too small will make viewing video clips more problematic.

Any suggestions?


PS I just changed loop and autoplay to "false" under QT in the filter.php file. But I still have one audio and one video file that autoplay and loop.
In reply to Steven Day

Re: Embed audio in Quizzes?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Yes, audio files are a bit of a problem ... not sure what to do about them.  Unfortunately Quicktime does not support an "autosize" parameter which would solve that.

Note that filter processing can be cached on unchanged texts, that's why some of your videos probably seemed to have old settings still. The Filters admin page in your Moodle has info about caching.

In reply to Martin Dougiamas

Re: Embed audio in Quizzes?

by Steven Day -
Thanks Martin. I'll empty the browser cache next time. Things are working well, in any case.

The embedded-audio-in-quizzes option should go over well at the demo for language teachers next month.

Steven

PS Emptying the cache did not work. I'll check to make sure the movie files themselves are not set to autoplay. By default, they are not I believe.
In reply to Steven Day

Re: Embed audio in Quizzes?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
No, not the browser cache.  This one is on the server.

Moodle -> Administration -> Configuration -> Filters
In reply to Steven Day

Re: Embed audio in Quizzes? *Steven & Rick*

by Bob Calder -
Steven : OK, so what you see at this point is that the filter.php is doint what the flash junk would ordinarily do for you with regard to setting control paramaters for autoplay or having different skins or whatever. Moodle is taking care of mediating the user experience (sorry for using that phrase.)
Rick: There are very nice interactive HTML tutorials at: w3schools.com You hit the "Learn HTML" item in the left hand menu and go down to the spot where you learn links. It pops up an interactive window and you can see how ordinary links work. Then only thing it DOESN'T DO is show you how important paths are. Just make sure that the relative path to the resource is correct. The relative path is the one that goes from the current directory to the resource. You don't have to specify the full path from the root of the drive.
In reply to Bryan Williams

Re: Embed audio in Quizzes?

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Any chance of a screen shot (or text) of how you embedded that media?
In reply to Marcus Green

Re: Embed audio in Quizzes?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
All you do is make an ordinary link to it.  The plugin looks for links to media, then replaces the link with a embedded plugin.
In reply to Marcus Green

Re: Embed audio in Quizzes?

by Don Hinkelman -
Picture of Particularly helpful Moodlers Picture of Plugin developers
For screen shots of making embedded audio, see pages 73-78 of Matt's excellent teachers manual. http://moodle.org/docs/teacher-manual.pdf
In reply to Don Hinkelman

Re: Embed audio in Quizzes?

by Steven Day -
Quicktime problems:

I really like the idea of embedding audio in quizzes for listening comprehension.

Now my problem is this: the files I want to use are originally mp3, no problem. But after editing them with Quicktime, they are saved as mp4. I thought that changing the suffix to "mp3" during export may be a workaround to the related problem of mp4s not being recognized by the Flash Player/filter. But if I simply change the suffix to mp3, the buttons show up but the file won't play. If it is uploaded as mp4, it plays fine but the buttons/embedding function are gone. This reduces an important pedagogical component.

Any ideas?

Thanks in advance.
In reply to Steven Day

Re: Embed audio in Quizzes?

by Bob Calder -
Hey Steven. Quicktime is just a file wrapper. It will allow several compression codecs inside of itself. However, you should probably use an audio editing program. It will allow you to choose the appropriate codec and sampling rate.

Changing the file extention will not affect a computer's ability to play something. The compression algorythm will only be recognized by it's own decompressor. The file extention just tells the operating system to point a particular program at it.

mp3 files are made for low performance and convenient portability by design. You should not transcode them and edit them. Use the uncompressed source files. If you don't own them . . .
In reply to Steven Day

Re: Embed audio in Quizzes?

by rick shepherd -
Just a word. Don't edit mp3s. Converty them to *.wav using Music Match Juke Box (8.0 is free) and then edit using, for example Audacity

http://audacity.sourceforge.net (also free)

Then back to mp3 using Music Match

Use 44100 Khz throughout.

Rick

In reply to Bryan Williams

Re: Embed audio in Quizzes?

by rick shepherd -
Yes!! Exactly like this. How do you (and I for that matter) do this?

Cheers

Rick
In reply to rick shepherd

Re: Embed audio in Quizzes?

by Bryan Williams -

Moodlers,

Here is a little fact that may make school teachers and business trainers drool a little more onto their shirt sleeves over Martin's latest enhancement to the mediaplugin.  You can locate a QuickTime or MediaPlayer file on your organizations LAN/WAN file storage system, or even a local CD drive, that is connected with a Resource web page you create within Moodle. The simple example code shown below illustrates a page called Media Test, located on one of my Moodle sites, with a MediaPlayer file (Trainer.wmv) embedded which is located on my desktop computer. The advantage here is instant access to even large media files without latency, and no need for a streaming server. This solution will of course be viable only for resources that are used within a school or organizations network, as the link wouldn't work when the student tries to access at home (unless they go through a proxy server). I'll leave it up to each teacher/trainers imagination as to how to use the new feature, but time sensitive quizzes seem like a good one. Also, people offering paid courses can sell a CD that interacts with online Moodle resources. cool

Hope this is useful,

Bryan 

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Media Test</title>
</head>

<body bgcolor="#FFEECE">

<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center"><font size="6">This is a Test Page!</font></p>
<p align="center">&nbsp;</p>
<p align="center">
<embed width="320" height="280" src="C:\Documents and Settings\Owner\My Documents\My Videos\Trainer.wmv"><noembed>You need the latest Media Player</noembed></p>

</body>

</html>

In reply to Bryan Williams

Re: Embed audio in Quizzes?

by Bryan Williams -

Here is the same trick using HTMLeditor to create a locally connected resource. Please ignore screen capture weirdness.

quiz

In reply to Bryan Williams

Re: Embed Video in Quizzes?

by Don Hinkelman -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Do I understand correctly, Bryan, that a video file on a local CD or local server can only be accessed via a resource link?   That the embedded video feature that Martin just added is only for files uploaded into the moodledata folder?
In reply to Don Hinkelman

Re: Embed Video in Quizzes?

by Bob Gettings -
Hi Don,

The file can be accessed if it is uploaded to another folder on your moodle site too (i.e. a site inside or outside of your Moodle folder). You can upload the file separately fromm Moodle and then write the path name of the file inclucing the file name. For example, ../../Streaming/bob_intro.mpg will embed a sound file that I uploaded by ftp in the streamong folder of my Mac's Site folder.


However, writing the URL for a file on another server doesn't seem to work

doesn't seem to work.

Bob Gettings

In reply to Bob Gettings

Re: Embed Video in Quizzes?

by rick shepherd -
Bob, just for your info, this works fine.

Rick
In reply to rick shepherd

Re: Embed Video in Quizzes?

by Paul Duff -
Ditto, works here too...........
In reply to Paul Duff

Re: Embed Video in Quizzes?

by Bob Gettings -
Ah..... welll.... I guess I should say that it didn't work in my Moodle.... I guess because I got the file name for my own file wrong clown sad dead


Thanks for pointing it out! I thought that I wasn't able to use URL's properly for quite a long time now surprise

My next utterly stupid post should be comming around in a week or two big grin black eye clown

In reply to Bob Gettings

Re: Embed Video in Quizzes?

by Hideto Harashima -

I wonder why and how some people get an audio controller with a slider bar like this (Bob's posting above), and I get only the play and pause button.

Also, I woder if there is a way to show the audio controller as a link when I try to add an audio as a "resource" module. What I mean is I want my students to stay on the current page, without jumping to the audio player screen, when they click my audio resource file. The current screen should stay still as if nothing went on except the actual sound and the sliding bar. I think it's cool.

Does anybody know how to do this?

Hideto

In reply to Hideto Harashima

Re: Embedding Audio in Quizzes

by Don Hinkelman -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi Hideto,

The reason you see an audio button with a slider bar is because this moodle site is using version 1.4.4+.  You are probably using an slightly older version.  If you upgrade from 1.4.3 or anything older, you will see the same slider bar.

Now to avoid the students jumping into a separate window for audio player, you can do either of these two things.
  1. make the link to the audio file very tiny, so students do not accidentally click on that blue link.   I usually make the link on just a "."
  2. you can also remove that secondary blue link totally by doing a hack into the moodle code.  Go into /filter/mediaplugin/filter.php and edit the PHP like this.  Find all six times you see  \\0 and change those to \\4  . 
In reply to Don Hinkelman

Re: Embedding Audio in Quizzes

by Ray Lawrence -
make the link to the audio file very tiny, so students do not accidentally click on that blue link.   I usually make the link on just a "."

Even better than that, it will work with a space i.e. press space bar and link to the space created.

Ray
In reply to Don Hinkelman

Re: Embedding Audio in Quizzes

by Hideto Harashima -

Thanks Don and Ray.

I use moodle 1.5 dev. with Winows, but still get the simplest controller. (strange) black eye

Even better than that, it will work with a space i.e. press space bar and link to the space created.

Yes, I can do that, but still this is not what I want.

I think Don and Ray are embedding audio in a "web page resource" (or forum or quiz). In that case, students still have to jump to that page from the course front page, whether the link may be set within the same window frame or to the new popup window.

I want to use audio files to voice navigate the course. I want my students to stay on the course front page. I want to paste an audio file to one of the topic (or week) frame of that page by going "Add  a resource" --> "Link to a file or web site" --> set the "Location" to the target audio file --> "Save changes".

As a result of this I want to see only the speaker icon Resource and the sound controller inside one topic (or week) frame of the course front page. I wonder if there is a way to hack this. I know one way to go about this is to paste the icon and the link to the topic (or week) description, but I want this to be realized as a "resource" -- more flexible that way.

Can anybody help me?

Hideto

In reply to Hideto Harashima

Re: Embedding Audio in Quizzes

by Ray Lawrence -
Hi Hideto,

Please accept my apologies but I'm still not quite understanding what you are trying to achieve. sad

However, if you want the sound file on the course page could you use the Label Resource to achieve this? Or in a Topic summary?
In reply to Ray Lawrence

Re: Embedding Audio in Quizzes

by Hideto Harashima -

Yes! "Label" does it! Thank you, Ray. kiss

I've had difficulty understanding the explanation of "Label resource", whether in Enlish or in Japanese, until today, but now I can move around my audio file across topics, and students can stay still on the course page while listneing to the voice navigation/instruction. Great! This is what I've wanted.

My 1.5 dev may be too old (last August version), Martin. I'll change it to 1.5 beta next week.

Hideto

In reply to Don Hinkelman

Re: Embed Video in Quizzes?

by Bryan Williams -

Don,

All modules that support Moodles HTML editor will allow you to link a QuickTime or MediaPlayer file, thanks to Martins latest enhancement to the mediaplugin filter.  I used a Resource activity in my example, but you could do the same thing in creating a media rich Glossary for example.  The idea here is that you don't need to upload the media file to Moodle, or as Bob G. has done, to another storage site. By locating the media file on a CD, which the student uses on their computer, you avoid all the problems that trying to stream large media files over the internet presents. The student gets the CD from class, the library or in the mail if it's a paid course.  One just links to a media file location on the CD when creating the activity using the HTML editor, making the interaction between online assignment and offline viewing fairly seemless.  There is a bit of code that would need to be created to help arbitrate different CD drive letters, but this could be worked out.

Bryan