I guess you are having a hard time due to your data structure. Based on your description i think you have data in the "wide" format, like this:
Student-ID 5th 6th 7th 8th Sex
1 result1 result2 result3 result4 male
2 result5 result6 ... female
(result1, result2,... being the test scores)
Your dependent and independent variables will become clear if you restructure your data to "long" format:
Student-ID Sex Grade TestResult
1 male 5th result1
1 male 6th result2
1 male 7th result3
1 male 8th result4
2 female 5th result5
2 female 6th result6
...
Now the dependent variable is the TestResults, while the independent variables (in my example) are sex and grade.
If thats not clarifying your problem, do as Kyle says.