Commit Graph

117 Commits

Author SHA1 Message Date
moodler 7aae797ec1 And another bit of MDL-7961 2006-12-18 02:00:38 +00:00
moodler c5749e312f Fixed a backwards logic bug preventing format changes sometimes MDL-7961 2006-12-18 01:58:59 +00:00
toyomoyo 2564d898d3 fixing a warning 2006-11-24 01:59:48 +00:00
vyshane 69e5d0ef95 Fix for MDL-7293. Added new function blocks_move_block() to replace blocks_execute_repositioning_atomic(). Reverted blocks_execute_repositioning() to what it was before the changes made whenblocks_execute_repositioning_atomic() was introduced. 2006-11-16 03:23:05 +00:00
vyshane 059c9be198 Fix for MDL-7293. We do not block_add() blocks that are pinned - for the ajax course formats. 2006-11-15 03:29:59 +00:00
stronk7 670eea76db New block upgrade functions must be called:
xmldb_block_BLOCKNAME_upgrade()

Part of MDL-6786, just for consistency.
2006-10-15 23:02:07 +00:00
nfreear 1bece9174c Fixes bug, "Warning: Invalid argument supplied for foreach() in /var/www/html/ndf42/head/lib/blocklib.php on line 174" 2006-10-10 11:03:35 +00:00
cap2501 c4308cfa1b Bug:MDL-6674
made changes to blocks_exeute_repositioning_atomic to fix some logic errors with shifting around the weight list
2006-10-10 02:06:51 +00:00
cap2501 77e65ff786 removed some debugging output accidently left in. 2006-10-08 20:23:30 +00:00
cap2501 e028ed34da created blocks_execute_repositioning_atomic as an extension of blocks_execute_repositioning, the original did adjust the column that the block was coming from but it did not insert it properly into the target column (adjusting the weights of the other blocks). This is currently only really nessicary for the ajax formats. 2006-10-08 20:21:15 +00:00
skodak 8ad2207965 fixed Fatal error: Call to undefined function: print_recent_activity() when adding Recent Activity as a sticky block MDL-6437 and blocks block database MDL-5931 2006-09-30 21:02:09 +00:00
stronk7 db8bd7a66f Now XMLDB installation is enabled! Old mysql.php and postgres7.php can
continue being used as previously until we finish all the required
DDL functions.

