106 Commits

Author SHA1 Message Date
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
moodler
7a3290ed20 No need to flag notices about missing database stuff in blocks 2005-04-10 13:51:19 +00:00
defacer
b35fc18250 Fix for bug 2731. 2005-03-12 15:56:19 +00:00
mjollnir_
3f05218715 In blocks_print_group, if we just return if pageblocks are empty, we never get to print the admin block 2005-03-08 23:24:10 +00:00
defacer
3ef642d96a Implemented discussion from bug 2547:
* Block authors no longer need to set $this->content_type
* If you want to make a "list" block, just derive from block_list
  instead of block_base
* All switch() statements gone from library code
* Overloaded method is_empty() added to block classes for convenience
2005-03-02 19:22:26 +00:00
defacer
831cd87f77 Er, print the adminblock only if editing is turned on. 2005-03-02 05:57:50 +00:00
defacer
dffd4bb948 You know you are beyond hope of redemption when you make "API uniformity" changes. ;-) 2005-03-02 05:56:24 +00:00
defacer
664923229c Since $PAGE knows where the adminblock should be printed, let it do the printing. 2005-03-02 05:47:39 +00:00
defacer
ec79d3e428 One-line-setup function for using blocks in a page. 2005-03-02 05:15:39 +00:00
defacer
ff67989728 Fix for bug 2628. 2005-02-23 18:51:00 +00:00
defacer
e82d6cac81 Improvement when configuring a block instance: the heading shows the
block's original title as it appears in the lang files, not its "internal"
name.
2005-02-18 17:05:49 +00:00
defacer
afd8402cfa Changed id attribute of adminblock to class, just like every other block. 2005-02-18 03:37:07 +00:00