299 Commits

Author SHA1 Message Date
Adrian Greeve
b0c6dc1cac MDL-34465 - lib - Replacing get_context_instance with context_XXXX::instance (group 8) 2012-07-27 10:10:46 +08:00
Dan Poltawski
7067a161a3 Merge branch 'wip-mdl-31023' of git://github.com/rajeshtaneja/moodle 2012-07-23 13:13:47 +08:00
Rajesh Taneja
afb92f1b9e MDL-31023 libraries: removed deprecated function and classes from pagelib.php 2012-07-19 15:48:45 +08:00
Rajesh Taneja
1e12c1203b MDL-30651 libraries: Replaced deprecated PARAM_INTEGER with PARAM_INT 2012-07-19 15:37:46 +08:00
Ruslan Kabalin
5683815612 MDL-31263 Rewrite block drag/drop using YUI3 2012-04-24 13:25:43 +08:00
Petr Skoda
f20edd5208 MDL-32094 fix various E_STRICT compatibility problems 2012-03-18 18:37:24 +01:00
Petr Skoda
b85b25ebb8 MDL-31006 fix various notices in PHP54
PHP54 compatibility
2012-01-18 01:03:20 +01:00
sam marshall
7728860ae5 MDL-30655 Blocks: Moving block to top of list can cause (harmless) PHP warnings 2011-12-09 17:45:23 +00:00
Eloy Lafuente (stronk7)
da78edea18 Merge branch 'MDL-30340-sticky-blocks_simplify_frontpage_ui' of git://github.com/stronk7/moodle 2011-12-05 10:57:53 +01:00
Martin Dougiamas
192a3380f1 MDL-30340 blocks - fix/restrict frontpage dark magic application
It seems that there are some overlapping constants in the blocks
subsystem that were causing some code, initially planned only
to frontpage, to be executed in other contexts. This commit moves
the bui_editingatfrontpage condition as root condition.
2011-12-05 10:28:54 +01:00
Eloy Lafuente (stronk7)
49ae1fdcea MDL-30340 blocks - incorrect option in user profile template and missing lang string in my template 2011-12-05 01:14:19 +01: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
9d2c424d83 MDL-30340 Block stickiness computation improvements
This is an attempt to clean up and fix the computation of the block
stickiness. At first, the page pattern can't be ignored because the user
may want to currently try to limit the page pattern. Second, the
site-index pattern can be forced only if the user selected 'Front page
only' as the page context.
2011-12-03 16:57:21 +01:00
David Mudrak
7c600d46aa MDL-30340 Trivial change in PHP doc block - the function does not accept any params 2011-12-03 16:57:21 +01:00
Eloy Lafuente (stronk7)
b2221ee59c MDL-30340 blocks - avoid lockin'blocks in subcontexts.
Everytime that one block instance is edited @ any subcontext,
guarantee that the 'bring back' pattern (* = all pages) is
available, so the block can be reseted to its original context
2011-12-03 11:21:48 +01:00
Sam Hemelryk
6335838604 Merge branch 'wip-MDL-30010' of git://github.com/lazydaisy/moodle 2011-11-14 12:10:17 +13:00
Mary Evans
afc7026a57 MDL-30010FIX for pagelayout problems when moving blocks 2011-11-06 19:48:10 +00:00
Petr Skoda
2a1ce6a8ed MDL-30150 support frankenstyle in page type callbacks 2011-11-06 11:32:12 +01:00
Petr Skoda
aff24313be MDL-29401 introduce new frankenstyle PARAM types
New PARAM_COMPONENT, PARAM_AREA and PARAM_PLUGIN + fixing of hopefully all current incorrect parameter types. This should help with diagnosing of incorrectly named 3rd party plugins too.
2011-09-25 09:59:55 +02:00
Sam Hemelryk
d609d96261 MDL-28599 textlib Separated collator to collatorlib with static methods, and added support for locale aware sorting of objects 2011-09-06 15:39:00 +12:00
Sam Hemelryk
6919b90f05 MDL-25602 blocks Altered order of block editing icons and added CSS to better control the size of block editing icons 2011-08-12 10:26:20 +08:00
Marina Glancy
28e63a9d8c MDL-27122 Allow admin to change CFG->undeletableblocktypes on 'Manage blocks' settings page. Instances of protected block types will be undeletable only from site context 2011-07-29 13:51:40 +08:00
Tim Hunt
fd3932fe54 MDL-26618 Moving sticky blocks on other pages does not work in Oracle.
This was due to some missing $DB->sql_empty() in a query affecting the
block_positions table.
2011-07-04 15:36:16 +01:00
Eloy Lafuente (stronk7)
ddaa914789 MDL-27829 block creation - ensure correct pagetypepattern in mod/ pages 2011-07-01 20:38:06 +02:00
Eloy Lafuente (stronk7)
0822174adc Merge branch 'MDL-27812_front_page_blocks' of git://github.com/andyjdavis/moodle 2011-06-29 15:29:14 +02:00
Andrew Davis (andyjdavis)
d863aecb92 MDL-27812 blocks: fixed the ability to add a block and have it display on all pages 2011-06-28 18:50:03 +08:00
Andrew Davis (andyjdavis)
b38e2e28a1 MDL-27829 blocks: altered the algorithm used to find plugin page types 2011-06-27 12:27:41 +08:00
Andrew Davis (andyjdavis)
b822fc8511 MDL-27829 blocks: added some brains to generate_page_type_patterns() so that it can handle special cases like course reports 2011-06-22 17:01:21 +08:00
Andrew Davis (andyjdavis)
0f63f2714f MDL-26105 blocks: made the block settings help icons work 2011-06-16 12:05:53 +02:00
Andrew Davis (andyjdavis)
84a1bea972 MDL-26105 blocks: readded the my moodle page's page type list generator function 2011-06-16 12:05:48 +02:00
Sam Hemelryk
46d3b9be73 Merged branch 's7_MDL-26105_block_settings_master' git://github.com/andyjdavis/moodle.git with changes 2011-06-13 16:54:52 +08:00
Andrew Davis (andyjdavis)
fb794ab73c MDL-26105 blocks: fixed some php errors and made a help string better 2011-06-09 17:03:27 +08:00
Sam Hemelryk
32a510de4e MDL-26105 block setting, improvement, replace switch-case with get_core_subsystems + get_plugin_types 2011-06-09 13:51:14 +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
Sam Hemelryk
faca4f2f29 MDL-27400 Fixed up typo in blocklib.php 2011-05-06 16:27:15 +08:00
Petr Skoda
cf717dc26b MDL-27148 use new get_in_or_equal() param prefix instead of start 2011-04-14 15:15:01 +02:00
Tim Hunt
d9c26e2174 blocklib MDL-25654 fix API inconsistency be renaming add_pretend_block to add_fake_block.
I added a deprecated method add_pretend_block that forwards to add_fake_block, so old code should be break. However, I aslo updated all the callers in core code.
2010-12-20 18:22:37 +01:00
Sam Hemelryk
bf2b43dfe1 blocks MDL-25074 When adding pretend blocks if the requested region doesn't exist it now uses the default region. 2010-11-05 03:45:32 +00:00
Petr Skoda
365a594107 MDL-24321 switching to stdClass in /lib/ 2010-09-21 08:07:44 +00:00
Aparup Banerjee
e2f4557a40 course MDL-24156 added deletion of user_preferences about block instances data after a course delete. 2010-09-20 02:28:42 +00:00
Petr Skoda
9311b925c6 initialized variable before include and fixed wrong require() 2010-09-17 07:52:06 +00:00
Petr Skoda
7604f5c1b0 commenting out unused broken code so that it does not irritate IDEs 2010-09-17 07:49:39 +00:00
Sam Hemelryk
d8ef60bd72 blocks MDL-24066 Blocks can now choose to be hideable + navigation and settings are no longer hideable. 2010-09-14 02:12:41 +00:00
Sam Hemelryk
4d6fd15c00 blocks MDL-23976 Added block method to determine if any of the blocks in a block region are docked. Kudo's to Brandon for the patch. 2010-09-08 09:01:15 +00:00
Petr Skoda
c6947ba7a5 MDL-23899 migration to new locale aware asort 2010-09-05 13:00:47 +00:00
Sam Marshall
51f96f5bd9 blocks MDL-24040 Creating course fails horribly if you make one of the default blocks invisible 2010-09-01 17:36:46 +00:00
Petr Skoda
847bed234d fixed a few comment typos 2010-08-28 11:54:24 +00:00
Sam Hemelryk
05c92729f2 blocks MDL-23935 fixed abuse of moodle_page protected variables 2010-08-26 06:27:47 +00: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
34a988e25f MDL-23183 Made the block config form a little more robust (check file AND class, not just file) 2010-07-18 08:05:00 +00:00