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

Manually added grades are removed when toggling the grades of existing subjects #42

Closed
runarmod opened this issue Jul 2, 2024 · 0 comments · Fixed by #43
Closed

Manually added grades are removed when toggling the grades of existing subjects #42

runarmod opened this issue Jul 2, 2024 · 0 comments · Fixed by #43
Assignees
Labels
bug Something isn't working

Comments

@runarmod
Copy link
Owner

runarmod commented Jul 2, 2024

This is a quick solution to another problem when the manual addition of grades was implemented. At first, the manually added grades would stay in the table, but their grades would not be reflected in the grade average.

Possible solutions:

  • after searching for grades that are checked, search through the table of manually added grades and take them into account
  • ... or start with the manually added grades instead of resetting to 0 when toggling a checkbox
  • ... or do not recount every time a checkbox is toggled, but rather only update the one grade toggled when checkbox is pressed (I think this is the best way to do it)
@runarmod runarmod added the bug Something isn't working label Jul 2, 2024
@runarmod runarmod self-assigned this Jul 5, 2024
runarmod added a commit that referenced this issue Jul 5, 2024
Previously when toggelig a checkbox, all grades were recalculated. Now only the affected grade is added or removed from "gradeCount" and "creditCounts". Fixes #42.
@runarmod runarmod linked a pull request Jul 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant