Closed Mikael-Lenander closed 1 month ago
What?
When a teacher opens the submissions modal by clicking "View all submissions", it raises zero division exception. This pr fixes the bug.
Why?
No one likes bugs.
How?
Checks that the denominator is >0 before division.
Remember to add or update unit tests for new features and changes.
What type of test did you run?
Opened the submissions modal for exercises with 0 and >0 submissions.
Did you test the changes in
Think of what is affected by these changes and could become broken
Clean up your git commit history before submitting the pull request!
Since I already merged PR apluslms/a-plus#1366, which fixes the same bug, I will close this as a duplicate.
Description
What?
When a teacher opens the submissions modal by clicking "View all submissions", it raises zero division exception. This pr fixes the bug.
Why?
No one likes bugs.
How?
Checks that the denominator is >0 before division.
Testing
Remember to add or update unit tests for new features and changes.
What type of test did you run?
Opened the submissions modal for exercises with 0 and >0 submissions.
Did you test the changes in
Think of what is affected by these changes and could become broken
Translation
Programming style
Have you updated the README or other relevant documentation?
Is it Done?
Clean up your git commit history before submitting the pull request!