From d6d6d0ac48a2c5c5fea4bc16790c66ea134e31d4 Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 16 Sep 2024 18:22:28 +0200 Subject: [PATCH 01/47] Added phrases for softwarebereitstellung app --- system/phrasesupdate.php | 64 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index a6fbf4f4d..9a99b21ec 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -28826,13 +28826,13 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Softwareanforderung und Lizenzmanagement für die Lehre', + 'text' => 'Softwareanforderung für die Lehre', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'Software Request and License management for Education', + 'text' => 'Software Request for Education', 'description' => '', 'insertvon' => 'system' ) @@ -30605,6 +30605,66 @@ array( ) ) ), + array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'userAnzahl', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'User-Anzahl', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'User Number', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'userAnzahlAendern', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'User-Anzahl ändern', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Change User Number', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'userAnzahlNeu', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'User-Anzahl NEU', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'NEW User Number', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), ); From 11b0e770a2aae6ec0d64629ce3859b48976cdcf3 Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 7 Oct 2024 16:29:53 +0200 Subject: [PATCH 02/47] Added filter lehrtyp_kurzbz to getAutocompleteSuggestions in Lehrveranstaltung_model.php --- .../education/Lehrveranstaltung_model.php | 34 ++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/application/models/education/Lehrveranstaltung_model.php b/application/models/education/Lehrveranstaltung_model.php index de8ebc5c9..f10ba5423 100644 --- a/application/models/education/Lehrveranstaltung_model.php +++ b/application/models/education/Lehrveranstaltung_model.php @@ -20,19 +20,45 @@ class Lehrveranstaltung_model extends DB_Model * @param $eventQuery String * @param string $studiensemester_kurzbz Filter by Studiensemester * @param array $oes Filter by Organisationseinheiten + * @param null $lehrtyp_kurzbz Filter by Lehrtyp 'lv' or 'modul' * @return array */ - public function getAutocompleteSuggestions($eventQuery, $studiensemester_kurzbz = null, $oes = null) + public function getAutocompleteSuggestions($eventQuery, $studiensemester_kurzbz = null, $oes = null, $lehrtyp_kurzbz = null) { - $subQry = $this->_getQryLvsByStudienplan($studiensemester_kurzbz, $oes); + // Subquery + $subQry = $this->_getQryLvsByStudienplan(); $params = []; - /* filter by input string */ - if (is_string($eventQuery)) { + if (isset($studiensemester_kurzbz) && is_string($studiensemester_kurzbz)) + { + /* filter by studiensemester */ + $subQry.= ' AND stplsem.studiensemester_kurzbz = ?'; + $params[] = $studiensemester_kurzbz; + } + + if (isset($oes) && is_array($oes)) + { + /* filter by organisationseinheit */ + $subQry.= ' AND lv.oe_kurzbz IN ?'; + $params[]= $oes; + } + + if (isset($lehrtyp_kurzbz) && is_string($lehrtyp_kurzbz)) + { + /* filter by lehrtyp_kurzbz */ + $subQry .= ' AND lehrtyp_kurzbz = ?'; + $params[] = $lehrtyp_kurzbz; + } + + + if (is_string($eventQuery)) + { + /* filter by input string */ $subQry.= ' AND lv.bezeichnung ILIKE ?'; $params[] = '%' . $eventQuery . '%'; } + // Final Query $qry = 'SELECT DISTINCT ON (lehrveranstaltung_id) * FROM ('. $subQry. ') AS tmp'; return $this->execQuery($qry, $params); From 8744a00ce7e42afe54806d260136302525503731 Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 7 Oct 2024 16:34:41 +0200 Subject: [PATCH 03/47] Added filter lehrtyp_kurzbz and $oe_column to getLvsByStudienplan in Lehrveranstaltung_model.php .lehrtyp_kurzbz filters by Lehrtyp 'lv' or 'modul' (default no filter) .oe_column is used when filtering $oes: Filter by lv.oe_kurzbz or stg.oe_kurzbz (the stg joined to lv) --- .../education/Lehrveranstaltung_model.php | 49 ++++++++++++++++--- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/application/models/education/Lehrveranstaltung_model.php b/application/models/education/Lehrveranstaltung_model.php index f10ba5423..1fb949d7b 100644 --- a/application/models/education/Lehrveranstaltung_model.php +++ b/application/models/education/Lehrveranstaltung_model.php @@ -67,15 +67,50 @@ class Lehrveranstaltung_model extends DB_Model /** * Get Lehrveranstaltungen with its Stg, OE and OE-type. * Filter by Studiensemester and Organisationseinheiten if necessary. - * @param $eventQuery String - * @param string $studiensemester_kurzbz Filter by Studiensemester - * @param array $oes Filter by Organisationseinheiten - * @param array $lv_ids Filter by Lehrveranstaltung-Ids + * @param null|string $studiensemester_kurzbz Filter by Studiensemester + * @param null|array $oes Filter by Organisationseinheiten + * @param null|string $lehrtyp_kurzbz Filter by Lehrtyp 'lv' or 'modul' + * @param null|array $lv_ids Filter by Lehrveranstaltung-Ids + * @param string $oe_column 'lv'|'stg' Used when filtering $oes: Filter by lv.oe_kurzbz or stg.oe_kurzbz (the stg joined to lv) * @return array */ - public function getLvsByStudienplan($studiensemester_kurzbz = null, $oes = null, $lv_ids = null) + public function getLvsByStudienplan($studiensemester_kurzbz = null, $oes = null, $lehrtyp_kurzbz = null, $lv_ids = null, $oe_column = 'lv') { - $subQry = $this->_getQryLvsByStudienplan($studiensemester_kurzbz, $oes); + // Subquery LVs + $subQry = $this->_getQryLvsByStudienplan(); + $params = []; + + if (isset($studiensemester_kurzbz) && is_string($studiensemester_kurzbz)) + { + /* filter by studiensemester */ + $subQry.= ' AND stplsem.studiensemester_kurzbz = ?'; + $params[] = $studiensemester_kurzbz; + } + + if (isset($oes) && is_array($oes)) + { + if ($oe_column === 'lv') + { + /* filter by lv organisationseinheit (Standard behaviour) */ + $subQry.= ' AND lv.oe_kurzbz IN ?'; + } + elseif ($oe_column === 'stg') + { + /* filter by lv studiengangs organisationseinheit () */ + $subQry.= ' AND stg.oe_kurzbz IN ?'; + } + + $params[]= $oes; + } + + if (isset($lehrtyp_kurzbz) && is_string($lehrtyp_kurzbz)) + { + /* filter by lehrtyp_kurzbz */ + $subQry .= ' AND lehrtyp_kurzbz = ?'; + $params[] = $lehrtyp_kurzbz; + } + + // Final Query $qry = 'SELECT * FROM ('. $subQry. ') AS tmp'; if (isset($lv_ids) && is_array($lv_ids)) @@ -87,7 +122,7 @@ class Lehrveranstaltung_model extends DB_Model $qry.= ' ORDER BY stg_typ_kurzbz, orgform_kurzbz DESC'; - return $this->execQuery($qry); + return $this->execQuery($qry, $params); } /** From b08e01f72f8589c0790856b1d656d6ac9df0f252 Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 7 Oct 2024 16:37:07 +0200 Subject: [PATCH 04/47] Added columns to and moved where-clauses from _getQryLvsByStudienplan to calling methods in Lehrveranstaltung_model.php .added cols lehrtyp_kurzbz and lehrveranstaltung_template_id --- .../education/Lehrveranstaltung_model.php | 23 ++++--------------- 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/application/models/education/Lehrveranstaltung_model.php b/application/models/education/Lehrveranstaltung_model.php index 1fb949d7b..1c601a291 100644 --- a/application/models/education/Lehrveranstaltung_model.php +++ b/application/models/education/Lehrveranstaltung_model.php @@ -130,7 +130,7 @@ class Lehrveranstaltung_model extends DB_Model * * @return string */ - private function _getQryLvsByStudienplan($studiensemester_kurzbz = null, $oes = null, $lehrtyp_kurzbz = 'lv') + private function _getQryLvsByStudienplan() { $qry = ' SELECT @@ -152,6 +152,8 @@ class Lehrveranstaltung_model extends DB_Model lv.lehrveranstaltung_id, lv.semester, lv.bezeichnung AS lv_bezeichnung, + lv.lehrtyp_kurzbz, + lv.lehrveranstaltung_template_id, ( -- comma seperated string of all lehreinheitgruppen SELECT string_agg(bezeichnung, \', \') AS lehreinheitgruppe_bezeichnung @@ -186,23 +188,8 @@ class Lehrveranstaltung_model extends DB_Model JOIN public.tbl_organisationseinheit oe USING (oe_kurzbz) JOIN public.tbl_studiengang stg ON stg.studiengang_kz = sto.studiengang_kz JOIN public.tbl_studiengangstyp stgtyp ON stgtyp.typ = stg.typ - /* filter by lehrtyp_kurzbz, default is lvs only */ - WHERE - lehrtyp_kurzbz = '. $this->db->escape($lehrtyp_kurzbz); - - if (isset($studiensemester_kurzbz) && is_string($studiensemester_kurzbz)) - { - /* filter by studiensemester */ - $qry.= ' AND stplsem.studiensemester_kurzbz = '. $this->db->escape($studiensemester_kurzbz); - - } - - if (isset($oes) && is_array($oes)) - { - /* filter by organisationseinheit */ - $implodedOes = "'". implode("', '", $oes). "'"; - $qry.= ' AND lv.oe_kurzbz IN ('. $implodedOes. ')'; - } + WHERE 1 = 1 + '; return $qry; } From 7096bba958ed8db567532d6812764bda07ccfa48 Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 7 Oct 2024 16:37:45 +0200 Subject: [PATCH 05/47] Added phrases for Softwarebereitstellung --- system/phrasesupdate.php | 80 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 9a99b21ec..89dc427c3 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -30665,6 +30665,86 @@ array( ) ) ), + array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'standardLvTemplate', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Standard LV-Template', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Standard Course Template', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'anforderungNachStandardLvTemplate', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anforderung nach Standard LV-Template', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Request by Standard Course Template', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'swAnforderungUeberAuswahlVonStandardisiertenLvTemplates', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Softwareanforderung über die Auswahl von standardisierten LV-Templates (Quellkurse)", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Software Requirements based on the Selection of Standardized Course-Templates", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'swFuerLvAnfordern', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Software für LV anfordern", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Request software for courses", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), ); From 5cee80ed124e28205145d6ec723234764609ba3f Mon Sep 17 00:00:00 2001 From: ma0048 Date: Fri, 18 Oct 2024 13:24:39 +0200 Subject: [PATCH 06/47] - 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 dcb24415fcb75f75f920ad0bffb1f61135f41559 Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 21 Oct 2024 14:02:25 +0200 Subject: [PATCH 07/47] Added phrases 'errorConfigFehlt' and 'errorUnbekannteUrl' --- system/phrasesupdate.php | 42 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 59c4a2246..a8d80a4af 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -31165,7 +31165,47 @@ array( 'insertvon' => 'system' ) ) - ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'errorConfigFehlt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Config-Eintrag fehlt", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Missing config entry", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'errorUnbekannteUrl', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Unbekannte URL. Seite bzw. Link kann nicht geöffnet werden.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Unknown URL. Cannot open to site or link", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), ); From 8614e4301fba5444c2f1bd36c0ada99aa8ddb890 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 20 Nov 2024 13:54:05 +0100 Subject: [PATCH 08/47] Added getStudienjahrByStudiensemester method to Studiensemester API Controller --- .../v1/organisation/Studiensemester.php | 39 ++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/application/controllers/api/frontend/v1/organisation/Studiensemester.php b/application/controllers/api/frontend/v1/organisation/Studiensemester.php index 72a449aaa..bb56ea71a 100644 --- a/application/controllers/api/frontend/v1/organisation/Studiensemester.php +++ b/application/controllers/api/frontend/v1/organisation/Studiensemester.php @@ -24,7 +24,8 @@ class Studiensemester extends FHCAPI_Controller parent::__construct( array( 'getAll' => self::PERM_LOGGED, - 'getAktNext' => self::PERM_LOGGED + 'getAktNext' => self::PERM_LOGGED, + 'getStudienjahrByStudiensemester' => self::PERM_LOGGED ) ); // Load model StudiensemesterModel @@ -115,4 +116,40 @@ class Studiensemester extends FHCAPI_Controller $this->terminateWithSuccess((getData($result) ?: '')); } + + /** + * Get Studienjahr by Studiensemester. + * input param semester: studiensemester_kurzbz + */ + public function getStudienjahrByStudiensemester() + { + $semester = $this->input->get('semester'); + + $studienjahrObj = null; + + if (!is_numeric($semester)) + { + $this->StudiensemesterModel->addSelect('studienjahr_kurzbz'); + $result = $this->StudiensemesterModel->loadWhere(array('studiensemester_kurzbz =' => $semester)); + } + + if (hasData($result)) + { + $studienjahr = getData($result)[0]->studienjahr_kurzbz; + $startstudienjahr = substr($studienjahr, 0, 4); + $endstudienjahr = substr($studienjahr, 0, 2) . substr($studienjahr, -2); + + $studienjahrObj = new StdClass(); + + $studienjahrObj->studienjahr_kurzbz = $studienjahr; + $studienjahrObj->startstudienjahr = $startstudienjahr; + $studienjahrObj->endstudienjahr= $endstudienjahr; + } + + if (isError($result)) { + $this->terminateWithError(getError($result), self::ERROR_TYPE_DB); + } + + $this->terminateWithSuccess((getData(success($studienjahrObj)))); + } } From 933af943448aa4e05da36d3e83e042e95f08a0e3 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 20 Nov 2024 13:55:11 +0100 Subject: [PATCH 09/47] Added checkIsTemplate method to Lehrveranstaltung Model Checks if given LV is a template (Quellkurs) --- .../education/Lehrveranstaltung_model.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/application/models/education/Lehrveranstaltung_model.php b/application/models/education/Lehrveranstaltung_model.php index 1c601a291..f7860f470 100644 --- a/application/models/education/Lehrveranstaltung_model.php +++ b/application/models/education/Lehrveranstaltung_model.php @@ -716,6 +716,28 @@ class Lehrveranstaltung_model extends DB_Model return $this->execQuery($qry); } + /** + * Check if given LV is a template (Quellkurs) + * + * @param $lehrveranstaltung_id + * @return array|stdClass|void + */ + public function checkIsTemplate($lehrveranstaltung_id) + { + $this->addSelect('lehrtyp_kurzbz, lehrveranstaltung_template_id'); + $result = $this->load($lehrveranstaltung_id); + + if (isError($result)) + return error(getError($result)); + + if (hasData($result)) + { + return success( + getData($result)[0]->lehrtyp_kurzbz === 'tpl' && + getData($result)[0]->lehrveranstaltung_template_id === null + ); + } + } /** * Get ECTS Summe pro angerechnetes Quereinstiegssemester. From ae94daa4a66cca8a04fcedbc73bed7abce3fdc5c Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 20 Nov 2024 13:57:30 +0100 Subject: [PATCH 10/47] Added getStudienjahrByStudiensemester method to Studiensemester Model --- .../organisation/Studiensemester_model.php | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/application/models/organisation/Studiensemester_model.php b/application/models/organisation/Studiensemester_model.php index c59c9d343..93cc6c014 100644 --- a/application/models/organisation/Studiensemester_model.php +++ b/application/models/organisation/Studiensemester_model.php @@ -253,4 +253,40 @@ class Studiensemester_model extends DB_Model if (is_numeric($studienjahrNumber) && mb_substr($studiensemester_kurzbz, 0, 2) == 'SS') (int)$studienjahrNumber -= 1; return $studienjahrNumber; } + + /** + * Get Studienjahr by Studiensemester. + * + * @param $studiensemester_kurzbz + * @return array|stdClass + */ + public function getStudienjahrByStudiensemester($studiensemester_kurzbz) + { + $studienjahrObj = null; + + if (!is_numeric($studiensemester_kurzbz)) + { + $this->StudiensemesterModel->addSelect('studienjahr_kurzbz'); + $result = $this->StudiensemesterModel->loadWhere(array('studiensemester_kurzbz =' => $studiensemester_kurzbz)); + } + + if (hasData($result)) + { + $studienjahr = getData($result)[0]->studienjahr_kurzbz; + $startstudienjahr = substr($studienjahr, 0, 4); + $endstudienjahr = substr($studienjahr, 0, 2) . substr($studienjahr, -2); + + $studienjahrObj = new StdClass(); + + $studienjahrObj->studienjahr_kurzbz = $studienjahr; + $studienjahrObj->startstudienjahr = $startstudienjahr; + $studienjahrObj->endstudienjahr= $endstudienjahr; + } + + if (isError($result)) { + return error(getError($result)); + } + + return success($studienjahrObj); + } } From e94e9ceff212f604199ac59e3d3f242ba7a590b6 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 20 Nov 2024 14:07:43 +0100 Subject: [PATCH 11/47] Added phrases 'zuordnungExistiertBereits' and 'swFuerLvAendern' --- system/phrasesupdate.php | 41 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 925f88bba..2f80e27aa 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -31346,7 +31346,46 @@ array( ) ) ), - + array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'zuordnungExistiertBereits', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Zuordnung existiert bereits.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Assignment already exists.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'swFuerLvAendern', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Software für LV ändern", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Change Software for courses", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ) ); From 1159b0dad5d3d62fa3d2ffbff897c571d603f629 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 27 Nov 2024 17:28:54 +0100 Subject: [PATCH 12/47] Refactored getLvs method in Lehrveranstaltung_model.php --- .../education/Lehrveranstaltung_model.php | 40 ++++++++----------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/application/models/education/Lehrveranstaltung_model.php b/application/models/education/Lehrveranstaltung_model.php index f7860f470..28b44a177 100644 --- a/application/models/education/Lehrveranstaltung_model.php +++ b/application/models/education/Lehrveranstaltung_model.php @@ -66,18 +66,21 @@ class Lehrveranstaltung_model extends DB_Model /** * Get Lehrveranstaltungen with its Stg, OE and OE-type. - * Filter by Studiensemester and Organisationseinheiten if necessary. + * Can be filtered by Studienesemester, lv oes or lv's stg oes, and also by specific lvs. * @param null|string $studiensemester_kurzbz Filter by Studiensemester - * @param null|array $oes Filter by Organisationseinheiten - * @param null|string $lehrtyp_kurzbz Filter by Lehrtyp 'lv' or 'modul' - * @param null|array $lv_ids Filter by Lehrveranstaltung-Ids - * @param string $oe_column 'lv'|'stg' Used when filtering $oes: Filter by lv.oe_kurzbz or stg.oe_kurzbz (the stg joined to lv) + * @param null $lv_oes Filter oes by lv oe (default behaviour) + * @param null $stg_oes Filter oes by lv's stg oe + * @param null|array $lv_ids Filter by Lehrveranstaltungen * @return array */ - public function getLvsByStudienplan($studiensemester_kurzbz = null, $oes = null, $lehrtyp_kurzbz = null, $lv_ids = null, $oe_column = 'lv') + public function getLvs($studiensemester_kurzbz = null, $lv_oes = null, $stg_oes = null, $lv_ids = null) { // Subquery LVs $subQry = $this->_getQryLvsByStudienplan(); + + /* filter by lehrtyp_kurzbz 'lv' */ + $subQry .= ' AND lehrtyp_kurzbz = \'lv\''; + $params = []; if (isset($studiensemester_kurzbz) && is_string($studiensemester_kurzbz)) @@ -87,27 +90,18 @@ class Lehrveranstaltung_model extends DB_Model $params[] = $studiensemester_kurzbz; } - if (isset($oes) && is_array($oes)) + if (isset($lv_oes) && is_array($lv_oes)) { - if ($oe_column === 'lv') - { - /* filter by lv organisationseinheit (Standard behaviour) */ - $subQry.= ' AND lv.oe_kurzbz IN ?'; - } - elseif ($oe_column === 'stg') - { - /* filter by lv studiengangs organisationseinheit () */ - $subQry.= ' AND stg.oe_kurzbz IN ?'; - } - - $params[]= $oes; + /* filter by lv organisationseinheit */ + $subQry.= ' AND lv.oe_kurzbz IN ?'; + $params[]= $lv_oes; } - if (isset($lehrtyp_kurzbz) && is_string($lehrtyp_kurzbz)) + if (isset($stg_oes) && is_array($stg_oes)) { - /* filter by lehrtyp_kurzbz */ - $subQry .= ' AND lehrtyp_kurzbz = ?'; - $params[] = $lehrtyp_kurzbz; + /* filter by lv studiengangs organisationseinheit */ + $subQry.= ' AND stg.oe_kurzbz IN ?'; + $params[]= $stg_oes; } // Final Query From c94a2d2d0caa3481b27bbb3a257a254cb2d30972 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 27 Nov 2024 17:31:02 +0100 Subject: [PATCH 13/47] Added param lehrveranstaltung_id to getTemplateLvTree method in Lehrveranstaltung_model.php and enhanced order Now ordering extra templates to appear first and directly after the assigned lvs --- .../education/Lehrveranstaltung_model.php | 33 ++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/application/models/education/Lehrveranstaltung_model.php b/application/models/education/Lehrveranstaltung_model.php index 28b44a177..aa68f7f69 100644 --- a/application/models/education/Lehrveranstaltung_model.php +++ b/application/models/education/Lehrveranstaltung_model.php @@ -189,14 +189,15 @@ class Lehrveranstaltung_model extends DB_Model } /** - * Get all Templates and union with all Lehrveranstaltungen of given Studiensemester and Oes, that are assigned to - * a template. This data structure can be used for nested tabulator data tree. + * Get all Templates and its assigned Lehrveranstaltungen of given Studiensemester and Oes. + * Lvs are queried via actual Studienordnung and Studienplan. * * @param null|string $studiensemester_kurzbz * @param null|array $oes + * @param null $lehrveranstaltung_id Queries certain LV only * @return array|stdClass|null */ - public function getTemplateLvTree($studiensemester_kurzbz = null, $oes = null){ + public function getTemplateLvTree($studiensemester_kurzbz = null, $oes = null, $lehrveranstaltung_id = null){ $params = []; $qry = ' WITH @@ -223,6 +224,13 @@ class Lehrveranstaltung_model extends DB_Model -- filter lvs assigned to template (= standardisierte lv) AND lehrveranstaltung_template_id IS NOT NULL'; + if (is_numeric($lehrveranstaltung_id)) + { + /* filter by studiensemester */ + $params[]= $lehrveranstaltung_id; + $qry.= ' AND lv.lehrveranstaltung_template_id = ? '; + } + if (is_string($studiensemester_kurzbz)) { /* filter by studiensemester */ @@ -266,6 +274,13 @@ class Lehrveranstaltung_model extends DB_Model WHERE std.lehrveranstaltung_template_id = lv.lehrveranstaltung_id )'; + if (is_numeric($lehrveranstaltung_id)) + { + /* filter by studiensemester */ + $params[]= $lehrveranstaltung_id; + $qry.= ' AND lv.lehrveranstaltung_id = ? '; + } + if (is_array($oes)) { /* filter by organisationseinheit */ @@ -342,7 +357,17 @@ class Lehrveranstaltung_model extends DB_Model JOIN public.tbl_studiengangstyp stgtyp ON stgtyp.typ = stg.typ JOIN public.tbl_organisationseinheit oe ON oe.oe_kurzbz = lv.oe_kurzbz ORDER BY - oe.bezeichnung, lv.semester, lv.bezeichnung + -- Sort by organisationseinheit, semester, and lv.bezeichnung + oe.bezeichnung, + lv.semester, + lv.bezeichnung, + -- Within each group, ensure templates appear first + CASE + WHEN lv.lehrtyp_kurzbz = \'tpl\' THEN 0 + ELSE 1 + END, + -- Ensure assigend lvs follow their template, grouped by lehrveranstaltung_template_id + COALESCE(lv.lehrveranstaltung_template_id, lv.lehrveranstaltung_id) '; return $this->execQuery($qry, $params); From 3ec748e6fbbbb501d795515ec32b71d8c50d7195 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 27 Nov 2024 17:31:48 +0100 Subject: [PATCH 14/47] Added new phrases for Softwarebereitstellung --- system/phrasesupdate.php | 86 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 3 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 2f80e27aa..b1e80f803 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -29361,18 +29361,18 @@ array( array( 'app' => 'softwarebereitstellung', 'category' => 'global', - 'phrase' => 'softwareanforderungSubtitle', + 'phrase' => 'softwarebereitstellungSubtitle', 'insertvon' => 'system', 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Softwareanforderung und Lizenzmanagement für die Lehre', + 'text' => 'Softwarebereitstellung für die Lehre', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'Software Request and License management for Education', + 'text' => 'Software delivery for Education', 'description' => '', 'insertvon' => 'system' ) @@ -31385,6 +31385,86 @@ array( 'insertvon' => 'system' ) ) + ), + array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'anforderungNachQuellkurs', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anforderung nach Quellkurs', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Request by Course-Template', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'swAnforderungFuerQuellkurs', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Softwareanforderung für Quellkurse", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Software Requirements for Course-Templates", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'swAnforderungFuerEinzelneLvs', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Softwareanforderung für einzelne Lehrveranstaltungen", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Software Requirements for individual Courses", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'softwarebereitstellung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Softwarebereitstellung", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Software Delivery", + 'description' => '', + 'insertvon' => 'system' + ) + ) ) ); From 4ccbdecc48ba3eaad48528e798b886dc72f879b7 Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Mon, 10 Feb 2025 13:37:53 +0100 Subject: [PATCH 15/47] added phrases for new Beurteilungsformular 2025 --- system/phrasesupdate.php | 309 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 309 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index cfaf85ec7..f8a2763e3 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -37297,7 +37297,316 @@ array( 'insertvon' => 'system' ) ) + ), + // PROJEKTARBEITSBEURTEILUNG SS2025 PHRASEN --------------------------------------------------------------------------- + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'maxPunkte', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Max. Punkte', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Max. points', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'bewertung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bewertung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Score', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'problemstellungZieldefinition', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Problemstellung und Zieldefinition', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'problemstellungZieldefinitionText', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Die Problemstellung ist klar und präzise definiert und in einen wissenschaftlichen Kontext eingebettet. +Die Zielsetzung sowie eventuelle Messgrößen sind eindeutig formuliert.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'methodikLoesungsansatz', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Methodik und Lösungsansatz', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'methodikLoesungsansatzText', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Das methodische Vorgehen ist logisch und nachvollziehbar strukturiert, passend zur Zielsetzung, +und die angewandten Methoden sind korrekt und fundiert umgesetzt. +Die Methodik ist fachspezifisch angemessen, literaturbasiert begründet und wissenschaftlich vertretbar.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'ergebnisseDiskussion', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Ergebnisse und Diskussion', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'ergebnisseDiskussionText', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Die Ergebnisse werden fundiert analysiert und in Bezug auf die Zielsetzung schlüssig interpretiert. +Die Diskussion reflektiert die Relevanz und Grenzen der Ergebnisse kritisch und ist logisch strukturiert.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'strukturAufbau', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Struktur und Aufbau', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'strukturAufbauText', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Die Arbeit folgt einer logischen, klaren Gliederung und einem konsistenten roten Faden. +Verzeichnisse, Grafiken, Tabellen und der Text sind gemäß den aktuell gültigen wissenschaftlichen Richtlinien der FH Technikum Wien aufbereitet.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'stilAusdruck', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Stil und Ausdruck', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'stilAusdruckText', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Der sprachliche Ausdruck ist präzise, +fachlich korrekt und erfüllt die Anforderungen an gendergerechte Sprache gemäß den geltenden Richtlinien der FH Technikum Wien.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'zitierregelnQuellenangaben', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Zitierregeln und Quellenangaben', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'zitierregelnQuellenangabenText', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Umfang, Qualität und Aktualität der verarbeiteten Quellen sind angemessen +und repräsentieren den aktuellen Stand der Forschung zum Thema. Die Zitierregeln (IEEE oder Harvard) werden konsequent und korrekt angewendet.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'notenschluesselHinweisGewichtungEinzeln', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Falls ein Kriterium negativ bewertet wird, ist die {0} insgesamt als negativ zu beurteilen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'If a criterion has a negative score, the {0} is to be assessed as negative overall.', + 'description' => '', + 'insertvon' => 'system' + ) + ) ) + // PROJEKTARBEITSBEURTEILUNG SS2025 ENDE --------------------------------------------------------------------------- ); From 92f3f0d89c71c1b6eb89287cef39d5adc6b9f995 Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Wed, 12 Feb 2025 19:15:43 +0100 Subject: [PATCH 16/47] changed Projektarbeitsbeurteilung phrases --- system/phrasesupdate.php | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index f8a2763e3..59da9ab39 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -37327,13 +37327,13 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Bewertung', + 'text' => 'Bewertung (Prozent)', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'Score', + 'text' => 'Score (percentage)', 'description' => '', 'insertvon' => 'system' ) @@ -37353,7 +37353,7 @@ array( ), array( 'sprache' => 'English', - 'text' => '', + 'text' => 'Problem Definition and Objective Setting', 'description' => '', 'insertvon' => 'system' ) @@ -37374,7 +37374,8 @@ Die Zielsetzung sowie eventuelle Messgrößen sind eindeutig formuliert.', ), array( 'sprache' => 'English', - 'text' => '', + 'text' => 'The problem is clearly and precisely defined and embedded in a scientific context. +The objective, along with any potential metrics, is clearly formulated.', 'description' => '', 'insertvon' => 'system' ) @@ -37394,7 +37395,7 @@ Die Zielsetzung sowie eventuelle Messgrößen sind eindeutig formuliert.', ), array( 'sprache' => 'English', - 'text' => '', + 'text' => 'Methodology and Approach', 'description' => '', 'insertvon' => 'system' ) @@ -37416,7 +37417,9 @@ Die Methodik ist fachspezifisch angemessen, literaturbasiert begründet und wiss ), array( 'sprache' => 'English', - 'text' => '', + 'text' => 'The methodological approach is logically and comprehensively structured, +aligned with the objective, and the applied methods are implemented correctly and soundly. +The methodology is appropriate to the field, justified based on literature, and scientifically valid.', 'description' => '', 'insertvon' => 'system' ) @@ -37436,7 +37439,7 @@ Die Methodik ist fachspezifisch angemessen, literaturbasiert begründet und wiss ), array( 'sprache' => 'English', - 'text' => '', + 'text' => 'Results and Discussion', 'description' => '', 'insertvon' => 'system' ) @@ -37457,7 +37460,9 @@ Die Diskussion reflektiert die Relevanz und Grenzen der Ergebnisse kritisch und ), array( 'sprache' => 'English', - 'text' => '', + 'text' => 'The quality of the solution sufficiently meets the objective. +The results are thoroughly analyzed and coherently interpreted with respect to the objective. +The discussion critically reflects on the relevance and limitations of the results and is logically structured.', 'description' => '', 'insertvon' => 'system' ) @@ -37477,7 +37482,7 @@ Die Diskussion reflektiert die Relevanz und Grenzen der Ergebnisse kritisch und ), array( 'sprache' => 'English', - 'text' => '', + 'text' => 'Structure and Organization', 'description' => '', 'insertvon' => 'system' ) @@ -37498,7 +37503,8 @@ Verzeichnisse, Grafiken, Tabellen und der Text sind gemäß den aktuell gültige ), array( 'sprache' => 'English', - 'text' => '', + 'text' => 'The work follows a logical and clear outline with a consistent narrative thread. +Directories, graphics, tables, and text are prepared in accordance with the currently valid scientific guidelines of FH Technikum Wien.', 'description' => '', 'insertvon' => 'system' ) @@ -37518,7 +37524,7 @@ Verzeichnisse, Grafiken, Tabellen und der Text sind gemäß den aktuell gültige ), array( 'sprache' => 'English', - 'text' => '', + 'text' => 'Style and Expression', 'description' => '', 'insertvon' => 'system' ) @@ -37539,7 +37545,8 @@ fachlich korrekt und erfüllt die Anforderungen an gendergerechte Sprache gemä ), array( 'sprache' => 'English', - 'text' => '', + 'text' => 'The linguistic expression is precise, professionally accurate, +and meets the requirements of gender-sensitive language as per the applicable guidelines of FH Technikum Wien.', 'description' => '', 'insertvon' => 'system' ) @@ -37559,7 +37566,7 @@ fachlich korrekt und erfüllt die Anforderungen an gendergerechte Sprache gemä ), array( 'sprache' => 'English', - 'text' => '', + 'text' => 'Citation Rules and References', 'description' => '', 'insertvon' => 'system' ) @@ -37580,7 +37587,8 @@ und repräsentieren den aktuellen Stand der Forschung zum Thema. Die Zitierregel ), array( 'sprache' => 'English', - 'text' => '', + 'text' => 'The scope, quality, and timeliness of the sources processed are appropriate +and represent the current state of research on the topic. The prescribed citation rules are consistently and correctly applied.', 'description' => '', 'insertvon' => 'system' ) @@ -37594,13 +37602,13 @@ und repräsentieren den aktuellen Stand der Forschung zum Thema. Die Zitierregel 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Falls ein Kriterium negativ bewertet wird, ist die {0} insgesamt als negativ zu beurteilen.', + 'text' => 'Wenn ein Kriterium mit unter 50% bewertet wird, ist die Arbeit insgesamt als negativ zu beurteilen.', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'If a criterion has a negative score, the {0} is to be assessed as negative overall.', + 'text' => 'Each criterion must receive a minimum score of 50%; otherwise, the entire work is rated negatively.', 'description' => '', 'insertvon' => 'system' ) From de895362be5d3a8f520864be8daa7ef43fcaf8a2 Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Wed, 12 Feb 2025 19:28:27 +0100 Subject: [PATCH 17/47] changed Projektarbeitsbeurteilung phrases even more --- system/phrasesupdate.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 59da9ab39..51399bbf2 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -37613,6 +37613,46 @@ and represent the current state of research on the topic. The prescribed citatio 'insertvon' => 'system' ) ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'begruendung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Begründung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Overall comment', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'begruendungVerpflichtend', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Eine Begründung der Bewertung ist notwendig', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'An overall comment is mandatory and must be completed', + 'description' => '', + 'insertvon' => 'system' + ) + ) ) // PROJEKTARBEITSBEURTEILUNG SS2025 ENDE --------------------------------------------------------------------------- ); From 7083955702e871fcd4c14b44a150e2cb6b831360 Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Fri, 14 Feb 2025 16:44:33 +0100 Subject: [PATCH 18/47] changed Proektarbeitsbeurteilung phrases --- system/phrasesupdate.php | 41 +++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 51399bbf2..85373ff28 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -37327,13 +37327,35 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Bewertung (Prozent)', + 'text' => 'Erfüllungsgrad (Prozent) zum Ausfüllen', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'Score (percentage)', + 'text' => 'Degree of Fulfilment (Percentage) to Fill In', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'details', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Details (angemessener und korrekter Einsatz von +Werkzeugen und Technologien in jedem Schritt)', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Details +(appropriate and correct use of tools and technologies at each step)', 'description' => '', 'insertvon' => 'system' ) @@ -37453,8 +37475,9 @@ The methodology is appropriate to the field, justified based on literature, and 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Die Ergebnisse werden fundiert analysiert und in Bezug auf die Zielsetzung schlüssig interpretiert. -Die Diskussion reflektiert die Relevanz und Grenzen der Ergebnisse kritisch und ist logisch strukturiert.', + 'text' => 'Die Qualität der Lösung ist bezogen auf die Zielsetzung ausreichend. + Die Ergebnisse werden fundiert analysiert und in Bezug auf die Zielsetzung schlüssig interpretiert. + Die Diskussion reflektiert die Relevanz und Grenzen der Ergebnisse kritisch und ist logisch strukturiert.', 'description' => '', 'insertvon' => 'system' ), @@ -37602,7 +37625,7 @@ and represent the current state of research on the topic. The prescribed citatio 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Wenn ein Kriterium mit unter 50% bewertet wird, ist die Arbeit insgesamt als negativ zu beurteilen.', + 'text' => 'Jedes Kriterium muss mit mind. 50% bewertet werden, sonst ist die gesamte Arbeit negativ.', 'description' => '', 'insertvon' => 'system' ), @@ -37617,12 +37640,12 @@ and represent the current state of research on the topic. The prescribed citatio array( 'app' => 'projektarbeitsbeurteilung', 'category' => 'projektarbeitsbeurteilung', - 'phrase' => 'begruendung', + 'phrase' => 'gesamtkommentar', 'insertvon' => 'system', 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Begründung', + 'text' => 'Gesamtkommentar', 'description' => '', 'insertvon' => 'system' ), @@ -37637,12 +37660,12 @@ and represent the current state of research on the topic. The prescribed citatio array( 'app' => 'projektarbeitsbeurteilung', 'category' => 'projektarbeitsbeurteilung', - 'phrase' => 'begruendungVerpflichtend', + 'phrase' => 'gesamtkommentarVerpflichtend', 'insertvon' => 'system', 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Eine Begründung der Bewertung ist notwendig', + 'text' => 'Gesamtkommentar verpflichtend auszufüllen', 'description' => '', 'insertvon' => 'system' ), From 57eec9b940dc15af0289ca29decf5cdd3e827fee Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Fri, 14 Feb 2025 23:47:19 +0100 Subject: [PATCH 19/47] adapted document export to new Projektarbeit version (percent assessment) --- cis/private/lehre/abgabe_lektor_details.php | 8 +- cis/private/lehre/abgabe_student.php | 4 +- cis/private/lehre/abgabe_student_details.php | 4 +- .../projektbeurteilungDocumentExport.php | 45 ++++ cis/private/pdfExport.php | 54 ++-- include/projektarbeit.class.php | 248 +++++++++++------- 6 files changed, 238 insertions(+), 125 deletions(-) create mode 100644 cis/private/lehre/projektbeurteilungDocumentExport.php diff --git a/cis/private/lehre/abgabe_lektor_details.php b/cis/private/lehre/abgabe_lektor_details.php index a8705e7f9..74722607f 100644 --- a/cis/private/lehre/abgabe_lektor_details.php +++ b/cis/private/lehre/abgabe_lektor_details.php @@ -125,7 +125,7 @@ $projekttyp_kurzbz = $projektarbeit_obj->projekttyp_kurzbz; // paarbeit sollte nur ab bestimmten Zeitpunkt online bewertet werden $paIsCurrent = $projektarbeit_obj->projektarbeitIsCurrent($projektarbeit_id); -if(!is_numeric($paIsCurrent) || $paIsCurrent < 0) +if(!is_bool($paIsCurrent)) { echo "".$p->t('abgabetool/fehlerAktualitaetProjektarbeit')."
 "; } @@ -166,7 +166,7 @@ if(in_array($betreuerart, array('Erstbegutachter', 'Senatsvorsitz'))) } // Mail mit Token an Zweitbegutachter senden - if (count($zweitbetreuerArr) > 0 && $paIsCurrent >= 1 && isset($_GET['zweitbegutachtertoken']) && isset($_GET['zweitbetreuer_person_id'])) + if (count($zweitbetreuerArr) > 0 && $paIsCurrent === true && isset($_GET['zweitbegutachtertoken']) && isset($_GET['zweitbetreuer_person_id'])) { $qry_std="SELECT * FROM campus.vw_benutzer where uid=".$db->db_add_param($uid); if(!$result_std=$db->db_query($qry_std)) @@ -482,7 +482,7 @@ $htmlstr .= "\n"; $htmlstr .= ""; $htmlstr .= ""; } diff --git a/cis/private/lehre/abgabe_student_details.php b/cis/private/lehre/abgabe_student_details.php index 860eb7579..f040ed034 100644 --- a/cis/private/lehre/abgabe_student_details.php +++ b/cis/private/lehre/abgabe_student_details.php @@ -472,8 +472,8 @@ if($command=="update" && $error!=true) else { // paarbeit sollte nur ab bestimmten Zeitpunkt online bewertet werden - $num_rows_sem = $projektarbeit_obj->projektarbeitIsCurrent($projektarbeit_id); - if(!is_numeric($num_rows_sem) || $num_rows_sem < 0) + $paIsCurrent = $projektarbeit_obj->projektarbeitIsCurrent($projektarbeit_id); + if(!is_bool($paIsCurrent)) { echo "".$p->t('abgabetool/fehlerAktualitaetProjektarbeit')."
 "; } diff --git a/cis/private/lehre/projektbeurteilungDocumentExport.php b/cis/private/lehre/projektbeurteilungDocumentExport.php new file mode 100644 index 000000000..195650a24 --- /dev/null +++ b/cis/private/lehre/projektbeurteilungDocumentExport.php @@ -0,0 +1,45 @@ +getBerechtigungen($user); + +$projektarbeit = new projektarbeit(); +$projektarbeit->load($_GET['projektarbeit_id']); + +$betreuer = new person(); +$betreuer->getPersonFromBenutzer($user); + +//Überprüft ob es der Betreuer oder der Student ist +if ($betreuer->person_id !== $_GET['person_id'] && $projektarbeit->student_uid !== $user && !$rechte->isBerechtigt('assistenz')) + die("

Sie haben keine Berechtigung für diese Aktion.

"); + +$projektarbeitVorlage = new projektarbeit(); + +// passende Vorlage holen +$vorlage = $projektarbeitVorlage->getVorlage($_GET['projektarbeit_id'], $_GET['betreuerart_kurzbz']); + + +if ($vorlage == null) + die("

".$projektarbeitVorlage->errormsg."

"); + +// weiterleiten auf Dokumentexport +header('Location: ' . APP_ROOT . '/cis/private/pdfExport.php?xml=projektarbeitsbeurteilung.xml.php' + .'&xsl='.$vorlage.'&betreuerart_kurzbz=' . $_GET['betreuerart_kurzbz'] + . '&projektarbeit_id=' . $_GET['projektarbeit_id'] . '&person_id=' . $_GET['person_id']. '&uid=' . $user +); +die(); diff --git a/cis/private/pdfExport.php b/cis/private/pdfExport.php index ad2bb1fae..7393a084c 100644 --- a/cis/private/pdfExport.php +++ b/cis/private/pdfExport.php @@ -196,41 +196,41 @@ if (isset($_GET['output']) && $_GET['output'] != 'pdf') else $output = 'pdf'; -if (isset($_GET['xsl']) && ($_GET['xsl'] === 'Projektbeurteilung')) -{ - if (!isset($_GET['betreuerart_kurzbz']) || !isset($_GET['person_id']) || !isset($_GET['projektarbeit_id'])) - die('Fehlerhafte Parameteruebergabe'); +//~ if (isset($_GET['xsl']) && ($_GET['xsl'] === 'Projektbeurteilung')) +//~ { + //~ if (!isset($_GET['betreuerart_kurzbz']) || !isset($_GET['person_id']) || !isset($_GET['projektarbeit_id'])) + //~ die('Fehlerhafte Parameteruebergabe'); - $projektarbeit = new projektarbeit(); - $projektarbeit->load($_GET['projektarbeit_id']); + //~ $projektarbeit = new projektarbeit(); + //~ $projektarbeit->load($_GET['projektarbeit_id']); - $betreuer = new person(); - $betreuer->getPersonFromBenutzer($user); + //~ $betreuer = new person(); + //~ $betreuer->getPersonFromBenutzer($user); - //Überprüft ob es der Betreuer oder der Student ist - if ($betreuer->person_id !== $_GET['person_id'] && $projektarbeit->student_uid !== $user && !$rechte->isBerechtigt('assistenz')) - die("

Sie haben keine Berechtigung für diese Aktion.

"); + //~ //Überprüft ob es der Betreuer oder der Student ist + //~ if ($betreuer->person_id !== $_GET['person_id'] && $projektarbeit->student_uid !== $user && !$rechte->isBerechtigt('assistenz')) + //~ die("

Sie haben keine Berechtigung für diese Aktion.

"); - switch ($_GET['betreuerart_kurzbz']) - { - case 'Begutachter' : - case 'Senatsvorsitz' : - $xsl = 'ProjektBeurteilungBA'; - break; - case 'Erstbegutachter' : - $xsl = 'ProjektBeurteilungMAErst'; - break; - case 'Zweitbegutachter' : - $xsl = 'ProjektBeurteilungMAZweit'; - break; - } + //~ switch ($_GET['betreuerart_kurzbz']) + //~ { + //~ case 'Begutachter' : + //~ case 'Senatsvorsitz' : + //~ $xsl = 'ProjektBeurteilungBA'; + //~ break; + //~ case 'Erstbegutachter' : + //~ $xsl = 'ProjektBeurteilungMAErst'; + //~ break; + //~ case 'Zweitbegutachter' : + //~ $xsl = 'ProjektBeurteilungMAZweit'; + //~ break; + //~ } - $allowed = true; -} + //~ $allowed = true; +//~ } $konto = new konto(); -if ((((isset($_GET["uid"]) && $user == $_GET["uid"])) || $rechte->isBerechtigt('admin')) || (isset($allowed) && $allowed === true)) +if (((isset($_GET["uid"]) && $user == $_GET["uid"])) || $rechte->isBerechtigt('admin')) { $buchungstypen = array(); if (defined("CIS_DOKUMENTE_STUDIENBEITRAG_TYPEN")) diff --git a/include/projektarbeit.class.php b/include/projektarbeit.class.php index 783a0670b..5f07cf69d 100644 --- a/include/projektarbeit.class.php +++ b/include/projektarbeit.class.php @@ -16,8 +16,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * Authors: Christian Paminger , - * Andreas Oesterreicher and - * Rudolf Hangl . + * Andreas Oesterreicher and + * Rudolf Hangl . */ /** * Klasse projektarbeit @@ -27,7 +27,7 @@ require_once(dirname(__FILE__).'/basis_db.class.php'); class projektarbeit extends basis_db { - public $new; // boolean + public $new; // boolean public $result = array(); // adresse Objekt //Tabellenspalten @@ -59,6 +59,37 @@ class projektarbeit extends basis_db public $abgabedatum; + // Welche Version der Projektarbeit wird in welchem Semester verwendet + private $_versions = array( + 'Diplom' => array( + 'SS2025' => 3, + 'SS2023' => 2, + 'SS2022' => 1 + ), + 'Others' => array( + 'SS2025' => 2, + 'SS2022' => 1 + ) + ); + + // welche Vorlagen werden für welche Projekarbeitsversion verwendet (beginnend mit 0) + private $_projektarbeitVorlageMappings = array( + 'Begutachter' => array( + 2 => 'ProjektBeurteilungBAProzent', + 0 => 'ProjektBeurteilungBA' + ), + 'Senatsvorsitz' => array( + 2 => 'ProjektBeurteilungBAProzent', + 0 => 'ProjektBeurteilungBA' + ), + 'Erstbegutachter' => array( + 3 => 'ProjektBeurteilungMAProzent', + 0 => 'ProjektBeurteilungMAErst' + ), + 'Zweitbegutachter' => array( + 0 => 'ProjektBeurteilungMAZweit' + ) + ); /** * Konstruktor @@ -233,25 +264,25 @@ class projektarbeit extends basis_db $qry='BEGIN; INSERT INTO lehre.tbl_projektarbeit (projekttyp_kurzbz, titel, lehreinheit_id, student_uid, firma_id, note, punkte, beginn, ende, faktor, freigegeben, gesperrtbis, stundensatz, gesamtstunden, themenbereich, anmerkung, insertamum, insertvon, updateamum, updatevon, titel_english, final) VALUES('. - $this->db_add_param($this->projekttyp_kurzbz).', '. - $this->db_add_param($this->titel).', '. - $this->db_add_param($this->lehreinheit_id, FHC_INTEGER).', '. - $this->db_add_param($this->student_uid).', '. - $this->db_add_param($this->firma_id, FHC_INTEGER).', '. - $this->db_add_param($this->note).', '. - $this->db_add_param($this->punkte).', '. - $this->db_add_param($this->beginn).', '. - $this->db_add_param($this->ende).', '. - $this->db_add_param($this->faktor).', '. - $this->db_add_param($this->freigegeben, FHC_BOOLEAN).', '. - $this->db_add_param($this->gesperrtbis).', '. - $this->db_add_param($this->stundensatz).', '. - $this->db_add_param($this->gesamtstunden).', '. - $this->db_add_param($this->themenbereich).', '. - $this->db_add_param($this->anmerkung).', now(), '. - $this->db_add_param($this->insertvon).', now(), '. - $this->db_add_param($this->updatevon).','. - $this->db_add_param($this->titel_english).','. + $this->db_add_param($this->projekttyp_kurzbz).', '. + $this->db_add_param($this->titel).', '. + $this->db_add_param($this->lehreinheit_id, FHC_INTEGER).', '. + $this->db_add_param($this->student_uid).', '. + $this->db_add_param($this->firma_id, FHC_INTEGER).', '. + $this->db_add_param($this->note).', '. + $this->db_add_param($this->punkte).', '. + $this->db_add_param($this->beginn).', '. + $this->db_add_param($this->ende).', '. + $this->db_add_param($this->faktor).', '. + $this->db_add_param($this->freigegeben, FHC_BOOLEAN).', '. + $this->db_add_param($this->gesperrtbis).', '. + $this->db_add_param($this->stundensatz).', '. + $this->db_add_param($this->gesamtstunden).', '. + $this->db_add_param($this->themenbereich).', '. + $this->db_add_param($this->anmerkung).', now(), '. + $this->db_add_param($this->insertvon).', now(), '. + $this->db_add_param($this->updatevon).','. + $this->db_add_param($this->titel_english).','. $this->db_add_param($this->final, FHC_BOOLEAN).');'; } else @@ -471,92 +502,129 @@ class projektarbeit extends basis_db } /** - * Prüft ob Projektarbeit aktuell ist (ab bestimmtem Semester). - * Masterarbeiten sind ab der Änderung zur Gewichtung der Punkte aktuell, - * Bachelorarbeiten schon ab dem Umstieg auf das Online Beurteilungsformular. + * Prüft ob Projektarbeit aktuell ist (also zurzeit online bewertet wird). * @param $projektarbeit_id - * @return int -1 wenn Fehler, 0 wenn nicht aktuell, 1 wenn aktuell + * @return boolean */ public function projektarbeitIsCurrent($projektarbeit_id) { + $version = $this->getVersion($projektarbeit_id); // paarbeit sollte nur ab einem Studiensemester online bewertet werden - $qry="SELECT 1 - FROM lehre.tbl_projektarbeit - JOIN lehre.tbl_lehreinheit USING(lehreinheit_id) - JOIN public.tbl_studiensemester USING(studiensemester_kurzbz) - WHERE projektarbeit_id=".$this->db_add_param($projektarbeit_id, FHC_INTEGER)." - AND - ( - ( - projekttyp_kurzbz = 'Diplom' - AND tbl_studiensemester.start::date >= ( - SELECT start - FROM public.tbl_studiensemester - WHERE studiensemester_kurzbz = 'SS2023' - )::date - ) - OR - ( - projekttyp_kurzbz <> 'Diplom' - AND tbl_studiensemester.start::date >= ( - SELECT start - FROM public.tbl_studiensemester - WHERE studiensemester_kurzbz = 'SS2022' - )::date - ) - ) - LIMIT 1"; - - $result_sem=$this->db_query($qry); - - if (!$result_sem) - { - $this->errormsg = "Fehler beim Ermitteln der Projektarbeit Aktualität"; - return -1; - } - - $num_rows = $this->db_num_rows($result_sem); - - if ($num_rows < 0) - { - $this->errormsg = "Fehler beim Ermitteln der Anzahl der aktuellen Projektarbeiten"; - } - - return $num_rows; + return $version === null ? null : $version->isCurrent; } /** - * Prüft ob Projektarbeit aktuell ist (ab bestimmtem Semester), vor der Änderung zur Gewichtung der Punkte. + * Holt sich Version der Projektarbeit. + * Liefert auch mit, ob die Version die aktuellste ist. + * z.B.: Masterarbeiten waren ab der Änderung zur Gewichtung der Punkte aktuell, + * Bachelorarbeiten waren ab dem Umstieg auf das Online Beurteilungsformular aktuell. * @param $projektarbeit_id - * @return int -1 wenn Fehler, 0 wenn nicht aktuell, 1 wenn aktuell + * @return objekt mit Versionsinfo, null im Fehlerfall */ - public function projektarbeitIsCurrentBeforeWeightening($projektarbeit_id) + public function getVersion($projektarbeit_id) { // paarbeit sollte nur ab einem Studiensemester online bewertet werden - $qry="SELECT 1 - FROM lehre.tbl_projektarbeit + $qry=" + SELECT + CASE + WHEN semesters_diplom.studiensemester_kurzbz IS NOT NULL + THEN semesters_diplom.studiensemester_kurzbz + ELSE semesters.studiensemester_kurzbz + END AS version_studiensemester_kurzbz, + pa.projekttyp_kurzbz + FROM + lehre.tbl_projektarbeit pa JOIN lehre.tbl_lehreinheit USING(lehreinheit_id) - JOIN public.tbl_studiensemester USING(studiensemester_kurzbz) - WHERE projektarbeit_id=".$this->db_add_param($projektarbeit_id, FHC_INTEGER)." - AND tbl_studiensemester.start::date >= (SELECT start FROM public.tbl_studiensemester WHERE studiensemester_kurzbz = 'SS2022')::date - LIMIT 1"; + JOIN public.tbl_studiensemester sem USING(studiensemester_kurzbz) + LEFT JOIN ( + SELECT + start, studiensemester_kurzbz + FROM + public.tbl_studiensemester + WHERE + studiensemester_kurzbz IN (".$this->db_implode4SQL(array_keys($this->_versions['Others'])).") + ) semesters ON sem.start >= semesters.start AND pa.projekttyp_kurzbz <> 'Diplom' + LEFT JOIN ( + SELECT + start, studiensemester_kurzbz + FROM + public.tbl_studiensemester + WHERE + studiensemester_kurzbz IN (".$this->db_implode4SQL(array_keys($this->_versions['Diplom'])).") + ) semesters_diplom ON sem.start >= semesters_diplom.start AND pa.projekttyp_kurzbz = 'Diplom' + WHERE + projektarbeit_id=".$this->db_add_param($projektarbeit_id, FHC_INTEGER)." + ORDER BY + semesters.start DESC, semesters_diplom.start DESC + LIMIT 1"; - $result_sem=$this->db_query($qry); + $errormsg = "Fehler beim Ermitteln der Projektarbeit Version"; - if (!$result_sem) + if ($this->db_query($qry)) { - $this->errormsg = "Fehler beim Ermitteln der Projektarbeit Aktualität"; - return -1; + if ($row = $this->db_fetch_object()) + { + // known project types + if (isset($this->_versions[$row->projekttyp_kurzbz][$row->version_studiensemester_kurzbz])) + { + $row->versionNumber = $this->_versions[$row->projekttyp_kurzbz][$row->version_studiensemester_kurzbz]; + $row->isCurrent = + $this->_versions[$row->projekttyp_kurzbz][$row->version_studiensemester_kurzbz] + == max($this->_versions[$row->projekttyp_kurzbz]); + + } + elseif (isset($this->_versions['Others'][$row->version_studiensemester_kurzbz])) + { + $row->versionNumber = $this->_versions['Others'][$row->version_studiensemester_kurzbz]; + $row->isCurrent = + $this->_versions['Others'][$row->version_studiensemester_kurzbz] + == max($this->_versions['Others']); + } + else + { + $row->isCurrent = false; + $row->versionNumber = 0; + } + return $row; + } + else + { + $this->errormsg = $errormsg; + return null; + } + } + else + { + $this->errormsg = $errormsg; + return null; + } + } + + /** + * Holt Version einer Projektarbeit für eine Betreuerart. + * @param $projektarbeit_id + * @param $betreuerart_kurzbz + * @return string Vorlagenname + */ + public function getVorlage($projektarbeit_id, $betreuerart_kurzbz) + { + $version = $this->getVersion($projektarbeit_id); + + if ($version == null) return null; + + $key = 0; + if (isset($this->_projektarbeitVorlageMappings[$betreuerart_kurzbz])) + { + foreach ($this->_projektarbeitVorlageMappings[$betreuerart_kurzbz] as $versionNumber => $vorlage) + { + if ($versionNumber <= $version->versionNumber && $versionNumber > $key) $key = $versionNumber; + } } - $num_rows = $this->db_num_rows($result_sem); - - if ($num_rows < 0) - { - $this->errormsg = "Fehler beim Ermitteln der Anzahl der aktuellen Projektarbeiten"; - } - - return $num_rows; + return + isset($this->_projektarbeitVorlageMappings[$betreuerart_kurzbz][$key]) + ? $this->_projektarbeitVorlageMappings[$betreuerart_kurzbz][$key] + : ''; } } ?> From 9fb2ea4ae31b16a30120212924111581c2d4c4d0 Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Mon, 17 Feb 2025 19:03:53 +0100 Subject: [PATCH 20/47] Projektarbeitsbeurteilung: added authorization (Berechtigungen) check to document export --- .../projektbeurteilungDocumentExport.php | 23 +-------- cis/private/pdfExport.php | 50 ++++++++----------- include/projektarbeit.class.php | 19 ++++++- 3 files changed, 41 insertions(+), 51 deletions(-) diff --git a/cis/private/lehre/projektbeurteilungDocumentExport.php b/cis/private/lehre/projektbeurteilungDocumentExport.php index 195650a24..08f7127ee 100644 --- a/cis/private/lehre/projektbeurteilungDocumentExport.php +++ b/cis/private/lehre/projektbeurteilungDocumentExport.php @@ -6,40 +6,21 @@ * daraus ein PDF */ require_once('../../../config/cis.config.inc.php'); -require_once('../../../include/functions.inc.php'); require_once('../../../include/projektarbeit.class.php'); -require_once('../../../include/person.class.php'); if (!isset($_GET['betreuerart_kurzbz']) || !isset($_GET['person_id']) || !isset($_GET['projektarbeit_id'])) die('Fehlerhafte Parameteruebergabe'); -$user = get_uid(); - -$rechte = new benutzerberechtigung(); -$rechte->getBerechtigungen($user); - -$projektarbeit = new projektarbeit(); -$projektarbeit->load($_GET['projektarbeit_id']); - -$betreuer = new person(); -$betreuer->getPersonFromBenutzer($user); - -//Überprüft ob es der Betreuer oder der Student ist -if ($betreuer->person_id !== $_GET['person_id'] && $projektarbeit->student_uid !== $user && !$rechte->isBerechtigt('assistenz')) - die("

Sie haben keine Berechtigung für diese Aktion.

"); - -$projektarbeitVorlage = new projektarbeit(); - // passende Vorlage holen +$projektarbeitVorlage = new projektarbeit(); $vorlage = $projektarbeitVorlage->getVorlage($_GET['projektarbeit_id'], $_GET['betreuerart_kurzbz']); - if ($vorlage == null) die("

".$projektarbeitVorlage->errormsg."

"); // weiterleiten auf Dokumentexport header('Location: ' . APP_ROOT . '/cis/private/pdfExport.php?xml=projektarbeitsbeurteilung.xml.php' .'&xsl='.$vorlage.'&betreuerart_kurzbz=' . $_GET['betreuerart_kurzbz'] - . '&projektarbeit_id=' . $_GET['projektarbeit_id'] . '&person_id=' . $_GET['person_id']. '&uid=' . $user + . '&projektarbeit_id=' . $_GET['projektarbeit_id'] . '&person_id=' . $_GET['person_id'] ); die(); diff --git a/cis/private/pdfExport.php b/cis/private/pdfExport.php index 7393a084c..d4638d1bd 100644 --- a/cis/private/pdfExport.php +++ b/cis/private/pdfExport.php @@ -196,41 +196,35 @@ if (isset($_GET['output']) && $_GET['output'] != 'pdf') else $output = 'pdf'; -//~ if (isset($_GET['xsl']) && ($_GET['xsl'] === 'Projektbeurteilung')) -//~ { - //~ if (!isset($_GET['betreuerart_kurzbz']) || !isset($_GET['person_id']) || !isset($_GET['projektarbeit_id'])) - //~ die('Fehlerhafte Parameteruebergabe'); +// Berechtigungprüfung Projektarbeit +if (isset($_GET['projektarbeit_id'])) +{ + $projektarbeitVorlage = new projektarbeit(); + $allePaVorlagen = $projektarbeitVorlage->getAllVorlagen(); - //~ $projektarbeit = new projektarbeit(); - //~ $projektarbeit->load($_GET['projektarbeit_id']); + if (!is_array($allePaVorlagen)) + die("

Fehler beim Holen der Projektarbeit Vorlagen

"); - //~ $betreuer = new person(); - //~ $betreuer->getPersonFromBenutzer($user); + if (in_array($xsl, $allePaVorlagen)) + { + $rechte = new benutzerberechtigung(); + $rechte->getBerechtigungen($user); - //~ //Überprüft ob es der Betreuer oder der Student ist - //~ if ($betreuer->person_id !== $_GET['person_id'] && $projektarbeit->student_uid !== $user && !$rechte->isBerechtigt('assistenz')) - //~ die("

Sie haben keine Berechtigung für diese Aktion.

"); + $projektarbeit = new projektarbeit(); + $projektarbeit->load($_GET['projektarbeit_id']); - //~ switch ($_GET['betreuerart_kurzbz']) - //~ { - //~ case 'Begutachter' : - //~ case 'Senatsvorsitz' : - //~ $xsl = 'ProjektBeurteilungBA'; - //~ break; - //~ case 'Erstbegutachter' : - //~ $xsl = 'ProjektBeurteilungMAErst'; - //~ break; - //~ case 'Zweitbegutachter' : - //~ $xsl = 'ProjektBeurteilungMAZweit'; - //~ break; - //~ } - - //~ $allowed = true; -//~ } + $betreuer = new person(); + $betreuer->getPersonFromBenutzer($user); + //Überprüft ob es der Betreuer oder der Student ist + if ($betreuer->person_id !== $_GET['person_id'] && $projektarbeit->student_uid !== $user && !$rechte->isBerechtigt('assistenz')) + die("

Sie haben keine Berechtigung für diese Aktion.

"); + $paBerechtigt = true; + } +} $konto = new konto(); -if (((isset($_GET["uid"]) && $user == $_GET["uid"])) || $rechte->isBerechtigt('admin')) +if (((isset($_GET["uid"]) && $user == $_GET["uid"])) || $rechte->isBerechtigt('admin') || (isset($paBerechtigt) && $paBerechtigt === true)) { $buchungstypen = array(); if (defined("CIS_DOKUMENTE_STUDIENBEITRAG_TYPEN")) diff --git a/include/projektarbeit.class.php b/include/projektarbeit.class.php index 5f07cf69d..c191550b7 100644 --- a/include/projektarbeit.class.php +++ b/include/projektarbeit.class.php @@ -59,7 +59,7 @@ class projektarbeit extends basis_db public $abgabedatum; - // Welche Version der Projektarbeit wird in welchem Semester verwendet + // Welche Version der Projektarbeit wird ab welchem Semester verwendet private $_versions = array( 'Diplom' => array( 'SS2025' => 3, @@ -72,7 +72,7 @@ class projektarbeit extends basis_db ) ); - // welche Vorlagen werden für welche Projekarbeitsversion verwendet (beginnend mit 0) + // welche Vorlagen werden ab welcher Projekarbeitsversion verwendet (0 - erste "default" Vorlage) private $_projektarbeitVorlageMappings = array( 'Begutachter' => array( 2 => 'ProjektBeurteilungBAProzent', @@ -626,5 +626,20 @@ class projektarbeit extends basis_db ? $this->_projektarbeitVorlageMappings[$betreuerart_kurzbz][$key] : ''; } + + /** + * Holt alle möglichen, jemals verwendeten Projektarbeits-Vorlagen + * @return array mit Vorlagennamen + */ + public function getAllVorlagen() + { + $vorlagen = array(); + foreach ($this->_projektarbeitVorlageMappings as $mappings) + { + $vorlagen = array_unique(array_merge($vorlagen, $mappings)); + } + + return $vorlagen; + } } ?> From a63c321f97634e95e3d3860636163594cd17025a Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Fri, 28 Feb 2025 12:09:26 +0100 Subject: [PATCH 21/47] added Projektarbeitsbeurteilung phrases --- system/phrasesupdate.php | 60 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 85373ff28..0e8ea3d8e 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -37676,6 +37676,66 @@ and represent the current state of research on the topic. The prescribed citatio 'insertvon' => 'system' ) ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'eingabefeld', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Eingabefeld', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Input field', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'universitaetLogo', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Universitätslogo', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'University logo', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'projektarbeitsbeurteilung', + 'category' => 'projektarbeitsbeurteilung', + 'phrase' => 'textEingabefeldBewertung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Text-Eingabefeld zur Bewertung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Text inut field for assessment', + 'description' => '', + 'insertvon' => 'system' + ) + ) ) // PROJEKTARBEITSBEURTEILUNG SS2025 ENDE --------------------------------------------------------------------------- ); From 037811c24c1faee50a4627730b2bcbb7c378e350 Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Mon, 3 Mar 2025 12:39:07 +0100 Subject: [PATCH 22/47] Paarbeitsabgabe: replaced num_rows_sem with new paiscurrent variable --- cis/private/lehre/abgabe_student_details.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cis/private/lehre/abgabe_student_details.php b/cis/private/lehre/abgabe_student_details.php index f040ed034..84ba608a1 100644 --- a/cis/private/lehre/abgabe_student_details.php +++ b/cis/private/lehre/abgabe_student_details.php @@ -495,7 +495,7 @@ if($command=="update" && $error!=true) $maildata['student_voller_name'] = trim($row_std->titelpre." ".$row_std->vorname." ".$row_std->nachname." ".$row_std->titelpost); $maildata['abgabetyp'] = $abgabetyp; $maildata['parbeituebersichtlink'] = "

Zur Projektarbeitsübersicht

"; - $maildata['bewertunglink'] = $num_rows_sem >= 1 && $paabgabetyp_kurzbz == 'end' ? "

Zur Beurteilung der Arbeit

" : ""; + $maildata['bewertunglink'] = $paIsCurrent && $paabgabetyp_kurzbz == 'end' ? "

Zur Beurteilung der Arbeit

" : ""; $maildata['token'] = ""; $mailres = sendSanchoMail( @@ -557,8 +557,8 @@ if($command=="update" && $error!=true) $zweitbetmaildata['student_voller_name'] = $maildata['student_voller_name']; $zweitbetmaildata['abgabetyp'] = $abgabetyp; $zweitbetmaildata['parbeituebersichtlink'] = $intern ? $maildata['parbeituebersichtlink'] : ""; - $zweitbetmaildata['bewertunglink'] = $num_rows_sem >= 1 ? "

Zur Beurteilung der Arbeit

" : ""; - $zweitbetmaildata['token'] = $num_rows_sem >= 1 && isset($begutachterMitToken->zugangstoken) && !$intern ? "

Zugangstoken: " . $begutachterMitToken->zugangstoken . "

" : ""; + $zweitbetmaildata['bewertunglink'] = $paIsCurrent ? "

Zur Beurteilung der Arbeit

" : ""; + $zweitbetmaildata['token'] = $paIsCurrent && isset($begutachterMitToken->zugangstoken) && !$intern ? "

Zugangstoken: " . $begutachterMitToken->zugangstoken . "

" : ""; $mailres = sendSanchoMail( 'ParbeitsbeurteilungEndupload', From e61b6b447cd5f8b10e472682d9882c94f079142f Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Mon, 3 Mar 2025 13:37:33 +0100 Subject: [PATCH 23/47] Abgabetool: removed hyperlink from benoten button quickinfo --- cis/private/lehre/abgabe_lektor_details.php | 5 +++-- locale/de-AT/abgabetool.php | 1 + locale/en-US/abgabetool.php | 1 + locale/it-IT/abgabetool.php | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cis/private/lehre/abgabe_lektor_details.php b/cis/private/lehre/abgabe_lektor_details.php index 74722607f..f97dfa159 100644 --- a/cis/private/lehre/abgabe_lektor_details.php +++ b/cis/private/lehre/abgabe_lektor_details.php @@ -495,7 +495,8 @@ if ($semester_benotbar && $endupload_vorhanden) } else { - $quick_info = !$semester_benotbar ? $p->t('abgabetool/aeltereParbeitBenoten') : $p->t('abgabetool/keinEnduploadErfolgt'); + $quick_info = !$semester_benotbar ? $p->t('abgabetool/aeltereParbeitBenotenQuickInfo') : $p->t('abgabetool/keinEnduploadErfolgt'); + $info_text = !$semester_benotbar ? $p->t('abgabetool/aeltereParbeitBenoten') : $p->t('abgabetool/keinEnduploadErfolgt'); $htmlstr .= ""; $htmlstr .= ""; @@ -516,7 +517,7 @@ else } $htmlstr .= "
- + "; $htmlstr .= "\n"; diff --git a/locale/de-AT/abgabetool.php b/locale/de-AT/abgabetool.php index aae3ca2de..18f413b74 100644 --- a/locale/de-AT/abgabetool.php +++ b/locale/de-AT/abgabetool.php @@ -1,6 +1,7 @@ phrasen['abgabetool/abgabetool']='Abgabetool'; $this->phrasen['abgabetool/aeltereParbeitBenoten']='Projektarbeit für älteres Semester, bitte Word-Formular zur Benotung verwenden!'; +$this->phrasen['abgabetool/aeltereParbeitBenotenQuickInfo']='Projektarbeit für älteres Semester, bitte Word-Formular zur Benotung verwenden!'; $this->phrasen['abgabetool/keinEnduploadErfolgt']='Endupload ist noch nicht erfolgt'; $this->phrasen['abgabetool/typ']='Typ'; $this->phrasen['abgabetool/titel']='Titel'; diff --git a/locale/en-US/abgabetool.php b/locale/en-US/abgabetool.php index c13ebd90d..1c2b7c142 100644 --- a/locale/en-US/abgabetool.php +++ b/locale/en-US/abgabetool.php @@ -1,6 +1,7 @@ phrasen['abgabetool/abgabetool']='Submission tool'; $this->phrasen['abgabetool/aeltereParbeitBenoten']='Thesis handed in for older semester, please use word form for assessment!'; +$this->phrasen['abgabetool/aeltereParbeitBenotenQuickInfo']='Thesis handed in for older semester, please use word form for assessment!'; $this->phrasen['abgabetool/keinEnduploadErfolgt']='Final version not uploaded yet'; $this->phrasen['abgabetool/typ']='Type'; $this->phrasen['abgabetool/titel']='Title'; diff --git a/locale/it-IT/abgabetool.php b/locale/it-IT/abgabetool.php index f7e7d9cf9..eecadfd5e 100644 --- a/locale/it-IT/abgabetool.php +++ b/locale/it-IT/abgabetool.php @@ -1,6 +1,7 @@ phrasen['abgabetool/abgabeLektorenbereich']='Consegna portale lettori'; $this->phrasen['abgabetool/aeltereParbeitBenoten']='Thesis handed in for older semester, please use word form for assessment!'; +$this->phrasen['abgabetool/aeltereParbeitBenotenQuickInfo']='Thesis handed in for older semester, please use word form for assessment!'; $this->phrasen['abgabetool/abgabeStudentenbereich']='consegna portale studente'; $this->phrasen['abgabetool/abgabetermine']='scadenze consegna'; $this->phrasen['abgabetool/abgabetool']='Strumenti di consegna'; From 2cbbcc9039aec377585ef973d9b85bfe1b9c1840 Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Wed, 5 Mar 2025 14:52:55 +0100 Subject: [PATCH 24/47] changed Projektarbeitsbeurteilung phrase --- system/phrasesupdate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 0e8ea3d8e..82f3904f0 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -10087,13 +10087,13 @@ Any unusual occurrences 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Der Plagiatscheck wurde durchgeführt und bestätigt, dass der zentrale Inhalt der Arbeit im erforderlichen Ausmaß eigenständig verfasst wurde (vgl. Satzungsteil Studienrechtliche Bestimmungen / Prüfungsordnung, § 18 Abs. 2 und 3).', + 'text' => 'Der Plagiatscheck wurde durchgeführt und bestätigt, dass der zentrale Inhalt der Arbeit im erforderlichen Ausmaß eigenständig verfasst wurde (vgl. Satzungsteil Studienrechtliche Bestimmungen / Prüfungsordnung, § 20 Abs. 2 und 3).', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'The plagiarism check has been carried out and confirms that the central content of the thesis has been written independently to the required extent (cf. part of the Statutes on Studies Act Provisions / Examination Regulations, § 18 Para. 2 and 3).', + 'text' => 'The plagiarism check has been carried out and confirms that the central content of the thesis has been written independently to the required extent (cf. part of the Statutes on Studies Act Provisions / Examination Regulations, § 20 Para. 2 and 3).', 'description' => '', 'insertvon' => 'system' ) From aab0dd7fc7c21d0db9164d37291734c64d116fbb Mon Sep 17 00:00:00 2001 From: Cristina Date: Thu, 6 Mar 2025 09:40:40 +0100 Subject: [PATCH 25/47] Added / Adapted Model queries and api Controller regarding for Lehrveranstaltung- and Studienjahr Model --- .../frontend/v1/organisation/Studienjahr.php | 80 ++++++++++++ .../education/Lehrveranstaltung_model.php | 115 ++++++++++-------- .../models/organisation/Studienjahr_model.php | 23 +++- 3 files changed, 161 insertions(+), 57 deletions(-) create mode 100644 application/controllers/api/frontend/v1/organisation/Studienjahr.php diff --git a/application/controllers/api/frontend/v1/organisation/Studienjahr.php b/application/controllers/api/frontend/v1/organisation/Studienjahr.php new file mode 100644 index 000000000..cdbb524c7 --- /dev/null +++ b/application/controllers/api/frontend/v1/organisation/Studienjahr.php @@ -0,0 +1,80 @@ + self::PERM_LOGGED, + 'getNext' => self::PERM_LOGGED + ) + ); + // Load model StudiensemesterModel + $this->load->model('organisation/studienjahr_model', 'StudienjahrModel'); + } + + /** + * Get all Studienjahre. + * + * @param null|string $order Sorting order for the Studienjahr, 'asc' or 'desc'. Defaults to 'asc'. + * @param null|string $start Starting Studienjahre with given studienjahr_kurzbz + */ + public function getAll() + { + $order = $this->input->get('order'); + $start = $this->input->get('studienjahr_kurzbz'); + + if (strcasecmp($order, 'DESC') == 0) { + $this->StudienjahrModel->addOrder('studienjahr_kurzbz', 'DESC'); + } else { + $this->StudienjahrModel->addOrder('studienjahr_kurzbz', 'ASC'); + } + + if ($start) { + $result = $this->StudienjahrModel->loadWhere([ + 'studienjahr_kurzbz >= ' => $start + ]); + } else { + $result = $this->StudienjahrModel->load(); + } + + if (isError($result)) { + $this->terminateWithError(getError($result), self::ERROR_TYPE_DB); + } + + $this->terminateWithSuccess((getData($result) ?: [])); + } + + public function getNext() + { + $this->StudienjahrModel->addJoin('public.tbl_studiensemester', 'studienjahr_kurzbz'); + $this->StudienjahrModel->addOrder('start'); + $this->StudienjahrModel->addLimit(1); + + $result = $this->StudienjahrModel->loadWhere(['start >' => 'NOW()']); + + if (isError($result)) { + $this->terminateWithError(getError($result), self::ERROR_TYPE_DB); + } + + $this->terminateWithSuccess(current(getData($result))); + } +} diff --git a/application/models/education/Lehrveranstaltung_model.php b/application/models/education/Lehrveranstaltung_model.php index 202df7525..9a82f6dfc 100644 --- a/application/models/education/Lehrveranstaltung_model.php +++ b/application/models/education/Lehrveranstaltung_model.php @@ -19,38 +19,42 @@ class Lehrveranstaltung_model extends DB_Model * Get Lehrveranstaltungen by eventQuery string. Use with autocomplete event queries. * @param $eventQuery String * @param string $studiensemester_kurzbz Filter by Studiensemester - * @param array $oes Filter by Organisationseinheiten + * @param array $oes Filter by Organisationseinheiten. Checks against STG OE * @param null $lehrtyp_kurzbz Filter by Lehrtyp 'lv' or 'modul' * @return array */ - public function getAutocompleteSuggestions($eventQuery, $studiensemester_kurzbz = null, $oes = null, $lehrtyp_kurzbz = null) + public function getNonQuellkursLvsAutocompleteSuggestions($eventQuery, $studienjahr_kurzbz = null, $oes = null) { // Subquery $subQry = $this->_getQryLvsByStudienplan(); $params = []; - if (isset($studiensemester_kurzbz) && is_string($studiensemester_kurzbz)) + // filter lvs only (no templates) + $subQry .= ' + AND lehrtyp_kurzbz = \'lv\' + AND lehrveranstaltung_template_id IS NULL'; + + if (isset($studienjahr_kurzbz) && is_string($studienjahr_kurzbz)) { - /* filter by studiensemester */ - $subQry.= ' AND stplsem.studiensemester_kurzbz = ?'; - $params[] = $studiensemester_kurzbz; + /* filter by studienjahr*/ + $params[] = $studienjahr_kurzbz; + $subQry.= ' + AND stplsem.studiensemester_kurzbz IN + ( + SELECT studiensemester_kurzbz + FROM public.tbl_studiensemester + WHERE studienjahr_kurzbz = ? + ) + '; } if (isset($oes) && is_array($oes)) { - /* filter by organisationseinheit */ - $subQry.= ' AND lv.oe_kurzbz IN ?'; + /* filter by STG organisationseinheit */ + $subQry.= ' AND stg.oe_kurzbz IN ?'; $params[]= $oes; } - if (isset($lehrtyp_kurzbz) && is_string($lehrtyp_kurzbz)) - { - /* filter by lehrtyp_kurzbz */ - $subQry .= ' AND lehrtyp_kurzbz = ?'; - $params[] = $lehrtyp_kurzbz; - } - - if (is_string($eventQuery)) { /* filter by input string */ @@ -59,42 +63,44 @@ class Lehrveranstaltung_model extends DB_Model } // Final Query - $qry = 'SELECT DISTINCT ON (lehrveranstaltung_id) * FROM ('. $subQry. ') AS tmp'; + $qry = 'SELECT * FROM ('. $subQry. ') AS tmp + ORDER BY lv_bezeichnung'; return $this->execQuery($qry, $params); } /** * Get Lehrveranstaltungen with its Stg, OE and OE-type. - * Can be filtered by Studienesemester, lv oes or lv's stg oes, and also by specific lvs. - * @param null|string $studiensemester_kurzbz Filter by Studiensemester - * @param null $lv_oes Filter oes by lv oe (default behaviour) + * @param null|string $studienjahr_kurzbz Filter by Studienjahr * @param null $stg_oes Filter oes by lv's stg oe * @param null|array $lv_ids Filter by Lehrveranstaltungen * @return array */ - public function getLvs($studiensemester_kurzbz = null, $lv_oes = null, $stg_oes = null, $lv_ids = null) + public function getNonQuellkursLvs($studienjahr_kurzbz = null, $stg_oes = null, $lv_ids = null) { // Subquery LVs $subQry = $this->_getQryLvsByStudienplan(); - /* filter by lehrtyp_kurzbz 'lv' */ - $subQry .= ' AND lehrtyp_kurzbz = \'lv\''; + /* filter by lehrtyp_kurzbz 'lv' and that are not assigned to a Quellkurs */ + $subQry .= ' + AND lehrtyp_kurzbz = \'lv\' + AND lehrveranstaltung_template_id IS NULL + '; $params = []; - if (isset($studiensemester_kurzbz) && is_string($studiensemester_kurzbz)) + if (is_string($studienjahr_kurzbz)) { - /* filter by studiensemester */ - $subQry.= ' AND stplsem.studiensemester_kurzbz = ?'; - $params[] = $studiensemester_kurzbz; - } - - if (isset($lv_oes) && is_array($lv_oes)) - { - /* filter by lv organisationseinheit */ - $subQry.= ' AND lv.oe_kurzbz IN ?'; - $params[]= $lv_oes; + /* filter by studienjahr */ + $params[] = $studienjahr_kurzbz; + $subQry .= ' + AND stplsem.studiensemester_kurzbz IN + ( + SELECT studiensemester_kurzbz + FROM public.tbl_studiensemester + WHERE studienjahr_kurzbz = ? + ) + '; } if (isset($stg_oes) && is_array($stg_oes)) @@ -114,7 +120,7 @@ class Lehrveranstaltung_model extends DB_Model $qry.= ' WHERE lehrveranstaltung_id IN ('. $implodedLvIds. ')'; } - $qry.= ' ORDER BY stg_typ_kurzbz, orgform_kurzbz DESC'; + $qry.= ' ORDER BY lv_bezeichnung'; return $this->execQuery($qry, $params); } @@ -138,10 +144,12 @@ class Lehrveranstaltung_model extends DB_Model studienordnung_id, sto.studiengang_kz, stpl.studienplan_id, + stpl.bezeichnung AS studienplan_bezeichnung, stplsem.semester, stpl.orgform_kurzbz, upper(stg.typ || stg.kurzbz) AS stg_typ_kurzbz, stg.bezeichnung AS stg_bezeichnung, + stg.oe_kurzbz AS stg_oe_kurzbz, stgtyp.bezeichnung AS stg_typ_bezeichnung, lv.lehrveranstaltung_id, lv.semester, @@ -197,7 +205,13 @@ class Lehrveranstaltung_model extends DB_Model * @param null $lehrveranstaltung_id Queries certain LV only * @return array|stdClass|null */ - public function getTemplateLvTree($studiensemester_kurzbz = null, $oes = null, $lehrveranstaltung_id = null){ + public function getTemplateLvTree($studiensemester_kurzbz = null, $oes = null, $studienjahr_kurzbz = null){ + + if (is_string($studiensemester_kurzbz) && is_string($studienjahr_kurzbz)) + { + return error('Query not possible for both studiensemester and studienjahr'); + } + $params = []; $qry = ' WITH @@ -224,13 +238,6 @@ class Lehrveranstaltung_model extends DB_Model -- filter lvs assigned to template (= standardisierte lv) AND lehrveranstaltung_template_id IS NOT NULL'; - if (is_numeric($lehrveranstaltung_id)) - { - /* filter by studiensemester */ - $params[]= $lehrveranstaltung_id; - $qry.= ' AND lv.lehrveranstaltung_template_id = ? '; - } - if (is_string($studiensemester_kurzbz)) { /* filter by studiensemester */ @@ -239,6 +246,17 @@ class Lehrveranstaltung_model extends DB_Model } + if (is_string($studienjahr_kurzbz)) { + /* filter by studiensemester */ + $params[] = $studienjahr_kurzbz; + $qry .= ' + AND stplsem.studiensemester_kurzbz IN ( + SELECT studiensemester_kurzbz + FROM public.tbl_studiensemester + WHERE studienjahr_kurzbz = ? + )'; + } + if (is_array($oes)) { /* filter by organisationseinheit */ @@ -274,13 +292,6 @@ class Lehrveranstaltung_model extends DB_Model WHERE std.lehrveranstaltung_template_id = lv.lehrveranstaltung_id )'; - if (is_numeric($lehrveranstaltung_id)) - { - /* filter by studiensemester */ - $params[]= $lehrveranstaltung_id; - $qry.= ' AND lv.lehrveranstaltung_id = ? '; - } - if (is_array($oes)) { /* filter by organisationseinheit */ @@ -357,9 +368,7 @@ class Lehrveranstaltung_model extends DB_Model JOIN public.tbl_studiengangstyp stgtyp ON stgtyp.typ = stg.typ JOIN public.tbl_organisationseinheit oe ON oe.oe_kurzbz = lv.oe_kurzbz ORDER BY - -- Sort by organisationseinheit, semester, and lv.bezeichnung - oe.bezeichnung, - lv.semester, + -- Sort by lv.bezeichnung lv.bezeichnung, -- Within each group, ensure templates appear first CASE diff --git a/application/models/organisation/Studienjahr_model.php b/application/models/organisation/Studienjahr_model.php index a6e1bc575..1686ddc48 100644 --- a/application/models/organisation/Studienjahr_model.php +++ b/application/models/organisation/Studienjahr_model.php @@ -1,4 +1,5 @@ execQuery($query); } + public function getNextStudienjahr() + { + $this->addJoin('public.tbl_studiensemester', 'studienjahr_kurzbz'); + $this->addOrder('start'); + $this->addLimit(1); + + return $this->loadWhere(['start >' => 'NOW()']); + } + public function getNextFrom($studienjahr_kurzbz) + { + $this->addLimit(1); + + return $this->loadWhere([ + 'studienjahr_kurzbz >' => $studienjahr_kurzbz + ]); + } /** * Get the current Studienjahr. During the summer term, continue using the previous Studienjahr. @@ -38,8 +55,7 @@ class Studienjahr_model extends DB_Model */ public function getLastOrAktStudienjahr($days = 60) { - if (!is_numeric($days)) - { + if (!is_numeric($days)) { $days = 60; } @@ -63,8 +79,7 @@ class Studienjahr_model extends DB_Model */ public function getAktOrNextStudienjahr($days = 62) { - if (!is_numeric($days)) - { + if (!is_numeric($days)) { $days = 62; } From eedbab21a2f8c9a5b2213fe4229c083c8c0894c8 Mon Sep 17 00:00:00 2001 From: Cristina Date: Thu, 6 Mar 2025 09:58:15 +0100 Subject: [PATCH 26/47] Added phrases for Softwarebereitstellung --- system/phrasesupdate.php | 60 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 59f713ccc..b4d79aea3 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -40613,6 +40613,66 @@ array( ) ), // FHC4 Phrases Mobility End + array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'swAendern', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'SW ändern', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Change SW', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'quellkurs', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Quellkurs', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Source Course', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'softwareAbbestellt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Software wurde abbestellt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Software was cancelled', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ) ); From 83fe68c04ef608e586889fbe6b5ad5998dded2ad Mon Sep 17 00:00:00 2001 From: Cristina Date: Thu, 6 Mar 2025 10:39:00 +0100 Subject: [PATCH 27/47] Removed 2 methods getNonQuellkursLvs and getNonQuellkursLvsAutocompleteSuggestions from Lehrveranstaltung_model.php --- .../education/Lehrveranstaltung_model.php | 181 ------------------ 1 file changed, 181 deletions(-) diff --git a/application/models/education/Lehrveranstaltung_model.php b/application/models/education/Lehrveranstaltung_model.php index 0d2373836..056fb45d7 100644 --- a/application/models/education/Lehrveranstaltung_model.php +++ b/application/models/education/Lehrveranstaltung_model.php @@ -15,187 +15,6 @@ class Lehrveranstaltung_model extends DB_Model $this->load->model('organisation/studiensemester_model', 'StudiensemesterModel'); } - /** - * Get Lehrveranstaltungen by eventQuery string. Use with autocomplete event queries. - * @param $eventQuery String - * @param string $studiensemester_kurzbz Filter by Studiensemester - * @param array $oes Filter by Organisationseinheiten. Checks against STG OE - * @param null $lehrtyp_kurzbz Filter by Lehrtyp 'lv' or 'modul' - * @return array - */ - public function getNonQuellkursLvsAutocompleteSuggestions($eventQuery, $studienjahr_kurzbz = null, $oes = null) - { - // Subquery - $subQry = $this->_getQryLvsByStudienplan(); - $params = []; - - // filter lvs only (no templates) - $subQry .= ' - AND lehrtyp_kurzbz = \'lv\' - AND lehrveranstaltung_template_id IS NULL'; - - if (isset($studienjahr_kurzbz) && is_string($studienjahr_kurzbz)) - { - /* filter by studienjahr*/ - $params[] = $studienjahr_kurzbz; - $subQry.= ' - AND stplsem.studiensemester_kurzbz IN - ( - SELECT studiensemester_kurzbz - FROM public.tbl_studiensemester - WHERE studienjahr_kurzbz = ? - ) - '; - } - - if (isset($oes) && is_array($oes)) - { - /* filter by STG organisationseinheit */ - $subQry.= ' AND stg.oe_kurzbz IN ?'; - $params[]= $oes; - } - - if (is_string($eventQuery)) - { - /* filter by input string */ - $subQry.= ' AND lv.bezeichnung ILIKE ?'; - $params[] = '%' . $eventQuery . '%'; - } - - // Final Query - $qry = 'SELECT * FROM ('. $subQry. ') AS tmp - ORDER BY lv_bezeichnung'; - - return $this->execQuery($qry, $params); - } - - /** - * Get Lehrveranstaltungen with its Stg, OE and OE-type. - * @param null|string $studienjahr_kurzbz Filter by Studienjahr - * @param null $stg_oes Filter oes by lv's stg oe - * @param null|array $lv_ids Filter by Lehrveranstaltungen - * @return array - */ - public function getNonQuellkursLvs($studienjahr_kurzbz = null, $stg_oes = null, $lv_ids = null) - { - // Subquery LVs - $subQry = $this->_getQryLvsByStudienplan(); - - /* filter by lehrtyp_kurzbz 'lv' and that are not assigned to a Quellkurs */ - $subQry .= ' - AND lehrtyp_kurzbz = \'lv\' - AND lehrveranstaltung_template_id IS NULL - '; - - $params = []; - - if (is_string($studienjahr_kurzbz)) - { - /* filter by studienjahr */ - $params[] = $studienjahr_kurzbz; - $subQry .= ' - AND stplsem.studiensemester_kurzbz IN - ( - SELECT studiensemester_kurzbz - FROM public.tbl_studiensemester - WHERE studienjahr_kurzbz = ? - ) - '; - } - - if (isset($stg_oes) && is_array($stg_oes)) - { - /* filter by lv studiengangs organisationseinheit */ - $subQry.= ' AND stg.oe_kurzbz IN ?'; - $params[]= $stg_oes; - } - - // Final Query - $qry = 'SELECT * FROM ('. $subQry. ') AS tmp'; - - if (isset($lv_ids) && is_array($lv_ids)) - { - /* filter by lv_ids */ - $implodedLvIds = "'". implode("', '", $lv_ids). "'"; - $qry.= ' WHERE lehrveranstaltung_id IN ('. $implodedLvIds. ')'; - } - - $qry.= ' ORDER BY lv_bezeichnung'; - - return $this->execQuery($qry, $params); - } - - /** - * Get basic query to retrieve Lehrveranstaltungen according to the Orgforms and Ausbildungssemesters actual Studienplan. - * - * @return string - */ - private function _getQryLvsByStudienplan() - { - $qry = ' - SELECT - lv.oe_kurzbz AS lv_oe_kurzbz, - CASE - WHEN oe.organisationseinheittyp_kurzbz = \'Kompetenzfeld\' THEN (\'KF \' || oe.bezeichnung) - WHEN oe.organisationseinheittyp_kurzbz = \'Department\' THEN (\'DEP \' || oe.bezeichnung) - ELSE (oe.organisationseinheittyp_kurzbz || \' \' || oe.bezeichnung) - END AS lv_oe_bezeichnung, - stplsem.studiensemester_kurzbz, - studienordnung_id, - sto.studiengang_kz, - stpl.studienplan_id, - stpl.bezeichnung AS studienplan_bezeichnung, - stplsem.semester, - stpl.orgform_kurzbz, - upper(stg.typ || stg.kurzbz) AS stg_typ_kurzbz, - stg.bezeichnung AS stg_bezeichnung, - stg.oe_kurzbz AS stg_oe_kurzbz, - stgtyp.bezeichnung AS stg_typ_bezeichnung, - lv.lehrveranstaltung_id, - lv.semester, - lv.bezeichnung AS lv_bezeichnung, - lv.lehrtyp_kurzbz, - lv.lehrveranstaltung_template_id, - ( - -- comma seperated string of all lehreinheitgruppen - SELECT string_agg(bezeichnung, \', \') AS lehreinheitgruppe_bezeichnung - FROM( - -- distinct bezeichnung, as may come multiple times from different lehreinheiten - SELECT DISTINCT ON (studiengang_kz, bezeichnung) studiengang_kz, bezeichnung FROM - ( - -- distinct lehreinheitgruppe, as may come multiple times from different lehrform - SELECT DISTINCT ON (legr.lehreinheitgruppe_id) legr.studiengang_kz, - -- get Spezialgruppe or Lehrverbandgruppe - COALESCE( - legr.gruppe_kurzbz, - CONCAT( UPPER(stg1.typ), UPPER(stg1.kurzbz), \'-\', legr.semester, legr.verband, legr.gruppe ) - ) as bezeichnung - FROM lehre.tbl_lehreinheitgruppe legr - JOIN lehre.tbl_lehreinheit le USING (lehreinheit_id) - JOIN lehre.tbl_lehrveranstaltung lv1 USING (lehrveranstaltung_id) - JOIN public.tbl_studiengang stg1 ON stg1.studiengang_kz = legr.studiengang_kz - WHERE lv1.lehrveranstaltung_id = lv.lehrveranstaltung_id - AND le.studiensemester_kurzbz = stplsem.studiensemester_kurzbz - ) AS lehreinheitgruppen - GROUP BY studiengang_kz, bezeichnung - ORDER BY studiengang_kz DESC - ) AS uniqueLehreinheitgruppen_bezeichnung - ) AS lehreinheitgruppen_bezeichnung - FROM - lehre.tbl_studienplan stpl - JOIN lehre.tbl_studienordnung sto USING (studienordnung_id) - JOIN lehre.tbl_studienplan_semester stplsem USING (studienplan_id) - JOIN lehre.tbl_studienplan_lehrveranstaltung stpllv ON (stpllv.studienplan_id = stpl.studienplan_id AND stpllv.semester = stplsem.semester) - JOIN lehre.tbl_lehrveranstaltung lv USING (lehrveranstaltung_id) - JOIN public.tbl_organisationseinheit oe USING (oe_kurzbz) - JOIN public.tbl_studiengang stg ON stg.studiengang_kz = sto.studiengang_kz - JOIN public.tbl_studiengangstyp stgtyp ON stgtyp.typ = stg.typ - WHERE 1 = 1 - '; - - return $qry; - } - /** * Get all Templates and its assigned Lehrveranstaltungen of given Studiensemester and Oes. * Lvs are queried via actual Studienordnung and Studienplan. From ff658526432d8734a3bdce3239a6262e5aed3d69 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Wed, 12 Mar 2025 08:21:03 +0100 Subject: [PATCH 28/47] 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 29/47] 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 29018477885ce802f9a852bfd0c071d282fe9959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szabo=20M=C3=B3nika?= Date: Wed, 12 Mar 2025 15:11:00 +0100 Subject: [PATCH 30/47] Update lvgesamtnoteverwalten.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Der Lehrveranstaltungstyp wurde in der E-Mail über die freigegebenen Noten hinzugefügt. --- cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php index a799c9fad..ac8cdaff4 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php @@ -241,7 +241,7 @@ if (isset($_REQUEST["freigabe"]) && ($_REQUEST["freigabe"] == 1)) $name hat neue Noten für die Lehrveranstaltung\n\n
" . $sg->kuerzel . ' ' . $lv->semester . '.Semester - ' . $lv->bezeichnung . " " . $lv->orgform_kurzbz . " - " . $stsem . " + ' . $lv->bezeichnung . " - " .$lv->lehrform_kurzbz. " " . $lv->orgform_kurzbz . " - " . $stsem . "
eingetragen.\n

Die Noten können jetzt ins Zeugnis übernommen werden.\n"; From 0a2bd1bdde3912da334248fd65e636c1ed3b992a Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 18 Mar 2025 14:02:23 +0100 Subject: [PATCH 31/47] - stundengrenze bei dummy nicht beruecksichtigen --- content/lvplanung/lehrveranstaltungDBDML.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/lvplanung/lehrveranstaltungDBDML.php b/content/lvplanung/lehrveranstaltungDBDML.php index 12a28b943..ad15c6879 100644 --- a/content/lvplanung/lehrveranstaltungDBDML.php +++ b/content/lvplanung/lehrveranstaltungDBDML.php @@ -355,7 +355,8 @@ if(!$error) WHERE mitarbeiter_uid=".$db->db_add_param($lem->mitarbeiter_uid)." AND studiensemester_kurzbz=".$db->db_add_param($le->studiensemester_kurzbz)." AND - bismelden"; + bismelden AND + lower(mitarbeiter_uid) NOT LIKE '_dummy%'"; if(count($oe_arr)>0) $qry.=" AND tbl_studiengang.oe_kurzbz in(".$db->db_implode4SQL($oe_arr).")"; From b8417869b5943e7cb05174ee8b75a4a669b02273 Mon Sep 17 00:00:00 2001 From: Cristina Date: Thu, 20 Mar 2025 11:18:26 +0100 Subject: [PATCH 32/47] Added phrase lizenzkategorie to Softwarebereitstellung app --- system/phrasesupdate.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 9067927da..ce2c01957 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -40792,6 +40792,26 @@ array( 'insertvon' => 'system' ) ) + ), + array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'lizenzkategorie', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Lizenz-Kategorie', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'License category', + 'description' => '', + 'insertvon' => 'system' + ) + ) ) ); From 2a4f1af69ff523d8a95d0bac8919f4a6df95e758 Mon Sep 17 00:00:00 2001 From: Cristina Date: Thu, 20 Mar 2025 11:18:26 +0100 Subject: [PATCH 33/47] Added phrase lizenzkategorie to Softwarebereitstellung app --- system/phrasesupdate.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 9067927da..c2f3fed3b 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -40792,6 +40792,46 @@ array( 'insertvon' => 'system' ) ) + ), + array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'lizenzkategorie', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Lizenz-Kategorie', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'License category', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), +array( + 'app' => 'softwarebereitstellung', + 'category' => 'global', + 'phrase' => 'lizenzkategorieKurzbz', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Lizenz-Kategorie Kurzbz', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'License category short', + 'description' => '', + 'insertvon' => 'system' + ) + ) ) ); 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 34/47] 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 35/47] =?UTF-8?q?ReihungstestJob=20angepasst=20damit=20Dri?= =?UTF-8?q?ttstaatenkaution=20ber=C3=BCcksichtigt=20wird.=20Fehler=20behob?= =?UTF-8?q?en=20beim=20setzen=20des=20Abgewiesenen=20Status=20das=20nicht?= =?UTF-8?q?=20in=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)) From 7126ab4561f6d5203fa4863d44b8db182b01faa0 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Mon, 24 Mar 2025 14:33:34 +0100 Subject: [PATCH 36/47] - "Kaution" - column: buchungstyp von anzahlung auf kaution geandert --- .../views/system/infocenter/infocenterAbgewiesenData.php | 4 ++-- application/views/system/infocenter/infocenterData.php | 4 ++-- .../views/system/infocenter/infocenterFreigegebenData.php | 5 +++-- .../infocenter/infocenterReihungstestAbsolviertData.php | 5 +++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/application/views/system/infocenter/infocenterAbgewiesenData.php b/application/views/system/infocenter/infocenterAbgewiesenData.php index da816b2c7..03397ff31 100644 --- a/application/views/system/infocenter/infocenterAbgewiesenData.php +++ b/application/views/system/infocenter/infocenterAbgewiesenData.php @@ -8,7 +8,7 @@ $STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\''; $LOGDATA_NAME = '\'Message sent\''; $LOGDATA_VON = '\'online\''; - $STUDIENGEBUEHR_ANZAHLUNG = '\'StudiengebuehrAnzahlung\''; + $KAUTION_DRITT_STAAT = '\'KautionDrittStaat\''; $query = ' SELECT @@ -62,7 +62,7 @@ $query = ' FROM public.tbl_konto konto WHERE konto.person_id = p.person_id AND konto.studiensemester_kurzbz = '. $STUDIENSEMESTER .' - AND konto.buchungstyp_kurzbz = '. $STUDIENGEBUEHR_ANZAHLUNG .' + AND konto.buchungstyp_kurzbz = '. $KAUTION_DRITT_STAAT .' ) AS "Kaution" FROM public.tbl_prestudentstatus pss diff --git a/application/views/system/infocenter/infocenterData.php b/application/views/system/infocenter/infocenterData.php index 956ad80d4..ebfd1db37 100644 --- a/application/views/system/infocenter/infocenterData.php +++ b/application/views/system/infocenter/infocenterData.php @@ -13,7 +13,7 @@ $ADDITIONAL_STG = $this->config->item('infocenter_studiengang_kz'); $AKTE_TYP = '\'identity\', \'zgv_bakk\''; $STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\''; - $STUDIENGEBUEHR_ANZAHLUNG = '\'StudiengebuehrAnzahlung\''; + $KAUTION_DRITT_STAAT = '\'KautionDrittStaat\''; $ORG_NAME = '\'InfoCenter\''; $ONLINE = '\'online\''; @@ -302,7 +302,7 @@ FROM public.tbl_konto konto WHERE konto.person_id = p.person_id AND konto.studiensemester_kurzbz = '. $STUDIENSEMESTER .' - AND konto.buchungstyp_kurzbz = '. $STUDIENGEBUEHR_ANZAHLUNG .' + AND konto.buchungstyp_kurzbz = '. $KAUTION_DRITT_STAAT .' ) AS "Kaution" FROM public.tbl_person p LEFT JOIN ( diff --git a/application/views/system/infocenter/infocenterFreigegebenData.php b/application/views/system/infocenter/infocenterFreigegebenData.php index 8003b42e0..27738719c 100644 --- a/application/views/system/infocenter/infocenterFreigegebenData.php +++ b/application/views/system/infocenter/infocenterFreigegebenData.php @@ -13,7 +13,8 @@ $ORG_NAME = '\'InfoCenter\''; $IDENTITY = '\'identity\''; $ONLINE = '\'online\''; - $STUDIENGEBUEHR_ANZAHLUNG = '\'StudiengebuehrAnzahlung\''; + $KAUTION_DRITT_STAAT = '\'KautionDrittStaat\''; + $query = ' SELECT @@ -275,7 +276,7 @@ $query = ' FROM public.tbl_konto konto WHERE konto.person_id = p.person_id AND konto.studiensemester_kurzbz = '. $STUDIENSEMESTER .' - AND konto.buchungstyp_kurzbz = '. $STUDIENGEBUEHR_ANZAHLUNG .' + AND konto.buchungstyp_kurzbz = '. $KAUTION_DRITT_STAAT .' ) AS "Kaution" FROM public.tbl_person p LEFT JOIN ( diff --git a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php index 7f9ee1288..c19b139b3 100644 --- a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php +++ b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php @@ -9,7 +9,8 @@ $ADDITIONAL_STG = $this->config->item('infocenter_studiengang_kz'); $STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\''; $ORG_NAME = '\'InfoCenter\''; - $STUDIENGEBUEHR_ANZAHLUNG = '\'StudiengebuehrAnzahlung\''; + $KAUTION_DRITT_STAAT = '\'KautionDrittStaat\''; + $query = ' SELECT @@ -206,7 +207,7 @@ $query = ' FROM public.tbl_konto konto WHERE konto.person_id = p.person_id AND konto.studiensemester_kurzbz = '. $STUDIENSEMESTER .' - AND konto.buchungstyp_kurzbz = '. $STUDIENGEBUEHR_ANZAHLUNG .' + AND konto.buchungstyp_kurzbz = '. $KAUTION_DRITT_STAAT .' ) AS "Kaution" FROM public.tbl_person p LEFT JOIN ( From 742ae40d981d6b17dc462360b1c679e2f26df00f Mon Sep 17 00:00:00 2001 From: kindlm Date: Tue, 25 Mar 2025 15:56:30 +0100 Subject: [PATCH 37/47] =?UTF-8?q?Link=20Zugangscode=20=C3=B6ffnet=20nicht?= =?UTF-8?q?=20sondern=20kopiert=20in=20zwischenablage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/functions.js.php | 18 ++++++++++++++++++ content/student/studentdetailoverlay.xul.php | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/content/functions.js.php b/content/functions.js.php index 9b75718d1..65622f9ae 100644 --- a/content/functions.js.php +++ b/content/functions.js.php @@ -217,6 +217,24 @@ function getDataFromClipboard() return pastetext; } +// **** +// * Kopiert Inhalte in die Zwischenablage +// **** +function copyToClipboard(link) +{ + netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); + try { + const clipboard = Components.classes["@mozilla.org/widget/clipboardhelper;1"] + .getService(Components.interfaces.nsIClipboardHelper); + clipboard.copyString(link); + + // Erfolgsmeldung anzeigen + alert("Link erfolgreich in die Zwischenablage kopiert.\nBitte in anderem Browser einfügen und öffnen."); + } catch (e) { + alert("Fehler beim Kopieren in die Zwischenablage: " + e); + } +} + // **** // * Oeffnet ein neues Fenster welches dann die Datei 'action' mit dem POST Parameter 'data' aufruft // **** diff --git a/content/student/studentdetailoverlay.xul.php b/content/student/studentdetailoverlay.xul.php index 4b4fbdd63..132667395 100644 --- a/content/student/studentdetailoverlay.xul.php +++ b/content/student/studentdetailoverlay.xul.php @@ -74,7 +74,7 @@ echo '';
".$p->t('abgabetool/student').": ".$db->convert_html_chars($studentenname).""; -$semester_benotbar = $paIsCurrent >= 1; +$semester_benotbar = $paIsCurrent === true; $endupload_vorhanden = $num_rows_endupload >= 1; if ($semester_benotbar && $endupload_vorhanden) @@ -544,7 +544,7 @@ if (isset($zweitbetreuerArr) && is_array($zweitbetreuerArr)) // wenn es Zweitbet $htmlstr .= "  " . $p->t("; // Token senden button wenn Zweitbegutachter extern ist und Projektarbeit nicht für altes Semester ist - if (isset($zweitbetreuer->email) && !isset($zweitbetreuer->uid) && $paIsCurrent >= 1) + if (isset($zweitbetreuer->email) && !isset($zweitbetreuer->uid) && $paIsCurrent === true) { $htmlstr .= "
\n"; $htmlstr .= ""; diff --git a/cis/private/lehre/abgabe_student.php b/cis/private/lehre/abgabe_student.php index 2512d9831..0a0385970 100644 --- a/cis/private/lehre/abgabe_student.php +++ b/cis/private/lehre/abgabe_student.php @@ -195,13 +195,13 @@ else $htmlstr .= "
"; if (!is_null($row->babgeschickt)) - $htmlstr .= "".$p->t('abgabetool/projektbeurteilungErstDownload').""; + $htmlstr .= "".$p->t('abgabetool/projektbeurteilungErstDownload').""; if (!is_null($row->babgeschickt) && !is_null($row->zweitbetreuer_abgeschickt)) $htmlstr .= "/"; if (!is_null($row->zweitbetreuer_abgeschickt)) - $htmlstr .= "".$p->t('abgabetool/projektbeurteilungZweitDownload').""; + $htmlstr .= "".$p->t('abgabetool/projektbeurteilungZweitDownload').""; $htmlstr .= "
" . $p->t('abgabetool/titel') . ": ".$db->convert_html_chars($titel)."".(isset($quick_info) ? $quick_info : '')."".(isset($info_text) ? $info_text : '')." ".$p->t('abgabetool/studentenansicht')."