From the details you provided,my understanding is you could've just completed it during lunch detention and that would've been the end of it, that seems pretty fair to me. You were aware of the consequences of not doing your homework and chose to continuously not do your assignments either at home or during the lunch period.