miDeb / digitales_register

Inoffizielle App für das Digitale Register (https://digitalesregister.it)
GNU General Public License v3.0
16 stars 3 forks source link

Add "Lernkontrolle" to estimateShouldWarn function in data.dart #17

Closed jbksr closed 1 year ago

jbksr commented 1 year ago

I hope this doesn't break something.

Actually, how does the official register know whether it's an entry with a warning? Here's the data for the entry with the title "Lernkontrolle" which is not being recognised correctly by the app:

            {
                "id": 418,
                "category": 418,
                "type": "gradeGroup",
                "title": "Lernkontrolle",
                "subtitle": "LZK \"Logisches und stichhaltiges Argumentieren\"",
                "label": "Deut",
                "warning": false,
                "0": true,
                "checkable": true,
                "checked": false,
                "online": 0,
                "submission": null,
                "deadline": "2023-09-26 08:30:00",
                "deadlineFormatted": "Dienstag, 26.09.2023, 08:30",
                "deadlineStart": null,
                "deadlineStartFormatted": "Donnerstag, 01.01.1970, 01:00",
                "submissionAllowed": 0,
                "submissionResigned": false,
                "submissionIsNowInOvertime": false,
                "homework": 0,
                "done": null,
                "gradeGroupSubmissions": null
            }

Could the "homework": 0 value be used to estimate a warning? For homework it is really 1. But I'm pretty sure there's another case where it is 0 and also not an exam. Not sure tho.

miDeb commented 1 year ago

Thanks, looks good!

Could the "homework": 0 value be used to estimate a warning? For homework it is really 1. But I'm pretty sure there's another case where it is 0 and also not an exam. Not sure tho.

I don't know either. Previously, the warning field was used to determine whether a warning should be shown, but it is now always false, as you can see. So I introduced this check to still show warnings in some cases. I don't have access to an account for digitalesregister.it anymore, so I can't check myself how the API behaves now, but your change makes sense.

miDeb commented 1 year ago

I don't know when we'll get to releasing a new version to the stores, I'm now studying in Vienna and don't have that much time to look after this project.

jbksr commented 1 year ago

I don't know when we'll get to releasing a new version to the stores, I'm now studying in Vienna and don't have that much time to look after this project.

Hey, no problem. Good luck and success with your studies!