Moodle
  1. Moodle
  2. MDL-34004

mod_url should not display html icon for links to html pages

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Resource
    • Labels:
      None
    • Rank:
      42115

      Description

      This change switches it to use the default icon for the resource

        Issue Links

          Activity

          Hide
          Dan Poltawski added a comment -

          This change makes it so we only get the icon if the the mimetype isn't guessed to be a html page.

          Resourcelib is included from local lib so looks safe.

          NOTE: This change needs course cache to be rebuilt for this to take effect. But we can just rely on that happening as part of the 2.3 upgrade - see MDL-33986

          Show
          Dan Poltawski added a comment - This change makes it so we only get the icon if the the mimetype isn't guessed to be a html page. Resourcelib is included from local lib so looks safe. NOTE: This change needs course cache to be rebuilt for this to take effect. But we can just rely on that happening as part of the 2.3 upgrade - see MDL-33986
          Hide
          Martin Dougiamas added a comment -

          Tested it and it fixes up URL links which are the worst case.

          It doesn't fix mod/resource files where the file is a .html file however.

          A comprehensive fix would actually replace the 16px "html" icon with a new one that looks more like a "page" icon.

          That would actually fix everything in one go, but I'm OK to land this one as is ... it's very safe.

          Show
          Martin Dougiamas added a comment - Tested it and it fixes up URL links which are the worst case. It doesn't fix mod/resource files where the file is a .html file however. A comprehensive fix would actually replace the 16px "html" icon with a new one that looks more like a "page" icon. That would actually fix everything in one go, but I'm OK to land this one as is ... it's very safe.
          Hide
          Martin Dougiamas added a comment -

          OK, I made a fix here that brings back a html icon:

          https://github.com/moodler/moodle/commit/386a862f95535203e191e2bc521dcf2858c0841b

          Brings old HTML link for course page links for:

          • urls without an extension
          • urls with .html or .htm extension
          • resources with .html or .htm extension

          Changes HTML files in filemanager/filepicker to new HTML icon:

          • currently it is the same as "unknown" icon, fairly neutral
          • should be fixed with unique html icon by a designer ASAP
          Show
          Martin Dougiamas added a comment - OK, I made a fix here that brings back a html icon: https://github.com/moodler/moodle/commit/386a862f95535203e191e2bc521dcf2858c0841b Brings old HTML link for course page links for: urls without an extension urls with .html or .htm extension resources with .html or .htm extension Changes HTML files in filemanager/filepicker to new HTML icon: currently it is the same as "unknown" icon, fairly neutral should be fixed with unique html icon by a designer ASAP
          Hide
          Dan Poltawski added a comment -

          Tested!

          (drag and drop of links was really convenient for testing that!)

          Show
          Dan Poltawski added a comment - Tested! (drag and drop of links was really convenient for testing that!)
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Yay. just in time for Moodle 2.3 release! Many thanks!

          Closing as fixed, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Yay. just in time for Moodle 2.3 release! Many thanks! Closing as fixed, ciao
          Hide
          Tobias Marx added a comment -

          Now there is no destinct URL icon in 2.3 anymore. URLs display only a neutral "text-page" icon. Is this intentional?

          This is beeing discussed e.g. here: https://moodle.org/mod/forum/discuss.php?d=212497

          Show
          Tobias Marx added a comment - Now there is no destinct URL icon in 2.3 anymore. URLs display only a neutral "text-page" icon. Is this intentional? This is beeing discussed e.g. here: https://moodle.org/mod/forum/discuss.php?d=212497

            People

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

              Dates

              • Created:
                Updated:
                Resolved: