From 38a083742d9c5002b73b69f2818297e3428a727e Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Fri, 24 Jan 2025 11:18:46 +0100 Subject: [PATCH] update(MyLv Noten farbe): uses db positiv column to determine the color of the grade in the MyLv component --- .../education/Lehrveranstaltung_model.php | 6 +++- public/css/Cis4/Cis.css | 2 ++ .../StudiengangInformation.js | 2 +- .../Cis/Mylv/Semester/Studiengang/Lv.js | 33 ++++++++++++++----- 4 files changed, 33 insertions(+), 10 deletions(-) diff --git a/application/models/education/Lehrveranstaltung_model.php b/application/models/education/Lehrveranstaltung_model.php index 3f02f5ce7..8044fa9de 100644 --- a/application/models/education/Lehrveranstaltung_model.php +++ b/application/models/education/Lehrveranstaltung_model.php @@ -608,7 +608,11 @@ class Lehrveranstaltung_model extends DB_Model $this->addSelect($lvbezeichnung . ' AS bezeichnung'); $this->addSelect($sgbezeichnung . ' AS sg_bezeichnung'); $this->addSelect('UPPER(sg.typ::VARCHAR(1) || sg.kurzbz) AS studiengang_kuerzel'); - + + //also adds returns the index of the grade + //TODO: ist zeugnissnote immer gleich wie die lvgesamtnote + $this->addSelect('COALESCE(zn.note::numeric,gn.note::numeric) as note_index'); + $this->addSelect('COALESCE(znn.positiv,gnn.positiv) as positiv'); $this->addSelect('COALESCE(gnn.' . $bezeichnung . ', gnn.bezeichnung, gn.note::text) AS lvnote'); $this->addSelect('COALESCE(znn.' . $bezeichnung . ', znn.bezeichnung, zn.note::text) AS znote'); diff --git a/public/css/Cis4/Cis.css b/public/css/Cis4/Cis.css index 78d9215f1..74d8648e0 100644 --- a/public/css/Cis4/Cis.css +++ b/public/css/Cis4/Cis.css @@ -32,6 +32,8 @@ html { --fhc-cis-menu-lvl-5-color: #000; --fhc-cis-menu-lvl-5-bg-hover: #eceff1; --fhc-cis-menu-lvl-5-color-hover: #000; + --fhc-cis-grade-positive: rgb(0, 128, 0); + --fhc-cis-grade-negative: rgb(128, 0, 0); } @media (min-width: 992px) { :root { diff --git a/public/js/components/Cis/Cms/StudiengangInformation/StudiengangInformation.js b/public/js/components/Cis/Cms/StudiengangInformation/StudiengangInformation.js index 540f21136..06743ae5d 100644 --- a/public/js/components/Cis/Cms/StudiengangInformation/StudiengangInformation.js +++ b/public/js/components/Cis/Cms/StudiengangInformation/StudiengangInformation.js @@ -46,7 +46,7 @@ template:/*html*/`