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

Avoid trying to add badges to navigation when disabled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.1
    • Component/s: Badges
    • Labels:
    • Testing Instructions:
      Hide
      1. Switch enablebadges setting off
      2. Delete badges directory
      3. Browse to a course
      4. Confirm that you see a fatal error about a require_once failure
      5. Apply this patch
      6. Repeat above and confirm that you see the page as usual
      7. Confirm that you can't see a "badges" node in the course navigation
      8. Switch "enablebadges" setting back on
      9. Restore the "badges" directory
      10. Browse back to the course
      11. Confirm that you can see a "badges" node in the course navigation
      Show
      Switch enablebadges setting off Delete badges directory Browse to a course Confirm that you see a fatal error about a require_once failure Apply this patch Repeat above and confirm that you see the page as usual Confirm that you can't see a "badges" node in the course navigation Switch "enablebadges" setting back on Restore the "badges" directory Browse back to the course Confirm that you can see a "badges" node in the course navigation
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:

      Description

      The settings navigation includes badgeslib.php and calls badges_add_course_navigation() even if badges are disabled at a server level.

      There is no reason for this to happen and it would make sense to check whether it is enabled first (as other sections such as outcomes do).

        Attachments

          Activity

            People

            • Assignee:
              maherne Michael Aherne
              Reporter:
              maherne Michael Aherne
              Peer reviewer:
              Ryan Wyllie
              Integrator:
              Andrew Nicols
              Tester:
              Mark Nelson
              Participants:
              Component watchers:
              Yuliya Bozhko, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                23/May/16