Video in Quizport

Video in Quizport

by Deborah Delin -
Number of replies: 25

Hi Gordon and Quizport users,

Help!  I am new to embedding video in Hot Potatoes/Quizport and am having problems.  Can any of you who have videos working in Quizport please advise?

Using the Flowplayer and the following code:

center><object type="application/x-shockwave-flash" data="FlowPlayer.swf" width="200" height="310" id="FlowPlayer"><param name="movie" value="FlowPlayer.swf" /><param name="autoPlay" value="false" /><param name="quality" value="high" /><param name="scale" value="noScale" /><param name="wmode" value="transparent" /><param name="flashvars" value="config={videoFile: 'swing.flv',autoPlay:false, loop: false,autoBuffer:true, autoBuffering:true,menuItems: [ false, false, false, false, false, false ]}" /></object></center

(I have user  both autoBuffer:true and autoBuffering:true  because of some suggestions I found on the Flowplayer forums).

Here are the problems I have in Quizport:

- On my site the first frame of the video doesn't display when the page loads - only the video recorder controls show up.  This happens in both IE8 and Firefox.  And when the page loads I get the Quizport message asking if I am sure I want to navigate away from the page.

- On Gordon's site (Deborah Video) the first frame of the video did show up in IE but the "Are you sure you want to navigate away........." message also came up.  In Firefox the first frame doesn't show up.  No navigate away message.

On both sites the first frame shows up in the quiz outside of Quizport.

I know that Glenys uses the above code, (minus loop: false,autoBuffer:true,autoBuffering:true - Glenys I had to add loop: false to get it to stop looping) in Quizport and it works.

I also tried the JW player.  This works perfectly outside of Moodle but not in Moodle at all.  (Video Exercise 2 on Gordon's site has the JW player).  If anyone could advise how to get the JW player working in Moodle that would also be great.

I've spent 4 days fiddling with this..........help!

Deborah

Average of ratings: -
In reply to Deborah Delin

Re: Video in Quizport

by Deborah Delin -

(This didn't appear on the forum so I am posting it again - hope this doesn't cause you problems Gordon.)

Hi Gordon and Quizport users,

Help!  I am new to embedding video in Hot Potatoes/Quizport and am having problems.  Can any of you who have videos working in Quizport please advise?

Using the Flowplayer and the following code:

center><object type="application/x-shockwave-flash" data="FlowPlayer.swf" width="200" height="310" id="FlowPlayer"><param name="movie" value="FlowPlayer.swf" /><param name="autoPlay" value="false" /><param name="quality" value="high" /><param name="scale" value="noScale" /><param name="wmode" value="transparent" /><param name="flashvars" value="config={videoFile: 'swing.flv',autoPlay:false, loop: false,autoBuffer:true, autoBuffering:true,menuItems: [ false, false, false, false, false, false ]}" /></object></center

(I have user  both autoBuffer:true and autoBuffering:true  because of some suggestions I found on the Flowplayer forums).

Here are the problems I have in Quizport:

- On my site the first frame of the video doesn't display when the page loads - only the video recorder controls show up.  This happens in both IE8 and Firefox.  And when the page loads I get the Quizport message asking if I am sure I want to navigate away from the page.

- On Gordon's site (Deborah Video) the first frame of the video did show up in IE but the "Are you sure you want to navigate away........." message also came up.  In Firefox the first frame doesn't show up.  No navigate away message.

On both sites the first frame shows up in the quiz outside of Quizport.

I know that Glenys uses the above code, (minus loop: false,autoBuffer:true,autoBuffering:true - Glenys I had to add loop: false to get it to stop looping) in Quizport and it works.

I also tried the JW player.  This works perfectly outside of Moodle but not in Moodle at all.  (Video Exercise 2 on Gordon's site has the JW player).  If anyone could advise how to get the JW player working in Moodle that would also be great.

I've spent 4 days fiddling with this..........help!

Deborah

In reply to Deborah Delin

Re: Video in Quizport

by Glenys Hanson -

Hi Deborah,

Do you know I've never noticed that my videos were looping? Now I see they are I find it very irritating - I'll certainly add your "loop: false" to all of mine from now on. Thanks for the tip.

I've uploaded one of my videos to Gordon's site (Glenys video Flowplayer) so you can compare. In both Firefox and IE there is a black rectangle to indicate a video.

I've also uploaded a Glenys video JW. It doesn't work on Gordon's site in IE, Firefox in QuizPort, Hot Pot or as simple HTML file but it does here: Alexis Lechine Wines. This is an old version of JW's player. I didn't use it for dictation type exercises because of problems with a "sticky" cursor.

These are all old exercises (ancient in IT terms: 4 to 8 years old) but, Deborah, I'd appreciate any pedagogical feedback you may have - maybe over on the Lang Teaching forums?

Cheers,

Glenys

In reply to Deborah Delin

Re: Video in Quizport

by Deborah Delin -

Hi Glenys and everyone!

Strange but this thread isn't appearing in my inbox............  I was hoping there might be someone else out there with experience of Flash video in Quizport but they won't see the thread. sad

Thanks very much for posting the examples to Gordon's site for comparison.  In IE the Flowplayer displayed a black screen and there was also the "Are you sure you want to navigate away from this page..." message.  In FF there is a black screen and no message.  I would be happy with a black screen.  I just want students to understand that there is a video to be watched and not think that it is another audio instruction.  I checked your code against mine again word for word and it is the same (except the bit about buffering but before I added that the video image didn't show up even outside of Quizport) so it is extremely puzzling why my videos don't show a first frame or splash page and yours do.

As for the JW player, no, it doesn't work at all in either quiz.  Matt Bury has a plugin for the JW player in Moodle but I am under the impression that Hot Potatoes are independent web pages and don't interact with media plugins.  But maybe I am wrong?  I would love to be wrong and be able to use the JW player.

So I'm keeping my fingers crossed that Gordon might have one of his magical snippets to suggest that will solve my Flash video problems in one fell swoop. smile

Deborah

p.s.  I will look at the wines exes. tomorrow and reply on the lang forum.

In reply to Deborah Delin

Re: Video in Quizport

by Deborah Delin -

It has just occurred to me that the difference between my videos and Glenys' is that mine are home made, in Camtasia. However, there is nothing in the settings to cause the first frame not to appear.   Oh dear, I wish I understood more...

Deborah

In reply to Deborah Delin

Re: Video in Quizport

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

Hi Deborah,

does the video work better if you change the relative url of the movie file to an absolute URL?

  • OLD: config={videoFile: 'swing.flv'
  • NEW: config={videoFile: 'http://mysite.com/moodle/file.php/99/myfolder/swing.flv'

where "99" is the courseid and "myfolder/swing.flv" is the path to your video file within the Moodle course "Files" area.

Gordon

In reply to Gordon Bateson

Re: Video in Quizport

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

but there is a much easier way ... and I will use the "video_exercise_1.jcl" as an example:

  • add dew player in "Instructions" like this:
    [type_gaps.mp3 dew]
  • add video in "Reading" like this:
    [swing.flv 200 310 center]

Then set the "Use media player" to "QuizPort media filter".

have fun!
Gordon

In reply to Gordon Bateson

Re: Video in Quizport

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

One final thing.

If you use "float:left" to position the help image, then it will float out of its containing box and may shift other elements around on the page.

I don't think this is what you want, so ...

I suggest you position the help image by adding a new container DIV which has "position:relative", and then use "position: absolute" to position the image, thus:

  • <div style="position: relative">
    <a style="cursor: pointer;" onclick="window.open('http://www.strivney-english.com/demo_videos/video_gap_fill/video_gap_fill.html');return false;"><img src="confused.gif" alt="How to do this Exercise.gif" title="How to do this Exercise" width="62" height="85"
    style="position:absolute; top: 0px; left: 0px;"></img></a>
    ...
    </div>

The attached JCloze file include this modification, and also embeds the mp3 and flv files using QuizPort's [square brackets] notation that I described earlier.

regards
Gordon

In reply to Deborah Delin

Re: Video in Quizport

by Deborah Delin -

Yes Gordon!  Changing to an absolute URL seems to do the trick.  The video showed up in all the browsers I tested, except IE6, but I can't worry about that too much.  Thank you!

Bit of a nuisance though.......  To see the video in the exercises on my desktop they need the relative URL, and then I need to edit the URL's of the uploaded files in situ?

By the way, the "Do you want to navigate away from this page....." message still appears on loading the page in IE, both on your site and on mine, even with the revised quiz with the absolute URL.  Did you not notice this with your video quizzes Glenys?

Thanks for working your magic as usual Gordon! smile

Deborah

In reply to Deborah Delin

Re: Video in Quizport

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

I don't think you will get the message on IE if you use the [square bracket] notation to embed the videos

Gordon

In reply to Gordon Bateson

Re: Video in Quizport

by Deborah Delin -

Oh sorry Gordon!

I had completely missed your previous posts about using the square brackets notation.   How kind of you to spell it out for me so clearly by altering the jcloze file and sending it to me.  You're the greatest!

Of course, everything works beautifully with the file you modified, and the Flowplayer is much happier, even displaying the little triangle in the middle of the image when it is paused.  Thank you so much!

Now I have to make a confession.  Whilst I appreciate the simplicity of the square brackets notation, I have avoided using it in the past because the exercises don't function on my desktop.  So if I am testing, revising or reviewing exercises on my desktop I need  a separate set with the full code so I can see how they function.   The bother of having to have two sets of exercises seems to me to rule out the advantages of the square brackets notation.  How do other Quizporters deal with this?

Thanks again so much Gordon.

Deborah

p.s.  The positioning of the help file has often caused problems in my exercises and I have gotten around it in the past by adding line breaks, thus creating wasted space in the exercises.  Thanks very much for the tip about giving it its own div.

p.p.s.  In IE6 the help file centers under the Dewplayer.  See attached screenshot.  Yes, IE6, I know I know............... but if you could suggest a simple addition to the code I would like to add it.  Thank you.

Attachment notation_ie6.gif
In reply to Deborah Delin

Re: Video in Quizport

by Deborah Delin -

Hi Gordon,

I have found that with the Moodle Standard Media Filters set and the square brackets notation,  playing the audio player sometimes crashes Internet Explorer.  This is a problem I have observed in the past too.

I am wondering about two alternatives for displaying the quizzes with the combination of Flash audio and video, which won't involve you spending more time trying to solve the curious problem with the htm files:

1.  The quizzes work fine from the source files with the square brackets notation.  You mentioned setting Quizport output to findit(a) or findit(b) but I don't see this option on the Updating: Quiz page.  Is it available?

2.  The problem with using the absolute URL's was that in IE the "Do you want to navigate away from this page?" message appears when the quiz loads.  Might there be a quick fix for this?

Thanks very much in advance.

Deborah

In reply to Deborah Delin

Re: Video in Quizport

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

Hi Deborah,

1. if you are running a QuizPort quiz from a "jcl" file, then you will see the "FindIt (a)" and "FindIt (b)" options in the "Output format" setting on the "Updating an QuizPort quiz" page.

2. I don't know why IE behaves the way it does in this situation, so I'm afraid I can't suggest a quick fix.

regards
Gordon

In reply to Deborah Delin

Re: Video in Quizport

by Deborah Delin -

Hi Gordon,

This is very strange.  Using the file you sent me as a template I added the square brackets notation to my files.  But the quizzes don't function on my site.  The browser says it cannot display the page.  I tried in 3 different browsers.

http://www.strivney.com/mod/quizport/view.php?id=1968

They do, however, function on your site.  (Deborah Video)

I have tried everything I can think of , including updating to the latest Quizport version (2008033195) and deleting the Quizport and re-creating it. The settings for my Quizport and yours are the same.

Prior to the update I had 3 out of 4 quizzes working after a lot of attempts.  The fourth quiz displayed white spaces where the Dew player and Flowplayer should have been.  Now none of the quizzes are displaying.

The problem is evidently related to the media filter as the pages load when I use no filter or Moodle's standard media filters.  But they don't work with the Quizport filter.

Please advise.

Deborah

In reply to Deborah Delin

Re: Video in Quizport

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

> The browser says it cannot display the page

That's certainly unexpected surprise

Removing the "dew" from the player in the "Instructions" at least allows the quiz to be displayed.

There must be an error somewhere. I set debugging to its most revealing setting (Site adminstration -> Server -> Debugging -> Developer) but nothing showed in the browser. Is it possible for you to get access to the error log on the server and see if a PHP error is generated when this quiz is displayed?

Alternatively, you could re-insert the <object> tags for the dew player, and use the [square brackets] just for the video.

regards
Gordon

In reply to Gordon Bateson

Re: Video in Quizport

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

Intesetingly, if I run the quiz (on your server) from the jcl file, and set the output format to "FindIt(a)", then the dew player and the video both display fine.

Thanks for checking the quiz on my server. could you confirm that you checked the htm file?

Assuming you did check the htm file on my server, then at the moment, it seems to me that there is something about the customized htm file, possilby combined with the customized theme, that is apparently causing the fatal PHP error when QuizPort tries to insert a non-standard player.

To get any further we need to know what the PHP error was.

Also, I would be interested to know if the custom htm file works on your server with a standard theme.

Gordon

In reply to Deborah Delin

Re: Video in Quizport

by Deborah Delin -

Hi Gordon

I am attaching the error log for the last 24 hours.

- Changing to Standard theme does not solve the problem on my site.

- I confirm that I tested the htm files on your site and they all work with the bracket notation and the Quizport filter.  However I do not think it is a customisation problem.  There are 4 quizzes in the set:

- unmodified Jcloze; jcloze findit(a); jclose findit(b); slightly modified         jmix.

None of the htm's work on my site, including the unmodified jcloze.  The jcl file of the unmodified quiz displays fine via the Quizport filter.

To clarify, yesterday when I first uploaded the htm file from the jcl file you made, it displayed fine on my site via the Quizport filter.  Later when I added the other three files I had a lot of problems with them sometimes displaying and then not displaying, until I got to the present situation where nothing displays via the Quizport filter.

Using the notation for the video and the Dewplayer <object> code isn't an option  as the Quizport filter doesn't allow the Dewplayer to display.  However, I can either use Moodle's standard media filters, which seems to work fine with the video notation and uses Moodle's audio player, or go back to using no filter and the absolute URL in the video code and living with the "Do you want to navigate away from this page" message.  However, I would love to get to the bottom of the problem and findout why my site is now objecting to the square brackets notation with the Quizport filter.

Many thanks for your help.

Deborah

In reply to Deborah Delin

Re: Video in Quizport

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Thanks very much for the extra info and error log. I am on the move at the moment but I will try to take a look at the log if I have time over the weekend. regards Gordon
In reply to Gordon Bateson

Re: Video in Quizport

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

Hmm, well the only thing I found was several of these:

  • [Thu Oct 28 19:25:30 2010] [error] [client 124.97.207.94]
  • PHP Fatal error:  Class 'ADODB_Session' not found in Unknown on line 0,
  • referer: mod/quizport/view.php?tab=preview&quizattemptid=11320&columnlistid=default&columnlisttype=quiz&sesskey=HNc9Gm26CA

Not sure what would cause that. But I would like to find out somehow ...
Gordon

In reply to Gordon Bateson

Re: Video in Quizport

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

Hi Deborah,
to make progress with this, I would like to visit your server and test the QuizPort scripts as they are running on your machine. In order to do this, would it be possible for you to send me a private email with ftp access information for your server?

thanks
Gordon

In reply to Gordon Bateson

Re: Video in Quizport

by Deborah Delin -

That's very good of you Gordon.  I will send you the information.

Deborah

In reply to Deborah Delin

Re: Video in Quizport

by Deborah Delin -

Hi Gordon,

I noticed that you made a test Quizport on my site.

I discovered that the quiz works when there are no previous attempts.  After the first attempt it doesn't work.  But if you delete the previous attempts - the quiz works again!

Deborah

In reply to Deborah Delin

Re: Video in Quizport

by Jim Ranalli -

Deborah,

I don't know if this idea is appropriate to your situation, but when you mentioned that you're making your own videos in Camtasia, I thought to mention it.

I use a lot of Camtasia-produced video and I like to make the optional captioning available to my students, so rather than embed to the flv/mp4 directly into the HP file, I use an iframe to link to the html page that Camtasia produces as a wrapper around it. The Camtasia files are stored outside my moodledata folder (actually they're on a different server that only serves static pages, but does so very quickly).

One problem with this approach, of course, is that my videos are viewable to anyone who's got a mind to find them (although they won't be of much value outside the QuizPort and the course). Also, it doesn't address the embedding issues you and Gordon have been struggling with, but I thought I'd share anyway.

Good luck,

Jim

In reply to Jim Ranalli

Re: Video in Quizport

by Deborah Delin -

Hi Gordon and Jim,

So that's how you get the Findit outputs!  This is great.  Now I can run my quizzes from the xml files using the square brackets notation and have both the Dewplayer and the Flowplayer functioning in the quiz.  Thank you!

Jim,

Does the i-frame show up in the quiz or do you have to click on a link that takes you to it?  If the former, could you possibly post a link showing an example?  Thanks very much for the tip.

Deborah

In reply to Deborah Delin

Re: Video in Quizport

by Jim Ranalli -

Deborah,

The video shows up just as it would if you'd embedded it directly in the QuizPort. Here's an example: http://jranalli.public.iastate.edu/vvt_html/match_patterns_and_verbs1.htm

You'll notice the optional closed-captioning, which is a Camtasia-produced feature I'm able to retain through the use of the iframe. You can also determine other settings (like whether the video starts automatically, the size of the caption font, etc.) by editing the configuration.xml file that's produced along with the video.

The iframe tag looks something like this.


<iframe src ="http://mymediaserver.com/module1/camtasiatutorial.html" width="670" height="520" frameborder="0"><br /> <p>Your browser does not support iframes.</p><br /></iframe>

I just plugged it into the instructions div in the HP file using the configuration screen.

I'll admit it's a bit clunky, but it does allow you to take fuller advantage of your Camtasia work. I have no idea whether this would solve your issues with IE6, though.

Best,

Jim

In reply to Jim Ranalli

Re: Video in Quizport

by Deborah Delin -

That's very interesting Jim.  Thank you! (The "Secret about Word Grammar" was quite interesting too!)

For the moment I've gotten round my issues by running the quizzes from the xml files, but I'm going to try out this method next time I make a video based exercise.

Deborah