moodle development course for version 2.2+

616 views Asked by At

I've just started developing moodle site and looking for a good tutorial, maybe course or book.

So far I found this book which is good but it's for old v.1.9 release. The current version is 2.9.

Please help me with this.

Thanks.

1

There are 1 answers

1
Russell England On BEST ANSWER

Just some tips

The main developer docs are here : https://docs.moodle.org/dev/Main_Page

Keep this page pinned as you will use it often - https://docs.moodle.org/dev/Data_manipulation_API - Moodle can use several databases so keep the SQL code generic or use one of the SQL compatibility functions.

Avoid changing any core code.

You will likely be developing plugins, here is a list of plugins and where the code should be - https://docs.moodle.org/dev/Plugin_types

If you're just starting out then try developing a simple block - https://docs.moodle.org/dev/Blocks

Then try developing a local plugin - https://docs.moodle.org/dev/Local_plugins

Tools I use often are

  • moodlesite.com/admin/purgecaches.php - if in doubt purge the caches
  • moodlesite.com/admin/cron.php - to run the cron manually
  • moodlesite.com/admin/tool/xmldb/ - to grab the code to create/update tables

I would also strongly suggest using the codechecker before committing any code - https://docs.moodle.org/dev/CodeSniffer - this is useful for learning and also improves code quality.

Also have these settings in your config.php during development, not on a production site though.

// Always have debugging on.
$CFG->debug = E_ALL & ~E_STRICT;
$CFG->debugdisplay = true;

// Turn off caching.
$CFG->cachejs = false;
$CFG->langstringcache = false;

// Set this to true when designing but ensure its switched off when not because its very slow.
$CFG->themedesignermode = false;

// Don't send any emails.
$CFG->noemailever = true;