From d1f69d469681a2377f241563a977c8b6845c1ac0 Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Mon, 6 Feb 2023 08:42:42 +0100 Subject: [PATCH] MyLV Verbesserungen & cleanup --- application/controllers/components/Cis/Mylv.php | 7 +------ .../models/education/Lehrveranstaltung_model.php | 6 +++++- application/models/education/Pruefung_model.php | 3 ++- .../organisation/Studiensemester_model.php | 1 + public/css/Cis4/Cis.css | 3 +++ .../components/Cis/Mylv/Semester/Studiengang.js | 2 +- .../Cis/Mylv/Semester/Studiengang/Lv.js | 16 +++++++++++----- .../Cis/Mylv/Semester/Studiengang/Lv/Info.js | 4 ++-- 8 files changed, 26 insertions(+), 16 deletions(-) diff --git a/application/controllers/components/Cis/Mylv.php b/application/controllers/components/Cis/Mylv.php index f357b17cb..60203a37c 100644 --- a/application/controllers/components/Cis/Mylv.php +++ b/application/controllers/components/Cis/Mylv.php @@ -3,12 +3,7 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); /** - * This controller operates between (interface) the JS (GUI) and the FilterCmptLib (back-end) - * Provides data to the ajax get calls about the filter component - * Listens to ajax post calls to change the filter data - * This controller works with JSON calls on the HTTP GET or POST and the output is always JSON - * NOTE: extends the FHC_Controller instead of the Auth_Controller because the FilterCmpt has its - * own permissions check + * */ class Mylv extends Auth_Controller { diff --git a/application/models/education/Lehrveranstaltung_model.php b/application/models/education/Lehrveranstaltung_model.php index b85699073..fddfad198 100644 --- a/application/models/education/Lehrveranstaltung_model.php +++ b/application/models/education/Lehrveranstaltung_model.php @@ -276,7 +276,7 @@ class Lehrveranstaltung_model extends DB_Model */ // TODO(chris): module or kf #$this->addSelect($this->dbTable . '.*'); - $this->addSelect('v.*'); + #$this->addSelect('v.*'); $this->addSelect($this->dbTable . '.benotung'); $this->addSelect($this->dbTable . '.lvinfo'); $this->addSelect($this->dbTable . '.farbe'); @@ -288,6 +288,7 @@ class Lehrveranstaltung_model extends DB_Model $this->addSelect('v.sprache'); $this->addSelect('v.ects'); + $this->addSelect('znn.positiv'); #$this->addSelect('splv.module'); $this->addSelect($lvbezeichnung . ' AS bezeichnung'); @@ -297,6 +298,7 @@ class Lehrveranstaltung_model extends DB_Model $this->addSelect('COALESCE(gnn.' . $bezeichnung . ', gnn.bezeichnung, gn.note::text) AS lvnote'); $this->addSelect('COALESCE(znn.' . $bezeichnung . ', znn.bezeichnung, zn.note::text) AS znote'); + // TODO(chris): Potentielle Anpassung "Eine UID" $this->addJoin('campus.vw_student_lehrveranstaltung v', 'lehrveranstaltung_id'); $this->addJoin('public.tbl_studiengang sg', $this->dbTable . '.studiengang_kz = sg.studiengang_kz'); $this->db->where("v.lehreverzeichnis<>''"); @@ -307,6 +309,8 @@ class Lehrveranstaltung_model extends DB_Model $this->addJoin('lehre.tbl_zeugnisnote zn', 'zn.lehrveranstaltung_id=v.lehrveranstaltung_id AND zn.student_uid=v.uid AND zn.studiensemester_kurzbz=v.studiensemester_kurzbz', 'LEFT'); $this->addJoin('lehre.tbl_note znn', 'zn.note=znn.note', 'LEFT'); + $this->addOrder('bezeichnung'); + /*if (!defined("CIS_PROFIL_STUDIENPLAN_MODULE_AUSBLENDEN") || !CIS_PROFIL_STUDIENPLAN_MODULE_AUSBLENDEN) { $modulebezeichnung = str_replace('v.', 'm.', $lvbezeichnung); $modulesql = ' diff --git a/application/models/education/Pruefung_model.php b/application/models/education/Pruefung_model.php index 48a6f4f3c..6e542b870 100644 --- a/application/models/education/Pruefung_model.php +++ b/application/models/education/Pruefung_model.php @@ -42,12 +42,13 @@ class Pruefung_model extends DB_Model * * @param string $uid * @param string $lehrveranstaltung_id - * @param string|null $lehrveranstaltung_id + * @param string|null $sprache * * @return object */ public function getByStudentAndLv($uid, $lehrveranstaltung_id, $sprache = null) { + // TODO(chris): Potentielle Anpassung "Eine UID" $this->dbTable = 'lehre.tbl_pruefung'; if ($sprache) { diff --git a/application/models/organisation/Studiensemester_model.php b/application/models/organisation/Studiensemester_model.php index a7333260d..608c48f4d 100644 --- a/application/models/organisation/Studiensemester_model.php +++ b/application/models/organisation/Studiensemester_model.php @@ -215,6 +215,7 @@ class Studiensemester_model extends DB_Model $this->addDistinct(); $this->addSelect($this->dbTable . '.*'); + // TODO(chris): Potentielle Anpassung "Eine UID" $this->addJoin('campus.vw_student_lehrveranstaltung v', 'studiensemester_kurzbz'); $this->db->where("v.lehreverzeichnis<>''"); diff --git a/public/css/Cis4/Cis.css b/public/css/Cis4/Cis.css index 6d7735ffd..007555c61 100644 --- a/public/css/Cis4/Cis.css +++ b/public/css/Cis4/Cis.css @@ -265,6 +265,9 @@ #cis-main { padding-left: var(--fhc-cis-main-px); } + #cis-main > :first-child { + margin-top: var(--fhc-cis-header-height); + } #cis-header { background-color: var(--fhc-cis-primary); height: var(--fhc-cis-header-height); diff --git a/public/js/components/Cis/Mylv/Semester/Studiengang.js b/public/js/components/Cis/Mylv/Semester/Studiengang.js index 4f1eaa45d..56605d308 100644 --- a/public/js/components/Cis/Mylv/Semester/Studiengang.js +++ b/public/js/components/Cis/Mylv/Semester/Studiengang.js @@ -36,7 +36,7 @@ export default { {{semester}}.{{p.t('lehre/semester')}}
-
+
diff --git a/public/js/components/Cis/Mylv/Semester/Studiengang/Lv.js b/public/js/components/Cis/Mylv/Semester/Studiengang/Lv.js index 5efe5d36b..dd6c57b30 100644 --- a/public/js/components/Cis/Mylv/Semester/Studiengang/Lv.js +++ b/public/js/components/Cis/Mylv/Semester/Studiengang/Lv.js @@ -1,9 +1,13 @@ import LvPruefungen from "./Lv/Pruefungen.js"; import LvInfo from "./Lv/Info.js"; +import Phrasen from "../../../../../mixins/Phrasen.js"; // TODO(chris): L10n export default { + mixins: [ + Phrasen + ], inject: ['studien_semester'], props: { lehrveranstaltung_id: Number, @@ -19,7 +23,8 @@ export default { orgform_kurzbz: String, sprache: String, ects: Number, - incoming: Number + incoming: Number, + positiv: Boolean }, data: () => { return { @@ -28,7 +33,7 @@ export default { } }, computed: { - bodyStyle() { + bodyStyle() {return {}; const bodyStyle = {}; if (this.farbe) bodyStyle['background-color'] = '#' + this.farbe; @@ -70,13 +75,14 @@ export default {
{{module}}
-