It is not idiomatic "to give" a class. A class, hinein this sense, is a collective noun for all the pupils/ the described group of pupils. "Ur class went to the zoo." There's a difference hinein meaning, of course. You can teach a class throughout the year, which means giving https://youtu.be/T0zWXvhEQwo?si=wNc6ihu97ShtIl7u