From 5cee80ed124e28205145d6ec723234764609ba3f Mon Sep 17 00:00:00 2001 From: ma0048 Date: Fri, 18 Oct 2024 13:24:39 +0200 Subject: [PATCH 1/5] - rtliste automatisierte messages --- public/js/plugin/FhcAlert.js | 26 ++++++++++++++++++++ system/dbupdate_3.4.php | 2 ++ system/dbupdate_3.4/37620_reihungslisten.php | 13 ++++++++++ vilesci/stammdaten/auswertung_fhtw.php | 18 ++++++++++++-- 4 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 system/dbupdate_3.4/37620_reihungslisten.php diff --git a/public/js/plugin/FhcAlert.js b/public/js/plugin/FhcAlert.js index b079bf98e..aa8c7a3cc 100644 --- a/public/js/plugin/FhcAlert.js +++ b/public/js/plugin/FhcAlert.js @@ -60,6 +60,13 @@ * Displays a confirmation dialog and returns a Promise which resolves * with true or false depending und the pressed button. * @return Promise + * + * confirm + * ------------ + * Displays a confirmation dialog and returns a Promise which resolves + * with true or false depending und the pressed button. + * @param string message + * @return Promise * * alertDefault * ------------ @@ -226,6 +233,25 @@ export default { }); }); }, + confirm(message) { + return new Promise((resolve, reject) => { + helperAppInstance.$confirm.require({ + group: 'fhcAlertConfirm', + header: 'Achtung', + message: message, + acceptLabel: 'Ja', + acceptClass: 'btn btn-success', + rejectLabel: 'Abbrechen', + rejectClass: 'btn btn-outline-secondary', + accept() { + resolve(true); + }, + reject() { + resolve(false); + }, + }); + }); + }, alertDefault(severity, title, message, sticky = false) { let options = { severity: severity, summary: title, detail: message}; diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index 11880fd55..ca8b42db9 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -58,6 +58,8 @@ require_once('dbupdate_3.4/17513_Entwicklungsteam.php'); require_once('dbupdate_3.4/28575_softwarebereitstellung.php'); require_once('dbupdate_3.4/41150_oe-pfad_db_view.php'); require_once('dbupdate_3.4/44031_stv_favorites.php'); +require_once('dbupdate_3.4/37620_reihungslisten.php'); + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; diff --git a/system/dbupdate_3.4/37620_reihungslisten.php b/system/dbupdate_3.4/37620_reihungslisten.php new file mode 100644 index 000000000..950d6af0e --- /dev/null +++ b/system/dbupdate_3.4/37620_reihungslisten.php @@ -0,0 +1,13 @@ +db_query("SELECT 1 FROM public.tbl_buchungstyp WHERE buchungstyp_kurzbz = 'KautionDrittStaat';")) +{ + if ($db->db_num_rows($result) == 0) + { + $qry = "INSERT INTO public.tbl_buchungstyp (buchungstyp_kurzbz, beschreibung, standardtext, standardbetrag) VALUES ('KautionDrittStaat', 'Kaution', 'Deposit for application, third countries', '-250');"; + if (!$db->db_query($qry)) + echo 'public.tbl_buchungstyp '.$db->db_last_error().'
'; + else + echo ' public.tbl_buchungstyp: Added buchungstyp "KautionDrittStaat"
'; + } +} \ No newline at end of file diff --git a/vilesci/stammdaten/auswertung_fhtw.php b/vilesci/stammdaten/auswertung_fhtw.php index aa39889cb..10809dc4f 100644 --- a/vilesci/stammdaten/auswertung_fhtw.php +++ b/vilesci/stammdaten/auswertung_fhtw.php @@ -1220,6 +1220,7 @@ $reihungstest = isset($_REQUEST['reihungstest']) ? $_REQUEST['reihungstest'] : ' $studiengang = isset($_REQUEST['studiengang']) ? $_REQUEST['studiengang'] : ''; $semester = isset($_REQUEST['semester']) ? $_REQUEST['semester'] : ''; $prestudent_id = isset($_REQUEST['prestudent_id']) ? $_REQUEST['prestudent_id'] : ''; +$prestudent_ids = isset($_REQUEST['prestudent_ids']) ? $_REQUEST['prestudent_ids'] : ''; $orgform_kurzbz = isset($_REQUEST['orgform_kurzbz']) ? $_REQUEST['orgform_kurzbz'] : ''; $format = (isset($_REQUEST['format']) ? $_REQUEST['format'] : ''); $stgtyp = (isset($_REQUEST['stgtyp']) ? $_REQUEST['stgtyp'] : ''); @@ -1259,7 +1260,7 @@ if ($prestudent_id != '' && !is_numeric($prestudent_id)) { die('PrestudentID ist ungueltig'); } -if (isset($_POST['rtauswsubmit']) && $reihungstest == '' && $studiengang == '' && $semester == '' && $prestudent_id == '' && $datum_von == '' && $datum_bis == '') +if (isset($_POST['rtauswsubmit']) && $reihungstest == '' && $studiengang == '' && $semester == '' && $prestudent_id == '' && $datum_von == '' && $datum_bis == '' && $prestudent_ids == '') { die('Waehlen Sie bitte mindestens eine der Optionen aus'); } @@ -1378,6 +1379,10 @@ if (isset($_REQUEST['reihungstest']) || isset($_POST['rtauswsubmit'])) { $query .= " AND ps.prestudent_id=" . $db->db_add_param($prestudent_id, FHC_INTEGER); } + if ($prestudent_ids != '') + { + $query .= " AND ps.prestudent_id IN (" .$db->db_implode4SQL(explode(',', $prestudent_ids)) . ")"; + } if ($orgform_kurzbz != '' && $studiengang != '') { $query .= " AND (tbl_ablauf.studienplan_id=( @@ -1611,6 +1616,10 @@ if (isset($_REQUEST['reihungstest']) || isset($_POST['rtauswsubmit'])) { $query .= " AND ps.prestudent_id=" . $db->db_add_param($prestudent_id, FHC_INTEGER); } + if ($prestudent_ids != '') + { + $query .= " AND ps.prestudent_id IN (" .$db->db_implode4SQL(explode(',',$prestudent_ids)) . ")"; + } if ($orgform_kurzbz != '') { //$query .= " AND tbl_prestudentstatus.orgform_kurzbz=" . $db->db_add_param($orgform_kurzbz); @@ -2890,7 +2899,7 @@ else $selectedrtstr = ''; $checkbxstr = ''; $first = true; - $noparamsselected = $prestudent_id == '' && $reihungstest == '' && $datum_von == '' && $datum_bis == '' && $studiengang == '' && $semester == ''; + $noparamsselected = $prestudent_id == '' && $reihungstest == '' && $datum_von == '' && $datum_bis == '' && $studiengang == '' && $semester == '' && $prestudent_ids == ''; //$maxeachline = 1; foreach ($rtest as $rt) { @@ -3006,6 +3015,9 @@ else echo ''; echo ''; echo 'PrestudentIn: '; + echo ''; + echo ''; + echo 'PrestudentIn (Mehrfachauswahl): '; echo ' '; echo '

'; @@ -3014,6 +3026,7 @@ else &datum_von=' . $datum_von . ' &datum_bis=' . $datum_bis . ' &prestudent_id=' . $prestudent_id . ' + &' . http_build_query(array('prestudent_ids' => $prestudent_ids)) . ' &' . http_build_query(array('reihungstest' => $reihungstest)) . ' &orgform_kurzbz=' . $orgform_kurzbz . ' &stgtyp=' . $stgtyp . ' @@ -3067,6 +3080,7 @@ else datum_von=' . $datum_von . '& datum_bis=' . $datum_bis . '& prestudent_id=' . $prestudent_id . '& + &' . http_build_query(array('prestudent_ids' => $prestudent_ids)) . ' &' . http_build_query(array('reihungstest' => $reihungstest)) . '">
'; echo '
'; From ff658526432d8734a3bdce3239a6262e5aed3d69 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Wed, 12 Mar 2025 08:21:03 +0100 Subject: [PATCH 2/5] neues recht basis/verwaltet_oe --- system/dbupdate_3.4.php | 1 + .../dbupdate_3.4/55614_perm_verwaltetoe.php | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 system/dbupdate_3.4/55614_perm_verwaltetoe.php diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index d007c04f6..ebb03bce7 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -72,6 +72,7 @@ require_once('dbupdate_3.4/53903_valorisierung.php'); require_once('dbupdate_3.4/55968_index_anrechnung.php'); require_once('dbupdate_3.4/25999_locale_update.php'); require_once('dbupdate_3.4/55289_pep_fine_tuning.php'); +require_once('dbupdate_3.4/55614_perm_verwaltetoe.php'); // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; diff --git a/system/dbupdate_3.4/55614_perm_verwaltetoe.php b/system/dbupdate_3.4/55614_perm_verwaltetoe.php new file mode 100644 index 000000000..4b31b48a6 --- /dev/null +++ b/system/dbupdate_3.4/55614_perm_verwaltetoe.php @@ -0,0 +1,41 @@ +, + * + * Beschreibung: + * Permission basis/verwaltet_oe + */ +if (! defined('DB_NAME')) exit('No direct script access allowed'); + +// Add permission: basis/gehaelter +if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berechtigung_kurzbz = 'basis/verwaltet_oe';")) +{ + if($db->db_num_rows($result) == 0) + { + $qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung) VALUES('basis/verwaltet_oe', 'Rechteinhaberin hat etwas mit der Verwaltung der OE zu tun.');"; + + if(!$db->db_query($qry)) + { + echo 'system.tbl_berechtigung '.$db->db_last_error().'
'; + } + else + { + echo 'system.tbl_berechtigung: Added permission "basis/verwaltet_oe"
'; + } + } +} From 129637cf4f4c796dc8edfbb583e31bf78ec76a2a Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Wed, 12 Mar 2025 12:05:34 +0100 Subject: [PATCH 3/5] add phrases for lvdev overviews --- system/phrasesupdate.php | 104 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 103 insertions(+), 1 deletion(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index acb7a12e6..a5b83c31d 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -40411,7 +40411,7 @@ array( ) ) ), - array( + array( 'app' => 'core', 'category' => 'mobility', 'phrase' => 'mobility_bearbeiten', @@ -40432,6 +40432,108 @@ array( ) ), // FHC4 Phrases Mobility End + // feature-55614 begin + array( + 'app' => 'core', + 'category' => 'kvp', + 'phrase' => 'lvdev_uebersichten', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'LV-Weiterentwicklung Übersichten', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Course Development Overviews', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'lehre', + 'phrase' => 'kompetenzfeld', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Kompetenzfeld', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'competence field', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'expand_all', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'alle ausklappen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'expand all', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'collapse_all', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'alle einklappen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'collapse all', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'lehre', + 'phrase' => 'quellkurs', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Quellkurs', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Source Course', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + // feature-55614 end ); From 08e38078a003f4afb922ca3f8fcb0c10dbd67bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Mon, 24 Mar 2025 09:57:46 +0100 Subject: [PATCH 4/5] Removed duplicate Confirm --- public/js/plugin/FhcAlert.js | 53 ++++++++++++------------------------ 1 file changed, 17 insertions(+), 36 deletions(-) diff --git a/public/js/plugin/FhcAlert.js b/public/js/plugin/FhcAlert.js index 4f07fdf24..6b4d780e3 100644 --- a/public/js/plugin/FhcAlert.js +++ b/public/js/plugin/FhcAlert.js @@ -13,7 +13,7 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * + * * @usage: * Preperations: * Be sure to have PrimeVue loaded with the toast and confirmdialog @@ -23,38 +23,38 @@ * Use: * In your component you can call now the global property $fhcAlert * which has the following functions: - * + * * alertSuccess * ------------ * Displays a success message * @param string message * @return void - * + * * alertInfo * --------- * Displays an info message * @param string message * @return void - * + * * alertWarning * ------------ * Displays a warning * @param string message * @return void - * + * * alertError * ---------- * Displays an error * @param string message * @return void - * + * * alertSystemError * ---------------- * Displays an alert with the error details and a button to mail * the error to the Support Team * @param string message * @return void - * + * * confirmDelete * ------------- * Displays a confirmation dialog and returns a Promise which resolves @@ -67,7 +67,7 @@ * with true or false depending und the pressed button. * @param string message * @return Promise - * + * * alertDefault * ------------ * Displays an alert @@ -76,7 +76,7 @@ * @param string message * @param boolean sticky (optional) defaults to false * @return void - * + * * alertMultiple * ------------- * Displays multiple alerts @@ -85,14 +85,14 @@ * @param string title (optional) defaults to 'Info' * @param boolean sticky (optional) defaults to false * @return void - * + * * handleSystemError * ----------------- * Automatiticly determine how to display an system error and display it. * This would be used in a catch block of an ajax call. * @param mixed error * @return void - * + * * handleSystemMessage * ------------------- * Automatiticly determine how to display a message and display it. @@ -253,28 +253,9 @@ export default { }); }); }, - confirm(message) { - return new Promise((resolve, reject) => { - helperAppInstance.$confirm.require({ - group: 'fhcAlertConfirm', - header: 'Achtung', - message: message, - acceptLabel: 'Ja', - acceptClass: 'btn btn-success', - rejectLabel: 'Abbrechen', - rejectClass: 'btn btn-outline-secondary', - accept() { - resolve(true); - }, - reject() { - resolve(false); - }, - }); - }); - }, alertDefault(severity, title, message, sticky = false) { let options = { severity: severity, summary: title, detail: message}; - + if (!sticky) options.life = 3000; @@ -292,7 +273,7 @@ export default { // don't show an error message to the user if the error was an aborted request if(error.hasOwnProperty('name') && error.name.toLowerCase() === "AbortError".toLowerCase()) return; - + // Error is string if (typeof error === 'string') return $fhcAlert.alertSystemError(error); @@ -304,7 +285,7 @@ export default { // Error has been handled already if (error.hasOwnProperty('handled') && error.handled) return; - + // Error is object if (typeof error === 'object' && error !== null) { let errMsg = ''; @@ -320,7 +301,7 @@ export default { if (error.hasOwnProperty('stack')) errMsg += 'Error Stack: ' + error.stack + '\r\n'; - + // Fallback object error message if (errMsg == '') errMsg = 'Error Message: ' + JSON.stringify(error) + '\r\n'; @@ -394,7 +375,7 @@ export default { // NOTE(chris): reset form validation $fhcAlert.resetFormValidation(form); - + // NOTE(chris): set form input validation const notFound = Object.entries(errors).filter(([key, detail]) => { const input = form.querySelector('[data-fhc-form-validate="' + key + '"]'); @@ -447,4 +428,4 @@ export default { app.config.globalProperties.$fhcAlert = $fhcAlert; app.provide('$fhcAlert', app.config.globalProperties.$fhcAlert); } -} \ No newline at end of file +} From a6ee6a8c0ff3b9adbbcd4038482e806ac158d498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Mon, 24 Mar 2025 11:45:58 +0100 Subject: [PATCH 5/5] =?UTF-8?q?ReihungstestJob=20angepasst=20damit=20Dritt?= =?UTF-8?q?staatenkaution=20ber=C3=BCcksichtigt=20wird.=20Fehler=20behoben?= =?UTF-8?q?=20beim=20setzen=20des=20Abgewiesenen=20Status=20das=20nicht=20?= =?UTF-8?q?in=20allen=20F=C3=A4llen=20funktioniert=20hat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/jobs/ReihungstestJob.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/controllers/jobs/ReihungstestJob.php b/application/controllers/jobs/ReihungstestJob.php index 9b2532b4b..6dd214fbb 100644 --- a/application/controllers/jobs/ReihungstestJob.php +++ b/application/controllers/jobs/ReihungstestJob.php @@ -821,7 +821,7 @@ class ReihungstestJob extends JOB_Controller JOIN lehre.tbl_studienordnung USING (studienordnung_id) JOIN PUBLIC.tbl_studiengang ON (tbl_studienordnung.studiengang_kz = tbl_studiengang.studiengang_kz) WHERE get_rolle_prestudent (tbl_prestudent.prestudent_id, ?) IN ('Aufgenommener','Bewerber','Wartender','Abgewiesener') - AND studiensemester_kurzbz = ? + AND studiensemester_kurzbz = ? AND tbl_studiengang.typ IN ('b', 'm') ) SELECT * FROM prst @@ -861,7 +861,7 @@ class ReihungstestJob extends JOB_Controller { // Alle niedrigeren Prios laden $qryNiedrPrios = " - SELECT DISTINCT + SELECT DISTINCT ON(prestudent_id) get_rolle_prestudent (tbl_prestudent.prestudent_id, '".$row_ps->studiensemester_kurzbz."') AS laststatus, tbl_studienplan.orgform_kurzbz, tbl_person.nachname, @@ -880,7 +880,7 @@ class ReihungstestJob extends JOB_Controller AND studiensemester_kurzbz = '".$row_ps->studiensemester_kurzbz."' AND tbl_studiengang.typ IN ('b', 'm') AND priorisierung > ".$row_ps->priorisierung." - ORDER BY studiengang_kz, laststatus + ORDER BY prestudent_id, studiengang_kz, laststatus, tbl_prestudentstatus.datum DESC "; // Wenn der letzte Status "Aufgenommener" ist, alle niedrigeren Prios auf "Abgewiesen" setzen @@ -976,7 +976,7 @@ class ReihungstestJob extends JOB_Controller FROM public.tbl_konto WHERE person_id = " . $row_ps->person_id . " AND studiensemester_kurzbz = '" . $row_ps->studiensemester_kurzbz . "' - AND buchungstyp_kurzbz = 'StudiengebuehrAnzahlung'"; + AND buchungstyp_kurzbz IN ('StudiengebuehrAnzahlung','KautionDrittStaat')"; $resultKautionExists = $db->execReadOnlyQuery($qryKautionExists); if (hasdata($resultKautionExists))