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

Broken icon's in 2.0 navigation + several other places

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Libraries
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Very noticable in navigation, there a VERY large number of broken images from icons.
      This also affects several other places in HEAD that have been upgraded to use the new output API.
      Problem is because OUTPUT->image does not check to see if the image_or_url var is a moodle_url which means anytime the following sort of thing is done we get an bad src attribute.

      echo $OUTPUT->image($OUTPUT->pix_url('i/settings'));

      The solution is simple just check that to see if we have a moodle_url object.... alternatively we could call cast the url var to string which would hit the moodle_url's magic tostring method but I think that a specific check is clearer.

        Attachments

          Activity

            People

            • Assignee:
              samhemelryk Sam Hemelryk
              Reporter:
              samhemelryk Sam Hemelryk
              Tester:
              Nobody
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10