Moodle
  1. Moodle
  2. MDL-30332

Global settings link for blocks does not appear on Manage Block screen when it does appear in the menu tree

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Component/s: Blocks
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide

      Install a block with a "settings.php" file but no "has_config" method.
      Verify that the settings link is in one or both places.

      Show
      Install a block with a "settings.php" file but no "has_config" method. Verify that the settings link is in one or both places.
    • Workaround:
      Hide

      Either just access the settings function from the menu, or add a 'has_config' function to the block code.

      Show
      Either just access the settings function from the menu, or add a 'has_config' function to the block code.
    • Affected Branches:
      MOODLE_21_STABLE
    • Rank:
      32686

      Description

      If you have a "settings.php" file in your block's directory, the settings link will be available from the main "Plugins / Blocks" menu tree but will not show up on the main "Manage blocks" page. This is true unless there is a "has_config" function defined within the block that returns true. I believe this inconsistency is unintended.
      One of two things should be true:

      1. Presence of the "settings.php" generated the setting link in both places, or
      2. Presence of the "has_config" function is required to generate the setting link in both places.

        Activity

        Hide
        Michael de Raadt added a comment -

        Thanks for reporting that, Mike.

        Certainly the redundancy is not necessary, but I suspect we're going to deal with both (considering both core and stable). So option one is probably the course forward now.

        Feel free to help us work on this issue. If you provide a patch, please add a patch label so we will spot it.

        PS. I liked your series of blogs on upgrading 1.9 code. Thanks for sharing your experience there.

        Show
        Michael de Raadt added a comment - Thanks for reporting that, Mike. Certainly the redundancy is not necessary, but I suspect we're going to deal with both (considering both core and stable). So option one is probably the course forward now. Feel free to help us work on this issue. If you provide a patch, please add a patch label so we will spot it. PS. I liked your series of blogs on upgrading 1.9 code. Thanks for sharing your experience there.
        Hide
        Mike Churchward added a comment -

        The code that impacts the main block manage screen is around line 185 in /admin/blocks.php. This checks the status of "has_config". The code that adds it to the menu tree is around line 40 in /admin/settings/plugins.php. This looks for the existence of settings.php.

        If you are going to change to the option 1 path, I would suggest that you change line 185 in /admin/blocks.php. But you will also need to make the "has_config" function obsolete, and likely output a developer message if it is being used.

        Show
        Mike Churchward added a comment - The code that impacts the main block manage screen is around line 185 in /admin/blocks.php. This checks the status of "has_config". The code that adds it to the menu tree is around line 40 in /admin/settings/plugins.php. This looks for the existence of settings.php. If you are going to change to the option 1 path, I would suggest that you change line 185 in /admin/blocks.php. But you will also need to make the "has_config" function obsolete, and likely output a developer message if it is being used.
        Hide
        Michael de Raadt added a comment -

        Thanks for reporting this issue.

        We have detected that this issue has been inactive for over a year. It was reported as affecting versions that are no longer supported.

        If you believe that this issue is still relevant to current versions (2.5 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

        Michael d.

        TW9vZGxlDQo=

        Show
        Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year. It was reported as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.5 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d. TW9vZGxlDQo=
        Hide
        Michael de Raadt added a comment -

        I'm closing this issue as it has been inactive for over a year has been recorded as affecting versions that are no longer supported.

        This is being done as part of a bulk annual clean-up of issues.

        If you still believe this is an issue in supported versions, please create a new issue.

        Show
        Michael de Raadt added a comment - I'm closing this issue as it has been inactive for over a year has been recorded as affecting versions that are no longer supported. This is being done as part of a bulk annual clean-up of issues. If you still believe this is an issue in supported versions, please create a new issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: