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

Glossary Icon does not use theme icons because doesn't use $CFG->pixpath

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7.1, 1.7.2, 1.7.3, 1.8, 1.8.1, 1.8.2, 1.8.3, 1.9
    • Fix Version/s: 1.9
    • Component/s: Glossary
    • Labels:
      None
    • Affected Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      mod/glossary/editcategories.php does not use $CFG->pixpath in it's image strings, therefore it ignores any that may be in a custom theme you are using.

      To replicate:
      Open a theme folder on your Moodle server and create a "pix" folder in it. Create a "t" folder under that and add two images called delete.gif and edit.gif.
      Log on to Moodle and use the theme you just edited. If you turn on editing your icons should be used.
      Create a new Glossary, go to the categories tab, Edit Categories and add a new one. When the page refreshes you will see it uses the standard delete and edit icons.

      Code changes to editcategories.php
      204: echo "<a href=\"editcategories.php?id=$cm->id&action=delete&mode=cat&hook=$category->id\"><img alt=\"" . get_string("delete") . "\"src=\"" .$CFG->pixpath. "/t/delete.gif\" height=\"11\" width=\"11\" border=\"0\" /></a> ";
      205: echo "<a href=\"editcategories.php?id=$cm->id&action=edit&mode=cat&hook=$category->id\"><img alt=\"" . get_string("edit") . "\" src=\"" .$CFG->pixpath. "/t/edit.gif\" height=\"11\" width=\"11\" border=\"0\" /></a>";

      Edited file is also attached

        Attachments

        1. delete.gif
          delete.gif
          0.3 kB
        2. edit.gif
          edit.gif
          0.3 kB
        3. editcategories.php
          9 kB

          Activity

            People

            Assignee:
            poltawski Dan Poltawski
            Reporter:
            redmorris Red Morris
            Tester:
            Helen Foster
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              3/Mar/08