Closed Levivig closed 6 years ago
At Corvinus the same build is used but the grade names do not include the grade number, so this must be a local configuration change at your university. I will think of a robust way of handling this.
@Levivig Can you please test this new version? https://github.com/solymosi/npu/raw/60d136219b8cc0ceafadd1cd83c1ba21070579d7/npu.user.js PR: #27
Works fine for me.
Yeah, unfortunately this happens when your only option is to parse HTML without an API. 😦
Off-topic suggestion: AI which learns which are passing grades. Or asking the students at first login "Is this a passing grade" and saving it as configuration variable. (This way, people who want a pristine semester can say that a Good (4) is not enough, consider it a failing grade!)
I would not go down the AI route for complexity reasons, but I like the idea of a little bit more configurability regarding the grade detection. My only concern is that it would be a feature barely used by anyone, but could cause backwards compatibility headaches for us down the road - i.e. if we allow users to customize passing and failing grade strings, we have to honor their custom configuration even if we later develop a new, better detection mechanism. This very PR (relaxing the matching rules from exact match to substring match) would be too dangerous if we already had users with custom strings configured (what if they added a passing string that is the substring of a failing string?)
For now, we could do the following instead: whenever the script finds a grade string it cannot recognize as passing or failing, it would report that grade string (and nothing else) back to us. This way we could add missing grade strings in later updates.
Version 1.52.3 has been released with the fix 🎉 Thanks for reporting this bug!
Not sure if this is a universal issue, but on this version the classification is not working, because the grade names are different. Jeles (5); Jó (4); etc. instead of Jeles; Jó; etc. . I quickly fixed it for myself like this:
If it looks good I can make a PR.
Build: 452 (2017.11.08.) P20171221