diff --git a/application/config/javascript.php b/application/config/javascript.php index 383002dab..6f82810e2 100644 --- a/application/config/javascript.php +++ b/application/config/javascript.php @@ -5,3 +5,5 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); $config['use_vuejs_dev_version'] = false; // use bundled javascript $config['use_bundled_javascript'] = false; +// systemerror_mailto use in FHC-Alert Plugin - if empty Link will not be rendered +$config['systemerror_mailto'] = ''; diff --git a/application/controllers/api/frontend/v1/stv/Kontakt.php b/application/controllers/api/frontend/v1/stv/Kontakt.php index fd16fff06..bcd38853c 100644 --- a/application/controllers/api/frontend/v1/stv/Kontakt.php +++ b/application/controllers/api/frontend/v1/stv/Kontakt.php @@ -85,7 +85,10 @@ class Kontakt extends FHCAPI_Controller || $this->router->method == 'addNewBankverbindung' ) { $person_id = current(array_slice($this->uri->rsegments, 2)); - + + if (is_null($person_id) || !ctype_digit((string)$person_id)) + $this->terminateWithError( $this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL); + $this->checkPermissionsForPerson($person_id, $permsMa, $permsStud); } elseif ($this->router->method == 'loadAddress' || $this->router->method == 'loadContact' @@ -119,6 +122,9 @@ class Kontakt extends FHCAPI_Controller $model = 'person/Bankverbindung_model'; } + if (!isset($id) || !ctype_digit((string)$id)) + $this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL); + $this->load->model($model, 'TempModel'); $result = $this->TempModel->load($id); $data = $this->getDataOrTerminateWithError($result); @@ -387,8 +393,11 @@ class Kontakt extends FHCAPI_Controller $this->terminateWithSuccess(getData($result) ?: []); } - public function getFirmen($searchString) + public function getFirmen($searchString = null) { + if (is_null($searchString)) + $this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL); + $this->load->model('ressource/firma_model', 'FirmaModel'); $result = $this->FirmaModel->searchFirmen($searchString); @@ -398,8 +407,11 @@ class Kontakt extends FHCAPI_Controller $this->terminateWithSuccess($result ?: []); } - public function getStandorte($searchString) + public function getStandorte($searchString = null) { + if (is_null($searchString)) + $this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL); + $this->load->model('organisation/standort_model', 'StandortModel'); $result = $this->StandortModel->searchStandorte($searchString); @@ -409,8 +421,11 @@ class Kontakt extends FHCAPI_Controller $this->terminateWithSuccess($data); } - public function getStandorteByFirma($firma_id) + public function getStandorteByFirma($firma_id = null) { + if (is_null($firma_id) || !ctype_digit((string)$firma_id)) + $this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL); + $this->load->model('organisation/standort_model', 'StandortModel'); $result = $this->StandortModel->getStandorteByFirma($firma_id); @@ -652,6 +667,9 @@ class Kontakt extends FHCAPI_Controller $bic = $this->input->post('bic'); $blz = $this->input->post('blz'); $kontonr = $this->input->post('kontonr'); + $iban = $this->input->post('iban'); + $typ = $this->input->post('typ'); + $verrechnung = $this->input->post('verrechnung'); $result = $this->BankverbindungModel->insert( [ @@ -659,13 +677,13 @@ class Kontakt extends FHCAPI_Controller 'name' => $name, 'anschrift' => $anschrift, 'bic' => $bic, - 'iban' => $_POST['iban'], + 'iban' => $iban, 'blz' => $blz, 'kontonr' => $kontonr, 'insertvon' => 'uid', 'insertamum' => date('c'), - 'typ' => $_POST['typ'], - 'verrechnung' => $_POST['verrechnung'], + 'typ' => $typ, + 'verrechnung' => $verrechnung, 'ext_id' => $ext_id, 'oe_kurzbz' => $oe_kurzbz, 'orgform_kurzbz' => $orgform_kurzbz diff --git a/application/controllers/jobs/IssueResolver.php b/application/controllers/jobs/IssueResolver.php index ca07439c3..fe7ee21f5 100755 --- a/application/controllers/jobs/IssueResolver.php +++ b/application/controllers/jobs/IssueResolver.php @@ -48,7 +48,9 @@ class IssueResolver extends IssueResolver_Controller 'CORE_PERSON_0001' => 'CORE_PERSON_0001', 'CORE_PERSON_0002' => 'CORE_PERSON_0002', 'CORE_PERSON_0003' => 'CORE_PERSON_0003', - 'CORE_PERSON_0004' => 'CORE_PERSON_0004' + 'CORE_PERSON_0004' => 'CORE_PERSON_0004', + 'CORE_PERSON_0005' => 'CORE_PERSON_0005', + 'CORE_PERSON_0006' => 'CORE_PERSON_0006' ); // fehler which are resolved by the job the same way as they are produced diff --git a/application/helpers/hlp_header_helper.php b/application/helpers/hlp_header_helper.php index 14f7ed338..de7e866f4 100644 --- a/application/helpers/hlp_header_helper.php +++ b/application/helpers/hlp_header_helper.php @@ -95,6 +95,9 @@ function generateJSDataStorageObject($indexPage, $calledPath, $calledMethod) }, $server_language); $user_language = getUserLanguage(); + $ci->load->config('javascript'); + $systemerror_mailto = $ci->config->item('systemerror_mailto'); + $FHC_JS_DATA_STORAGE_OBJECT = array( 'app_root' => APP_ROOT, 'ci_router' => $indexPage, @@ -103,6 +106,7 @@ function generateJSDataStorageObject($indexPage, $calledPath, $calledMethod) 'server_languages' => $server_language, 'user_language' => $user_language, 'timezone' => date_default_timezone_get(), + 'systemerror_mailto' => $systemerror_mailto, ); $toPrint = "\n"; diff --git a/application/libraries/AntragLib.php b/application/libraries/AntragLib.php index 885acac90..d90a98241 100644 --- a/application/libraries/AntragLib.php +++ b/application/libraries/AntragLib.php @@ -77,7 +77,9 @@ class AntragLib 'studiensemester_kurzbz'=>$prestudentstatus->studiensemester_kurzbz, 'ausbildungssemester'=>$prestudentstatus->ausbildungssemester ], [ - 'statusgrund_id' => null + 'statusgrund_id' => null, + 'updateamum' => date('c'), + 'updatevon' => $insertvon ]); } } @@ -335,7 +337,10 @@ class AntragLib 'status_kurzbz'=>$prestudentstatus->status_kurzbz, 'studiensemester_kurzbz'=>$prestudentstatus->studiensemester_kurzbz, 'ausbildungssemester'=>$prestudentstatus->ausbildungssemester - ], []); + ], [ + 'updateamum' => $insertam, + 'updatevon' => $insertvon + ]); if (isError($result)) { $errors[] = getError($result); diff --git a/application/libraries/issues/PlausicheckResolverLib.php b/application/libraries/issues/PlausicheckResolverLib.php index 26da985f6..2b20a7d93 100644 --- a/application/libraries/issues/PlausicheckResolverLib.php +++ b/application/libraries/issues/PlausicheckResolverLib.php @@ -13,7 +13,7 @@ class PlausicheckResolverLib private $_ci; // ci instance private $_extensionName; // name of extension private $_codeLibMappings = []; // mappings for issues which explicitly defined resolver - private $_codeProducerLibMappings = []; // mappings for issues which are resolved as produced + private $_codeProducerLibMappings = []; // mappings for issues which are resolved with the same check as they are produced public function __construct($params = null) { @@ -99,10 +99,11 @@ class PlausicheckResolverLib $issueResolved = getData($issueResolvedRes) === true; } } - elseif (isset($this->_codeProducerLibMappings[$issue->fehlercode])) + elseif (isset($this->_codeProducerLibMappings[$issue->fehlercode])) // check if it is an issue without explicit resolver, "self-resolving" { $libName = $this->_codeProducerLibMappings[$issue->fehlercode]; + // execute same check as used for issue production $issueResolvedRes = $this->_ci->plausicheckproducerlib->producePlausicheckIssue( $libName, $issue->fehler_kurzbz, diff --git a/application/libraries/issues/resolvers/CORE_PERSON_0005.php b/application/libraries/issues/resolvers/CORE_PERSON_0005.php new file mode 100644 index 000000000..1d768e70c --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_PERSON_0005.php @@ -0,0 +1,36 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->model('person/Person_model', 'PersonModel'); + + // load geburtsnation for the given person + $this->_ci->PersonModel->addSelect('geburtsnation'); + $personRes = $this->_ci->PersonModel->load($params['issue_person_id']); + + if (isError($personRes)) return $personRes; + + if (hasData($personRes)) + { + // get person data + $personData = getData($personRes)[0]; + + // if geburtsnation present, issue is resolved + return success(!isEmptyString($personData->geburtsnation)); + } + else + return success(false); // if no person found, not resolved + } +} \ No newline at end of file diff --git a/application/libraries/issues/resolvers/CORE_PERSON_0006.php b/application/libraries/issues/resolvers/CORE_PERSON_0006.php new file mode 100644 index 000000000..8b7ff9c56 --- /dev/null +++ b/application/libraries/issues/resolvers/CORE_PERSON_0006.php @@ -0,0 +1,37 @@ +_ci =& get_instance(); // get code igniter instance + + $this->_ci->load->model('codex/Uhstat1daten_model', 'UhstatModel'); + + $personRes = $this->_ci->UhstatModel->getUHSTAT1PersonData([$params['issue_person_id']]); + + if (isError($personRes)) return $personRes; + + if (hasData($personRes)) + { + // get person data + $personData = getData($personRes)[0]; + + // if person identification data present, issue is resolved + return success( + !isEmptyString($personData->ersatzkennzeichen) + || (!isEmptyString($personData->vbpkAs) && !isEmptyString($personData->vbpkBf)) + ); + } + else + return success(false); // if no person found, not resolved + } +} \ No newline at end of file diff --git a/application/models/codex/Uhstat1daten_model.php b/application/models/codex/Uhstat1daten_model.php index 9bca44b58..899f037ef 100644 --- a/application/models/codex/Uhstat1daten_model.php +++ b/application/models/codex/Uhstat1daten_model.php @@ -11,4 +11,44 @@ class Uhstat1daten_model extends DB_Model $this->dbTable = 'bis.tbl_uhstat1daten'; $this->pk = 'uhstat1daten_id'; } + + /** + * Gets person data needed for sending as UHSTAT1 data. + * @param array $person_id_arr + * @param string $studiensemester + * @param array $status_kurzbz + * @return object success with prestudents or error + */ + public function getUHSTAT1PersonData($person_id_arr) + { + if (!isset($person_id_arr) || isEmptyArray($person_id_arr)) return success([]); + + $params = array($person_id_arr); + + $prstQry = "SELECT + DISTINCT ON (pers.person_id) + pers.person_id, uhstat_daten.uhstat1daten_id, pers.svnr, pers.ersatzkennzeichen, pers.geburtsnation, + uhstat_daten.mutter_geburtsstaat, uhstat_daten.mutter_bildungsstaat, uhstat_daten.mutter_geburtsjahr, + uhstat_daten.mutter_bildungmax, uhstat_daten.vater_geburtsstaat, uhstat_daten.vater_bildungsstaat, + uhstat_daten.vater_geburtsjahr, uhstat_daten.vater_bildungmax, + kzVbpkAs.inhalt AS \"vbpkAs\", kzVbpkBf.inhalt AS \"vbpkBf\" + FROM + public.tbl_person pers + JOIN public.tbl_prestudent ps USING (person_id) + JOIN public.tbl_studiengang stg USING (studiengang_kz) + JOIN bis.tbl_uhstat1daten uhstat_daten USING (person_id) + LEFT JOIN public.tbl_kennzeichen kzVbpkAs ON kzVbpkAs.kennzeichentyp_kurzbz = 'vbpkAs'AND kzVbpkAs.person_id = pers.person_id AND kzVbpkAs.aktiv + LEFT JOIN public.tbl_kennzeichen kzVbpkBf ON kzVbpkBf.kennzeichentyp_kurzbz = 'vbpkBf'AND kzVbpkBf.person_id = pers.person_id AND kzVbpkBf.aktiv + WHERE + ps.bismelden + AND stg.melderelevant + AND pers.person_id IN ? + ORDER BY + pers.person_id"; + + return $this->execReadOnlyQuery( + $prstQry, + $params + ); + } } diff --git a/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php b/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php index 6827beaa4..f81a2d518 100644 --- a/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php +++ b/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php @@ -59,7 +59,14 @@ class Dienstverhaeltnis_model extends DB_Model } $qry .=" - ORDER BY dv.von desc + ORDER BY + CASE + WHEN (COALESCE(dv.bis, '2999-12-31'::date) - NOW()::date) < 0 THEN NULL + ELSE + (COALESCE(dv.bis, '2999-12-31'::date) - NOW()::date) + END ASC NULLS LAST, + COALESCE(dv.bis, '2999-12-31'::date) DESC, + dv.von DESC "; return $this->execQuery($qry, $data); diff --git a/application/views/system/infocenter/infocenterFreigegebenData.php b/application/views/system/infocenter/infocenterFreigegebenData.php index 27738719c..38285b6ae 100644 --- a/application/views/system/infocenter/infocenterFreigegebenData.php +++ b/application/views/system/infocenter/infocenterFreigegebenData.php @@ -112,7 +112,7 @@ $query = ' LIMIT 1 ) AS "AnzahlAbgeschickt", ( - SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(so.studiengangkurzbzlang) || \':\' || sp.orgform_kurzbz), \', \') + SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(so.studiengangkurzbzlang) || \':\' || sp.orgform_kurzbz || \' [\' || pss.ausbildungssemester || \']\'), \', \') FROM public.tbl_prestudentstatus pss JOIN public.tbl_prestudent ps USING(prestudent_id) JOIN public.tbl_studiengang sg USING(studiengang_kz) diff --git a/cis/testtool/frage.php b/cis/testtool/frage.php index 0aa37b299..c38229cdf 100644 --- a/cis/testtool/frage.php +++ b/cis/testtool/frage.php @@ -148,7 +148,7 @@ echo ' alert(t("testtool/alleFragenBeantwortet")."'"?>); return true; } - + $(document).ready(function () { $(document).bind('cut copy paste', function(e) { @@ -717,7 +717,7 @@ if($frage->frage_id!='') if(!$demo) { - echo ''; + echo ''; } else { diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Abschlusspruefung/Abschlusspruefung.js b/public/js/components/Stv/Studentenverwaltung/Details/Abschlusspruefung/Abschlusspruefung.js index 31f600a8c..76987aefc 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Abschlusspruefung/Abschlusspruefung.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Abschlusspruefung/Abschlusspruefung.js @@ -52,6 +52,15 @@ export default { stg_kz(){ return this.studentKzs[0]; }, + showAllFormats() { + if( this.isBerechtigtDocAndOdt === false + || !Array.isArray(this.isBerechtigtDocAndOdt) ) + { + return false; + } + let retval = this.isBerechtigtDocAndOdt.includes(this.stgInfo.oe_kurzbz); + return retval; + } }, props: { student: Object @@ -478,7 +487,7 @@ export default {