Since 2013/09, I discovered the existence of a free great tool (Auto-Multiple Choice) that every teacher should know. It allows you to make quizzes very quickly with automatic marking. Since I investigate it, some of my colleagues are using it (S. Lavirotte, D. Lingrand, G. Rey) and we share a lot of experiences on it. Congratulations to developpers of this software. A good french description is also avalaible here.
In 2011/09, I created f-PDF files thanks to LibreOffice that contains editable textfields and in which students can add textual information as answers to exercices. Then, thanks to iTextSharp Powershell library, it is possible to parse PDF documents and to easily extract students answers in text format. By this way, same document is used as the course support and answers to exercices. See Powershell Course for file examples.