SLoodle is an open source tool set for linking Second Life and Moodle. It also works with OpenSim.

There is also a SLoodle compatible grid management tool called Modlos that allows you to manage your OpenSim grid from Moodle.