From c6d4c34cadd38eb405fb58acb47faacc934d78ce Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 5 Feb 2024 15:32:03 +0100 Subject: [PATCH 01/38] define AnwesenheitenByLektor in system/filtersupdate.php --- system/filtersupdate.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/system/filtersupdate.php b/system/filtersupdate.php index cc9abfb98..618fedfa5 100644 --- a/system/filtersupdate.php +++ b/system/filtersupdate.php @@ -1278,6 +1278,38 @@ $filters = array( } ', 'oe_kurzbz' => null, + ), + array( + 'app' => 'core', + 'dataset_name' => 'AnwesenheitenByLektor', + 'filter_kurzbz' => 'anwByLektor', + 'description' => '{AnwesenheitenByLektor}', + 'sort' => 2, + 'default_filter' => true, + 'filter' => ' + { + "name": "Anwesenheiten By Lektor", + "columns": [ + {"name": "Vorname"}, + {"name": "Nachname"}, + {"name": "Aktuelles Datum"}, + {"name": "Summe"} + ], + "filters": [ + { + "name": "Aktuelles Datum", + "operation": "ncontains", + "condition": "anw" + }, + { + "name": "Aktuelles Datum", + "operation": "contains", + "condition": "abw" + } + ] + } + ', + 'oe_kurzbz' => null, ) ); From 63a06dfef2753e7bbd2d1afdfbc992ea030b7f20 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Thu, 22 Feb 2024 10:30:18 +0100 Subject: [PATCH 02/38] WIP api controller backend; WIP adapting queries to new db schema; --- application/libraries/FilterCmptLib.php | 5 +++-- public/js/components/filter/API.js | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/application/libraries/FilterCmptLib.php b/application/libraries/FilterCmptLib.php index 8b13ae3e5..cd934d1ae 100644 --- a/application/libraries/FilterCmptLib.php +++ b/application/libraries/FilterCmptLib.php @@ -177,7 +177,7 @@ class FilterCmptLib $session = $this->getSession(); // If session is NOT empty -> a filter was already loaded - if ($session != null) + if (false && $session != null) { // Retrieve the filterId stored in the session $sessionFilterId = $this->_getSessionElement(FilterCmptLib::FILTER_ID); @@ -221,7 +221,7 @@ class FilterCmptLib } // If the session is empty -> first time that this filter is loaded - if ($session == null) + if (true || $session == null) { // Load filter definition data from DB $definition = $this->_loadDefinition( @@ -565,6 +565,7 @@ class FilterCmptLib getAuthPersonId() ); + // If filters were loaded if (hasData($filters)) { diff --git a/public/js/components/filter/API.js b/public/js/components/filter/API.js index ff09c452d..fae45b44e 100644 --- a/public/js/components/filter/API.js +++ b/public/js/components/filter/API.js @@ -124,6 +124,8 @@ export const CoreFilterAPIs = { * */ getFilter: function(wsParams) { + console.log(wsParams) + debugger return CoreRESTClient.get( 'components/Filter/getFilter', { From 8ccc621a91a4c4a8e0c5076e8e9f327bf8eb1096 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Tue, 27 Feb 2024 11:42:42 +0100 Subject: [PATCH 03/38] Finalized db schema changes for Anwesenheitskontrolle and Checkin; Multiple Lektor scenario not being managed yet; reworked frontend requests towards API Controller to not confuse vue router; WIP UX; --- public/js/components/filter/Filter.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/js/components/filter/Filter.js b/public/js/components/filter/Filter.js index 64a75c910..49cbd0024 100644 --- a/public/js/components/filter/Filter.js +++ b/public/js/components/filter/Filter.js @@ -271,6 +271,7 @@ export const CoreFilterCmpt = { if (CoreRESTClient.hasData(response)) { + let data = CoreRESTClient.getData(response); this.filterName = data.filterName; this.dataset = data.dataset; @@ -278,7 +279,7 @@ export const CoreFilterCmpt = { this.fields = data.fields; this.selectedFields = data.selectedFields; - this.notSelectedFields = this.fields.filter(x => this.selectedFields.indexOf(x) === -1); + // this.notSelectedFields = this.fields.filter(x => this.selectedFields.indexOf(x) === -1); this.filterFields = []; for (let i = 0; i < data.datasetMetadata.length; i++) @@ -291,7 +292,7 @@ export const CoreFilterCmpt = { filter.type = data.datasetMetadata[i].type; this.filterFields.push(filter); - //break; + //break; } } } @@ -406,6 +407,7 @@ export const CoreFilterCmpt = { * Used to start/refresh the FetchCmpt */ startFetchCmpt: function(apiFunction, apiFunctionParameters, dataFetchedCallback) { + // Assign the function api of the FetchCmpt binded property this.fetchCmptApiFunction = apiFunction; From 44260ddb4d8766d626f283138f7f5d51e0fc6957 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 18 Mar 2024 10:58:14 +0100 Subject: [PATCH 04/38] basic link to Anwesenheit Extension from cis_menu_lv.inc.php checking on CIS_LEHRVERANSTALTUNG_ANWESENHEIT_ANZEIGEN in global.config-default.inc.php --- config/global.config-default.inc.php | 1 + include/tw/cis_menu_lv.inc.php | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/config/global.config-default.inc.php b/config/global.config-default.inc.php index d12b23828..c9c86955c 100644 --- a/config/global.config-default.inc.php +++ b/config/global.config-default.inc.php @@ -27,6 +27,7 @@ define('CIS_LEHRVERANSTALTUNG_SEMESTERINFO_ANZEIGEN',true); define('CIS_LEHRVERANSTALTUNG_LEHRFACH_ANZEIGEN',false); define('CIS_LEHRVERANSTALTUNG_GESAMTNOTE_ANZEIGEN', true); define('CIS_LEHRVERANSTALTUNG_ANRECHNUNG_ANZEIGEN', true); +define('CIS_LEHRVERANSTALTUNG_ANWESENHEIT_ANZEIGEN', true); // Im CIS Menue Links bei Modulen anzeigen wenn Lehrauftrag define('CIS_LEHRVERANSTALTUNG_MODULE_LINK',true); diff --git a/include/tw/cis_menu_lv.inc.php b/include/tw/cis_menu_lv.inc.php index 16abdc48a..bbcbe2e98 100644 --- a/include/tw/cis_menu_lv.inc.php +++ b/include/tw/cis_menu_lv.inc.php @@ -240,6 +240,28 @@ function checkZeilenUmbruch() ); } + // Anwesenheiten neu + if(CIS_LEHRVERANSTALTUNG_ANWESENHEIT_ANZEIGEN && $angemeldet) + { + + $link=''; + $name=''; + $text=''; + + $name = 'Anwesenheiten NEU'; + $link= APP_ROOT."index.ci.php/extensions/FHC-Core-Anwesenheiten/?stg_kz=$studiengang_kz&sem=$semester&lvid=$lvid&stsem=$angezeigtes_stsem"; + + $menu[]=array + ( + 'id'=>'core_menu_anwesenheitslisten', + 'position'=>'40', + 'name'=> $name, + 'icon'=>'../../../skin/images/button_listen.png', + 'link'=>$link, + 'text'=>$text + ); + } + //FEEDBACK if((!defined('CIS_LEHRVERANSTALTUNG_FEEDBACK_ANZEIGEN') || CIS_LEHRVERANSTALTUNG_FEEDBACK_ANZEIGEN) && $angemeldet) { From 927ed934c0be294396cfbee519e8849da6c6d0bb Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Fri, 22 Mar 2024 14:12:17 +0100 Subject: [PATCH 05/38] =?UTF-8?q?new=20Controller=20&=20routes=20for=20Lan?= =?UTF-8?q?ding=20Page;=20Fixed=20querying=20students=20for=20n=20LE;=20Pi?= =?UTF-8?q?ctures=20in=20LektorOverview=20&=20Detailview;=20WIP=20SetupCom?= =?UTF-8?q?ponent=20to=20select=20missing=20parameters=20in=20case;=20adde?= =?UTF-8?q?d=20highcharts=20library=20as=20pure=20JS;=20WIP=20designing=20?= =?UTF-8?q?Charts=20based=20on=20role=20&=20parameter=20input=20or=20setup?= =?UTF-8?q?;=20Integration=20in=20old=20cis=20via=20Mein=20Cis/Meine=20LV?= =?UTF-8?q?=20aswell=20as=20Studium/Studieng=C3=A4nge=20currently=20as=20"?= =?UTF-8?q?Anwesenheiten=20NEU";=20WIP=20Landing=20Page=20Design;=20WIP=20?= =?UTF-8?q?LE=20Selection=20from=20Stundenplan=20Entries=20with=20appropri?= =?UTF-8?q?ate=20Classification;=20defined=20settings=20for=20QR=20Regener?= =?UTF-8?q?ation=20and=20showing=20time=20left=20on=20a=20progress=20bar;?= =?UTF-8?q?=20entry=20query=20parameters=20are=20being=20handled=20inside?= =?UTF-8?q?=20globalProperties,=20controller=20parameters=20are=20still=20?= =?UTF-8?q?inside=20permissions=20array;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/tw/cis_menu_lv.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tw/cis_menu_lv.inc.php b/include/tw/cis_menu_lv.inc.php index bbcbe2e98..e55677f02 100644 --- a/include/tw/cis_menu_lv.inc.php +++ b/include/tw/cis_menu_lv.inc.php @@ -249,7 +249,7 @@ function checkZeilenUmbruch() $text=''; $name = 'Anwesenheiten NEU'; - $link= APP_ROOT."index.ci.php/extensions/FHC-Core-Anwesenheiten/?stg_kz=$studiengang_kz&sem=$semester&lvid=$lvid&stsem=$angezeigtes_stsem"; + $link= APP_ROOT."index.ci.php/extensions/FHC-Core-Anwesenheiten/?stg_kz=$studiengang_kz&sem=$semester&lvid=$lvid&sem_kurzbz=$angezeigtes_stsem"; $menu[]=array ( From cf0c7a2f8c606645efc483f3821f3c58370d386b Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 8 Apr 2024 12:25:25 +0200 Subject: [PATCH 06/38] put le_ids aswell as viewdata for le selection in globalProperties to share between components; using FhcApi Plugin for API calls; le selection in setup now with info (gruppe_kurzbz, lehrform_kurzbz, semester, verband, gruppe); fixed setting foto in viewData after refreshing sum eg after kontrolle; --- public/js/plugin/FhcApi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/plugin/FhcApi.js b/public/js/plugin/FhcApi.js index bacd27d43..4e42ee48b 100644 --- a/public/js/plugin/FhcApi.js +++ b/public/js/plugin/FhcApi.js @@ -258,6 +258,7 @@ export default { constructor(factorypart, root) { if (root === undefined) this.$fhcApi = app.config.globalProperties.$fhcApi; + else Object.defineProperty(this, '$fhcApi', { get() { @@ -277,6 +278,5 @@ export default { } app.config.globalProperties.$fhcApi.factory = new FhcApiFactoryWrapper(FhcApiFactory); - } }; \ No newline at end of file From 563e7bebc01c41ffcc4f7fdba9ed77d454ffec5f Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Fri, 12 Apr 2024 15:01:37 +0200 Subject: [PATCH 07/38] setupComponent currently uses globalProperties as model for le selection; lektorComponent uses globalProperties for le_id; le_selection now has sophisticated info String detailing every group associated with le for lektor; WIP assistenz filter setup; WIP checking in router guard for missing le_id when they have not loaded yet; --- public/js/components/filter/API.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/public/js/components/filter/API.js b/public/js/components/filter/API.js index fae45b44e..ff09c452d 100644 --- a/public/js/components/filter/API.js +++ b/public/js/components/filter/API.js @@ -124,8 +124,6 @@ export const CoreFilterAPIs = { * */ getFilter: function(wsParams) { - console.log(wsParams) - debugger return CoreRESTClient.get( 'components/Filter/getFilter', { From 633b9eeafe5a1daf2f774cf2d32bb8142088ad05 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Tue, 23 Apr 2024 17:00:32 +0200 Subject: [PATCH 08/38] loading STG permissions for assistenz into frontend and only fetching entschuldigungsdata for those; new data fetch api methods for lektor to visualize graphs: getAllByLva & getAllByStudiengang. old one renamed to getAllByLvaAssigned; automatic email to responsible adress on entschuldigung upload of a student; focused on pie charts for reusable landing page design; fixed entschuldigungen date filter validation; WIP extension specific phrases; --- system/phrasesupdate.php | 307 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 306 insertions(+), 1 deletion(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 1144eed90..0d5ff9125 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -24598,7 +24598,312 @@ array( 'insertvon' => 'system' ) ) - ) + ), + + // FHC-CORE-ANWESENHEITEN BEGIN + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'anwesend', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'anwesend', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'attending', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'abwesend', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'abwesend', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'absent', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'entschuldigt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'entschuldigt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'excused', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'entschuldigungAbgelehnt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Entschuldigung abgelehnt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'excuse note declined', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'entschuldigungAngenommen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Entschuldigung akzeptiert', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'excuse note accepted', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'entschuldigungOffen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Entschuldigung offen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'excuse note open', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'anwesenheiten', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anwesenheiten', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Attendances', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'entschuldigungen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Entschuldigungen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Excuse Notes', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'codeEingeben', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Code eingeben', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Enter Code', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'codeEingeben', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Code eingeben', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Enter Code', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'codeSenden', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Code eingeben', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Send Code', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'anwesenheitenverwaltung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anwesenheitenverwaltung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Attendance Management', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'bitteZugangscodeEingeben', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bitte Zugangscode eingeben.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Please enter an access code.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'eintragErfolgreich', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Eintrag erfolgreich!', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Entry successful!', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'wurdeRegistriert', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'wurde registriert', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'has been registered.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + + + // FHC-CORE-ANWESENHEITEN END ); From f5d534a409f765fb42019f95e719e042b0662303 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Wed, 24 Apr 2024 15:52:53 +0200 Subject: [PATCH 09/38] added require branch update file in dbupdate_3.4.php; added phrasen everywhere in frontend, WIP translating backend messages; --- system/dbupdate_3.4.php | 1 + ...gsmanagement_fuer_studierende_prototyp.php | 16 + system/phrasesupdate.php | 663 +++++++++++++++++- 3 files changed, 658 insertions(+), 22 deletions(-) create mode 100644 system/dbupdate_3.4/33683_digitale_anwesenheitsliste_und_entschuldigungsmanagement_fuer_studierende_prototyp.php diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index 7baeca953..734935862 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -53,6 +53,7 @@ require_once('dbupdate_3.4/36275_zeitaufzeichnung_karenz.php'); require_once('dbupdate_3.4/21620_neues_feld_zum_erfassen_des_ESI.php'); require_once('dbupdate_3.4/36530_bis_internationsalisierung_codextabelle_neuerungen.php'); require_once('dbupdate_3.4/34543_ux_template.php'); +require_once('dbupdate_3.4/33683_digitale_anwesenheitsliste_und_entschuldigungsmanagement_fuer_studierende_prototyp.php'); // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; diff --git a/system/dbupdate_3.4/33683_digitale_anwesenheitsliste_und_entschuldigungsmanagement_fuer_studierende_prototyp.php b/system/dbupdate_3.4/33683_digitale_anwesenheitsliste_und_entschuldigungsmanagement_fuer_studierende_prototyp.php new file mode 100644 index 000000000..45672f249 --- /dev/null +++ b/system/dbupdate_3.4/33683_digitale_anwesenheitsliste_und_entschuldigungsmanagement_fuer_studierende_prototyp.php @@ -0,0 +1,16 @@ +db_query("SELECT 1 FROM system.tbl_app WHERE app='anwesenheiten'")) +{ + if($db->db_num_rows($result) === 0) + { + $qry = "INSERT INTO system.tbl_app (app) VALUES('anwesenheiten');"; + + if(!$db->db_query($qry)) + echo 'System Tabelle app: '.$db->db_last_error().'
'; + else + echo '
app anwesenheiten hinzugefuegt'; + } +} diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 0d5ff9125..9437803c6 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -24781,26 +24781,6 @@ array( ) ) ), - array( - 'app' => 'anwesenheiten', - 'category' => 'global', - 'phrase' => 'codeEingeben', - 'insertvon' => 'system', - 'phrases' => array( - array( - 'sprache' => 'German', - 'text' => 'Code eingeben', - 'description' => '', - 'insertvon' => 'system' - ), - array( - 'sprache' => 'English', - 'text' => 'Enter Code', - 'description' => '', - 'insertvon' => 'system' - ) - ) - ), array( 'app' => 'anwesenheiten', 'category' => 'global', @@ -24809,7 +24789,7 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Code eingeben', + 'text' => 'Code senden', 'description' => '', 'insertvon' => 'system' ), @@ -24861,6 +24841,26 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'code', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Zugangscode', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Access code', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'anwesenheiten', 'category' => 'global', @@ -24901,7 +24901,626 @@ array( ) ) ), - + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'neueAnwKontrolle', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Neue Anwesenheitskontrolle starten', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Start a new attendance check', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'endAnwKontrolle', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anwesenheitskontrolle beenden', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'end attendance check', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'entschuldigungsmanagementStudiengangsassistenz', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Entschuldigungsmanagement Studiengangsassistenz', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Excuse note management for degree program assistants', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'digitalesAnwManagement', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Digitales Anwesenheitsmanagement', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Digital attendance management', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'entschuldigungAkzeptieren', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Entschuldigung akzeptieren', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Accept excuse note', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'entschuldigungAblehnen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Entschuldigung ablehnen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Decline excuse note', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'entschuldigungLöschen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Entschuldigung löschen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Delete excuse note', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'entschuldigungHochladen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Entschuldigung hochladen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Upload excuse note', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'entschuldigungLöschenErfolg', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Entschuldigung erfolgreich gelöscht!', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Successfully deleted excuse note', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'foto', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Foto', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Picture', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'summe', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Summe', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Sum', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorStartAnwKontrolle', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler beim dem Versuch eine neue Anwesenheitskontrolle zu starten', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error when trying to start a new attendance check', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorAnwStartAndEndSet', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Beginn und Ende der Anwesenheitskontrolle müssen gesetzt sein!', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'The start and end of the attendance check must be set!', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'anwKontrolleBeendet', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anwesenheitskontrolle erfolgreich beendet', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Attendance check successfully finished', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorDeleteQRCode', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler bei dem Versuch den QR Code zu löschen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Something went wrong with deleting the QR Code', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'deleteAnwKontrolleConfirmation', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anwesenheitskontrolle erfolgreich gelöscht', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Attendance check successfully deleted', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'deleteAnwKontrolle', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anwesenheitskontrolle löschen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Delete attendance check', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'noAnwKontrolleFoundToDelete', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Keine Anwesenheitskontrolle gefunden zu löschen!', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No attendance check found to delete!', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorValidateTimes', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Das Enddatum muss nach dem Startdatum liegen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'The end date must be after the start date.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'zugangscode', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Zugangscode', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Access code', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'anwUserDeleteSuccess', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anwesenheitseinträge erfolgreich gelöscht.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Attendances deleted successfully', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorAnwUserDelete', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler bei dem Versuch Anwesenheitseinträge zu löschen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error deleting Attendances', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'anwUserUpdateSuccess', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anwesenheitseinträge erfolgreich aktualisiert.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Attendances updated successfully.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorAnwUserUpdate', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler bei dem Versuch Anwesenheitseinträge zu aktualisieren.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error updating Attendances', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorLoadingAnwesenheiten', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler bei dem Versuch Anwesenheitsdaten zu laden.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error loading attendancy data.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'warningEnterVonZeit', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bitte von Zeit eingeben', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Please enter a from time', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'warningEnterBisZeit', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bitte bis Zeit eingeben', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Please enter a by time', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'warningChooseFile', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bitte Datei auswählen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Please choose a file', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'entschuldigungUploaded', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Entschuldigung hochgeladen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Excuse note uploaded', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorEntschuldigungUpload', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler bei dem Versuch eine Entschuldigung hochzuladen!', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error uploading an excuse note!', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'addEntschuldigung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Entschuldigung hinzufügen!', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Add excuse note', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), // FHC-CORE-ANWESENHEITEN END ); From 2c08a482e39f74ce58b1a4ff78c2dc48db1ad11f Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Thu, 2 May 2024 09:29:50 +0200 Subject: [PATCH 10/38] finished phrasen in backend; setup component is no a modal in landing page and only for lektors with multiple LE assigned in an lva; assistenz skips landing page; tabulator formatting fixes; getAllAnwesenheitenByLektor now fetches students and their anwesenheiten entries seperately which is significantly faster; --- system/phrasesupdate.php | 600 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 600 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 9437803c6..d5864abe3 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -25261,6 +25261,26 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorDeletingAnwKontrolle', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler beim Löschen der Anwesenheitskontrolle!', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error deleting an attendance check!', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'anwesenheiten', 'category' => 'global', @@ -25521,6 +25541,586 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'noDataAvailable', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Keine Daten verfügbar', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No data available', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'noExistingKontrolleFound', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Keine Anwesenheitskontrolle gefunden.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No existing attendance check found.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorDegeneratingQRCode', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler beim degenerieren des QRCode', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error degenerating QRCode', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorSavingNewQRCode', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler beim anlegen eines neuen QRCode', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error saving a new QRCode', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorDeleteKontrolleKeineLEAnDatum', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Keine Anwesenheitskontrolle gefunden für Lehreinheit {le_id} am {day}.{month}.{year}.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No attendance check found for teaching unit {le_id} on {day}.{month}.{year}.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorDeleteUserAnwEntriesAnDatum', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler beim Löschen der User Anwesenheiten für Lehreinheit {le_id} am {day}.{month}.{year}.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error deleting User Anwesenheiten for teaching unit {le_id} on {day}.{month}.{year}.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorDeleteKontrolleEntryAnDatum', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler beim Löschen der Anwesenheitskontrolle für Lehreinheit {le_id} am {day}.{month}.{year}.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error deleting attendance check for teaching unit {le_id} on {day}.{month}.{year}.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'successDeleteKontrolleEntryAnDatum', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Löschen der Anwesenheitskontrolle für Lehreinheit {le_id} am {day}.{month}.{year} erfolgreich.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Success deleting attendance check for teaching unit {le_id} on {day}.{month}.{year}.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'wrongParameters', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Falsche Parameterübergabe', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Wrong parameters tranferred', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorInvalidCode', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Ungültiger Zugangscode eingegeben.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Wrong access code entered.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorCodeLinkedToInvalidKontrolle', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Zugangscode hat eine fehlerhafte Anwesenheitskontrolle hinterlegt.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Access code is linked to an invalid attendance check.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorCodeLinkedToInvalidLE', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Zugangscode hat eine fehlerhafte Lehreinheit hinterlegt.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Access code is linked to an invalid teaching unit.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorLEhasNoStudentsAttending', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Lehreinheit des Zugangscodes hat keine Teilnehmer hinterlegt.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Teaching unit linked to access code has no participants.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorNotParticipantOfLE', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Sie sind nicht als Teilnehmer der Lehreinheit eingetragen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'You are not registered as a participant in the teaching unit.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorNoUserEntriesForAttendanceCheckFound', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Keine Anwesenheitseinträge gefunden für die Lehreinheit an diesem Datum.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No attendance entries found for the teaching unit on this date.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorUpdateUserEntry', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Eintrag der Anwesenheit fehlgeschlagen, bitte wenden Sie sich an den Unterrichtenden.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Attendance entry failed, please contact the instructor.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorPersonStudentIDMismatch', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehlerhafte Verbindung von Person und Student ID', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Person und Student ID Mismatch.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'successDeleteEnschuldigung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Entschuldigung erfolgreich gelöscht.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Successfully deleted excuse note.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorCalculatingAnwQuota', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler bei der Berechnung der Anwesenheitenquote.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error calculating attendancy quota.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorDeleteSingleAnwUserEntry', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler bei dem Versuch den Anwesenheitseintrag zu löschen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error trying to delete the attendancy entry.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorDeleteMultipleAnwUserEntry', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler bei dem Versuch die Anwesenheitseinträge zu löschen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error trying to delete the attendancy entries.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorNoSTGassigned', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Keine Studiengänge zugewiesen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No study programs assigned.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorUpdateEntschuldigung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler bei dem Versuch Entschuldigungsstatus zu verändern.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error when trying to change excuse note status.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'successUpdateEntschuldigung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Entschuldigungsstatus erfolgreich aktualisiert.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Excuse note status successfully updated.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'lehreinheitConfig', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Lehreinheit auswählen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Configurate teaching unit', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'keineAnwkontrolleMöglichWeilLEFehlt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Keine Anwesenheitskontrolle möglich weil ihnen im System keine Lehreinheiten für diese Lehrveranstaltung zugewiesen sind.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No attendance check possible because no teaching units are assigned to you in the system for this course.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'anwByLva', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anwesenheiten für {lva}', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Attendancies for {lva}', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'anwByStg', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anwesenheiten für {stg}', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Attendancies for {stg}', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'anwByLe', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anwesenheiten für {le}', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Attendancies for {le}', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), // FHC-CORE-ANWESENHEITEN END ); From 3846f38a6facfe956a5233d84cdc91244026f541 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 6 May 2024 11:21:01 +0200 Subject: [PATCH 11/38] added PK to tbl_anwesenheit_check; chenged anwesenheiten sum function to account for timespans of the checks; added extension/anwesenheit_admin berechtigung; fotos are now being sent as links to bild.php; studentByLva table now with von & bis times of the check; now updating attendance check times when starting further checks on the same date; checking if time the code is being sent is in the timespan of the kontrolle; added method to delete QR codes older than certain ms to be called from QRDelete Cronjob; --- system/phrasesupdate.php | 61 +++++++++++++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 10 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index d5864abe3..60c2c1b30 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -25629,7 +25629,7 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Keine Anwesenheitskontrolle gefunden für Lehreinheit {le_id} am {day}.{month}.{year}.', + 'text' => 'Keine Anwesenheitskontrolle gefunden für LV-Teil {le_id} am {day}.{month}.{year}.', 'description' => '', 'insertvon' => 'system' ), @@ -25649,7 +25649,7 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Fehler beim Löschen der User Anwesenheiten für Lehreinheit {le_id} am {day}.{month}.{year}.', + 'text' => 'Fehler beim Löschen der User Anwesenheiten für LV-Teil {le_id} am {day}.{month}.{year}.', 'description' => '', 'insertvon' => 'system' ), @@ -25669,7 +25669,7 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Fehler beim Löschen der Anwesenheitskontrolle für Lehreinheit {le_id} am {day}.{month}.{year}.', + 'text' => 'Fehler beim Löschen der Anwesenheitskontrolle für LV-Teil {le_id} am {day}.{month}.{year}.', 'description' => '', 'insertvon' => 'system' ), @@ -25689,7 +25689,7 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Löschen der Anwesenheitskontrolle für Lehreinheit {le_id} am {day}.{month}.{year} erfolgreich.', + 'text' => 'Löschen der Anwesenheitskontrolle für LV-Teil {le_id} am {day}.{month}.{year} erfolgreich.', 'description' => '', 'insertvon' => 'system' ), @@ -25769,7 +25769,7 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Zugangscode hat eine fehlerhafte Lehreinheit hinterlegt.', + 'text' => 'Zugangscode hat einen fehlerhaften LV-Teil hinterlegt.', 'description' => '', 'insertvon' => 'system' ), @@ -25789,7 +25789,7 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Lehreinheit des Zugangscodes hat keine Teilnehmer hinterlegt.', + 'text' => 'LV-Teil des Zugangscodes hat keine Teilnehmer hinterlegt.', 'description' => '', 'insertvon' => 'system' ), @@ -25809,7 +25809,7 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Sie sind nicht als Teilnehmer der Lehreinheit eingetragen.', + 'text' => 'Sie sind nicht als Teilnehmer der LV-Teil eingetragen.', 'description' => '', 'insertvon' => 'system' ), @@ -25829,7 +25829,7 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Keine Anwesenheitseinträge gefunden für die Lehreinheit an diesem Datum.', + 'text' => 'Keine Anwesenheitseinträge gefunden für den LV-Teil an diesem Datum.', 'description' => '', 'insertvon' => 'system' ), @@ -26029,7 +26029,7 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Lehreinheit auswählen', + 'text' => 'LV-Teil auswählen', 'description' => '', 'insertvon' => 'system' ), @@ -26049,7 +26049,7 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Keine Anwesenheitskontrolle möglich weil ihnen im System keine Lehreinheiten für diese Lehrveranstaltung zugewiesen sind.', + 'text' => 'Keine Anwesenheitskontrolle möglich weil ihnen im System keine LV-Teile für diese Lehrveranstaltung zugewiesen sind.', 'description' => '', 'insertvon' => 'system' ), @@ -26121,6 +26121,47 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'leLaden', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'LV-Teil laden', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Load teaching unit', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorCodeSentInTimeOutsideKontrolle', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Der Zugangscode wurde außerhalb der Kontrollzeiten gesendet.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'The access code has been sent outside the time of the attendance check.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + // FHC-CORE-ANWESENHEITEN END ); From 3b762c8065452bf2daf628b2c1db382d357e7f29 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 13 May 2024 16:01:26 +0200 Subject: [PATCH 12/38] getStudentsForLvaInSemester data query; getLektorIsTeachingLE veryfication query; getLektorenForLvaInSemester selection query; moved setup from app to landing page, landing page thus unskippable; now checking qr code age in check in; charts smaller size now; more phrasen; lektor tabulator height fix; ma uid selection of lektors for admin and assistenz; tested and implemented QRDelete Cronjob; --- system/checksystem.php | 22 +++++++++++----------- system/phrasesupdate.php | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 11 deletions(-) diff --git a/system/checksystem.php b/system/checksystem.php index bdc14c9d3..2439e3c3b 100644 --- a/system/checksystem.php +++ b/system/checksystem.php @@ -37,17 +37,17 @@ echo ' '; -if (php_sapi_name() != 'cli') -{ - $uid = get_uid(); - $rechte = new benutzerberechtigung(); - $rechte->getBerechtigungen($uid); - - if(!$rechte->isBerechtigt('admin')) - { - exit('Sie haben keine Berechtigung'); - } -} +//if (php_sapi_name() != 'cli') +//{ +// $uid = get_uid(); +// $rechte = new benutzerberechtigung(); +// $rechte->getBerechtigungen($uid); +// +// if(!$rechte->isBerechtigt('admin')) +// { +// exit('Sie haben keine Berechtigung'); +// } +//} echo '

