The gruduation function does not check the following which are required by the docs.
sessionEnd
The amount of reviews each student has
The final student score (cutOffScore)
In the graduateAndUpgrade function the docs require that before a system upgrade can take place the school's sessionEnd has been reached. This function does not check if we are past the sessionEnd allowing the Principal to call the graduate function before the session has ended.
The docs state that before a system upgrade all students must have 4 reviews. This function does not check how many reviews the each student has, allowing the principal to upgrade the system with students having less than 4 reviews.
Finally, the cutOffScore is not checked for any student, allowing students who did not make the cut to graduate to the next level.
Students who did not make the cut will always graduate.
Its possible that an upgrade will take place without a student receiving the 4 required reviews.
Its possible the prinicpal could call the graduateAndUpgrade before the session has ended.
Manual review
I recommend making the following changes below. I've included the check for the session end and requiring each student to have 4 or more reviews and
All students are graduated when the graduation function is called as the cut-off criteria is not applied.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.