summaryrefslogtreecommitdiffstats
path: root/assets/js/gsec.js
diff options
context:
space:
mode:
authorsijanec <sijanecantonluka@gmail.com>2020-06-08 15:21:59 +0200
committersijanec <sijanecantonluka@gmail.com>2020-06-08 15:21:59 +0200
commit134d89078f864250abf340713edc1d23d90ede24 (patch)
tree386288c539024d6692c8244e491e1828090dfc91 /assets/js/gsec.js
parentterms of service css fix - who reads those? (diff)
downloadbeziapp-134d89078f864250abf340713edc1d23d90ede24.tar
beziapp-134d89078f864250abf340713edc1d23d90ede24.tar.gz
beziapp-134d89078f864250abf340713edc1d23d90ede24.tar.bz2
beziapp-134d89078f864250abf340713edc1d23d90ede24.tar.lz
beziapp-134d89078f864250abf340713edc1d23d90ede24.tar.xz
beziapp-134d89078f864250abf340713edc1d23d90ede24.tar.zst
beziapp-134d89078f864250abf340713edc1d23d90ede24.zip
Diffstat (limited to 'assets/js/gsec.js')
-rw-r--r--assets/js/gsec.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/assets/js/gsec.js b/assets/js/gsec.js
index 6cef90e..73e8fd2 100644
--- a/assets/js/gsec.js
+++ b/assets/js/gsec.js
@@ -481,7 +481,8 @@ class gsec {
let gradeSpans = parsed.getElementsByClassName("txtVOcObd");
for (const grade of gradeSpans) {
- var ist = grade.getElementsByTagName("span")[0].getAttribute("title").split("\n");
+ var whatever_ist_meant_in_my_head_back_then_but_as_a_string = grade.getElementsByTagName("span")[0].getAttribute("title");
+ var ist = whatever_ist_meant_in_my_head_back_then_but_as_a_string.split("\n");
if (ist.length == 1) { // that means the txtVOcObd defines a zaključno oceno // gimsis is just utter crap
var gradeToAdd = {
"gradeType": GSEC_ZAKLJUCNA_GRADE,
@@ -496,11 +497,12 @@ class gsec {
var teacher = ist[1].split(": ")[1].trim();
var subject = ist[2].split(": ")[1].trim();
var name = [];
-
- name.push(ist[3].split(": ")[1].trim())
- name.push(ist[4].split(": ")[1].trim())
- name.push(ist[5].split(": ")[1].trim())
-
+
+ name.push(whatever_ist_meant_in_my_head_back_then_but_as_a_string.split("Ocenjevanje: ")[1].split("\nVrsta: ")[0].trim());
+ name.push(whatever_ist_meant_in_my_head_back_then_but_as_a_string.split("Vrsta: ")[1].split("\nRok: ")[0].trim())
+ name.push(whatever_ist_meant_in_my_head_back_then_but_as_a_string.split("Rok: ")[1].trim())
+ // prov predstavljam si enga profesorja, ke bo v polje Ocenjevanje vnesel "Vrsta: " in spet BREAKAL
+ // FKING algoritem.
var gradeNumber = Number(grade.getElementsByTagName("span")[0].innerHTML);
var temporary = grade.getElementsByTagName("span")[0].classList.contains("ocVmesna");