Finally audio and video in multiple choice question

Events happening in the community are now at Drupal community events on www.drupal.org.
DigitalFreak's picture

After investigation for 3 days, finally I am able to show audio and video in a question within a quiz!

What I used are D5, Quiz 2 module, Upload module, SWF tools module.

  1. enable Upload module
  2. install SWF tools module, please follow the install instruction here http://drupal.org/node/303203
    and if you got a question about swftools , please go to the FAQ here http://drupal.org/node/318728
  3. I have installed the 1 pixel out and JW player for audio and video (it is not include in the module, you need to download somewhere else), indeed the "generic mp3/flv" player comes with module do a good job at least in displaying the audio.
  4. get Quiz 2 module and follow the README to install it
  5. enable all module and grant corresponding permissions
  6. go to admin->input format to allow the "swf" tag as an input filter
  7. go to create a multiple choice question, for me a create a question of "what sound is this?"
  8. then I uploaded the sound of a sheep (mp3) using the upload module, I unchecked the "list" box
  9. the upload module will show an URL of where your mp3 on the serve, just copy that ,e.g. "http://mysite.com/files/sheep.mp3"
  10. I then typed <swf file="http://mysite.com/files/sheep.mp3"> next to my "what sound is this?" question
  11. create some answer for this question.
  12. hit preview to see if it works, if not, just go to the swftools admin page and go through those item one by one
  13. you should able to see a flash player which can play that mp3 you uploaded.
  14. hit submit
  15. create a quiz and include this question, and you will see the flash player show up when this question is being 'Asked'.

Hope that can help you to insert audio and video to your question! It is the 3rd approach i could think of, all the previous 2 is not working for now.
1st try : Media field + media field display , result : media cannot show in quiz, but it can show in question view, I was thinking I can get it shown by content template, yet quiz 2 does not work well with content template module.
2nd try : filefield + jquery media , can get one pixel out player working, so ditch it altogether.

I still have one question, currently the audio flash player could not be inline with my question.
It showed as "What sound is it? [next line] [the button]" , what i want is "what sound is it? [the button]"
I have try to add that display:inline for the div tag swftools is using with no success, what have i done wrong? any other method I could inline my question with my button?

Comments

inline player next to the question, not under it.

DigitalFreak's picture

just add this

div .swftools-wrapper {
  display: inline;
}

to the quiz.css to make the flash player display next to the question.

Very cool!

mbutcher's picture

This is a great way of adding some multimedia support. I'm glad you have posted this, and I hope others find it as useful as I have.

I am looking at CCK integration, which should make your process even easier for the 6.x-3.x version.

Quiz

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: