From 45b7a56c3a4ac53f556b7d8760b5eb8b6f321127 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Mon, 24 Mar 2025 14:00:14 +0100 Subject: [PATCH 01/10] - zeugnis vorlage fuer micro degree --- rdf/zeugnis.rdf.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/rdf/zeugnis.rdf.php b/rdf/zeugnis.rdf.php index 2021c8335..038aba842 100644 --- a/rdf/zeugnis.rdf.php +++ b/rdf/zeugnis.rdf.php @@ -35,6 +35,7 @@ require_once('../include/studiengang.class.php'); require_once('../include/mitarbeiter.class.php'); require_once('../include/anrechnung.class.php'); require_once('../include/prestudent.class.php'); +require_once('../include/nation.class.php'); $datum = new datum(); $db = new basis_db(); @@ -107,7 +108,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") tbl_studiengang.bezeichnung, tbl_studiengang.english, tbl_studentlehrverband.semester, tbl_person.vorname, tbl_person.vornamen, tbl_person.nachname,tbl_person.gebdatum,tbl_person.titelpre, tbl_person.titelpost, tbl_person.anrede, tbl_studiensemester.bezeichnung as sembezeichnung, - tbl_studiensemester.studiensemester_kurzbz as stsem, tbl_student.prestudent_id, tbl_studiengang.max_semester + tbl_studiensemester.studiensemester_kurzbz as stsem, tbl_student.prestudent_id, tbl_studiengang.max_semester, tbl_person.gebort, tbl_person.geburtsnation, tbl_person.geschlecht FROM tbl_person, tbl_student, tbl_studiengang, tbl_benutzer, tbl_studentlehrverband, tbl_studiensemester WHERE tbl_student.studiengang_kz = tbl_studiengang.studiengang_kz AND tbl_student.student_uid = tbl_benutzer.uid AND tbl_benutzer.person_id = tbl_person.person_id @@ -187,6 +188,10 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") else $studiengang_kz = sprintf("%04s", abs($row->studiengang_kz)); + + $nation = new nation($row->geburtsnation); + $geburtsnation = $nation->kurztext; + $xml .= " "; $xml .= " "; $xml .= "\n anrede."]]>"; @@ -195,6 +200,9 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") $xml .= " titelpre.' '.trim($row->vorname.' '.$row->vornamen).' '.$row->nachname.($row->titelpost!=''?', '.$row->titelpost:''))."]]>"; $gebdatum = date('d.m.Y',strtotime($row->gebdatum)); $xml .= " "; + $xml .= " gebort."]]>"; + $xml .= " "; + $xml .= " geschlecht."]]>"; $xml .= " matrikelnr)."]]>"; $xml .= " "; $datum_aktuell = date('d.m.Y'); @@ -267,6 +275,15 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") if ($lastPrestudentStatus) $showAllNoten = $prestudent->status_kurzbz === 'Incoming'; + $lastBenotungsdatum = ''; + + $dates = array_column($obj->result, 'benotungsdatum'); + if (!empty($dates)) + { + $lastBenotungsdatum = max($dates); + $xml .= ""; + } + foreach ($obj->result as $row) { if($showAllNoten || $row->zeugnis) @@ -390,6 +407,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") } } $xml .= "\n "; + $xml .= " benotungsdatum))."]]>"; $xml .= " "; $xml .= " "; $xml .= " note_positiv."]]>"; From f826c20949c0518cba9d4953e7b8110003ae2e44 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Fri, 4 Apr 2025 08:42:20 +0200 Subject: [PATCH 02/10] =?UTF-8?q?lv=5Fid=20beim=20zeugnis.rdf.php=20hinzug?= =?UTF-8?q?efuegt=20auf=20die=20ersten=202=20lvs=20im=20microdegree=20eing?= =?UTF-8?q?eschr=C3=A4nkt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rdf/zeugnis.rdf.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rdf/zeugnis.rdf.php b/rdf/zeugnis.rdf.php index 038aba842..c468301d5 100644 --- a/rdf/zeugnis.rdf.php +++ b/rdf/zeugnis.rdf.php @@ -414,6 +414,8 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") $xml .= " "; $xml .= " semesterstunden==0?'':number_format(sprintf('%.1F',$row->semesterstunden/$wochen),1))."]]>"; $xml .= " sws==0?'':number_format(sprintf('%.1F',$row->sws),1))."]]>"; + $xml .= " lehrveranstaltung_id."]]>"; + $ectspunkte=''; $anrechnung = new anrechnung(); From 419341f496e1a204cd055a08238dfc2104b65356 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Mon, 12 May 2025 12:53:16 +0200 Subject: [PATCH 03/10] absage fuer alle und rueckstellung ueber infocenter uebersicht --- .../system/infocenter/InfoCenter.php | 35 ++++++++++--- .../system/infocenter/Rueckstellung.php | 32 +++++++++++- application/models/crm/Prestudent_model.php | 16 ++++++ .../views/system/infocenter/infocenter.php | 3 +- .../infocenter/infocenterAbgewiesen.php | 2 +- .../infocenter/infocenterAufgenommen.php | 2 +- .../infocenter/infocenterFreigegeben.php | 2 +- .../infocenterReihungstestAbsolviert.php | 2 +- .../js/infocenter/infocenterPersonDataset.js | 50 +++++++++++++++++++ public/js/infocenter/rueckstellung.js | 27 ++++++++++ 10 files changed, 158 insertions(+), 13 deletions(-) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index f6e41d2e6..f8e46a8bf 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -2375,16 +2375,39 @@ class InfoCenter extends Auth_Controller if ($statusgrund === 'null' || $studiengang === 'null' || $abgeschickt === 'null' || empty($personen)) $this->terminateWithJsonError("Bitte füllen Sie alle Felder aus"); - foreach($personen as $person) + if ($studiengang === 'all' && $abgeschickt !== 'all' || + $abgeschickt === 'all' && $studiengang !== 'all') + $this->terminateWithJsonError("Absage für alle Studiengänge ist nur in Kombination mit abgeschickt 'Beide' möglich!"); + + if ($studiengang === 'all' && $abgeschickt === 'all') { - $prestudent = $this->PrestudentModel->getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester, $abgeschickt); + foreach($personen as $person) + { + $prestudenten = $this->PrestudentModel->getByPersonWithoutLehrgang($person, $studienSemester); - if (!hasData($prestudent)) - continue; + if (!hasData($prestudenten)) + continue; - $prestudentData = getData($prestudent); + $prestudentenData = getData($prestudenten); - $this->saveAbsage($prestudentData[0]->prestudent_id, $statusgrund); + foreach ($prestudentenData as $prestudent) + { + $this->saveAbsage($prestudent->prestudent_id, $statusgrund); + } + } + } + else + { + foreach($personen as $person) + { + $prestudent = $this->PrestudentModel->getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester, $abgeschickt); + + if (!hasData($prestudent)) + continue; + + $prestudentData = getData($prestudent); + $this->saveAbsage($prestudentData[0]->prestudent_id, $statusgrund); + } } $this->outputJsonSuccess("Success"); diff --git a/application/controllers/system/infocenter/Rueckstellung.php b/application/controllers/system/infocenter/Rueckstellung.php index 62af633ca..b1f2b60b7 100644 --- a/application/controllers/system/infocenter/Rueckstellung.php +++ b/application/controllers/system/infocenter/Rueckstellung.php @@ -14,7 +14,8 @@ class Rueckstellung extends Auth_Controller 'get' => array('infocenter:r', 'lehre/zgvpruefung:r'), 'set' => array('infocenter:r', 'lehre/zgvpruefung:r'), 'delete' => array('infocenter:r', 'lehre/zgvpruefung:r'), - 'getStatus' => array('infocenter:rw', 'lehre/zgvpruefung:rw') + 'getStatus' => array('infocenter:rw', 'lehre/zgvpruefung:rw'), + 'setForPersonen' => array('infocenter:rw', 'lehre/zgvpruefung:rw'), ) ); @@ -79,7 +80,34 @@ class Rueckstellung extends Auth_Controller $this->outputJson($result); } - + + public function setForPersonen() + { + $personen = $this->input->post('personen'); + $datum_bis = $this->input->post('datum_bis'); + $status_kurzbz = $this->input->post('status_kurzbz'); + + foreach ($personen as $person) + { + $rueckstellung = $this->_ci->RueckstellungModel->loadWhere(array('person_id' => $person)); + if (hasData($rueckstellung)) + continue; + + $result = $this->_ci->RueckstellungModel->insert( + array('person_id' => $person, + 'status_kurzbz' => $status_kurzbz, + 'datum_bis' => date_format(date_create($datum_bis), 'Y-m-d'), + 'insertvon' => $this->_uid + ) + ); + + if (isError($result)) + $this->terminateWithJsonError(getError($result)); + $this->_log($person, $status_kurzbz); + } + $this->outputJsonSuccess("Erfolgreich gespeichert!"); + } + public function delete() { $person_id = $this->input->post('person_id'); diff --git a/application/models/crm/Prestudent_model.php b/application/models/crm/Prestudent_model.php index 242c26518..188158b4e 100644 --- a/application/models/crm/Prestudent_model.php +++ b/application/models/crm/Prestudent_model.php @@ -703,6 +703,22 @@ class Prestudent_model extends DB_Model return $this->execQuery($query, array($person, $studiengang, $studienSemester)); } + public function getByPersonWithoutLehrgang($person, $studienSemester) + { + $query = "SELECT DISTINCT(ps.prestudent_id) + FROM public.tbl_prestudentstatus pss + JOIN public.tbl_prestudent ps USING(prestudent_id) + JOIN public.tbl_studiengang sg USING(studiengang_kz) + JOIN lehre.tbl_studienplan sp USING(studienplan_id) + JOIN lehre.tbl_studienordnung so USING(studienordnung_id) + WHERE ps.person_id = ? + AND (sg.typ = 'b' OR sg.typ = 'm') + AND pss.studiensemester_kurzbz = ?"; + + return $this->execQuery($query, array($person, $studienSemester)); + } + + /** * Gets förderrelevant flag for a prestudent, from prestudent, or, if not set on prestudent level, from studiengang * @param int $prestudent_id diff --git a/application/views/system/infocenter/infocenter.php b/application/views/system/infocenter/infocenter.php index 0b7a20c2c..157f98bf1 100644 --- a/application/views/system/infocenter/infocenter.php +++ b/application/views/system/infocenter/infocenter.php @@ -14,12 +14,13 @@ 'navigationwidget' => true, 'dialoglib' => true, 'phrases' => array( + 'infocenter' => array('statusAuswahl'), 'person' => array('vorname', 'nachname'), 'global' => array('mailAnXversandt'), 'ui' => array('bitteEintragWaehlen') ), 'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/infocenter/infocenterPersonDataset.css'), - 'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js') + 'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/rueckstellung.js', 'public/js/infocenter/infocenterPersonDataset.js') ); $this->load->view('templates/FHC-Header', $includesArray); diff --git a/application/views/system/infocenter/infocenterAbgewiesen.php b/application/views/system/infocenter/infocenterAbgewiesen.php index 921d9f224..7129a3250 100644 --- a/application/views/system/infocenter/infocenterAbgewiesen.php +++ b/application/views/system/infocenter/infocenterAbgewiesen.php @@ -20,7 +20,7 @@ 'ui' => array('bitteEintragWaehlen') ), 'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/infocenter/infocenterPersonDataset.css'), - 'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js') + 'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/rueckstellung.js', 'public/js/infocenter/infocenterPersonDataset.js') ) ); ?> diff --git a/application/views/system/infocenter/infocenterAufgenommen.php b/application/views/system/infocenter/infocenterAufgenommen.php index 680d66a8a..d57f31d6b 100644 --- a/application/views/system/infocenter/infocenterAufgenommen.php +++ b/application/views/system/infocenter/infocenterAufgenommen.php @@ -20,7 +20,7 @@ 'ui' => array('bitteEintragWaehlen') ), 'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/infocenter/infocenterPersonDataset.css'), - 'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js') + 'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/rueckstellung.js', 'public/js/infocenter/infocenterPersonDataset.js') ) ); ?> diff --git a/application/views/system/infocenter/infocenterFreigegeben.php b/application/views/system/infocenter/infocenterFreigegeben.php index a240a0b5c..d843cc5c9 100644 --- a/application/views/system/infocenter/infocenterFreigegeben.php +++ b/application/views/system/infocenter/infocenterFreigegeben.php @@ -20,7 +20,7 @@ 'ui' => array('bitteEintragWaehlen') ), 'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/infocenter/infocenterPersonDataset.css'), - 'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js') + 'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/rueckstellung.js', 'public/js/infocenter/infocenterPersonDataset.js') ) ); ?> diff --git a/application/views/system/infocenter/infocenterReihungstestAbsolviert.php b/application/views/system/infocenter/infocenterReihungstestAbsolviert.php index a86e0df97..eef2a214a 100644 --- a/application/views/system/infocenter/infocenterReihungstestAbsolviert.php +++ b/application/views/system/infocenter/infocenterReihungstestAbsolviert.php @@ -20,7 +20,7 @@ 'ui' => array('bitteEintragWaehlen') ), 'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/infocenter/infocenterPersonDataset.css'), - 'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js') + 'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/rueckstellung.js', 'public/js/infocenter/infocenterPersonDataset.js') ) ); ?> diff --git a/public/js/infocenter/infocenterPersonDataset.js b/public/js/infocenter/infocenterPersonDataset.js index b7334d265..14fba0779 100644 --- a/public/js/infocenter/infocenterPersonDataset.js +++ b/public/js/infocenter/infocenterPersonDataset.js @@ -50,12 +50,21 @@ var InfocenterPersonDataset = { '' + '' + ''; + let rueckstellung = '
' + + '' + + '' + + ''; + InfocenterPersonDataset.getAbsageData(); + Rueckstellung.getStatus() var studienSemesterHtml = '