If you’re interested in building and integrating badges into your Moodle site, a new tool is now in beta and available for you to use. Download the code from Iain Checkland here [http://drcheckers.wordpress.com].
The Block Badger is a block that adds and displays earned badges within the Moodle classroom and sites. You can read more and see screenshots here.