Hawk High

First Flight #39
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Impact: medium
Likelihood: high
Invalid

[M-2] Only bad review is given to a student in `LevelOne::giveReview()` function

Description:
only bad reviews is given to a students instead of good and bad which will add or deducts 10 points from the score.

if (!review) {
studentScore[_student] -= 10;
}

Impact:
When a students deserved good reviews, he will not have any points, but when he gave bad reviews the systems will deduct 10 points from his score

Tools used:
Manual Reviews

Remediation:
Consider updating the following

- if (!review) {
- studentScore[_student] -= 10;
- }
+ if (!review) {
+ studentScore[_student] -= 10;
+ } else {
+ studentScore[_student] += 10;
+ }
Updates

Lead Judging Commences

yeahchibyke Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.