Unfortunately, I can't oblige with the code, but I think it would be a great addition to Moodle. Their mission statement does indicate openness.
Lounge
Mapping Discussion with Argunaut
This discussion has been locked so you can no longer reply to it.