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

block_tree is broken (maybe outdated?)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.3, 2.6.4, 2.7.1
    • Fix Version/s: STABLE backlog
    • Component/s: Blocks
    • Labels:
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE

      Description

      Tried to use the block_tree class for a block and it appears that tree_block_contents() is out of date. As far as I know, tree_block_contents() takes an array of navigation_node's but in the function's body, it calls $item->content() which should be $item->get_content() I think.

      Further, it would be nice if this code produced a block like the settings block. I attempted to re-create the output of the settings block and found that I mostly had to duplicate some rendering code and styles. I think it would be helpful if this could be generalized so it could be used anywhere (in a block or not).

        Attachments

          Activity

            People

            • Votes:
              19 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: