Refactored LecturesController#update.
Refactored Studentgroups view stuff in a partial that is called twice.