The graduateAndUpgrade function fails to implement a critical business logic requirement: preventing students who haven't met the minimum score threshold from graduating. While the contract initializes and tracks a cutOffScore in the startSession function, this value is never actually used to validate student eligibility during the graduation process.
High Severity. The absence of this validation completely bypasses a core academic requirement of the system. All students will be promoted to the next level regardless of their performance, which:
Undermines the entire academic assessment system
Invalidates the purpose of tracking student scores
Defeats the purpose of the teacher review mechanism
Contradicts the explicitly stated graduation requirements
In the current implementation:
The cutOffScore is set in startSession:
Teachers can give reviews that affect student scores via giveReview:
However, the graduateAndUpgrade function processes graduation for all students without checking their scores:
This completely negates the stated requirement: "If they fail to meet the cutoff score at the end of a school session, they will be not graduated to the next level when the Principal upgrades the system."
Implement the missing validation in the graduateAndUpgrade function:
Alternatively, if students who don't meet the criteria should be expelled rather than blocking the upgrade:
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.