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

Outputlib post_process does not revert $usesvg

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 2.4
    • 2.4
    • Usability
    • MOODLE_24_STABLE
    • MOODLE_24_STABLE
    • MDL-36290-master
    • Hide

      Test pre-requisites

      • Test on different browsers (Chrome, FF, IE9+)
      • Test on different themes

      Test steps

      1. Make sure you can see SVG icons (zoom in to make sure they scale as they're not PNGs)
      2. Make sure you can see background images
      1. Replace mod/forum/icon.svg with any random (but different) icon.
      2. Log in as admin and purge your caches
      3. Check that when you view a course with a forum you see the replacement icon.
      4. Check when you use the activity chooser you see the replacement icon.
      Show
      Test pre-requisites Test on different browsers (Chrome, FF, IE9+) Test on different themes Test steps Make sure you can see SVG icons (zoom in to make sure they scale as they're not PNGs) Make sure you can see background images Replace mod/forum/icon.svg with any random (but different) icon. Log in as admin and purge your caches Check that when you view a course with a forum you see the replacement icon. Check when you use the activity chooser you see the replacement icon.

      While trying to replace the forum icon with an SVG icon, which did not work, I realised that the method post_process() in outputlib.php:948 was forcing the SVG status to false. But does not revert it once the method is completed. This leads to $usesvg to be switched off for the rest of the execution of the page.

      To replicate

      1. Drop a file called icon.svg in /mod/forum/pix/

      Actual:

      • The icon is not displayed in the activity chooser, nor course content
      • The URL to the icon specifies svg=0

      Expected:

      • The icon is displayed in the activity chooser and course content
      • The URL to the icon specifies svg=1

            fred Frédéric Massart
            fred Frédéric Massart
            Sam Hemelryk Sam Hemelryk
            Dan Poltawski Dan Poltawski
            Rossiani Wijaya Rossiani Wijaya
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.