Hi,
moodle/file.php works fine with flash objets incorporated in quiz questions.
But if we have to pass parameters to the flash objet to make it more flexible and adaptable ( xxxx.swf?param1=22¶m2=47 ), then the parameters are not removed from $pathname and $filename variables.
I used around lines 40 of moodle/file.php
$pathname = "$CFG->dataroot$pathinfo";
if ($pathbb = explode("?",$pathname)) {
$pathname = $pathbb[0];
}
$filename = $args[$numargs-1];
if ($filebb = explode("?",$filename)) {
$filename = $filebb[0];
}
to remove these parameters and the 2 cases seems to works fine.
Is there a better way?
Thanks,
Bernard
Yes, it would be very good to solve this problem, there is more and more active content out there and it's caused a few hassles.
With the fix you mention here, do the parameters still get passed to the Flash?
With the fix you mention here, do the parameters still get passed to the Flash?
Sure, the fix work with and without parameters with the few flash files I have tested.
There is also another problem with Internet explorer (6.0.28 ) that don't exist with Mozilla ( 1.5b ).
If you embed your flash in a table that use the parameter width=xxx% ( as with a question imported with the gift format ) then, the parameter width expressed in % of the flash is not reconized by IE and you only ear the sound but you see nothing Mozilla show the objet and give the sound.
If you express the width of the objet in pixel it work with the two browsers.
Have good testing,
Bernard
There is also another problem with Internet explorer (6.0.28 ) that don't exist with Mozilla ( 1.5b ).
If you embed your flash in a table that use the parameter width=xxx% ( as with a question imported with the gift format ) then, the parameter width expressed in % of the flash is not reconized by IE and you only ear the sound but you see nothing Mozilla show the objet and give the sound.
If you express the width of the objet in pixel it work with the two browsers.
Have good testing,
Bernard
Ah, IE (sigh).
So it's only a percentage (for the object) within a percentage (for the table)?
The mediaplugin player already uses pixels so that will be OK ... this is just a trap for people writing their own Flash embedding HTML I suppose.
So it's only a percentage (for the object) within a percentage (for the table)?
The mediaplugin player already uses pixels so that will be OK ... this is just a trap for people writing their own Flash embedding HTML I suppose.