mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-30340 blocks - hide some redundant pagetypepattern options at fro…
…nt page The dual front-page/system-wide form to edit blocks can be reduced asuming that, always: A) system sets the context to system, recursively and with page-type set to "*" B) frontpage only sets the context to site-course, non-recursively and with page-type set to "site-index" C) frontpage all added sets the context to site-course, recursively and with paget-type set to "*" And that is the change that this patch provides, by: 1) detecting properly if we are editing blocks @ protpage 2) passing that information to the form data processor 3) setting parentcontextid, showinsubcontexts and pagetypepattern following the A, B, C immutables above. Finally, and affecting some other system-wide pages, there are cases (my, user templates...) having only one possible pagetypepattern, and it looks badly if the page has subpages, so for those system-wide cases we are showing exceptionaly the pagetypepattern statically. This will be revisited once MDL-30574 is decided and implemented, although perhaps it's ok to leave it as default to places with only one pagetypepattern available.
- Loading branch information
Showing
2 changed files
with
104 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters