EdupageAPI / edupage-api

A python library for accessing your Edupage account
https://edupageapi.github.io/edupage-api/
GNU General Public License v3.0
66 stars 13 forks source link

[Bug] `Grades.get_grades` - max_points doesn't work #43

Closed ivanhrabcak closed 2 years ago

ivanhrabcak commented 2 years ago

Describe the bug When I was writing the grades example, I found out get_grades is not working properly. For me, the max points are never in p_vaha_body, they sometimes show up in p_vaha.

How to reproduce

# ...login

grades = edupage.get_grades()
for grade in grades:
    print(grade.max_points)

Expected behavior Every grade (except grades with percentages) should have max_points, but max_points is None

Version

The bug The code with the bug is here.

Could anyone else test this? Where are the max points for you? (Are they in p_vaha?)

BelKed commented 2 years ago

If I understand correctly, how EduPage works, grades are differentiated by p_typ_udalosti:

So, according to this knowledge, I implemented that in https://github.com/ivanhrabcak/edupage-api/commit/1acdf1b0659e6473ca1f02a53a286e3b892a9ccc. I hope, it will work now correctly...

ivanhrabcak commented 2 years ago

Good job! Everything is working properly now. Thank you.