eddex / hslu-simple-mep-results

:bar_chart: A browser add-on that adds essential features to the HSLU MyCampus website
MIT License
39 stars 16 forks source link

firstModule calculation is wrong #95

Open Leo1212 opened 2 years ago

Leo1212 commented 2 years ago

Describe the bug I started in H21 but have some modules with a start date bevor that (TA.MAREP.2102, I.BA_INFO_ABEND_RK.H2001, I.EN_PFLICHT_NEIN.AIML) these modules should be ignored. But in the statistic my modules are shown as Semester 3.

Expected behavior The statistic should start at Semester 1.

Actual behavior The statistic starts at Semester 3. Ignoring the modules does not help.

Steps to Reproduce

  1. Add the modules (removed personal data):
    {
    "from": "2021-08-30T00:00:00",
    "to": "2021-09-10T00:00:00",
    "details": [
      {
        "key": "Nummer",
        "val": "TA.MAREP.2102"
      },
      {
        "key": "Zeit",
        "val": "08:30 - 16:30 Uhr"
      },
      {
        "key": "Dauer",
        "val": "Montag, 30.08. - Freitag, 10.09.2021"
      },
      {
        "key": "Leitung",
        "val": "",
        "pid": ""
      }
    ],
    "anlassnumber": "TA.MAREP.2102",
    "ects": null,
    "iliasUrl": "",
    "note": null,
    "grade": null,
    "numParticipants": null,
    "hasMainDetails": true,
    "title": "Mathematik-Repetitorium HS 21",
    "text": "",
    "link": "",
    "prop1": [
      {
        "text": "Teilgenommen erfüllt"
      }
    ],
    "id": ""
    },
    {
    "from": "2020-10-21T00:00:00",
    "to": null,
    "details": [
      {
        "key": "Nummer",
        "val": "I.BA_INFO_ABEND_RK.H2001"
      },
      {
        "key": "Zeit",
        "val": "18:00 - 20:00 Uhr"
      },
      {
        "key": "Leitung",
        "val": "",
        "pid": ""
      }
    ],
    "anlassnumber": "I.BA_INFO_ABEND_RK.H2001",
    "ects": null,
    "iliasUrl": null,
    "note": null,
    "grade": null,
    "numParticipants": null,
    "hasMainDetails": false,
    "title": "Online Info-Abend Ausbildung Informatik",
    "text": "",
    "link": "",
    "prop1": [
      {
        "text": "Erfolgreich teilgenommen"
      }
    ],
    "id": ""
    },
    {
    "from": "2020-02-17T00:00:00",
    "to": "2099-09-19T00:00:00",
    "details": [
      {
        "key": "Nummer",
        "val": "I.EN_PFLICHT_NEIN.AIML"
      }
    ],
    "anlassnumber": "I.EN_PFLICHT_NEIN.AIML",
    "ects": null,
    "iliasUrl": null,
    "note": null,
    "grade": null,
    "numParticipants": null,
    "hasMainDetails": false,
    "title": "Besuch von zwei englischen Sprachmodulen in der Assessmentstufe ist nicht Pflicht",
    "text": "",
    "link": "",
    "prop1": [
      {
        "text": "Angemeldet"
      }
    ],
    "id": ""
    }
  2. Look at the statistic

Screenshots MEP-Web-Ext.png

Contributing (please choose one)

Leo1212 commented 2 years ago

I found out that only the module I.BA_INFO_ABEND_RK.H2001 is responsible for the wrong calculation.

rogerKaelin commented 1 year ago

I've fixed the issue for me locally but haven't yet gotten to pushing it. Here's the sauce if anybody wants to fix it for themselves. https://github.com/eddex/hslu-simple-mep-results/issues/99#issuecomment-1283029378