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

[App crash] fix(grades): if no coefficient is returned, set to 1 #699

Merged

Conversation

Bulgus
Copy link
Contributor

@Bulgus Bulgus commented Jan 28, 2025

Caution

Lorsque les coefficients ne sont pas retournés par Pronote, cela cause un crash de l'application. Cette PR résout ce problème.

Checklist

  • Vous avez testé de build le projet avec vos modifications et ce build a réussi
  • Vous respectez les conventions de codage et de nommage du projet
  • Vous utilisez la tabulation pour l'indentation afin de maintenir un code lisible
  • Cette pull request n'est pas un duplicata d'une autre
  • Cette pull request est prête à être revue (review) et fusionnée (merge)
  • Il n'y a pas de TODO (aka des annotations pour du code manquant) dans vos modifications
  • Il n'y a pas d'erreurs de langue dans votre code (grammaire, vocabulaire, conjugaison, orthographe)
  • Les détails des changements ont été décrits ci-dessous
  • Cette pull-request n'est pas une "breaking-change" (des modifications qui vont entraîner la modification du fonctionnement de certaines fonctionnalités déjà existantes)

Changelog

Pronote has recently implemented the ability to hide grade coefficients. This prevents calculation of the average, and causes a crash when displaying the average or grade details.

This significantly skews the calculation of the overall average in the case of grades with coefficients other than 1, but there are no other solutions.

  • If the coefficient isn't returned, set to 1
  • The same applies to Ecole Direct, just in case.
  • If the coefficient in Skolengo is 0, take it into account rather than setting it to 1. (|| --> ??)
No coefficient displayed on Pronote

image

@Bulgus Bulgus changed the title fix(grades): if no coefficient is returned, set to 1 [App crash] fix(grades): if no coefficient is returned, set to 1 Jan 28, 2025
@ecnivtwelve ecnivtwelve merged commit 7471551 into PapillonApp:main Jan 28, 2025
1 check failed
@Bulgus Bulgus deleted the fix(grades)/no_returned_coefficient branch January 30, 2025 14:28
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.

2 participants