Skip to content

Commit

Permalink
Remove hodn_key. It is not used anymore.
Browse files Browse the repository at this point in the history
FWIW: adding 'semester' is not enough to make it unique. It is possible for a
given student to be enrolled in a given course multiple times, even in the same
year and semester. Usually (maybe always?) they're postgraduate courses like
"Pedagogická činnosť", "Vedecká činnosť III", "Seminár pracoviska" etc. There
are known cases of:

- two rows which only differ in hodn_datum, hodn_termin, hodn_znamka,
  hodn_znamka_popis (empty vs non-empty) (seen with semester = "" or "Z")

- two rows which only differ in hodn_datum, hodn_znamka, hodn_znamka_popis
  (different non-empty values) (hodn_termin is "R - ...", semester is "")

- two rows which only differ in hodn_datum (e.g. "09.02.20xx" vs "19.06.20xx")

- two completely equal rows (seen with semester = "" or "Z")

Fortunately, we don't need a unique row identifier for this table.

Updates #91.
  • Loading branch information
TomiBelan committed Apr 11, 2023
1 parent 3d5833a commit 5bd5624
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions fladgejt/structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@
Hodnotenie = keyed_namedtuple('Hodnotenie', [
'akademicky_rok', 'skratka', 'nazov', 'typ_vyucby', 'semester', 'kredit',
'hodn_znamka', 'hodn_termin', 'hodn_datum', 'hodn_znamka_popis',
'zapisny_list_key', 'predmet_key', 'hodn_key'],
predmet_key=['skratka'],
hodn_key=['zapisny_list_key', 'skratka'])
'zapisny_list_key', 'predmet_key'],
predmet_key=['skratka'])

PriebezneHodnotenie = namedtuple('PriebezneHodnotenie', [
'dovod', 'poc_bodov', 'maximum', 'zaevidoval', 'zapocitavat', 'minimum'])
Expand Down
1 change: 0 additions & 1 deletion votrfront/js/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ export interface Hodnotenie {
hodn_znamka_popis: string;
zapisny_list_key: string;
predmet_key: string;
hodn_key: string;
}

export interface PriebezneHodnotenie {
Expand Down

0 comments on commit 5bd5624

Please sign in to comment.