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

Drag-drop markers question form validation cannot handle SVG background images

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 3.10.3
    • None
    • Files API, Questions
    • None
    • MOODLE_310_STABLE

    Description

      Reported in https://moodle.org/mod/forum/discuss.php?d=421358

      If you try to create a drag-drop markers question with and SVG background image (which should work, and did work in the past) then when you try to save, it always shows the "The shape you have defined goes out of the bounds of the background image" error.

      This is because the file API call to get the size of an image ultimately uses the PHP function getimagesize and that does not support SVG images as far as I can see.

      Increasingly, on the web, SVG images are what people are using, so ideally we should fix this in the File API if we can. (Google found https://stackoverflow.com/questions/6532261/how-do-you-get-the-width-and-height-of-an-svg-picture-in-php for me.)

      Attachments

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              timhunt Tim Hunt
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo, Safat Shahin, Tim Hunt, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Kevin Percy, Laurent David, Mathew May, Mihail Geshoski, Raquel Ortega, Sabina Abellan, Sander Bangma, Sara Arjona (@sarjona), Shamim Rezaie
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: