Help me understand/translate "不留到晚自习就写完多好" (context supplied)
Because there is some uncommon term that OP don't understand. 

课代表 so call "class/course representative", is in fact, a helper/assistant roles appointed by the tutor/teacher.  So the author is a "helper" . 

这样可以避免我去办公室问作业  : So as a helper, he/she may need to go to the teahcer office to ask about home work for the student if the teacher forget about it.

而且想提前写作业 不留到晚自习就写完多好. What the author mean the he/she are able to do the home work immediately during those spare time between the class, rather than leaving it overnight.