To set the cutOffScore the principal must call the LevelOne::startSession function with the cutOffScore passed as an argument, but the thing is when a student enroll for the contract, the maximum score they can get is 100 (as the student got a bad review, their review will be reduced by 10, and if got a positive review their score will remains constant with no change), so if the principal set the cutOffScore to a score above 100 no student will be able to graduate although they haven't got any bad review.
1- Navigate to test/LeveOnelAndGraduateTest.t.sol file.
2- Add the following PoC code to the test file:
3- in the command line, run the following command: forge test --match-test testCutOffScoreCanBeMoreThan100 -vvv
4- the output would be :
Any student who doesn't meet the cutOffScore should not be upgraded, so if the principal set the cutOffScore to a value greater than 100, no student will be able to graduate although they haven't got any bad review.
Manual Recon
foundry test suite
in the LevelOne::startSession function, add the following check :
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.