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

Allow Blocks to decide whether they are collapsible.

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3, DEV backlog
    • Component/s: Blocks
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      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

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                25/Jun/12