I think you could look at this...
http://moodle.org/mod/forum/discuss.php?d=49118
I can't give you the code at this moment, as the files that my students generated where incomplete and now they are on holidays...
but i think is a good strategy, maybe with some extra kind of forums with different management of rights or grading.