Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Talk:Blocks

From MoodleDocs
Revision as of 11:08, 28 December 2011 by Greg Preece (talk | contribs) (Updating with latest changes to main article - All previous points of discussion now resolved)

Moodle 2.0


Update, 28th December 2011

I have removed the instance_allow_config() method from the tutorial. As noted by Mike Churchward, this method is no longer used in Moodle 2.0. After double-checking in the code base, it turns out that basic instance config is automatic, and the edit_form.php file is all that is required to extend this. The appendix has also been updated as required.

This one got past me because while instance_config_print() is marked as deprecated, instance_allow_config() is not. Thanks to Mike for his sharp eyes.

Update, 23rd December 2011

So I tried implementing a tree block to prove my code, and there's a slight issue. The block_tree code that was submitted by Alan references a tree_item abstract class and descendants, and the renderer code expects this class in order to function correctly. Problem is, none of these classes are anywhere to be found in the Moodle 2.x code base, and believe me, I looked. Turns out this is already on the tracker as #28289. I am noting this in the tutorial, and if this issue is resolved, I will update the documentation accordingly.

PHP closing tags have been removed from the tutorial as discussed previously.