I think you need to take small steps.
1 I think each student should have a unique 'student code' not the class code.
2. I think students who have left should be omitted not deleted
Better than 2 there should be another linked look up data base/table that allows the first table to create a new record by student code but does not delete the record when the student is deleted on the first table. Once you have been able to retain the student record safely in the second table then you can play with various viewing layouts
Expanding on Dumiya's item 2: Isn't it possible to have a student leave and then return in some point in the future?
If you aren't using a portal, you may want to look up this term in filemaker help. It's a useful tool for displaying and editing multiple related records. WIth this on a students layout, you can open up a window to a list of related report records--one for each year the student was enrolled.