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

User menu: customusermenuitems don't map Font Awesome icons for non pix/t folders

XMLWordPrintable

    • MOODLE_36_STABLE
    • MOODLE_36_STABLE
    • MDL-61573-master
    • Hide

      Preparation

      1. Login as admin
      2. Open the setting 'customusermenuitems'
      3. Enter the following code:

        ####
        privatefiles,moodle|/user/files.php|add
        ####
        language,moodle|/user/language.php|../i/publish
        

      4. Save this setting
      5. Take a look at the user menu
        1. Confirm that all icons are now Font Awesome icons
      Show
      Preparation Login as admin Open the setting 'customusermenuitems' Enter the following code: #### privatefiles,moodle|/user/files.php|add #### language,moodle|/user/language.php|../i/publish Save this setting Take a look at the user menu Confirm that all icons are now Font Awesome icons

      Hi!

      We added custom user menu items (customusermenuitems) and for some of them we selected a pix icon from another pix folder than the pix/t folder (we used icons from pix/i).

      This is the code:

      ####
      grades,grades|/grade/report/mygrades.php|grades
      badges,badges|/badges/mybadges.php|award
      ####
      privatefiles,moodle|/user/files.php|../i/files
      calendar,calendar|/calendar/view.php|../i/calendar
      messages,message|/message/index.php|message
      ####
      language,moodle|/user/language.php|../i/publish
      preferences,moodle|/user/preferences.php|preferences
      

      The result:

      All icons that use another pix folder show the fallback svg/png icon and don't use the Font Awesome representation defined in the /lib/classes/output/icon_system_fontawesome.php mapping.
      For example the i/files mapping: https://github.com/moodle/moodle/blob/master/lib/classes/output/icon_system_fontawesome.php#L221

      The function that processes the setting customusermenuitems should use the function that maps pix icons to Font Awesome icons.

      Best, Kathrin

        1. customusermenuitems_fa.png
          customusermenuitems_fa.png
          29 kB
        2. MDL-61573.jpg
          MDL-61573.jpg
          6 kB
        3. testing.png
          testing.png
          8 kB

            kosswa Kathrin Osswald
            kosswa Kathrin Osswald
            Luca Bösch Luca Bösch
            David Monllaó David Monllaó
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.