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

Settings block adds unnecessary <hr> tags

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.9
    • 2.9
    • Blocks

      There is a minor bug in block_settings_renderer::settings_tree, when it is counting the children it doesn't exclude hidden items.
      If you have the "My profile settings" item hidden, for example, it will still show a hr before "Site Administration", when it shouldn't.

      The fix would be to change:

      foreach ($navigation->children as &$child) {
          $child->preceedwithhr = ($count!==0);
          $count++;
      }
      

      To:

      foreach ($navigation->children as &$child) {
          $child->preceedwithhr = ($count!==0);
          if ($child->display) {
              $count++;
          }
      }
      

            moodle.com Moodle HQ
            skylarkelty Skylar Kelty
            Dave Cooper Dave Cooper
            Dan Poltawski Dan Poltawski
            Simey Lameze Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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