erk! This actually happened 8th grade year at my middle school in 1997. One of my classmates hung himself 3 weeks before the end of the year. He was quiet but well-liked by lots of students and teachers. He was an acquaintance and casual friend, but I wasn't close to him. Of course graduation would happen. And of course the school would do something in his memory during graduation (they would do that for any students who died before graduation), and give his folks an 8th grade diploma. And no, they wouldn't have a problem with kids leaving class to attend the funeral. I didn't go to graduation OR the funeral, but I tend to withdraw from upsetting situations.
We didn't have real finals in 8th grade. As you know, it's a very emotionally volatile age, so reactions can be more dramatic than they would be in teens or adults. I think no one really expects a grieving kid to do hard core school work, but obviously it would vary from teacher to teacher and from kid to kid. In the incident at my school, he was discovered by another 8th grader whose family he was staying with at the time. The girl who found him didn't return to school for the rest of the year.
Another thing is that the school would bring in counselors to talk to the kids, and people would probably be allowed to leave class to meet with them. Some facilitator (i don't know what his job title is) would come in and give a talk to teachers (and probably one for interested parents as well) on how to help kids deal with loss (or guilt, or fear). They also want to do everything they can to make sure no one else will try suicide, either because they perceive that the other kid 'succeeded' in ending his pain or because they want to similarly become the center of attention in a terrible way. There will also be a lot of talk of 'Recognizing the Signs that Someone is Suicidal' even though it is often impossible to do. (We also had facilitator people come to our high school when there was a major school shooting at one of our rival schools in town.) They don't make people talk to them, but they make them available to help kids process their feelings and such.
And like I said, the teachers wouldn't expect too much out of the kids for the rest of the year, maybe watch some videos and discuss them, or review what's already been learned.
That's all I can think of right now. I'll post more if I think of anything else.