From cd7fed2b43c0ace65db3c7ce00eb52c833fbb67b Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Fri, 8 Jul 2022 00:33:44 +0200 Subject: [PATCH 01/26] Added studienkennung_uni field to bis.tbl_gsprogramm --- system/dbupdate_3.3.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 01839e4b9..0ca29f7c3 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -6259,6 +6259,17 @@ if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berecht } } +// ADD COLUMN studienkennung_uni to bis.tbl_gsprogramm +if(!@$db->db_query("SELECT studienkennung_uni FROM bis.tbl_gsprogramm LIMIT 1")) +{ + $qry = "ALTER TABLE bis.tbl_gsprogramm ADD COLUMN studienkennung_uni varchar(32);"; + + if(!$db->db_query($qry)) + echo 'bis.tbl_gsprogramm '.$db->db_last_error().'
'; + else + echo '
Spalte studienkennung_uni in bis.tbl_gsprogramm hinzugefügt'; +} + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; From 17493a6e406411e6405c5c3291af9392b691a279 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Tue, 12 Jul 2022 16:37:18 +0200 Subject: [PATCH 02/26] dbupdate: added bis.tbl_gsprogramm studienkennung_uni to check array --- system/dbupdate_3.3.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 0ca29f7c3..7d3896550 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -6294,7 +6294,7 @@ $tabellen=array( "bis.tbl_gemeinde" => array("gemeinde_id","plz","name","ortschaftskennziffer","ortschaftsname","bulacode","bulabez","kennziffer"), "bis.tbl_gsstudientyp" => array("gsstudientyp_kurzbz","bezeichnung","studientyp_code"), "bis.tbl_gsprogrammtyp" => array("gsprogrammtyp_kurzbz","bezeichnung","programmtyp_code"), - "bis.tbl_gsprogramm" => array("gsprogramm_id","programm_code","bezeichnung","gsprogrammtyp_kurzbz"), + "bis.tbl_gsprogramm" => array("gsprogramm_id","programm_code","bezeichnung","gsprogrammtyp_kurzbz","studienkennung_uni"), "bis.tbl_hauptberuf" => array("hauptberufcode","bezeichnung"), "bis.tbl_lgartcode" => array("lgartcode","kurzbz","bezeichnung","beantragung","lgart_biscode"), "bis.tbl_mobilitaet" => array("mobilitaet_id","prestudent_id","mobilitaetstyp_kurzbz","studiensemester_kurzbz","mobilitaetsprogramm_code","gsprogramm_id","firma_id","status_kurzbz","ausbildungssemester","insertvon","insertamum","updatevon","updateamum"), From 013def84e33d5376430a0f8c564723273c60edba Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Tue, 12 Jul 2022 18:16:09 +0200 Subject: [PATCH 03/26] bis.tbl_gsprogramm: studienkennung_uni can be added and edited in vilesci --- include/gsprogramm.class.php | 43 ++++++++++++++++++++++++++++--- vilesci/stammdaten/gsprogramm.php | 8 ++++++ 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/include/gsprogramm.class.php b/include/gsprogramm.class.php index ec49adecf..3120057d5 100644 --- a/include/gsprogramm.class.php +++ b/include/gsprogramm.class.php @@ -34,6 +34,7 @@ class gsprogramm extends basis_db public $programm_code; public $bezeichnung; public $gsprogrammtyp_kurzbz; + public $studienkennung_uni; public function getAll() { @@ -57,6 +58,7 @@ class gsprogramm extends basis_db $obj->gsprogrammtyp_kurzbz = $row->gsprogrammtyp_kurzbz; $obj->gsprogrammtyp_bezeichnung = $row->gsprogrammtyp_bezeichnung; + $obj->studienkennung_uni = $row->studienkennung_uni; $this->result[]=$obj; } @@ -86,6 +88,7 @@ class gsprogramm extends basis_db $this->programm_code = $row->programm_code; $this->bezeichnung = $row->bezeichnung; $this->gsprogrammtyp_kurzbz = $row->gsprogrammtyp_kurzbz; + $this->studienkennung_uni = $row->studienkennung_uni; $this->new = false; } return true; @@ -126,22 +129,56 @@ class gsprogramm extends basis_db } } + /** + * Prueft die Daten vor dem Speichern + * + * @return true wenn ok, false wenn Fehler + */ + public function validate() + { + if(!is_numeric($this->programm_code)) + { + $this->errormsg = 'Programm Code muss eine Zahl sein'; + return false; + } + if($this->gsprogrammtyp_kurzbz=='') + { + $this->errormsg = 'Gsprogrammtyp Kurzbezeichnung muss eingegeben werden'; + return false; + } + if($this->bezeichnung=='') + { + $this->errormsg = 'Bezeichnung muss eingetragen werden'; + return false; + } + if($this->studienkennung_uni != '' && preg_match("/^[AFHLU][UPF][A-Z]([0-9]{3}){1,3}(0[1-6]|[UP][A-W]){0,1}$/", $this->studienkennung_uni) !== 1) + { + $this->errormsg = 'Ungültige Studienkennung Uni'; + return false; + } + return true; + } + public function save() { + if(!$this->validate()) + return false; if($this->new) { $qry = 'BEGIN;INSERT INTO bis.tbl_gsprogramm(programm_code, - bezeichnung, gsprogrammtyp_kurzbz) VALUES('. + bezeichnung, gsprogrammtyp_kurzbz, studienkennung_uni) VALUES('. $this->db_add_param($this->programm_code).','. $this->db_add_param($this->bezeichnung).','. - $this->db_add_param($this->gsprogrammtyp_kurzbz).');'; + $this->db_add_param($this->gsprogrammtyp_kurzbz).','. + $this->db_add_param($this->studienkennung_uni).');'; } else { $qry = 'UPDATE bis.tbl_gsprogramm SET bezeichnung='.$this->db_add_param($this->bezeichnung).', gsprogrammtyp_kurzbz='.$this->db_add_param($this->gsprogrammtyp_kurzbz).', - programm_code='.$this->db_add_param($this->programm_code, FHC_INTEGER).' + programm_code='.$this->db_add_param($this->programm_code, FHC_INTEGER).', + studienkennung_uni='.$this->db_add_param($this->studienkennung_uni).' WHERE gsprogramm_id='.$this->db_add_param($this->gsprogramm_id, FHC_INTEGER, false); } diff --git a/vilesci/stammdaten/gsprogramm.php b/vilesci/stammdaten/gsprogramm.php index 116bf5427..2a9c10963 100644 --- a/vilesci/stammdaten/gsprogramm.php +++ b/vilesci/stammdaten/gsprogramm.php @@ -52,6 +52,7 @@ if($action=='save') $gsprogramm->bezeichnung = $_POST['bezeichnung']; $gsprogramm->gsprogrammtyp_kurzbz = $_POST['gsprogrammtyp_kurzbz']; $gsprogramm->programm_code = $_POST['programm_code']; + $gsprogramm->studienkennung_uni = $_POST['studienkennung_uni']; if($gsprogramm->save()) echo 'Daten erfolgreich gespeichert'; else @@ -195,6 +196,13 @@ echo ' + + StudienkennungUni + + + +   From f72c165fe639ad0fb86a35aa257638ad1ec87a37 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Tue, 12 Jul 2022 19:41:08 +0200 Subject: [PATCH 04/26] added codex/Gsprogramm_model --- application/models/codex/Gsprogramm_model.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 application/models/codex/Gsprogramm_model.php diff --git a/application/models/codex/Gsprogramm_model.php b/application/models/codex/Gsprogramm_model.php new file mode 100644 index 000000000..4fd0694dd --- /dev/null +++ b/application/models/codex/Gsprogramm_model.php @@ -0,0 +1,15 @@ +dbTable = 'bis.tbl_gsprogramm'; + $this->pk = 'gsprogramm_id'; + } + +} From 8a813e0a2c21b5b4dc1350f392e04f4bb4a6d278 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Wed, 13 Jul 2022 11:27:10 +0200 Subject: [PATCH 05/26] added "StudienkennungUni" to BIS XML studentenmeldung --- vilesci/bis/studentenmeldung.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vilesci/bis/studentenmeldung.php b/vilesci/bis/studentenmeldung.php index bfa916457..60cb0dcfe 100644 --- a/vilesci/bis/studentenmeldung.php +++ b/vilesci/bis/studentenmeldung.php @@ -366,7 +366,7 @@ if($result = $db->db_query($qry)) $stg_obj = new studiengang(); if($stg_obj->load($row->studiengang_kz)) { - + $maxsemester = $stg_obj->max_semester; if($maxsemester == 0) @@ -1203,6 +1203,7 @@ function GenerateXMLStudentBlock($row) $qrygs="SELECT tbl_mobilitaet.*, tbl_gsprogramm.programm_code, + tbl_gsprogramm.studienkennung_uni, tbl_firma.partner_code FROM bis.tbl_mobilitaet @@ -1247,6 +1248,7 @@ function GenerateXMLStudentBlock($row) ".$rowgs->partner_code." ".$rowgs->ausbildungssemester." ".$studstatuscode." + ".(isset($rowgs->studienkennung_uni) ? "".$rowgs->studienkennung_uni."" : "")." "; if(!isset($gssem[$storgform][$rowgs->ausbildungssemester])) { From 043f444bb65ed9d6635ff268787897f0d62a6b5f Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Thu, 14 Jul 2022 19:50:50 +0200 Subject: [PATCH 06/26] added tbl_bisio.herkunftsland_code in db and made it editable as IO data in FAS --- content/student/studentDBDML.php | 1 + content/student/studentiooverlay.xul.php | 14 ++++++++++++++ content/student/studentoverlay.js.php | 7 +++++++ include/bisio.class.php | 12 +++++++++--- rdf/bisio.rdf.php | 1 + system/dbupdate_3.3.php | 14 +++++++++++++- 6 files changed, 45 insertions(+), 4 deletions(-) diff --git a/content/student/studentDBDML.php b/content/student/studentDBDML.php index e9c657635..adcd4f16d 100644 --- a/content/student/studentDBDML.php +++ b/content/student/studentDBDML.php @@ -3126,6 +3126,7 @@ if(!$error) $bisio->bisio_id = (isset($_POST['bisio_id'])?$_POST['bisio_id']:''); $bisio->mobilitaetsprogramm_code = $_POST['mobilitaetsprogramm_code']; $bisio->nation_code = $_POST['nation_code']; + $bisio->herkunftsland_code = $_POST['herkunftsland_code']; $bisio->von = $_POST['von']; $bisio->bis = $_POST['bis']; $bisio->student_uid = $_POST['student_uid']; diff --git a/content/student/studentiooverlay.xul.php b/content/student/studentiooverlay.xul.php index da5b47738..ae4d9643c 100644 --- a/content/student/studentiooverlay.xul.php +++ b/content/student/studentiooverlay.xul.php @@ -171,6 +171,20 @@ echo ''; + +