While looking @
MDL-30340 some incorrect "any-page" options were discovered here and there.
Basically only system/coursecat/course must have such option when the block is being edited at its real-context. When the block is being edited @ any subcontext, the "bring-back" feature will add the option and the end of the list.
But such "any-page" won't be available in any other plugin/subsystem at all, so system => system "bring back" will not be allowed.
- Take rid of the harcoded 'page-x' options @ blog and reports. It only should be shown when the 'bring-back' feature inserts it at the end.
- At course/lib and default_page_type_list(), modify the use, so 'page-x' is only added (on top) if editing @ currentcontext = parentcontext. Else, the 'bring-back' feature will insert it (bottom).
Note, while I see clearly that we should prevent those system => system "bring-backs", MD opines it's worth having them. My point is that not horizontal edition should be allowed at all, so any system page is responsible of editing its pagetypes with all them being exclusive (blog, notes, tags, my, userprofile...).
Anyway, we agreed to postpone this after 2.2 release, keeping things as they are right now.