Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix late penalty notes #491

Merged
merged 2 commits into from
Nov 26, 2024
Merged

Fix late penalty notes #491

merged 2 commits into from
Nov 26, 2024

Conversation

19mdavenport
Copy link
Collaborator

Fixes the late penalty notes to not add anything if the submission is on time.

@19mdavenport 19mdavenport requested a review from webecke November 26, 2024 01:18
Copy link
Contributor

@webecke webecke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

thanks for fixing my silly mistake

notes += " Late penalty maxed out at " + numDaysLate + " days late: -";
else if (numDaysLate > 0)
notes += " " + numDaysLate + " days late: -";
notes += (int)(numDaysLate * PER_DAY_LATE_PENALTY * 100) + "% ";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what silly goose wrote this code?

@@ -465,6 +461,25 @@ else if (numDaysLate > 0)
);
}

private String makeLatePenaltyNotes(int numDaysLate, int maxLateDays, String origNotes) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that its a separate function now, makes it more clear

@19mdavenport 19mdavenport merged commit dd90965 into main Nov 26, 2024
2 checks passed
@19mdavenport 19mdavenport deleted the fix-ontime-submission-notes branch November 26, 2024 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug (probably backend): passing submissions are getting weird "0%" notes
2 participants