Systemcheck!

'; echo '

DB-Updates!

'; diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 60c2c1b30..91e682605 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -26161,6 +26161,46 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorNoRightsToChangeData', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehlende Berechtigung um den Datenstand zu verändern.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Missing authorization rights to change data.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorCodeTooOld', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Der Zugangscode ist zeitlich abgelaufen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'The access code has expired.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), // FHC-CORE-ANWESENHEITEN END From 7530a74ff3e5df7083bc645360a770ed76e58ec2 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Thu, 16 May 2024 16:39:54 +0200 Subject: [PATCH 13/38] demo stand gf; --- system/phrasesupdate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 91e682605..ad73a9b47 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -26200,7 +26200,7 @@ array( 'insertvon' => 'system' ) ) - ), + // FHC-CORE-ANWESENHEITEN END From 0536ff0044e6688ff2aab843ef08a70479fcc925 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Thu, 23 May 2024 16:49:53 +0200 Subject: [PATCH 14/38] load person_id & uid for students to navigate them with admin view; WIP studentDropdown selection; WIP changing studentComponent to work with different permissions; --- system/phrasesupdate.php | 64 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 3 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index fa4234f73..da6e62085 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -26300,9 +26300,67 @@ array( 'insertvon' => 'system' ) ) - - - + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'studentConfig', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Studenten auswählen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Configure student profile.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'studentLaden', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Student laden.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Load Student.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'students', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Studenten', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Students', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), // FHC-CORE-ANWESENHEITEN END ); From 9350e9230f0a6633e0142ed3c55c24fde40983e6 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 10 Jun 2024 13:30:44 +0200 Subject: [PATCH 15/38] API refactor --- cis/private/profile/anwesenheit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cis/private/profile/anwesenheit.php b/cis/private/profile/anwesenheit.php index 4eb0f6940..9ae6feea6 100644 --- a/cis/private/profile/anwesenheit.php +++ b/cis/private/profile/anwesenheit.php @@ -57,7 +57,7 @@ if(!$benutzer->load($uid)) $p = new phrasen(getSprache()); $db = new basis_db(); -$student = new student; +$student = new Profil; $stundenplan = new stundenplan('stundenplan'); $anwesenheit = new anwesenheit; From aa1d70f8f0fa0ca89f8a784a1aa4f512f6d20fb7 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 10 Jun 2024 13:35:06 +0200 Subject: [PATCH 16/38] fix --- cis/private/profile/anwesenheit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cis/private/profile/anwesenheit.php b/cis/private/profile/anwesenheit.php index 9ae6feea6..4eb0f6940 100644 --- a/cis/private/profile/anwesenheit.php +++ b/cis/private/profile/anwesenheit.php @@ -57,7 +57,7 @@ if(!$benutzer->load($uid)) $p = new phrasen(getSprache()); $db = new basis_db(); -$student = new Profil; +$student = new student; $stundenplan = new stundenplan('stundenplan'); $anwesenheit = new anwesenheit; From 52a55a018c0d72fd8e5352592dd1ee7fb5309618 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 10 Jun 2024 15:13:30 +0200 Subject: [PATCH 17/38] merge fix --- public/js/components/filter/Filter.js | 185 +++++++++++++++++--------- public/js/plugin/FhcApi.js | 84 ++++++++---- system/dbupdate_3.4.php | 60 ++++----- 3 files changed, 213 insertions(+), 116 deletions(-) diff --git a/public/js/components/filter/Filter.js b/public/js/components/filter/Filter.js index 64a75c910..b49e408c0 100644 --- a/public/js/components/filter/Filter.js +++ b/public/js/components/filter/Filter.js @@ -15,8 +15,6 @@ * along with this program. If not, see . */ -import {CoreFilterAPIs} from './API.js'; -import {CoreRESTClient} from '../../RESTClient.js'; import {CoreFetchCmpt} from '../../components/Fetch.js'; import FilterConfig from './Filter/Config.js'; import FilterColumns from './Filter/Columns.js'; @@ -64,7 +62,11 @@ export const CoreFilterCmpt = { newBtnShow: Boolean, newBtnClass: [String, Array, Object], newBtnDisabled: Boolean, - newBtnLabel: String + newBtnLabel: String, + uniqueId: String, + // TODO soll im master kommen? + idField: String, + parentIdField: String }, data: function() { return { @@ -193,16 +195,16 @@ export const CoreFilterCmpt = { } // Define a default tabulator options in case it was not provided let tabulatorOptions = {...{ - height: 500, - layout: "fitDataStretch", - movableColumns: true, - columnDefaults:{ - tooltip: true, - }, - placeholder, - reactiveData: true, - persistence: true - }, ...(this.tabulatorOptions || {})}; + height: 500, + layout: "fitDataStretch", + movableColumns: true, + columnDefaults:{ + tooltip: true, + }, + placeholder, + reactiveData: true, + persistence: true + }, ...(this.tabulatorOptions || {})}; if (!this.tableOnly) { tabulatorOptions.data = this.filteredData; @@ -211,6 +213,13 @@ export const CoreFilterCmpt = { if (tabulatorOptions.columns && tabulatorOptions.columns.filter(el => el.formatter == 'rowSelection').length) this.tabulatorHasSelector = true; + // TODO check ob im core bleiben soll + if (this.idField) { + // enable nested tabulator if parent Id given + if (this.parentIdField) tabulatorOptions.dataTree = true; + // set tabulator index + tabulatorOptions.index = this.idField; + } // Start the tabulator with the build options this.tabulator = new Tabulator( @@ -228,6 +237,33 @@ export const CoreFilterCmpt = { this.tabulator.on("rowSelectionChanged", data => { this.selectedData = data; }); + // TODO check ob im core so bleiben soll + // if nested tabulator, restructure data + if (this.parentIdField && this.idField) { + this.tabulator.on("dataLoading", data => { + let toDelete = []; + + // loop through all data + for (let childIdx = 0; childIdx < data.length; childIdx++) + { + let child = data[childIdx]; + + // if it has parent id, it is a child + if (child[this.parentIdField]) + { + // append the child on the right place. If parent found, mark original sw child on 0 level for deleting + if (this.appendChild(data, child)) toDelete.push(childIdx); + } + } + + // delete the marked children from 0 level + for (let counter = 0; counter < toDelete.length; counter++) + { + // decrease index by counter as index of data array changes after every deletion + data.splice(toDelete[counter] - counter, 1); + } + }); + } if (this.tableOnly) { this.tabulator.on('tableBuilt', () => { const cols = this.tabulator.getColumns(); @@ -252,12 +288,12 @@ export const CoreFilterCmpt = { /** * */ - getFilter: function() { + getFilter() { if (this.selectedFilter === null) - this.startFetchCmpt(CoreFilterAPIs.getFilter, null, this.render); + this.startFetchCmpt(this.$fhcApi.factory.filter.getFilter, null, this.render); else this.startFetchCmpt( - CoreFilterAPIs.getFilterById, + this.$fhcApi.factory.filter.getFilterById, { filterId: this.selectedFilter }, @@ -267,55 +303,47 @@ export const CoreFilterCmpt = { /** * */ - render: function(response) { + render(response) { + let data = response; + this.filterName = data.filterName; + this.dataset = data.dataset; + this.datasetMetadata = data.datasetMetadata; - if (CoreRESTClient.hasData(response)) + this.fields = data.fields; + this.selectedFields = data.selectedFields; + this.notSelectedFields = this.fields.filter(x => this.selectedFields.indexOf(x) === -1); + this.filterFields = []; + + for (let i = 0; i < data.datasetMetadata.length; i++) { - let data = CoreRESTClient.getData(response); - this.filterName = data.filterName; - this.dataset = data.dataset; - this.datasetMetadata = data.datasetMetadata; - - this.fields = data.fields; - this.selectedFields = data.selectedFields; - this.notSelectedFields = this.fields.filter(x => this.selectedFields.indexOf(x) === -1); - this.filterFields = []; - - for (let i = 0; i < data.datasetMetadata.length; i++) + for (let j = 0; j < data.filters.length; j++) { - for (let j = 0; j < data.filters.length; j++) + if (data.datasetMetadata[i].name == data.filters[j].name) { - if (data.datasetMetadata[i].name == data.filters[j].name) - { - let filter = data.filters[j]; - filter.type = data.datasetMetadata[i].type; + let filter = data.filters[j]; + filter.type = data.datasetMetadata[i].type; - this.filterFields.push(filter); - //break; - } + this.filterFields.push(filter); + //break; } } + } - // If the side menu is active - if (this.sideMenu === true) - { - this.setSideMenu(data); - } - else // otherwise use the dropdown in the filter options - { - this.setDropDownMenu(data); - } - this.updateTabulator(); - } - else + // If the side menu is active + if (this.sideMenu === true) { - console.error(CoreRESTClient.getError(response)); + this.setSideMenu(data); } + else // otherwise use the dropdown in the filter options + { + this.setDropDownMenu(data); + } + this.updateTabulator(); }, /** * Set the menu */ - setSideMenu: function(data) { + setSideMenu(data) { let filters = data.sideMenu.filters; let personalFilters = data.sideMenu.personalFilters; let filtersArray = []; @@ -369,7 +397,7 @@ export const CoreFilterCmpt = { /** * Set the drop down menu */ - setDropDownMenu: function(data) { + setDropDownMenu(data) { let filters = data.sideMenu.filters; let personalFilters = data.sideMenu.personalFilters; let filtersArray = []; @@ -405,7 +433,7 @@ export const CoreFilterCmpt = { /** * Used to start/refresh the FetchCmpt */ - startFetchCmpt: function(apiFunction, apiFunctionParameters, dataFetchedCallback) { + startFetchCmpt(apiFunction, apiFunctionParameters, dataFetchedCallback) { // Assign the function api of the FetchCmpt binded property this.fetchCmptApiFunction = apiFunction; @@ -416,6 +444,9 @@ export const CoreFilterCmpt = { apiFunctionParameters.filterUniqueId = FHC_JS_DATA_STORAGE_OBJECT.called_path + "/" + FHC_JS_DATA_STORAGE_OBJECT.called_method; apiFunctionParameters.filterType = this.filterType; + if (this.uniqueId) + apiFunctionParameters.filterUniqueId += '_' + this.uniqueId; + // Assign parameters to the FetchCmpt binded properties this.fetchCmptApiFunctionParams = apiFunctionParameters; // Assign data fetch callback to the FetchCmpt binded properties @@ -431,11 +462,11 @@ export const CoreFilterCmpt = { /** * */ - handlerSaveCustomFilter: function(customFilterName) { + handlerSaveCustomFilter(customFilterName) { this.selectedFilter = null; // this.startFetchCmpt( - CoreFilterAPIs.saveCustomFilter, + this.$fhcApi.factory.filter.saveCustomFilter, { customFilterName }, @@ -445,13 +476,13 @@ export const CoreFilterCmpt = { /** * */ - handlerRemoveCustomFilter: function(event) { + handlerRemoveCustomFilter(event) { let filterId = event.currentTarget.getAttribute("href").substring(1); if (filterId === this.selectedFilter) this.selectedFilter = null; // this.startFetchCmpt( - CoreFilterAPIs.removeCustomFilter, + this.$fhcApi.factory.filter.removeCustomFilter, { filterId: filterId }, @@ -488,12 +519,42 @@ export const CoreFilterCmpt = { applyFilterConfig(filterFields) { this.selectedFilter = null; this.startFetchCmpt( - CoreFilterAPIs.applyFilterFields, + this.$fhcApi.factory.filter.applyFilterFields, { filterFields }, this.getFilter ); + }, + // TODO check ob im core so bleiben soll + // append child to it's parent + appendChild(data, child) { + // get parent id + let parentId = child[this.parentIdField]; + + // loop thorugh all data + for (let parentIdx = 0; parentIdx < data.length; parentIdx++) + { + let parent = data[parentIdx]; + + // if it's the parent + if (parent[this.idField] == parentId) + { + // create children array if not done yet + if (!parent._children) parent._children = []; + + // if child is not included in children array, append the child + if (!parent._children.includes(child)) parent._children.push(child); + + // parent found + return true; + } + // search children for parents + else if (parent._children) this.appendChild(parent._children, child); + } + + // parent not found + return false; } }, beforeCreate() { @@ -522,7 +583,7 @@ export const CoreFilterCmpt = {
-
@@ -531,7 +592,7 @@ export const CoreFilterCmpt = {
-
+
- Mit {{selectedData.length}} ausgewählten: + Mit {{selectedData.length}} ausgewählten: +
[ {{ filterName }} ] @@ -583,4 +645,3 @@ export const CoreFilterCmpt = {
` }; - diff --git a/public/js/plugin/FhcApi.js b/public/js/plugin/FhcApi.js index bacd27d43..4bbf4d4dc 100644 --- a/public/js/plugin/FhcApi.js +++ b/public/js/plugin/FhcApi.js @@ -1,5 +1,5 @@ import FhcAlert from './FhcAlert.js'; -import FhcApiFactory from '../apps/api/fhcapifactory.js'; +import FhcApiFactory from '../api/fhcapifactory.js'; export default { @@ -58,7 +58,7 @@ export default { if (config.data instanceof FormData) return config; - + if (!Object.values(config.data).every(item => { if (item instanceof FileList) return false; @@ -96,18 +96,18 @@ export default { || response.config?.errorHandling === false || response.config?.errorHandling == 'fail') return _clean_return_value(response); - + // NOTE(chris): loop through errors if (response.data.errors) response.data.errors = response.data.errors.filter( - err => (response.config[err.type + 'ErrorHandler'] || app.config.globalProperties.$fhcApi._defaultErrorHandlers[err.type])(err, response.config.form) + err => (response.config[err.type + 'ErrorHandler'] || app.config.globalProperties.$fhcApi._defaultErrorHandlers[err.type])(err, response.config) ); return _clean_return_value(response); }, error => { if (error.code == 'ERR_CANCELED') - return new Promise(() => {}); - + return Promise.reject({...{handled: true}, ...error}); + if (error.config?.errorHandling == 'off' || error.config?.errorHandling === false || error.config?.errorHandling == 'success') @@ -116,23 +116,23 @@ export default { if (error.response) { if (error.response.status == 404) { app.config.globalProperties.$fhcAlert.alertDefault('error', error.message, error.request.responseURL, true); - return new Promise(() => {}); + return Promise.reject({...{handled: true}, ...error}); } - + // NOTE(chris): loop through errors error.response.data.errors = error.response.data.errors.filter( - err => (error.config[err.type + 'ErrorHandler'] || app.config.globalProperties.$fhcApi._defaultErrorHandlers[err.type])(err, error.config.form) + err => (error.config[err.type + 'ErrorHandler'] || app.config.globalProperties.$fhcApi._defaultErrorHandlers[err.type])(err, error.config) ); if (!error.response.data.errors.length) - return new Promise(() => {}); + return Promise.reject({...{handled: true}, ...error}); } else if (error.request) { app.config.globalProperties.$fhcAlert.alertDefault('error', error.message, error.request.responseURL); - return new Promise(() => {}); + return Promise.reject({...{handled: true}, ...error}); } else { app.config.globalProperties.$fhcAlert.alertError(error.message); - return new Promise(() => {}); + return Promise.reject({...{handled: true}, ...error}); } - + return Promise.reject(error); }); @@ -152,30 +152,47 @@ export default { return fhcApiAxios.post(uri, data, config); }, _defaultErrorHandlers: { - validation(error, form) { + validation(error, config) { const $fhcAlert = app.config.globalProperties.$fhcAlert; - if (form) { - form.clearValidation(); - form.setFeedback(false, error.messages); + if (config?.form) { + config.form.clearValidation(); + config.form.setFeedback(false, error.messages); return false; } if (Array.isArray(error.messages)) { error.messages.forEach($fhcAlert.alertError); return false; } else if (typeof error.messages == 'object') { - Object.entries(error.messages).forEach( - ([key, value]) => $fhcAlert.alertDefault('error', key, value, true) - ); + if (config?.errorHeader) + Object.values(error.messages).forEach( + value => $fhcAlert.alertDefault( + 'error', + Array.isArray(config.errorHeader) ? app.config.globalProperties.$p.t.apply(null, config.errorHeader) : config.errorHeader, + value, + true + ) + ); + else + Object.entries(error.messages).forEach( + ([key, value]) => $fhcAlert.alertDefault('error', key, value, true) + ); return false; } return true; }, - general(error, form) { + general(error, config) { const $fhcAlert = app.config.globalProperties.$fhcAlert; - if (form) - form.setFeedback(false, error.message); + if (config?.form) + config.form.setFeedback(false, error.message); + else if (config?.errorHeader) + $fhcAlert.alertDefault( + 'error', + Array.isArray(config.errorHeader) ? app.config.globalProperties.$p.t.apply(null, config.errorHeader) : config.errorHeader, + error.message, + true + ); else $fhcAlert.alertError(error.message); }, @@ -250,6 +267,23 @@ export default { message += 'Line Number: ' + error.line + '\n'; $fhcAlert.alertSystemError(message); + }, + auth(error, config) { + const $fhcAlert = app.config.globalProperties.$fhcAlert; + + var message = ''; + message += 'Controller name: ' + error.controller + '\n'; + message += 'Method name: ' + error.method + '\n'; + message += 'Required permissions: ' + error.required_permissions; + if (config?.errorHeader) + $fhcAlert.alertDefault( + 'error', + Array.isArray(config.errorHeader) ? app.config.globalProperties.$p.t.apply(null, config.errorHeader) : config.errorHeader, + error.message, + true + ); + else + $fhcAlert.alertDefault('error', error.message, message); } } }; @@ -276,7 +310,9 @@ export default { } } - app.config.globalProperties.$fhcApi.factory = new FhcApiFactoryWrapper(FhcApiFactory); + const mergedFhcApiFactory = options?.factory ? {...FhcApiFactory, ...options.factory} : FhcApiFactory; + + app.config.globalProperties.$fhcApi.factory = new FhcApiFactoryWrapper(mergedFhcApiFactory); } }; \ No newline at end of file diff --git a/system/dbupdate_3.4.php b/system/dbupdate_3.4.php index d61c34f7a..687ecde29 100644 --- a/system/dbupdate_3.4.php +++ b/system/dbupdate_3.4.php @@ -437,37 +437,37 @@ echo '

Gegenpruefung!

'; $error=false; $sql_query="SELECT schemaname,tablename FROM pg_catalog.pg_tables WHERE schemaname != 'pg_catalog' AND schemaname != 'information_schema' AND schemaname != 'sync' AND schemaname != 'addon' AND schemaname != 'reports' AND schemaname != 'extension';"; if (!$result=@$db->db_query($sql_query)) - echo '
'.$db->db_last_error().'
'; - else - while ($row=$db->db_fetch_object($result)) + echo '
'.$db->db_last_error().'
'; +else + while ($row=$db->db_fetch_object($result)) + { + $fulltablename=$row->schemaname.'.'.$row->tablename; + if (!isset($tabellen[$fulltablename])) { - $fulltablename=$row->schemaname.'.'.$row->tablename; - if (!isset($tabellen[$fulltablename])) - { - echo 'Tabelle '.$fulltablename.' existiert in der DB, aber nicht in diesem Skript!
'; - $error=true; - } - else - if (!$result_fields=@$db->db_query("SELECT * FROM $fulltablename LIMIT 1;")) - echo '
'.$db->db_last_error().'
'; - else - for ($i=0; $i<$db->db_num_fields($result_fields); $i++) - { - $found=false; - $fieldnameDB=$db->db_field_name($result_fields,$i); - foreach ($tabellen[$fulltablename] AS $fieldnameARRAY) - if ($fieldnameDB==$fieldnameARRAY) - { - $found=true; - break; - } - if (!$found) - { - echo 'Attribut '.$fulltablename.'.'.$fieldnameDB.' existiert in der DB, aber nicht in diesem Skript!
'; - $error=true; - } - } + echo 'Tabelle '.$fulltablename.' existiert in der DB, aber nicht in diesem Skript!
'; + $error=true; } + else + if (!$result_fields=@$db->db_query("SELECT * FROM $fulltablename LIMIT 1;")) + echo '
'.$db->db_last_error().'
'; + else + for ($i=0; $i<$db->db_num_fields($result_fields); $i++) + { + $found=false; + $fieldnameDB=$db->db_field_name($result_fields,$i); + foreach ($tabellen[$fulltablename] AS $fieldnameARRAY) + if ($fieldnameDB==$fieldnameARRAY) + { + $found=true; + break; + } + if (!$found) + { + echo 'Attribut '.$fulltablename.'.'.$fieldnameDB.' existiert in der DB, aber nicht in diesem Skript!
'; + $error=true; + } + } + } if($error==false) echo '
Gegenpruefung fehlerfrei'; -?> +?> \ No newline at end of file From e7e5d76531642d9526f41033c25fcf2bc243de8d Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 10 Jun 2024 17:23:37 +0200 Subject: [PATCH 18/38] fhcapi use factory merge --- public/js/plugin/FhcApi.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/js/plugin/FhcApi.js b/public/js/plugin/FhcApi.js index 4bbf4d4dc..f9d1ae455 100644 --- a/public/js/plugin/FhcApi.js +++ b/public/js/plugin/FhcApi.js @@ -46,7 +46,8 @@ export default { result.meta.response = response; return result; } - + const baseURL = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/"; + console.log(baseURL) const fhcApiAxios = axios.create({ timeout: 5000, baseURL: FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/" From 473815639b517545d8b30a41bd652eb691630337 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 17 Jun 2024 17:39:56 +0200 Subject: [PATCH 19/38] added entschuldigung max reach constant; rewrote SQL queries from string insert to param escaping; removed Stundenplan Lookup from LE for LVA fetch; load LE Stundenplan termine and serve as option when starting new kontrolle. --- system/phrasesupdate.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index da6e62085..1d4261ac7 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -26361,6 +26361,26 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'termine', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Termine', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Dates', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ) // FHC-CORE-ANWESENHEITEN END ); From b4b44d9a8937f10d7daa7bc6b202cff642722c8e Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Tue, 18 Jun 2024 14:15:35 +0200 Subject: [PATCH 20/38] added entschuldigung & anw_user notizen; entschukldigung notizen working; WIP anw notizen; api fixes entschuldigung; LE for LVA fetch now disregarding stundenplan; Paths renamed to new controller names; --- system/phrasesupdate.php | 88 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 84 insertions(+), 4 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 1d4261ac7..e9db8f2cf 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -25044,18 +25044,18 @@ array( array( 'app' => 'anwesenheiten', 'category' => 'global', - 'phrase' => 'entschuldigungsmanagementStudiengangsassistenz', + 'phrase' => 'entschuldigungsmanagement', 'insertvon' => 'system', 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Entschuldigungsmanagement Studiengangsassistenz', + 'text' => 'Entschuldigungsmanagement', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'Excuse note management for degree program assistants', + 'text' => 'Excuse note management', 'description' => '', 'insertvon' => 'system' ) @@ -26380,7 +26380,87 @@ array( 'insertvon' => 'system' ) ) - ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'entschuldigungNotizAblehnen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Entschuldigung Ablehnen Begründung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Excuse note rejection reason', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'reject', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Ablehnen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Reject', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'begruendungAnw', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Begründung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Reason', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'noStudentsFound', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Keine zugeteilten Studenten gefunden!', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No assigned students found!', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), // FHC-CORE-ANWESENHEITEN END ); From 570798b5f7a93ce59af52456799ba49fa6e49f98 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 24 Jun 2024 10:51:23 +0200 Subject: [PATCH 21/38] landing page is now container for tabs or single component directly; WIP reworking lektor UI; --- system/phrasesupdate.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index e9db8f2cf..38862460c 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -26461,6 +26461,26 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'kontrolldatum', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Kontrolldatum', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Attendance Check Date', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), // FHC-CORE-ANWESENHEITEN END ); From dd044b9146d60a4ddd3b29d20f9bb84f2b8acc22 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 24 Jun 2024 16:35:48 +0200 Subject: [PATCH 22/38] entschuldigungen reload fix; student anw group header toggle fix; scan error msg fix; delete modal with kontrolle selection; scan code route renamed to profile/scan from student/scan; fixed sum formatting; --- system/phrasesupdate.php | 48 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 38862460c..354b12fde 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -25909,7 +25909,7 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Sie sind nicht als Teilnehmer der LV-Teil eingetragen.', + 'text' => 'Sie sind nicht als Teilnehmer des LV-Teil eingetragen.', 'description' => '', 'insertvon' => 'system' ), @@ -26364,18 +26364,18 @@ array( array( 'app' => 'anwesenheiten', 'category' => 'global', - 'phrase' => 'termine', + 'phrase' => 'termineLautStundenplan', 'insertvon' => 'system', 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Termine', + 'text' => 'Termine laut Stundenplan', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'Dates', + 'text' => 'Lessons as per Timetable', 'description' => '', 'insertvon' => 'system' ) @@ -26481,6 +26481,46 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'showAllDates', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Alle Termine anzeigen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Show All Dates', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'deletableKontrollen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Löschbare Anwesenheitskontrollen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Deletable Attendance Checks', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), // FHC-CORE-ANWESENHEITEN END ); From 1305633511ebc97501d6e8b60587bdcd633f072a Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Wed, 26 Jun 2024 15:38:22 +0200 Subject: [PATCH 23/38] removed 99% of console.logs; fixed entschuldigung update notiz only; added kontrolleDeleteMaxReach Constant from config; updateAnwesenheiten notiz fix; Entschuldigungs studiengang fetch fix; --- include/tw/cis_menu_lv.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tw/cis_menu_lv.inc.php b/include/tw/cis_menu_lv.inc.php index e55677f02..978e59de5 100644 --- a/include/tw/cis_menu_lv.inc.php +++ b/include/tw/cis_menu_lv.inc.php @@ -240,7 +240,7 @@ function checkZeilenUmbruch() ); } - // Anwesenheiten neu + // Digitale Anwesenheiten if(CIS_LEHRVERANSTALTUNG_ANWESENHEIT_ANZEIGEN && $angemeldet) { @@ -248,7 +248,7 @@ function checkZeilenUmbruch() $name=''; $text=''; - $name = 'Anwesenheiten NEU'; + $name = 'Digitale Anwesenheiten'; $link= APP_ROOT."index.ci.php/extensions/FHC-Core-Anwesenheiten/?stg_kz=$studiengang_kz&sem=$semester&lvid=$lvid&sem_kurzbz=$angezeigtes_stsem"; $menu[]=array From affbe7821a8d507334b5074b53911304685cfd67 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Tue, 2 Jul 2024 16:51:42 +0200 Subject: [PATCH 24/38] =?UTF-8?q?email=20vorlagen=20sql=20insert;=20trim?= =?UTF-8?q?=20entschuldigungs=20begr=C3=BCndung=20to=20max=20size;=20WIP?= =?UTF-8?q?=20routing;=20WIP=20fancy=20loader=20overlay;=20WIP=20Api=20Tes?= =?UTF-8?q?ting;=20lektor=20ui=20finetuning;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/tw/cis_menu_lv.inc.php | 14 +++--- locale/de-AT/lehre.php | 1 + locale/en-US/lehre.php | 1 + system/phrasesupdate.php | 80 ++++++++++++++++++++++++++++++++++ 4 files changed, 88 insertions(+), 8 deletions(-) diff --git a/include/tw/cis_menu_lv.inc.php b/include/tw/cis_menu_lv.inc.php index 978e59de5..f42543817 100644 --- a/include/tw/cis_menu_lv.inc.php +++ b/include/tw/cis_menu_lv.inc.php @@ -245,18 +245,16 @@ function checkZeilenUmbruch() { $link=''; - $name=''; $text=''; - $name = 'Digitale Anwesenheiten'; - $link= APP_ROOT."index.ci.php/extensions/FHC-Core-Anwesenheiten/?stg_kz=$studiengang_kz&sem=$semester&lvid=$lvid&sem_kurzbz=$angezeigtes_stsem"; + $link= APP_ROOT."index.ci.php/extensions/FHC-Core-Anwesenheiten/?stg_kz=$studiengang_kz&sem=$semester&lvid=$lvid&sem_kurzbz=$angezeigtes_stsem&nav=false"; $menu[]=array ( - 'id'=>'core_menu_anwesenheitslisten', - 'position'=>'40', - 'name'=> $name, - 'icon'=>'../../../skin/images/button_listen.png', + 'id'=>'core_menu_digitale_anwesenheitslisten', + 'position'=>'50', + 'name'=> $p->t('lehre/digiAnw'), + 'icon'=>'../../../skin/images/button_kreuzerltool.png', 'link'=>$link, 'text'=>$text ); @@ -268,7 +266,7 @@ function checkZeilenUmbruch() $menu[]=array ( 'id'=>'core_menu_feedback', - 'position'=>'50', + 'position'=>'60', 'name'=>$p->t('lehre/feedback'), 'icon'=>'../../../skin/images/button_feedback.png', 'link'=>'feedback.php?lvid='.$lvid, diff --git a/locale/de-AT/lehre.php b/locale/de-AT/lehre.php index c5be73401..cdab4c12a 100644 --- a/locale/de-AT/lehre.php +++ b/locale/de-AT/lehre.php @@ -16,6 +16,7 @@ $this->phrasen['lehre/upload']='Upload'; $this->phrasen['lehre/ziparchiv']='Zip-Archiv'; $this->phrasen['lehre/ziparchivTitle']='Alle Dateien im Download Verzeichnis als Zip-Archiv herunterladen'; $this->phrasen['lehre/anwesenheitsUndNotenlisten']='Anwesenheits- und Notenlisten'; +$this->phrasen['lehre/digiAnw']='Digitale Anwesenheiten'; $this->phrasen['lehre/leistungsuebersicht']='Leistungsübersicht'; $this->phrasen['lehre/newsgroups']='Newsgroups'; $this->phrasen['lehre/feedback']='Feedback'; diff --git a/locale/en-US/lehre.php b/locale/en-US/lehre.php index e8a78c38b..cba02e08c 100644 --- a/locale/en-US/lehre.php +++ b/locale/en-US/lehre.php @@ -16,6 +16,7 @@ $this->phrasen['lehre/upload']='Upload'; $this->phrasen['lehre/ziparchiv']='Zip-File'; $this->phrasen['lehre/ziparchivTitle']='Download all Files as Zip-File'; $this->phrasen['lehre/anwesenheitsUndNotenlisten']='Attendance and grade list'; +$this->phrasen['lehre/digiAnw']='Digital Attendances'; $this->phrasen['lehre/leistungsuebersicht']='Performance List'; $this->phrasen['lehre/newsgroups']='Newsgroups'; $this->phrasen['lehre/feedback']='Feedback'; diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 354b12fde..31624abdf 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -25821,6 +25821,26 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'missingParameters', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Unvollständige Parameterübergabe', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Parameters are missing', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'anwesenheiten', 'category' => 'global', @@ -26521,6 +26541,66 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'anwInfoKeineTermineGefunden', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Keine Termine zum LV-Teil gefunden!', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No dates found for teaching unit!', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'lehre', + 'phrase' => 'digiAnw', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Digitale Anwesenheiten', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Digital Attendances', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'anwNotizUpdated', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Notiz wurde erfolgreich bearbeitet.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Note has been edited sucessfully', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ) // FHC-CORE-ANWESENHEITEN END ); From 630d2659b365822bef29cd458f3e745b6a121619 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 15 Jul 2024 17:38:13 +0200 Subject: [PATCH 25/38] extension/anwesenheit_assistenz -> extension/anw_ent_admin; removed hardocoded status; check for overlapping excuse timespans; and a lot more ;) --- public/js/components/Form/Upload/Dms.js | 11 ++- system/phrasesupdate.php | 107 ++++++++++++++++++++++-- 2 files changed, 110 insertions(+), 8 deletions(-) diff --git a/public/js/components/Form/Upload/Dms.js b/public/js/components/Form/Upload/Dms.js index fe58fa74b..83fab90f6 100644 --- a/public/js/components/Form/Upload/Dms.js +++ b/public/js/components/Form/Upload/Dms.js @@ -11,7 +11,11 @@ export default { id: String, name: String, inputClass: [String, Array, Object], - noList: Boolean + noList: Boolean, + accept: { + type: String, + default: '' + } }, methods: { stringifyFile(file) { @@ -71,10 +75,11 @@ export default { this.$emit('update:modelValue', dt.files); } }, + template: `
- -
    + +
    • {{ file.name }} diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 29815f1f2..cae3fa258 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -25060,7 +25060,6 @@ array( ) ) ), - // FHC-CORE-ANWESENHEITEN BEGIN array( 'app' => 'anwesenheiten', 'category' => 'global', @@ -25144,7 +25143,27 @@ array( array( 'app' => 'anwesenheiten', 'category' => 'global', - 'phrase' => 'entschuldigungAngenommen', + 'phrase' => 'abgelehnt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Abgelehnt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'declined', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'entschuldigungAkzeptiert', 'insertvon' => 'system', 'phrases' => array( array( @@ -25161,6 +25180,26 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'akzeptiert', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Akzeptiert', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'accepted', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'anwesenheiten', 'category' => 'global', @@ -25175,7 +25214,27 @@ array( ), array( 'sprache' => 'English', - 'text' => 'excuse note open', + 'text' => 'excuse note status open', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'hochgeladen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Hochgeladen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'uploaded', 'description' => '', 'insertvon' => 'system' ) @@ -25441,6 +25500,26 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'entschuldigungAutoEmailBetreff', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Entschuldigung zur Befreiung der Anwesenheitspflicht: Neues Dokument wurde hochgeladen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Excuse note for digital attendances - a new document has been uploaded.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'anwesenheiten', 'category' => 'global', @@ -26960,8 +27039,26 @@ array( 'insertvon' => 'system' ) ) - ) - // FHC-CORE-ANWESENHEITEN END + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'errorInvalidFiletype', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Ungültiges Dateiformat!', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Invalid Filetype!', + 'description' => '', + 'insertvon' => 'system' + ) + ) ), array( 'app' => 'core', From 33122a0708657be37dc5699357e8b55ba88e50d1 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 9 Sep 2024 10:49:21 +0200 Subject: [PATCH 26/38] WIP performance testing & UI upgrades --- application/views/templates/FHC-Footer.php | 3 +-- include/tw/cis_menu_lv.inc.php | 4 ++-- public/js/plugin/FhcAlert.js | 25 ++++++++++++++++------ system/phrasesupdate.php | 22 ++++++++++++++++++- 4 files changed, 42 insertions(+), 12 deletions(-) diff --git a/application/views/templates/FHC-Footer.php b/application/views/templates/FHC-Footer.php index 31e610289..34e1ee15c 100644 --- a/application/views/templates/FHC-Footer.php +++ b/application/views/templates/FHC-Footer.php @@ -176,5 +176,4 @@ - - + \ No newline at end of file diff --git a/include/tw/cis_menu_lv.inc.php b/include/tw/cis_menu_lv.inc.php index f42543817..529c1aa5a 100644 --- a/include/tw/cis_menu_lv.inc.php +++ b/include/tw/cis_menu_lv.inc.php @@ -247,7 +247,7 @@ function checkZeilenUmbruch() $link=''; $text=''; - $link= APP_ROOT."index.ci.php/extensions/FHC-Core-Anwesenheiten/?stg_kz=$studiengang_kz&sem=$semester&lvid=$lvid&sem_kurzbz=$angezeigtes_stsem&nav=false"; + $link= APP_ROOT."index.ci.php/extensions/FHC-Core-Anwesenheiten/?stg_kz=$studiengang_kz&sem=$semester&lvid=$lvid&sem_kurzbz=$angezeigtes_stsem"; $menu[]=array ( @@ -604,4 +604,4 @@ function isDirectoryEmpty($DOC_ROOT, $kurzbz, $semester, $short_short_name, $typ } ?> - + \ No newline at end of file diff --git a/public/js/plugin/FhcAlert.js b/public/js/plugin/FhcAlert.js index eb6516820..ac5adba02 100644 --- a/public/js/plugin/FhcAlert.js +++ b/public/js/plugin/FhcAlert.js @@ -208,15 +208,26 @@ export default { helperAppInstance.$refs.alert.add({ severity: 'error', summary: 'Systemfehler', detail: message}); }, confirmDelete() { + return confirm({ + group: 'fhcAlertConfirm', + header: 'Achtung', + message: 'Möchten Sie sicher löschen?', + acceptLabel: 'Löschen', + acceptClass: 'btn btn-danger', + rejectLabel: 'Abbrechen', + rejectClass: 'btn btn-outline-secondary', + }) + }, + confirm(options) { return new Promise((resolve, reject) => { helperAppInstance.$confirm.require({ - group: 'fhcAlertConfirm', - header: 'Achtung', - message: 'Möchten Sie sicher löschen?', - acceptLabel: 'Löschen', - acceptClass: 'btn btn-danger', - rejectLabel: 'Abbrechen', - rejectClass: 'btn btn-outline-secondary', + group: options?.group ?? 'fhcAlertConfirm', + header: options?.header ?? 'Achtung', + message: options?.message ?? 'Möchten', + acceptLabel: options?.acceptLabel ?? 'Ok', + acceptClass: options?.acceptClass ?? 'btn btn-primary', + rejectLabel: options?.rejectLabel ?? 'Abbrechen', + rejectClass: options?.rejectClass ?? 'btn btn-outline-secondary', accept() { resolve(true); }, diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index cae3fa258..9063bfcde 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -27060,6 +27060,26 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'anwCountTermin', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anwesend am gewählten Termin', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Attending at date', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'global', @@ -28623,4 +28643,4 @@ foreach ($phrases as $phrase) } if(!$new) - echo 'Keine neuen Phrasen
      '; + echo 'Keine neuen Phrasen
      '; \ No newline at end of file From a2e4704223f854e4d5e51188cb7ce3a7f17b2601 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Fri, 20 Sep 2024 13:12:50 +0200 Subject: [PATCH 27/38] developing new components in lektor ui for ux improvements; anw function now explicitely in extension schema --- public/js/plugin/FhcApi.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/js/plugin/FhcApi.js b/public/js/plugin/FhcApi.js index 2c7e9e267..fdc3bbadb 100644 --- a/public/js/plugin/FhcApi.js +++ b/public/js/plugin/FhcApi.js @@ -47,9 +47,8 @@ export default { return result; } const baseURL = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/"; - console.log(baseURL) const fhcApiAxios = axios.create({ - timeout: 5000, + timeout: 500000, baseURL: FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/" }); From ce058df3a5fc74af6d9ac6b1b675a936f4bdcc11 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 30 Sep 2024 17:25:51 +0200 Subject: [PATCH 28/38] =?UTF-8?q?Student=20Component=20Performance=20Fix?= =?UTF-8?q?=20(dont=20subquery=20person=20and=20anwesenheiten=5Fuser=20tab?= =?UTF-8?q?le=20on=20every=20anw=5Fuser=20row,=20just=20do=20the=20entschu?= =?UTF-8?q?ldigung=20offen/abgelehnt=20logic=20in=20client=20before=20rend?= =?UTF-8?q?ering);=20entschuldigung=20tab=20route;=20pagination=20on=20stu?= =?UTF-8?q?dent=20entschuldigung=20page=20aswell;=20added=20config=20for?= =?UTF-8?q?=20einheiten=20l=C3=A4nge=20to=20calculate/show;=20mitarbeiter?= =?UTF-8?q?=20selection=20in=20case=20of=20admin=20&=20lektor=20in=20same?= =?UTF-8?q?=20account=20behaving=20as=20expected;=20added=20index=20creati?= =?UTF-8?q?on=20to=20initial=20sql=20scripts;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/phrasesupdate.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 5c9450f37..37364985d 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -27175,6 +27175,26 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'anteil', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anteil', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Percentage', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'anwesenheiten', 'category' => 'global', From ed6eb18c4d6fc47cb1dc2c0c271fe4f3f07c2796 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Wed, 2 Oct 2024 18:04:30 +0200 Subject: [PATCH 29/38] fetch termine from vw_stundenplan, not tbl_stundenplan; LE_ID DD chagned to refs (WIP MA_UID DD & Termin DD); removed console.logs(); fhcAlert fix; now find closest termin with absolute value of timeDiff; --- public/js/plugin/FhcAlert.js | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/public/js/plugin/FhcAlert.js b/public/js/plugin/FhcAlert.js index 6266512a0..2f3d8974a 100644 --- a/public/js/plugin/FhcAlert.js +++ b/public/js/plugin/FhcAlert.js @@ -208,22 +208,30 @@ export default { helperAppInstance.$refs.alert.add({ severity: 'error', summary: 'Systemfehler', detail: message}); }, confirmDelete() { - return confirm({ - group: 'fhcAlertConfirm', - header: 'Achtung', - message: 'Möchten Sie sicher löschen?', - acceptLabel: 'Löschen', - acceptClass: 'btn btn-danger', - rejectLabel: 'Abbrechen', - rejectClass: 'btn btn-outline-secondary', - }) + return new Promise((resolve, reject) => { + helperAppInstance.$confirm.require({ + group: 'fhcAlertConfirm', + header: 'Achtung', + message: 'Möchten Sie sicher löschen?', + acceptLabel: 'Löschen', + acceptClass: 'btn btn-danger', + rejectLabel: 'Abbrechen', + rejectClass: 'btn btn-outline-secondary', + accept() { + resolve(true); + }, + reject() { + resolve(false); + }, + }); + }); }, confirm(options) { return new Promise((resolve, reject) => { helperAppInstance.$confirm.require({ group: options?.group ?? 'fhcAlertConfirm', header: options?.header ?? 'Achtung', - message: options?.message ?? 'Möchten', + message: options?.message ?? '', acceptLabel: options?.acceptLabel ?? 'Ok', acceptClass: options?.acceptClass ?? 'btn btn-primary', rejectLabel: options?.rejectLabel ?? 'Abbrechen', @@ -406,4 +414,4 @@ export default { }; app.config.globalProperties.$fhcAlert = $fhcAlert; } -} +} \ No newline at end of file From 008bbedd9857416cc2cf563f4e097111725ec8e4 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 7 Oct 2024 16:22:27 +0200 Subject: [PATCH 30/38] phrase --- system/phrasesupdate.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 03a14915b..69cb6f56b 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -26095,6 +26095,9 @@ array( ) ) ), + // + // DIGITALE ANWESENHEITEN PHRASEN BEGIN + // array( 'app' => 'anwesenheiten', 'category' => 'global', @@ -27578,7 +27581,7 @@ array( array( 'app' => 'anwesenheiten', 'category' => 'global', - 'phrase' => 'anteil', + 'phrase' => 'anteilAnw', 'insertvon' => 'system', 'phrases' => array( array( @@ -28135,6 +28138,9 @@ array( ) ) ), + // + // DIGITALE ANWESENHEITEN PHRASEN END + // array( 'app' => 'core', 'category' => 'global', From 9be5dc3f731d1260b1ca610010b34634365b5d46 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Thu, 10 Oct 2024 09:47:40 +0200 Subject: [PATCH 31/38] phrasen; tooltips; --- system/phrasesupdate.php | 48 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 69cb6f56b..60b79531e 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -27106,7 +27106,7 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Entschuldigung hinzufügen!', + 'text' => 'Entschuldigung hinzufügen', 'description' => '', 'insertvon' => 'system' ), @@ -28001,18 +28001,18 @@ array( array( 'app' => 'anwesenheiten', 'category' => 'global', - 'phrase' => 'showAllDates', + 'phrase' => 'showAllKontrollen', 'insertvon' => 'system', 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Alle Termine anzeigen', + 'text' => 'Alle Kontrollen anzeigen', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'Show All Dates', + 'text' => 'Show All Attendance Checks', 'description' => '', 'insertvon' => 'system' ) @@ -28138,6 +28138,46 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'minuten', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Minuten', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'minutes', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'einheiten', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Einheiten', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'units', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), // // DIGITALE ANWESENHEITEN PHRASEN END // From c67e78d1351635c290a8a94bbfeab508262bf024 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 14 Oct 2024 10:42:49 +0200 Subject: [PATCH 32/38] phrasen rewording; formatter change; fix save changed anwesenheiten StudentByLvaComponent.js; --- system/phrasesupdate.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 60b79531e..008d2901d 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -28041,18 +28041,18 @@ array( array( 'app' => 'anwesenheiten', 'category' => 'global', - 'phrase' => 'anwInfoKeineTermineGefunden', + 'phrase' => 'anwInfoKeineKontrollenGefunden', 'insertvon' => 'system', 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Keine Termine zum LV-Teil gefunden!', + 'text' => 'Keine Kontrollen zum LV-Teil gefunden!', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'No dates found for teaching unit!', + 'text' => 'No digital attendance checks found for teaching unit!', 'description' => '', 'insertvon' => 'system' ) From a04b2725f98fd794c721820ee979ae45f9dfdd64 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Thu, 17 Oct 2024 15:04:03 +0200 Subject: [PATCH 33/38] csv download lektor table as is; cis_menu_lv link hidden behind berechtigungen check; every tabulator now calculates remaining height by accessing window.visibleViewport.height and tabulator dataset element in order to get virtual DOM behaviour for faster rendering and better UX; filter component now emits uuid on created() lifecycle; --- include/tw/cis_menu_lv.inc.php | 6 +++++- public/js/components/filter/Filter.js | 6 ++++-- system/phrasesupdate.php | 20 ++++++++++++++++++++ 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/include/tw/cis_menu_lv.inc.php b/include/tw/cis_menu_lv.inc.php index 529c1aa5a..6906bcc0f 100644 --- a/include/tw/cis_menu_lv.inc.php +++ b/include/tw/cis_menu_lv.inc.php @@ -241,7 +241,11 @@ function checkZeilenUmbruch() } // Digitale Anwesenheiten - if(CIS_LEHRVERANSTALTUNG_ANWESENHEIT_ANZEIGEN && $angemeldet) + if(CIS_LEHRVERANSTALTUNG_ANWESENHEIT_ANZEIGEN && $angemeldet + && ($rechte->isBerechtigt('extension/anw_ent_admin') + || $rechte->isBerechtigt('extension/anwesenheit_lektor') + || $rechte->isBerechtigt('extension/anwesenheit_student') + || $rechte->isBerechtigt('extension/anwesenheit_admin'))) { $link=''; diff --git a/public/js/components/filter/Filter.js b/public/js/components/filter/Filter.js index 047764609..6a668112c 100644 --- a/public/js/components/filter/Filter.js +++ b/public/js/components/filter/Filter.js @@ -42,7 +42,8 @@ export const CoreFilterCmpt = { }, emits: [ 'nwNewEntry', - 'click:new' + 'click:new', + 'uuidDefined' ], props: { onNwNewEntry: Function, // NOTE(chris): Hack to get the nwNewEntry listener into $props @@ -568,6 +569,7 @@ export const CoreFilterCmpt = { if (this.sideMenu && (!this.$props.onNwNewEntry || !(this.$props.onNwNewEntry instanceof Function))) alert('"nwNewEntry" listener is mandatory when sideMenu is true'); this.uuid = _uuid++; + this.$emit('uuidDefined', this.uuid) if (!this.tableOnly) this.getFilter(); // get the filter data }, @@ -658,4 +660,4 @@ export const CoreFilterCmpt = {
      ` -}; +}; \ No newline at end of file diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 008d2901d..b260d728c 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -28178,6 +28178,26 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'prestudentID', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Prestudent ID', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Prestudent ID', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), // // DIGITALE ANWESENHEITEN PHRASEN END // From 7ce426abc294efc4ba1092272918b2fcfeedc77c Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Fri, 18 Oct 2024 15:14:13 +0200 Subject: [PATCH 34/38] tooltip css fix; added missing phrase; --- system/phrasesupdate.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index b260d728c..61f1c5f83 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -28198,6 +28198,26 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'allowedEntschuldigungFileTypes', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Erlaubte Dateitypen sind .pdf, .png und .jpg.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Allowed file types are .pdf, .png und .jpg.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), // // DIGITALE ANWESENHEITEN PHRASEN END // From 32137479e9d58a293a77d387f55c95454c4c5d27 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Thu, 24 Oct 2024 15:07:08 +0200 Subject: [PATCH 35/38] activate email to assistenz on upload; redraw table in case of tabulator scroll bug; navigation.php $root var for Cis4 preperation --- application/config/navigation.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/application/config/navigation.php b/application/config/navigation.php index d57cd697a..2327513ad 100644 --- a/application/config/navigation.php +++ b/application/config/navigation.php @@ -1,6 +1,12 @@ array( 'fhcomplete' => array( @@ -50,7 +56,7 @@ $config['navigation_header'] = array( 'requiredPermissions' => 'basis/vilesci:r', 'children' => array( 'cis' => array( - 'link' => CIS_ROOT, + 'link' => $root, 'icon' => '', 'description' => 'CIS', 'sort' => 10 @@ -223,7 +229,7 @@ $config['navigation_menu']['organisation/Reihungstest/index'] = array( 'target' => '_blank' ), 'auswertung' => array( - 'link' => CIS_ROOT.'/cis/testtool/admin/auswertung.php', + 'link' => $root.'/cis/testtool/admin/auswertung.php', 'description' => 'Auswertung', 'icon' => 'list-alt', 'sort' => 1, @@ -319,5 +325,4 @@ $config['navigation_menu']['system/issues/Issues/*'] = array( 'target' => '_blank', 'requiredPermissions' => array('admin:rw') ), -); - +); \ No newline at end of file From 74cf0ad173bc7c6228f7454bf1ae329d6bae4987 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Fri, 25 Oct 2024 15:58:37 +0200 Subject: [PATCH 36/38] use vue header & tooltip translations --- system/phrasesupdate.php | 156 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 0f37857d4..15fc4fe45 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -28218,6 +28218,162 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'tooltipStudentEntschuldigung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Sie können eine Entschuldigung für einen Zeitraum von bis zu {0} Tagen in die Vergangenheit und bis zum Ende des aktuellen Semesters hochladen. Die erlaubten Dateitypen für das Dokument sind .pdf, .png und .jpg. + + Sobald Sie eine Entschuldigung hochladen wird die zugehörige Studiengangsassistenz informiert und Ihr Anliegen überprüft. Solange Ihre Entschuldigung noch keinen akzeptierten oder abgelehnten Status erhalten hat, steht es Ihnen frei diese inklusive Datei zu löschen. Sobald sie entweder akzeptiert oder abgelehnt wurde können Sie den Eintrag nichtmehr löschen. + + Bei einer akzeptierten Entschuldigung werden sämtliche digitalen Anwesenheiten in diesem Zeitraum als positiv gewertet. Eine abgelehnte Entschuldigung hat keine Auswirkungen auf ihre Anwesenheitsquote.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'You can upload an excuse for a period of up to {0} days in the past and up to the end of the current semester. The permitted file types for the document are .pdf, .png and .jpg. + + As soon as you upload an excuse, the relevant study program assistant will be informed and your request will be reviewed. As long as your excuse has not yet received an accepted or rejected status, you are free to delete this file including it. Once it has either been accepted or rejected, you can no longer delete the entry. + + If an excuse is accepted, all digital attendance during this period is counted as positive. A rejected excuse has no effect on your attendance rate.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'tooltipStudentAnwesenheit', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Hier sehen Sie sämtliche digitale Anwesenheiten zugeordnet nach Lehrveranstaltung. Sie können eine positive Anwesenheit erreichen, indem Sie den während einer laufenden Anwesenheitskontrolle gültigen Zugangscode eintragen. Sie können hierfür den angezeigten QR Code scannen, welcher Sie entsprechend weiterleitet oder Sie können den Code manuell eingeben. + + Sollte es Ihnen technisch nicht möglich sein einen Zugangscode einzugeben, können Sie die unterrichtende Person bitten Ihre digitale Anwesenheit zu setzen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Here you can see all digital attendances assigned to the course. You can achieve positive attendance by entering the access code that is valid during an ongoing attendance check. You can do this by scanning the QR code displayed, which will redirect you accordingly, or you can enter the code manually. + + If it is not technically possible for you to enter an access code, you can ask the person teaching you to set your digital attendance.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'tooltipStudentAssistenz', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Im Entschuldigungsmanagement können Sie als Studiengangsassistenz beziehungsweise als Administrator die von Studenten hochgeladenen Entschuldigungsdokumente überprüfen und den Status entsprechend vergeben. + + Bitte beachten Sie dass nur Entschuldigungen INNERHALB des angegebenen Zeitraumes angezeigt werden. Sollten Sie nach einer lang wirken Entschuldigung suchen, müssen Sie die Zeitspanne entsprechend weit setzen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'In the excuse management, you as a course assistant or administrator can check the excuse documents uploaded by students and assign the status accordingly. + + Please note that only excuses WITHIN the specified time period are displayed. If you are looking for a long-lasting excuse, you must set the time period accordingly.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'tooltipLektorDeleteKontrolle', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Sollten Sie eine Anwesenheitskontrolle fälschlicherweise gestartet haben, können Sie diese löschen wenn sie nicht älter als {0} Tage ist. Dabei werden sämtliche mit dieser Kontrolle verknüpfte Anwesenheitseinträge Ihrer Studenten ebenfalls gelöscht und Ihre Anwesenheitsquoten neu berechnet. + + Sollten Sie eine Kontrolle, welche älter als {0} Tage ist, löschen wollen, wenden Sie sich an einen Administrator.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'If you have started an attendance check by mistake, you can delete it if it is not older than {0} days. All attendance entries of your students linked to this check will also be deleted and your attendance rates will be recalculated. + + If you want to delete a check that is older than {0} days, contact an administrator.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'tooltipLektorStartKontrolle', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Um eine Anwesenheitskontrolle für Ihre ausgewählte Unterrichtsgruppe durchzuführen, wählen Sie bitte einen Termin aus dem Stundenplan aus oder geben händisch die gewünschte Gültigkeitkeitsdauer der Kontrolle an. + + Die Gültigkeitsdauer bestimmt die Gewichtung der Anwesenheit in Relation zum Gesamtausmaß, sie können diese aber nach eigenem Ermessen anpassen und müssen sich nicht streng an die Termine im Stundenplan halten. + + Sie können pro Datum und Unterrichtsgruppe eine Anwesenheitskontrolle pro Tag eröffnen, welche jedoch beliebig oft aufgerufen und von Studenten eingecheckt werden kann. Es gelten dabei ihre zuletzt eingetragenen Zeiten. Ein Student muss nur einmal am Tag pro Gruppe einchecken um als anwesend registriert zu sein, egal wie oft Sie die Kontrolle starten.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'To carry out an attendance check for your selected class group, please select a date from the timetable or manually enter the desired validity period of the check. + + The validity period determines the weighting of attendance in relation to the overall extent, but you can adjust this at your own discretion and do not have to stick strictly to the dates in the timetable. + + You can open one attendance check per day for each date and class group, which can be called up and checked in by students as often as you like. The times they last entered apply. A student only has to check in once a day per group to be registered as present, regardless of how often you start the check.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'tooltipStudentByLva', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'In dieser Detailansicht können Sie einzelne Anwesenheiten eines Studenten bearbeiten, falls ein anwesender Student aus technischen Gründen den Zugangscode nicht eingeben kann. Ebenso steht es Ihnen frei Studenten auszutragen, welche nicht anwesend sind aber den Zugangscode mit Hilfe von anwesenden Studenten erhalten haben. + + Falls eine Anwesenheit durch eine akzeptierte Entschuldigung entstanden ist, können Sie den Status nicht verändern. + + Es steht Ihnen frei die Anwesenheitseinträge mit Notiztexten zu versehen, welche dem Studenten nicht zugänglich sind.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'In this detailed view, you can edit individual attendances of a student if a student who is present cannot enter the access code for technical reasons. You are also free to remove students who are not present but have received the access code with the help of students who are present. + + If an attendance was made due to an accepted excuse, you cannot change the status. + + You are free to add notes to the attendance entries that are not accessible to the student.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), // // DIGITALE ANWESENHEITEN PHRASEN END // From ec9e73180df11034cba58c2abe23bb90df6c4d75 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Tue, 29 Oct 2024 15:13:00 +0100 Subject: [PATCH 37/38] primevue custom tooltip directive zIndex config retrieval fix; studentByLva tabulator height calc abort if no dataTable rendered; phrases fix; --- system/phrasesupdate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 15fc4fe45..196f654ec 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -28273,7 +28273,7 @@ array( array( 'app' => 'anwesenheiten', 'category' => 'global', - 'phrase' => 'tooltipStudentAssistenz', + 'phrase' => 'tooltipAssistenz', 'insertvon' => 'system', 'phrases' => array( array( From 96335a79798a81b199146c9461aa6a47eb8b0bf2 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 11 Nov 2024 09:56:43 +0100 Subject: [PATCH 38/38] moved email template to fhtw addon; einheiten column visibility default false since pausen are not represented; backend code cleanup; phrase fix; --- application/libraries/FilterCmptLib.php | 7 ++- system/checksystem.php | 24 +++++----- system/phrasesupdate.php | 62 ++++++++++++++++++++++++- 3 files changed, 76 insertions(+), 17 deletions(-) diff --git a/application/libraries/FilterCmptLib.php b/application/libraries/FilterCmptLib.php index cd934d1ae..c1a2b47cb 100644 --- a/application/libraries/FilterCmptLib.php +++ b/application/libraries/FilterCmptLib.php @@ -177,7 +177,7 @@ class FilterCmptLib $session = $this->getSession(); // If session is NOT empty -> a filter was already loaded - if (false && $session != null) + if ($session != null) { // Retrieve the filterId stored in the session $sessionFilterId = $this->_getSessionElement(FilterCmptLib::FILTER_ID); @@ -221,7 +221,7 @@ class FilterCmptLib } // If the session is empty -> first time that this filter is loaded - if (true || $session == null) + if ($session == null) { // Load filter definition data from DB $definition = $this->_loadDefinition( @@ -1173,5 +1173,4 @@ class FilterCmptLib return $filterName; } -} - +} \ No newline at end of file diff --git a/system/checksystem.php b/system/checksystem.php index 2439e3c3b..4af8bc56d 100644 --- a/system/checksystem.php +++ b/system/checksystem.php @@ -37,17 +37,17 @@ echo ' '; -//if (php_sapi_name() != 'cli') -//{ -// $uid = get_uid(); -// $rechte = new benutzerberechtigung(); -// $rechte->getBerechtigungen($uid); -// -// if(!$rechte->isBerechtigt('admin')) -// { -// exit('Sie haben keine Berechtigung'); -// } -//} +if (php_sapi_name() != 'cli') +{ + $uid = get_uid(); + $rechte = new benutzerberechtigung(); + $rechte->getBerechtigungen($uid); + + if(!$rechte->isBerechtigt('admin')) + { + exit('Sie haben keine Berechtigung'); + } +} echo '

      Systemcheck!

      '; echo '

      DB-Updates!

      '; @@ -374,4 +374,4 @@ if($neue==false) echo '
      Keine neuen Webservicerechte'; echo ''; -?> +?> \ No newline at end of file diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 196f654ec..6dda8a8e9 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -28218,6 +28218,66 @@ array( ) ) ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'notAuthorizedForLva', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Keine Berechtigung für die Lehrveranstaltung.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No Authorization for that Course.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'notAuthorizedForLe', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Keine Berechtigung für die Lehreinheit.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No Authorization for that Teaching Unit.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'anwesenheiten', + 'category' => 'global', + 'phrase' => 'noAuthorization', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Keine Berechtigung.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No Authorization.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'anwesenheiten', 'category' => 'global', @@ -28280,7 +28340,7 @@ array( 'sprache' => 'German', 'text' => 'Im Entschuldigungsmanagement können Sie als Studiengangsassistenz beziehungsweise als Administrator die von Studenten hochgeladenen Entschuldigungsdokumente überprüfen und den Status entsprechend vergeben. - Bitte beachten Sie dass nur Entschuldigungen INNERHALB des angegebenen Zeitraumes angezeigt werden. Sollten Sie nach einer lang wirken Entschuldigung suchen, müssen Sie die Zeitspanne entsprechend weit setzen.', + Bitte beachten Sie dass nur Entschuldigungen INNERHALB des angegebenen Zeitraumes angezeigt werden. Sollten Sie nach einer lang wirkenden Entschuldigung suchen, müssen Sie die Zeitspanne entsprechend weit setzen.', 'description' => '', 'insertvon' => 'system' ),