From 0153364885a481ec9e25875c18fde53ce9282eac Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 15 Sep 2020 18:11:37 +0200 Subject: [PATCH 1/9] =?UTF-8?q?Pr=C3=BCfungsprotokoll=20Freigabe:=20passed?= =?UTF-8?q?=20data=20to=20controller=20in=20better=20way=20(password=20and?= =?UTF-8?q?=20freigegeben=20bool=20in=20a=20separate=20object)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controllers/lehre/Pruefungsprotokoll.php | 20 ++++++++++-------- public/js/lehre/pruefungsprotokoll.js | 21 ++++++++++++------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/application/controllers/lehre/Pruefungsprotokoll.php b/application/controllers/lehre/Pruefungsprotokoll.php index d9793ef06..467a7dc71 100644 --- a/application/controllers/lehre/Pruefungsprotokoll.php +++ b/application/controllers/lehre/Pruefungsprotokoll.php @@ -115,9 +115,11 @@ class Pruefungsprotokoll extends Auth_Controller public function saveProtokoll() { $abschlusspruefung_id = $this->input->post('abschlusspruefung_id'); - $data = $this->input->post('protocoldata'); + $freigebendata = $this->input->post('freigebendata'); + $protocoldata = $this->input->post('protocoldata'); - if (isset($abschlusspruefung_id) && is_numeric($abschlusspruefung_id) && isset($data)) + if (isset($abschlusspruefung_id) && is_numeric($abschlusspruefung_id) + && isset($freigebendata['freigeben']) && isset($protocoldata)) { // check permission $berechtigt = $this->_getAbschlusspruefungBerechtigt($abschlusspruefung_id); @@ -125,15 +127,14 @@ class Pruefungsprotokoll extends Auth_Controller $this->outputJsonError(getError($berechtigt)); else { - $freigabe = isset($data['freigabedatum']) && $data['freigabedatum']; + $freigabe = $freigebendata['freigeben'] === 'true'; if ($freigabe) { // Verify password - $password = $data['password']; - unset($data['password']); - if (!isEmptyString($password)) + if (isset($freigebendata['password']) && !isEmptyString($freigebendata['password'])) { + $password = $freigebendata['password']; $result = $this->authlib->checkUserAuthByUsernamePassword($this->_uid, $password); if (isError($result)) { @@ -146,7 +147,8 @@ class Pruefungsprotokoll extends Auth_Controller } } - $data = $this->_prepareAbschlusspruefungDataForSave($data); + $data = $this->_prepareAbschlusspruefungDataForSave($protocoldata, $freigabe); + $result = $this->AbschlusspruefungModel->update($abschlusspruefung_id, $data); if (hasData($result)) @@ -213,7 +215,7 @@ class Pruefungsprotokoll extends Auth_Controller * @param $data * @return array */ - private function _prepareAbschlusspruefungDataForSave($data) + private function _prepareAbschlusspruefungDataForSave($data, $freigabe) { $nullfields = array('uhrzeit', 'endezeit', 'abschlussbeurteilung_kurzbz', 'protokoll'); foreach ($data as $idx => $item) @@ -222,7 +224,7 @@ class Pruefungsprotokoll extends Auth_Controller $data[$idx] = null; } - if (isset($data['freigabedatum']) && $data['freigabedatum']) + if ($freigabe === true) $data['freigabedatum'] = date('Y-m-d'); return $data; diff --git a/public/js/lehre/pruefungsprotokoll.js b/public/js/lehre/pruefungsprotokoll.js index 8cb72cbf6..8af7d6f21 100644 --- a/public/js/lehre/pruefungsprotokoll.js +++ b/public/js/lehre/pruefungsprotokoll.js @@ -10,6 +10,12 @@ $("document").ready(function() { $("#saveProtocolBtn, #freigebenProtocolBtn").click( function() { + + var freigebendata = { + freigeben: false, + password: null + } + var data = { abschlussbeurteilung_kurzbz: $("#abschlussbeurteilung_kurzbz").val(), protokoll: $("#protokoll").val(), @@ -19,11 +25,11 @@ $("document").ready(function() { if ($(this).prop("id") === 'freigebenProtocolBtn') { - data.freigabedatum = true; - data.password = $("#password").val(); + freigebendata.freigeben = true; + freigebendata.password = $("#password").val(); } - var checkFields = Pruefungsprotokoll.checkFields(data, $("#verfCheck").prop('checked')); + var checkFields = Pruefungsprotokoll.checkFields(data, freigebendata, $("#verfCheck").prop('checked')); $("#protocolform td").removeClass('has-error'); if (checkFields.length > 0) { @@ -44,7 +50,7 @@ $("document").ready(function() { return; } - Pruefungsprotokoll.saveProtokoll($("#abschlusspruefung_id").val(),data); + Pruefungsprotokoll.saveProtokoll($("#abschlusspruefung_id").val(), freigebendata, data); } ) @@ -79,11 +85,11 @@ var Pruefungsprotokoll = { $("#verfNotice").html(FHC_PhrasesLib.t("abschlusspruefung", "verfNotice")); } }, - checkFields: function(data, verfChecked) + checkFields: function(data, freigebendata, verfChecked) { var errors = []; - if (data.abschlussbeurteilung_kurzbz == "" && data.freigabedatum === true && verfChecked) + if (data.abschlussbeurteilung_kurzbz == "" && freigebendata.freigeben === true && verfChecked) errors.push({"abschlussbeurteilung_kurzbz": FHC_PhrasesLib.t("abschlusspruefung", "abschlussbeurteilungLeer")}); var zeitregex = /^[0-2][0-9]:[0-5][0-9]$/; @@ -111,12 +117,13 @@ var Pruefungsprotokoll = { }, // ajax calls // ----------------------------------------------------------------------------------------------------------------- - saveProtokoll: function(abschlusspruefung_id, data) + saveProtokoll: function(abschlusspruefung_id, freigeben, data) { FHC_AjaxClient.ajaxCallPost( CALLED_PATH + '/saveProtokoll', { abschlusspruefung_id: abschlusspruefung_id, + freigebendata: freigeben, protocoldata: data }, { From 4b81727b73e84d48e6977ddb430c4f26edb3c70b Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 20 Oct 2020 00:37:49 +0200 Subject: [PATCH 2/9] Diplomasupplement: added auslandssemesterdata to sonstige angaben --- rdf/diplomasupplement.xml.php | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/rdf/diplomasupplement.xml.php b/rdf/diplomasupplement.xml.php index a88df9533..7efefb9fd 100644 --- a/rdf/diplomasupplement.xml.php +++ b/rdf/diplomasupplement.xml.php @@ -360,15 +360,32 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") } } - $qry = "SELECT von, bis, lehreinheit_id FROM bis.tbl_bisio WHERE student_uid=".$db->db_add_param($uid_arr[$i]); + $qry = "SELECT tbl_bisio.bisio_id, von, bis, lehreinheit_id, + (SELECT STRING_AGG ( + tbl_zweck.bezeichnung, + ', ' + ORDER BY tbl_zweck.zweck_code + ) FROM bis.tbl_bisio_zweck + JOIN bis.tbl_zweck USING(zweck_code) + WHERE tbl_bisio_zweck.bisio_id = tbl_bisio.bisio_id + ) zweck, ort, universitaet + FROM bis.tbl_bisio + WHERE student_uid=".$db->db_add_param($uid_arr[$i]); + if($db->db_query($qry)) { if($db->db_num_rows()>0) { - echo " "; + echo ""; while($row1 = $db->db_fetch_object()) { - echo "Auslandssemester/International semester ".$datum->convertISODate($row1->von)." - ".$datum->convertISODate($row1->bis); + echo ""; + echo "".$datum->convertISODate($row1->von).""; + echo "".$datum->convertISODate($row1->bis).""; + echo "$row1->zweck"; + echo "$row1->ort"; + echo "$row1->universitaet"; + echo ""; } echo ""; $auslandssemester=true; From a26f1701ec21105b315c233b54f7f8a8606ad58c Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 20 Oct 2020 23:08:01 +0200 Subject: [PATCH 3/9] Diplomasupplement: andere Formulierung bei dualem Studium, orgform kommt vom Status --- rdf/diplomasupplement.xml.php | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/rdf/diplomasupplement.xml.php b/rdf/diplomasupplement.xml.php index 7efefb9fd..0052c75be 100644 --- a/rdf/diplomasupplement.xml.php +++ b/rdf/diplomasupplement.xml.php @@ -228,14 +228,13 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") else echo ' '; - if($row->mischform=='t' || $row->orgform_kurzbz=='VBB') - { - //Bei Mischformen, die OrgForm aus dem Status nehmen - $prestudent = new prestudent(); - $prestudent->getLastStatus($row->prestudent_id); - if($prestudent->orgform_kurzbz!='') - $row->orgform_kurzbz=$prestudent->orgform_kurzbz; - } + //OrgForm aus dem Status nehmen + $prestudent = new prestudent(); + $prestudent->getLastStatus($row->prestudent_id); + if($prestudent->orgform_kurzbz!='') + $row->orgform_kurzbz=$prestudent->orgform_kurzbz; + + $anforderungen_praxis = 'Das Studium beinhaltet ein facheinschlägiges Berufspraktikum.'; switch($row->orgform_kurzbz) { @@ -245,6 +244,10 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") break; case 'DL': echo ' Fernstudium / Distance Learning'; break; + case 'DUA': // andere praxisanforderungen bei dualem Studium + echo ' Duales Studium / Integrated work/study degree program'; + $anforderungen_praxis = 'Das Studium ist als duales Studium konzipiert und weist einen hohen Anteil an Praxisphasen in Partnerunternehmen auf, die inhaltlich und organisatorisch im Studienplan verankert sind und die systematische Verschränkung von Wissen und Anwendung fördern.'; + break; default: echo ' '; break; } @@ -254,7 +257,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") echo ' UNESCO ISCED 7'; echo ' '; echo ' '; - echo ' '; + echo ' '; echo ' '; echo ' '; echo ' '; @@ -278,7 +281,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") echo ' UNESCO ISCED 6'; echo ' '; echo ' '; - echo ' '; + echo ' '; echo ' '; echo ' '; echo ' '; From 3ec0aabfee85c93c94a011631ac030de7928e4c0 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 22 Oct 2020 00:30:37 +0200 Subject: [PATCH 4/9] person/Kontakt_model: added getZustellKontakt for getting latest Zustellkontakt --- application/models/person/Kontakt_model.php | 29 +++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/application/models/person/Kontakt_model.php b/application/models/person/Kontakt_model.php index 50ef18e15..c35794fc8 100644 --- a/application/models/person/Kontakt_model.php +++ b/application/models/person/Kontakt_model.php @@ -169,4 +169,33 @@ class Kontakt_model extends DB_Model return $this->execQuery($qry, array($person_id)); } + + /** + * Loads main contact, i.e. most recent Zustellkontakt with the given kontakttypes. + * @param $person_id + * @param $kontakttypen array of kontakttypen, one chronologically last Zustellkontakt for all given types + * @return object + */ + public function getZustellKontakt($person_id, $kontakttypen) + { + if (is_string($kontakttypen)) + $kontakttypen = array($kontakttypen); + + if (!isEmptyArray($kontakttypen)) + { + $qry = " + SELECT + kontakt + FROM + public.tbl_kontakt + WHERE person_id = ? + AND kontakttyp IN ? + ORDER BY zustellung DESC NULLS LAST, updateamum DESC, insertamum DESC + LIMIT 1"; + + return $this->execQuery($qry, array($person_id, $kontakttypen)); + } + else + return success(array()); + } } From 17affaa57d117d7319219ce7c22cedebd7df016d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Fri, 6 Nov 2020 09:42:05 +0100 Subject: [PATCH 5/9] =?UTF-8?q?BIS-Meldung=20Kennzahlen=20f=C3=BCr=20Eisen?= =?UTF-8?q?stadt=20und=20Pinkafeld=20angepasst?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vilesci/bis/studentenmeldung.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vilesci/bis/studentenmeldung.php b/vilesci/bis/studentenmeldung.php index f27d3602f..7f6d97a47 100644 --- a/vilesci/bis/studentenmeldung.php +++ b/vilesci/bis/studentenmeldung.php @@ -144,9 +144,9 @@ derzeit fuer alle Studierende der gleiche Standort ToDo: Standort sollte pro Student konfigurierbar sein. */ $standortcode='22'; -if(in_array($stg_kz,array('265','268','761','760','266','267','764','269','400'))) +if(in_array($stg_kz,array('265','268','761','760','266','267','764','269','400','794','795','786','859'))) $standortcode='14'; // Pinkafeld -elseif(in_array($stg_kz,array('639','640','263','743','364','635','402','401','725','264','271'))) +elseif(in_array($stg_kz,array('639','640','263','743','364','635','402','401','725','264','271','781'))) $standortcode='3'; // Eisenstadt $datumobj=new datum(); From df8e7a9006d4c0421c75d6103e5319b1ea389896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Fri, 6 Nov 2020 12:39:37 +0100 Subject: [PATCH 6/9] =?UTF-8?q?BIS=20Check=20f=C3=BCr=20Aufenthaltszweckco?= =?UTF-8?q?de=20korrigiert=20wenn=201,2=20und=203=20gleichzeitig=20erfasst?= =?UTF-8?q?=20wurde?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vilesci/bis/studentenmeldung.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vilesci/bis/studentenmeldung.php b/vilesci/bis/studentenmeldung.php index 7f6d97a47..df10214fa 100644 --- a/vilesci/bis/studentenmeldung.php +++ b/vilesci/bis/studentenmeldung.php @@ -1368,7 +1368,7 @@ function GenerateXMLStudentBlock($row) if (!in_array($row_zweck->zweck_code, $zweck_code_arr)) { // Aufenthaltszweck 1, 2, 3 nicht gemeinsam melden - if (!empty(array_intersect(array(1, 2, 3), $zweck_code_arr))) + if (in_array(1,$zweck_code_arr) && in_array(2,$zweck_code_arr) && in_array(3,$zweck_code_arr)) { $error_log_io .= (!empty($error_log_io) ? ', ' : ''). "Aufenthaltzweckcode 1, 2, 3 dürfen nicht gemeinsam gemeldet werden"; From 575e097e7fa667a64601cc812a6d5506c139ed6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Mon, 9 Nov 2020 08:20:30 +0100 Subject: [PATCH 7/9] =?UTF-8?q?Diplomasupplement=20-=20Englische=20Version?= =?UTF-8?q?=20f=C3=BCr=20duales=20Studium=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rdf/diplomasupplement.xml.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rdf/diplomasupplement.xml.php b/rdf/diplomasupplement.xml.php index 0052c75be..14352a3c3 100644 --- a/rdf/diplomasupplement.xml.php +++ b/rdf/diplomasupplement.xml.php @@ -235,6 +235,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") $row->orgform_kurzbz=$prestudent->orgform_kurzbz; $anforderungen_praxis = 'Das Studium beinhaltet ein facheinschlägiges Berufspraktikum.'; + $anforderungen_praxiseng = 'Included in the program is a relevant work placement.'; switch($row->orgform_kurzbz) { @@ -247,6 +248,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") case 'DUA': // andere praxisanforderungen bei dualem Studium echo ' Duales Studium / Integrated work/study degree program'; $anforderungen_praxis = 'Das Studium ist als duales Studium konzipiert und weist einen hohen Anteil an Praxisphasen in Partnerunternehmen auf, die inhaltlich und organisatorisch im Studienplan verankert sind und die systematische Verschränkung von Wissen und Anwendung fördern.'; + $anforderungen_praxiseng = 'The program is designed as integrated work study program and has a high proportion of practical phases in partner companies, which are embedded in the curriculum in terms of content and organisation and promote the systematic interconnection of knowledge and utilisation.'; break; default: echo ' '; break; @@ -258,7 +260,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") echo ' '; echo ' '; echo ' '; - echo ' '; + echo ' '; echo ' '; echo ' '; echo ' Diplomstudium (UNESCO ISCED 7)'; @@ -282,7 +284,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") echo ' '; echo ' '; echo ' '; - echo ' '; + echo ' '; echo ' '; echo ' '; echo ' Bachelorstudium (UNESCO ISCED 6)'; @@ -363,7 +365,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml") } } - $qry = "SELECT tbl_bisio.bisio_id, von, bis, lehreinheit_id, + $qry = "SELECT tbl_bisio.bisio_id, von, bis, lehreinheit_id, (SELECT STRING_AGG ( tbl_zweck.bezeichnung, ', ' From e499a07d7e93903948e52a641c20e0a30d253230 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 9 Nov 2020 15:16:54 +0100 Subject: [PATCH 8/9] =?UTF-8?q?bpk-Pr=C3=BCfung=20auskommentiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vilesci/bis/studentenmeldung.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vilesci/bis/studentenmeldung.php b/vilesci/bis/studentenmeldung.php index df10214fa..388942595 100644 --- a/vilesci/bis/studentenmeldung.php +++ b/vilesci/bis/studentenmeldung.php @@ -751,7 +751,7 @@ function GenerateXMLStudentBlock($row) { $error_log.=(!empty($error_log)?', ':'')."Heimat-Nation ('".$nation."')"; } - if($row->bpk == '' || $row->bpk == null) + /*if($row->bpk == '' || $row->bpk == null) { $error_log .= (!empty($error_log) ? ', ' : '') . "bPK fehlt"; } @@ -766,7 +766,7 @@ function GenerateXMLStudentBlock($row) { $error_log.=(!empty($error_log) ? ', ' : ''). "bPK ist nicht 28 Zeichen lang"; } - } + }*/ if (!$ausserordentlich && !$incoming) { if ($zustell_plz == '' || $zustell_plz == null) @@ -1198,9 +1198,9 @@ function GenerateXMLStudentBlock($row) " . $row->ersatzkennzeichen . ""; } - $datei .= " + /*$datei .= " " . $row->bpk . " - "; + ";*/ $datei .= " " . $row->staatsbuergerschaft . " From 4feabb25e0f69fb5ad70f1ada65d237a775569d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Fri, 13 Nov 2020 14:55:51 +0100 Subject: [PATCH 9/9] =?UTF-8?q?Firmenhandys=20sind=20nur=20f=C3=BCr=20Mita?= =?UTF-8?q?rbeiter=20sichtbar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/private/profile/index.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cis/private/profile/index.php b/cis/private/profile/index.php index 5b3a645da..dd39cf301 100644 --- a/cis/private/profile/index.php +++ b/cis/private/profile/index.php @@ -56,6 +56,12 @@ $uid = get_uid(); $rechte = new benutzerberechtigung(); $rechte->getBerechtigungen($uid); +$is_employee = false; +if (check_lektor($uid)) +{ + $is_employee = true; +} + $datum_obj = new datum(); // Wenn ein anderer User sich das Profil ansieht (Bei Personensuche) sollen bestimmte persönliche Daten nicht angezeigt werden @@ -346,7 +352,7 @@ if ($type == 'mitarbeiter') $kontakt->load_pers($user->person_id); foreach($kontakt->result as $k) { - if ($k->kontakttyp == 'firmenhandy') + if ($k->kontakttyp == 'firmenhandy' && $is_employee) echo 'Firmenhandy: '.$k->kontakt.'
'; }