The problem isn't only about relationships. I'm not sure how many tables you have that either are not needed or that are needed in different form. If your tables are suspect, their relations are even more deeply suspect.
I have to guess. If you are doing students, grades, classes, and terms that cross multiple years, then a starting point would be
Students: StudentID (PK), Student name and other identifying stuff ONLY about the student
Class: ClassID (PK), Class name, class description, whatever else about the class but nothing about specific sessions
ClassSession: SessionID (PK), ClassID (FK), Year, anything else specific to the individual session but not the class as a whole
Grade: ClassID(FK), StudentID(FK), Grade
But in your diagram I didn't see anything about classes in your post #22 so obviously we have one of two problems. EITHER you are using another word than Class as a thing to which a grade might be associated OR your problem is not as closely related to classes as one might anticipate despite the use of "Student" and "Grade" and "specific year" concepts. I do not open unknown databases in general anyway and do not want to pick through the bones of your database like a medical examiner doing an autopsy of a corpse. I hate mysteries.
This problem can be solved FAR more easily if you would offer a description IN WORDS, not in code, of what you were trying to do and the context in which you were trying to do it. I don't know another way to ask the question.