33 Commits

Author SHA1 Message Date
Marina Glancy
6b081d2e9f MDL-74465 blocks: allow configuration in modal
Introduce 'pagehash' - an identifier that uniquely identifies a page for the user session
2023-03-30 12:15:54 +01:00
Marina Glancy
854dd65966 MDL-74465 blocks: improve phpdocs 2023-03-30 11:41:16 +01:00
Marina Glancy
f5b667f1c5 MDL-62206 blocks: do not add fixed form elements as hidden 2018-05-10 12:08:41 +08:00
Marina Glancy
1a0df5535e MDL-52081 forms: Use __construct() for constructors 2015-12-10 13:38:01 +08:00
Marina Glancy
1ce4b63bdd MDL-48366 blocks: always display custom regions in dropdown 2014-12-04 16:07:56 +08:00
Sam Hemelryk
f25a6839fd MDL-44120 block: tidied up block @package uses 2014-02-16 12:17:14 +13:00
Adrian Greeve
329846f198 MDL-40430 - Libraries: Deprecate print_context_name(). 2013-07-09 16:11:55 +08:00
David Monllao
238a6572c9 MDL-38855 blocks: Fix missing setType calls 2013-04-03 11:11:01 +08:00
Ankit Agarwal
d197ea4300 MDL-34549 libraries: Replace get_context_instance_by_id() by context::instance_by_id() 2012-08-24 11:30:10 +08:00
Frederic Massart
fe2fdd11e4 MDL-34456 Librairies: Replaced deprecated get_context_instance() 2012-07-24 09:49:47 +08:00
Petr Skoda
b3aad0a25a MDL-32451 fix block edit strict issue 2012-04-21 11:21:21 +02:00
Andrew Robert Nicols
986bd83585 MDL-30804 Rename the 'onthispage' fieldset for block configuration 2011-12-19 11:46:23 +00:00
Eloy Lafuente (stronk7)
d4e71a4eed MDL-30340 blocks - hide some redundant pagetypepattern options at front 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.
2011-12-05 01:09:02 +01:00
David Mudrak
e3cdf40ff5 MDL-30340 Always generate pagetype patterns in the block settings form
This is an alternative solution to MDL-27812. If the current block
instance has page type set to site-index, we need to provide a way how
that page type pattern can be reset back to other value.
2011-12-03 16:57:21 +01:00
Eloy Lafuente (stronk7)
3e16a2ca66 MDL-27829 blocks - clean dupe comments 2011-07-01 20:38:06 +02:00
Andrew Davis (andyjdavis)
2f9bdadfd2 MDL-27829 blocks: made the ability to add a block to all site administration pages work 2011-07-01 17:11:10 +08:00
Andrew Davis (andyjdavis)
d097ad564d MDL-27829 blocks: added a warning to the block settings page that displays when the block was using a block type we dont let users select anymore 2011-06-30 17:44:50 +08:00
Andrew Davis (andyjdavis)
096928c79e MDL-27829 blocks: improved backwards compatibility for blocks set to display on page types we dont allow the user to select anymore 2011-06-30 16:42:28 +08:00
Andrew Davis (andyjdavis)
800688bd1e MDL-27829 blocks: added code to make the page type restrictions for blocks on admin setting pages make sense 2011-06-30 15:32:34 +08:00
Dongsheng Cai
b1627a92e5 MDL-26105 Block settings should contains less options, and be more user friendly
AMOS BEGIN
    MOV [page-blog-index, pagetype], [page-blog-index, blog]
    MOV [page-blog-x, pagetype], [page-blog-x, blog]
    MOV [page-tag-x, pagetype], [page-tag-x, tag]
    MOV [page-course-view-weeks, pagetype], [page-course-view-weeks, format_weeks]
    MOV [page-course-view-weeks-x, pagetype], [page-course-view-weeks-x, format_weeks]
    MOV [page-course-view-topics, pagetype], [page-course-view-topics, format_topics]
    MOV [page-course-view-topics-x, pagetype], [page-course-view-topics-x, format_topics]
AMOS END
2011-06-09 13:51:14 +08:00
Petr Skoda
78bfb562a0 MDL-21249 improved php docs and adding direct access prevention in core libs 2010-07-25 13:35:05 +00:00
Martin Dougiamas
bfebaf64d8 MDL-22388 Added some checks to kill these scripts dead with an unequivocal notice unless included properly from a Moodle script. 2010-05-13 02:02:05 +00:00
David Mudrak
ded6ff8e9f MDL-21375 Got rid of dependency on get_string() returning [[...]] and added missing page type string 2010-04-27 13:22:39 +00:00
David Mudrak
4d74c87667 MDL-15252 MDL-21375 Removing illegal stringid '*' and some whitespace 2010-04-27 13:04:15 +00:00
Martin Dougiamas
35e064659e block/config MDL-21375 Restrict options on the front page, and use better human-readable names 2010-01-25 05:29:51 +00:00
Martin Dougiamas
0aed347fd1 blocks config MDL-21375 Usability improvements for editing block stickiness, especially when dealing with frontpage and system blocks. 2010-01-20 09:08:04 +00:00
Martin Dougiamas
02ba576c27 blocks/sticky MDL-21375 This patch allows frontpage blocks to be easily turned into SYSTEM-wide sticky blocks. There is still an outstanding problem about how to deal with SYSTEM blocks that are not sticky. I think these should also be seen on the front page all the time but I'm not sure. See the bug for discussion about this. 2010-01-19 10:07:52 +00:00
Petr Skoda
4ca6cfbfd4 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 12:00:47 +00:00
tjhunt
2cdb8d8452 blocks: MDL-19893 move blocks on page UI - part 2
This updates the DB.

I beleive this is correct, but it is very hairy and badly needs unit tests.
2009-07-30 10:29:14 +00:00
tjhunt
d14edf06ee blocks: MDL-19399 proper permissions checks for editing blocks.
In particular for editing sticky blocks. If the admin addes one at site level,
then the teacher should not be able to change its configuration from
the course page, but should be able to set the position on this page.
2009-07-30 03:44:10 +00:00
tjhunt
a23bbaa30b blocks: MDL-19946 More bug fixes. 2009-07-29 03:51:16 +00:00
tjhunt
a19f419db2 blocks: MDL-19946 Block editing form must be displayed from the original URL, with properliy initialised $page 2009-07-28 09:59:21 +00:00
tjhunt
1d13c75c15 blocks editing ui: MDL-19398 Can how precisely control block positioning using the edit icon
This mostly works now, but ...
* The UI needs further work. In particular we need a non-advanced mode.
* This only works for blocks that use a new edit_form.php to replace config_instance.html.
* .. and so far I have only implemented edit_form.php for the HTML block so far.
* Needs to be enabled (with no block-specific config) for blocks without instance config, so you can control their positioning.
2009-07-16 10:50:19 +00:00