Also, this implies that *.sql files aren't needed anymore. Now all we have to do
is to maintain the install.xml files from the editor.
2006-09-20 22:36:21 +00:00
vyshane 48f6bcddd2 Fix for blocks capability updates. Somehow missed this commit last night. 2006-09-13 04:08:58 +00:00
vyshane f7cf2f8efd Fixed bug preventing capability upgrades for blocks. Typo :( 2006-09-12 08:25:03 +00:00
skodak b1631fef28 add admin_tree to front page during install and upgrade 2006-09-03 18:37:41 +00:00
skodak e9a207595c allow deleting of block when original code not present 2006-09-03 17:46:27 +00:00
skodak 02cc05a708 fixes for new admin blocks 2006-09-02 23:55:56 +00:00
stronk7 17c9113752 This condition was preventing new installs sometimes 2006-08-31 22:42:04 +00:00
stronk7 790647b950 Block plugin tables can use the XMLDB install & upgrade 2006-08-31 00:02:06 +00:00
stronk7 1164af7cf5 Block core blocks tables can use the XMLDB install & upgrade 2006-08-30 23:18:29 +00:00
cap2501 4a1a14c9d3 added nessicary code for ajax course format 2006-08-28 02:06:04 +00:00
moodler 0a0bb38019 Ed Coyne's AJAX course format, with some cleanups done.
More cleanups to come from Ed.

This isn't actually working for me right now but he'll fix it now.

This is completely optional and won't affect any other code right now.
2006-08-24 03:20:37 +00:00
skodak dedb2304cd upgrade logging cleanup, fixes - more improvements ahead 2006-08-17 22:37:34 +00:00
skodak 8549af11d1 fixed upgrade success notification, backup and blocks success messages are not red anymore... 2006-08-14 08:37:19 +00:00
moodler f10306b9e2 Removed tabs 2006-08-09 14:00:51 +00:00
moodler bbbf2d4015 ROLES AND PERMISSIONS - FIRST CHECK-IN
=======================================

WARNING:  DEV IS CURRENTLY VERY UNSTABLE.

This is a mega-checkin of the new Roles system.   A lot of changes have
been made in core and modules.

Currently there are a lot of rough edges and known problems.  We are
working hard on these .. .the reason for getting this into HEAD at this
stage is enable us to move faster (our branch was diverging from HEAD
too much).

Please keep an eye on http://docs.moodle.org/en/Roles for current status
and information for developers on how to use the new Roles system.
2006-08-08 05:13:06 +00:00
skodak 583fad994c Bug #5352 - upgrade might be interrupted by user - upgrades are now logged into moddata/upgradelogs/, user abor is ignored and concurrent running of upgrades is prevented from one browser 2006-08-01 07:46:19 +00:00
sam_marshall 44c55d4662 Added hooks so that blocks can create functions that are run when they are installed and uninstalled. The base implementation does nothing. 2006-07-14 11:17:46 +00:00
tjhunt a36f058e53 Bug 6101 - Automatically scroll to any errors when upgrading the database. JavaScript thanks to Andrew Walker. PHP changes are my fault. 2006-07-13 09:48:56 +00:00
tjhunt b1a308bee0 Merge from 1.6 branch. 2006-05-17 11:38:34 +00:00
martinlanghoff 66c7e47b27 blocklib: cache (and used cached) block instances properly in $pageblocks
Now blocks_have_content() caches instantiated block objects inside $pageblocks
and blocks_print_blocks() uses them if available. This behaviour now matches
the documentation: blocks instances are created only once, get_content()
may be invoked several times.

A better fix would be to cache the _output_ of the block (the ->content
property) but it may bite us if any block is counting on being called twice.

Discussion at: http://moodle.org/mod/forum/discuss.php?d=45867
2006-05-17 04:39:43 +00:00
stronk7 f809df70ce Avoided some notices when one block has been deleted from moodle/blocks
and from blocks admin page and their instances haven't been deleted.

We should build some sort of check to do all the house-cleaning of "orphaned"
blocks, perhaps each time we arrive to the blocks admin page.
2006-04-24 15:01:35 +00:00
vyshane a2c28054b8 Added $CFG->pagepath to the blocks_execute_action() function for the config
action. This is used to generate the Moodle Docs URL for configuration of an
instance of a block.
2006-03-16 04:55:43 +00:00
mjollnir_ f9648e77cf Added cron support for blocks - it was already there in the tables, now we just need to use it 2006-02-14 03:24:08 +00:00
mjollnir_ ddf1935f30 For pinned blocks (that don't have a pageid), make one up on the fly (Fixes bug #4497) 2005-12-20 20:55:37 +00:00
defacer 1130633117 NEW FEATURE:
Per-block access controls for creating and editing block instances. Defaults
behave the same as before, and the framework has final say as before.

See relevant discussion at http://moodle.org/mod/forum/discuss.php?d=36444



Other minor changes: Converted "continue" to "break" inside switch statements
(more to the point, although equivalent), change erroneous (but harmless)
"return false" to "break" on failed addition of block instance, removed some
inline comments from block_base (they were duplicated in PHPdoc)
2005-12-17 04:37:55 +00:00
defacer a9033ad5f8 Faster block_method_result(), my back-of-the-envelope benchmarks say that
call_user_func is about 3 times faster than eval(). Which is no surpise. ;-)

Faster block_load_class() by checking if the block class is already present
instead of relying on require_once() and include_once() which have include
paths and other nasties to take into account.
2005-12-17 03:09:13 +00:00
moodler b9709905c7 Merged CSS fix for bug 4045 from stable 2005-09-09 16:52:47 +00:00
mjollnir_ a9b3afb7b1 Merged from MOODLE_15_STABLE: Performance fix: in postgres, sometimes indexes are not used because of type casting. block_instance.pageid is a big int field so the index wasn't being used. Wrapping in '' prevents the typecast. See http://www.postgresql.org/docs/7.4/interactive/datatype.html#DATATYPE-INT for more information 2005-09-07 22:00:55 +00:00
defacer 3cdc4597f5 Fixing copy/paste typo, caught by Howard Miller.
Penny can you please confirm that this is how it's supposed to be?
2005-08-23 18:16:06 +00:00
mjollnir_ 4374ee2ca9 Fixing warnings in my moodle/ blocks /pagelib, plus moved page->edit_always to base class 2005-08-23 04:48:34 +00:00
mjollnir_ ee6055eb89 Fixing up the my moodle blocks to use blocks_setup instead of the old way. 2005-08-23 04:03:56 +00:00
mjollnir_ 0d6b9d4f4d MyMoodle: new /my/ page, contains course overview (module based, forum done). User defined blocks on /my/ page, admin defined stickyblocks. Needs lots of testing. Held off bumping version.php for blocks because of the postgres upgrade fixes Patrick is putting in. 2005-08-16 00:25:39 +00:00
defacer 2e477369d3 Merging from STABLE:
Fix for bug 3510:

Due to stupidly copy/pasting some code, deleting a block instance could,
under some circumstances, throw a fatal error.
2005-06-14 20:33:39 +00:00
defacer b33dd23adc Merging from STABLE:
Implementing Dan Marsden's great idea for additional hooks when block
instances are deleted (bug 3446). Going a step further and adding hooks
for when block instances are created.
2005-06-13 03:32:31 +00:00
defacer b011f733bf Fix for bug 2635:
The "current blocks code older than the one that made the database" message
tweaked so that it's different from the corresponding Moodle core warning.
2005-05-17 15:28:06 +00:00
thepurpleblob 2d81e9080a Changed include to require for base_block class. Won't get far without this
and puts error message in the right place if there is a problem
2005-05-03 12:23:48 +00:00
defacer ff6191b742 On second thought, moving the cache retrieval out of the loop should eliminate
up to ten or so function calls per page view. I don't know how expensive they
are, but let's take what we can.
2005-04-30 03:18:02 +00:00
defacer 9b68732055 Extra check in blocks_preferred_width: don't examine any instance if that
block is not visible. Apart from fixing a bug, this is also they key to
fixing broken behavior with legacy 1.4 blocks.
2005-04-30 03:14:42 +00:00
defacer 61abc65bb9 New function block_is_compatible(), if it returns anything but true and you
decide to do anything with the block your warranty is void.
2005-04-30 03:08:04 +00:00