Problem with Resource Module after 1.8 upgrade

Problem with Resource Module after 1.8 upgrade

by Joseph Vargas -
Number of replies: 5

Hi all:

I just upgraded to 1.8 and now each of the resources that contain a link to a streaming media file no longer work.  These links begin with mms.

A pop-up window appears as before but with an error message that says "Internet Explorer cannot display the webpage"

Links beginning with http work fine.

Any ideas of what might be wrong?

Thanks

Average of ratings: -
In reply to Joseph Vargas

Re: Problem with Resource Module after 1.8 upgrade

by Ken DeVellis -

Hi Joseph,

I experienced the same problem too.  Since I installed the 1.8+ on to a test server, I experimented with some of the code and discovered a work-around that you might consider trying until this bug is fixed.

If you still have an earlier installation of Moodle, do the following:

- In your new 1.8 installation directory, rename this folder "..moodle\mod\resource\type\file" to something like "..moodle\mod\resource\type\file_org"

- Then copy the "..moodle\mod\resource\type\file" subdirectory from an earlier version of Moodle (I had 1.7+) to the 1.8 installation

Worked for me - good luck..

In reply to Ken DeVellis

Re: Problem with Resource Module after 1.8 upgrade

by Katja Krüger -
We had the same problem with *.wmv files. We wanted them to show up embedded in a popup window. After I changed the line 218 in mod/resource/type/file/resource.class.php (version moodle 1.8.+; file version 1.53.2.9 2007/04/05) from:
if ($resource->options == "frame")
to:
if ($resource->options != "frame")
as it was befor in the 1.7.1 version, everything SEEMS to work fine. I do not have the time now to test everything and to understand the programming of the module.
In reply to Katja Krüger

Re: Problem with Resource Module after 1.8 upgrade

by Ken DeVellis -

Hi Katja,

Thanks for this workaround, I tryed it and it too fixes the streaming of .wmv files using the mms:// protocol.  However, the .wmv files are displaying full size in the new window and there are a few other side-effects on other media types such as .swf and .mp3 files - they are only showing up in new windows, and full size as well.

I have experimented with another draconian workaround that I am now using without any detected side-effects discovered so far on our production server.  Here it is in case you want to be amused:

I renamed our older 1.7+ version of resource.class.php to resource.class.mms.php and copied it to our 1.8+ version (these files are in the path: ..moodle\mod\resource\type\file).  Then in the view.php file in the ..moodle\mod\resource folder, I added an 'if' statement to the code right after the code statement: require_course_login($course, true, $cm); near line 35

The code added is this:

if (substr($resource->reference, 0, 4) == "mms:") {
    require ($CFG->dirroot.'/mod/resource/type/'.$resource->type.'/resource.class.mms.php');
}else{
    require ($CFG->dirroot.'/mod/resource/type/'.$resource->type.'/resource.class.php');
}

Now, the old 1.7+ resource.class.mms.php is only used for streaming using the mms:// protocol.

I'm looking forward to implementing the real solution to this problem when it appears, and if you're brave enough to try this last workaround, please let me know if it works for you and if you discover any side-effects thoughtful

In reply to Ken DeVellis

Re: Problem with Resource Module after 1.8 upgrade

by Katja Krüger -
Hallo Ken,

I'm sorry, I tried your workaround but it doesn't help me. Now I see a Windows-Media Player, but nothing happens. When I try to read the stream with Real Player, it's the same thing.
My workaround now is to save the file on another moodle-installation and then make a link to it from our 1.8.+ installation. Then http:// is used and everything works correct.
I hope for a fix of this problem.