by Derek Chirnside.
As Mary has said, if you want to copy what they have done at http://moodlecommons.org you don't need to modify the code, just turn editing on and add the activity. As for the code question, this is outside my knowledge.
-Derek