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

Navigation block not using FontAwesome when set by the theme.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 3.3.1
    • Component/s: Blocks, Navigation
    • Labels:
    • Testing Instructions:
      Hide
      1. Add the navigation and settings blocks to any page in boost.
      2. Tab to the tree in each block and press * on the numpad to expand all branches
      3. Observe the use of the FontAwesome icons in the nav tree (but not for activities).
      4. Switch to hebrew and verify the icons and spacing are still correct.
      Show
      Add the navigation and settings blocks to any page in boost. Tab to the tree in each block and press * on the numpad to expand all branches Observe the use of the FontAwesome icons in the nav tree (but not for activities). Switch to hebrew and verify the icons and spacing are still correct.
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-58808-master

      Description

      In MDL-40759 FontAwesome was added as an icon system to be used by a theme if desired.  The title of the issue is 'Use the Font Awesome icon font for all icons in Moodle' however the AJAX processing of the response processed in /blocks/navigation/amd/src/ajax_response_header.js:

      {code}

      if (node.icon && (!isBranch || node.type === NODETYPE.ACTIVITY || node.type === NODETYPE.RESOURCE)) {
      li.addClass('item_with_icon');
      p.addClass('hasicon');

      icon = $('<img/>');
      icon.attr('alt', node.icon.alt);
      icon.attr('title', node.icon.title);
      icon.attr('src', M.util.image_url(node.icon.pix, node.icon.component));
      $.each(node.icon.classes, function(index, className) {
      icon.addClass(className);
      });
      }

      {code}

      ignores this and injects an image directly rather than implementing the intent of the theme configuration setting: $THEME->iconsystem = \core\output\icon_system::FONTAWESOME;

      Therefore 'Use the Font Awesome icon font for all icons in Moodle' is false and incomplete.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              damyon Damyon Wiese
              Reporter:
              gb2048 Gareth J Barnard
              Peer reviewer:
              Ryan Wyllie
              Integrator:
              Jake Dallimore
              Tester:
              Adrian Greeve
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Jul/17