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

Icon for word/excel resources don't show in navigation bar when viewing another resource.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.4, 2.2.1, 2.3
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Navigation
    • Labels:
    • Testing Instructions:
      Hide
      1. Log in as an admin
      2. Add several file resources for doc, excel, pdf etc
      3. Browse the course and make sure icons are shown in the navigation
      4. Browse to one of the resources and check icons are still being shown.
      Show
      Log in as an admin Add several file resources for doc, excel, pdf etc Browse the course and make sure icons are shown in the navigation Browse to one of the resources and check icons are still being shown.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      wip-MDL-31224-m23

      Description

      If you add two resources to a course, say a pdf, and a word file. On the course home page, you can toggle the navigation bar to show both the icons, though the word resource isn't a link. (first screen shot)
      If you view the pdf resource which opens a seperate window with a url like /mod/resource/view.php?id=..., the navigation bar only shows the icon for the pdf resource, and not the word one.
      It isn't only the currently viewed resource that gets an icon. Icons that do appear are pdf, mp4, html. Icons that don't appear are docx, xlsx, pptx, wmv.

      Attached are some resources to test with. Also some screenshots showing the issue

        Gliffy Diagrams

        1. fox.docx
          10 kB
          Hugh Davenport
        2. fox.pdf
          62 kB
          Hugh Davenport
        3. Fruits.xlsx
          11 kB
          Hugh Davenport
        1. course-homepage.png
          8 kB
        2. in_other_resource.png
          6 kB

          Activity

          Hide
          samhemelryk Sam Hemelryk added a comment -

          Thanks for the report Hugh. I've marked this triaged now and have added it to our stable backlog.
          I'll endeavour to look at this when we next start working on stable bugs (currently we are in a docs sprint).

          Cheers
          Sam

          Show
          samhemelryk Sam Hemelryk added a comment - Thanks for the report Hugh. I've marked this triaged now and have added it to our stable backlog. I'll endeavour to look at this when we next start working on stable bugs (currently we are in a docs sprint). Cheers Sam
          Hide
          samhemelryk Sam Hemelryk added a comment -

          Got a solution and have put it up for peer-review now.
          Problem was that node with an action_link object as their action were overriding the content to which the icon was being appended.

          Cheers
          Sam

          Show
          samhemelryk Sam Hemelryk added a comment - Got a solution and have put it up for peer-review now. Problem was that node with an action_link object as their action were overriding the content to which the icon was being appended. Cheers Sam
          Hide
          andyjdavis Andrew Davis added a comment -

          Code changes look sensible enough.

          Show
          andyjdavis Andrew Davis added a comment - Code changes look sensible enough.
          Hide
          samhemelryk Sam Hemelryk added a comment -

          Cool thanks for looking at this Andrew, putting it up for integration now.

          Show
          samhemelryk Sam Hemelryk added a comment - Cool thanks for looking at this Andrew, putting it up for integration now.
          Hide
          nebgor Aparup Banerjee added a comment -

          Thanks, thats been integrated.

          Show
          nebgor Aparup Banerjee added a comment - Thanks, thats been integrated.
          Hide
          abgreeve Adrian Greeve added a comment -

          I added the resources as outlined and then navigated to the files in the navigation tree. Unfortunately some of the files were not turning up as hyper-links.

          Show
          abgreeve Adrian Greeve added a comment - I added the resources as outlined and then navigated to the files in the navigation tree. Unfortunately some of the files were not turning up as hyper-links.
          Hide
          samhemelryk Sam Hemelryk added a comment -

          MOODLE_21_STABLE was the only broken branch and has been fixed now. Could you please retest Adrian.

          Cheers
          Sam

          Show
          samhemelryk Sam Hemelryk added a comment - MOODLE_21_STABLE was the only broken branch and has been fixed now. Could you please retest Adrian. Cheers Sam
          Hide
          abgreeve Adrian Greeve added a comment -

          Tested in 2.1 and 2.3
          All files appear as hyper-links in the navigation menu. Working as expected.
          Thanks for your patience Sam

          Show
          abgreeve Adrian Greeve added a comment - Tested in 2.1 and 2.3 All files appear as hyper-links in the navigation menu. Working as expected. Thanks for your patience Sam
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Your nice code represents only 1/46 of the issues that have been sent upstream this week, so thanks, but not many.

          Nah, joking, many thanks! Closing this a fixed, ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Your nice code represents only 1/46 of the issues that have been sent upstream this week, so thanks, but not many. Nah, joking, many thanks! Closing this a fixed, ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Mar/12