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

Allow Blocks to decide whether they are collapsible.

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3
    • 2.3, DEV backlog
    • Blocks
    • MOODLE_23_STABLE
    • MOODLE_23_STABLE
    • Hide
      1. Go to Admin > Appearance > Themes
      2. Ensure allowuserblockhiding is set to yes
      3. Go to a course
      4. As a student attempt to hide blocks using the -/+ icon
      5. Pick a block and add the following code to the blocks on the page you are testing:

        public function instance_can_be_collapsed() { return false; }

      6. Make sure the collapse/expand icons are no longer visible and that the block is expanded
      7. Go to Admin > Apperance > Themes
      8. Set allowuserblockhiding to no
      9. Go to a course
      10. Ensure you can't collapse any blocks
      11. Attempt to add new blocks to a course page and ensure this works fine
      Show
      Go to Admin > Appearance > Themes Ensure allowuserblockhiding is set to yes Go to a course As a student attempt to hide blocks using the -/+ icon Pick a block and add the following code to the blocks on the page you are testing: public function instance_can_be_collapsed() { return false; } Make sure the collapse/expand icons are no longer visible and that the block is expanded Go to Admin > Apperance > Themes Set allowuserblockhiding to no Go to a course Ensure you can't collapse any blocks Attempt to add new blocks to a course page and ensure this works fine

    Description

      Currently, the primary display control methods for blocks allow the block instance to decide whether it should be dockable, hidable or display the header. The notable missing capability is to determine whether they are collapsible.

      Attachments

        Activity

          People

            jrchamp Jonathan Champ
            jrchamp Jonathan Champ
            Adrian Greeve Adrian Greeve
            Dan Poltawski Dan Poltawski
            Sam Hemelryk Sam Hemelryk
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              25/Jun/12