Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-30768

Embedded links do not restore in some cases

    Details

    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE

      Description

      In cartridge cc1p1vtd10v1p0.imscc:

      http://www3.open.ac.uk/courses/bin/p12.dll?C01S103 - Does not embed correctly
      http://www3.open.ac.uk/courses/classifications/science.shtm - Embeds correctly
      http://www.open2.net/sciencetechnologynature/ - Embeds correctly

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            darko.miletic Darko Miletic added a comment - - edited

            The reason for this is following:

            Module mod/url tries to detect the type of the content served by URL and proposes several special cases for specific mime types. Special support is available for the following type:

            image/gif
            image/jpeg
            image/png
            audio/mp3
            video/x-flv
            application/x-shockwave-flash
            video/x-ms
            video/quicktime
            video/mpeg
            audio/x-pn-realaudio-plugin

            Everything else not being in this list is embedded with object tag (?????) that looks like this (see resourcelib_embed_general function):

            <div class="resourcecontent resourcegeneral">
            <object id="resourceobject" data="<url>" type="<mimetype>" width="800" height="600">
            $param
            $clicktoopen
            </object>
            </div>

            The problem here lies in fact that this particular URL does not exist and server will return HTTP code 404. When a location returns code 404 all modern browsers do not load the content of error page inside object tag. That is the reason it looks like nothing happens. The only way to load such a content is to use iframe.

            The only way to solve this problem is to change the behaviour of mod/url.

            Show
            darko.miletic Darko Miletic added a comment - - edited The reason for this is following: Module mod/url tries to detect the type of the content served by URL and proposes several special cases for specific mime types. Special support is available for the following type: image/gif image/jpeg image/png audio/mp3 video/x-flv application/x-shockwave-flash video/x-ms video/quicktime video/mpeg audio/x-pn-realaudio-plugin Everything else not being in this list is embedded with object tag (?????) that looks like this (see resourcelib_embed_general function): <div class="resourcecontent resourcegeneral"> <object id="resourceobject" data="<url>" type="<mimetype>" width="800" height="600"> $param $clicktoopen </object> </div> The problem here lies in fact that this particular URL does not exist and server will return HTTP code 404. When a location returns code 404 all modern browsers do not load the content of error page inside object tag. That is the reason it looks like nothing happens. The only way to load such a content is to use iframe. The only way to solve this problem is to change the behaviour of mod/url.
            Hide
            salvetore Michael de Raadt added a comment -

            Thanks for working on that.

            I'm not sure how the URL resource module is linked to IMS CC. Could you explain that?

            Show
            salvetore Michael de Raadt added a comment - Thanks for working on that. I'm not sure how the URL resource module is linked to IMS CC. Could you explain that?
            Hide
            darko.miletic Darko Miletic added a comment -

            Url resource issue is linked because weblinks from common cartridge are being imported as url resource in Moodle. That module incorrectly handles some URL's (see above explanation). Hence the request.

            Show
            darko.miletic Darko Miletic added a comment - Url resource issue is linked because weblinks from common cartridge are being imported as url resource in Moodle. That module incorrectly handles some URL's (see above explanation). Hence the request.

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Fix Release Date:
                  8/Jul/13