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

Outputlib post_process does not revert $usesvg

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Usability
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-36290-master

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  3/Dec/12