Note: You are currently viewing documentation for Moodle 3.1. Up-to-date documentation for the latest stable version of Moodle is probably available here: Blocks 2.0.3 UI.

Development:Blocks 2.0.3 UI: Difference between revisions

From MoodleDocs
mNo edit summary
mNo edit summary
 
Line 8: Line 8:


Reduce the number of page type options using a callback so that all components can exactly specify what they support.  If the component doesn't have a callback then fallback to the calculated list we have now.
Reduce the number of page type options using a callback so that all components can exactly specify what they support.  If the component doesn't have a callback then fallback to the calculated list we have now.
==Upgrade block_instances->page_patterns==
All of the existing instances need to be upgraded to remove any settings that are no longer appearing in the UI.  This will have to be implemented with an upgrade block in each module, added at the same time as the callback.


==Sub-page types==
==Sub-page types==

Latest revision as of 07:15, 8 April 2011

This page specs some refinements to the blocks config UI for Moodle 2.0.3. See MDL-26105 for details.

Home context

Indicate where the "home" context is for this block. The place it was created.

Reduce page types

Reduce the number of page type options using a callback so that all components can exactly specify what they support. If the component doesn't have a callback then fallback to the calculated list we have now.

Sub-page types

Instead of showing "This specific page (Page 13)" (the sub page id)

  • Remove the "Page 13" completely
  • Make the navbar show the page name: Sitename -> Site pages -> Tags -> My funky tag -> XXX Block -> Configuration


User blocks

Blocks created on user pages ie the My Moodle page or profile pages (including those that were copied from the default blocks the first time the user tries to customise the page) just need to show the page types menu to select between:

  • Public user profile page (user-profile)
  • Private "My Moodle" page (my-index)
  • All pages (*)

Sub page type option should be hidden too, because it always being applied in user context.

This list will come from a callback function in /user/lib.php

Module blocks

Blocks should looking for page pattern from module callback which comes from /mod/$mod/lib.php

Blocks' page types should be limited to module context only, module will decide what types will be available. Some blocks are created at course level, and allowed to be displayed at the child contexts of course context, in this case, context selection should be kept. The original page type pattern should be kept as well.

Blocks' page contexts options should be module context only, there are no children contexts in modules.

Course blocks

Blocks added in course level can be displayed on module context, in this case , we don't need to display context options, page type pattern will override the context options.