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

[Patch] Add PHP method to determine if the dock will be visible

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Blocks, JavaScript, Themes
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Themes currently have the region_completed_docked method to determine if all blocks in a given region are docked. This helps to prevent page jump by styling the page correctly even before the dock javascript is triggered.

      The attached patch adds a complement method, region_uses_dock, that returns true if any of the blocks in a given region (or regions if an array of regions is passed) will be docked. This can also help to prevent page jump by pre-styling the page for the dock before the dock javascript is executed.

        Attachments

          Activity

            People

            Assignee:
            samhemelryk Sam Hemelryk
            Reporter:
            blt04 Brandon Turner
            Tester:
            Nobody
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Bas Brands
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              24/Nov/10