diff --git a/application/libraries/FilterCmptLib.php b/application/libraries/FilterCmptLib.php index 8b13ae3e5..c1a2b47cb 100644 --- a/application/libraries/FilterCmptLib.php +++ b/application/libraries/FilterCmptLib.php @@ -565,6 +565,7 @@ class FilterCmptLib getAuthPersonId() ); + // If filters were loaded if (hasData($filters)) { @@ -1172,5 +1173,4 @@ class FilterCmptLib return $filterName; } -} - +} \ No newline at end of file diff --git a/application/views/templates/FHC-Footer.php b/application/views/templates/FHC-Footer.php index dd27fe5e6..bf3475a04 100644 --- a/application/views/templates/FHC-Footer.php +++ b/application/views/templates/FHC-Footer.php @@ -177,5 +177,4 @@ - - + \ No newline at end of file diff --git a/config/global.config-default.inc.php b/config/global.config-default.inc.php index b945a15d2..6c3e401c5 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..6906bcc0f 100644 --- a/include/tw/cis_menu_lv.inc.php +++ b/include/tw/cis_menu_lv.inc.php @@ -240,13 +240,37 @@ function checkZeilenUmbruch() ); } + // Digitale Anwesenheiten + 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=''; + $text=''; + + $link= APP_ROOT."index.ci.php/extensions/FHC-Core-Anwesenheiten/?stg_kz=$studiengang_kz&sem=$semester&lvid=$lvid&sem_kurzbz=$angezeigtes_stsem"; + + $menu[]=array + ( + 'id'=>'core_menu_digitale_anwesenheitslisten', + 'position'=>'50', + 'name'=> $p->t('lehre/digiAnw'), + 'icon'=>'../../../skin/images/button_kreuzerltool.png', + 'link'=>$link, + 'text'=>$text + ); + } + //FEEDBACK if((!defined('CIS_LEHRVERANSTALTUNG_FEEDBACK_ANZEIGEN') || CIS_LEHRVERANSTALTUNG_FEEDBACK_ANZEIGEN) && $angemeldet) { $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, @@ -584,4 +608,4 @@ function isDirectoryEmpty($DOC_ROOT, $kurzbz, $semester, $short_short_name, $typ } ?> - + \ No newline at end of file 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/public/js/components/Form/Upload/Dms.js b/public/js/components/Form/Upload/Dms.js index 47ba168fb..a8548fe53 100644 --- a/public/js/components/Form/Upload/Dms.js +++ b/public/js/components/Form/Upload/Dms.js @@ -16,7 +16,11 @@ export default { id: String, name: String, inputClass: [String, Array, Object], - noList: Boolean + noList: Boolean, + accept: { + type: String, + default: '' + } }, methods: { stringifyFile(file) { @@ -84,8 +88,8 @@ export default { }, template: `
- -
` -} +} \ No newline at end of file diff --git a/public/js/components/filter/Filter.js b/public/js/components/filter/Filter.js index cff692c21..1508fb72a 100644 --- a/public/js/components/filter/Filter.js +++ b/public/js/components/filter/Filter.js @@ -43,7 +43,8 @@ export const CoreFilterCmpt = { emits: [ 'nwNewEntry', 'click:new', - 'tableBuilt' + 'tableBuilt', + 'uuidDefined' ], props: { onNwNewEntry: Function, // NOTE(chris): Hack to get the nwNewEntry listener into $props @@ -200,16 +201,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; @@ -573,6 +574,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 }, @@ -664,4 +666,3 @@ export const CoreFilterCmpt = {
` }; - diff --git a/public/js/plugin/FhcAlert.js b/public/js/plugin/FhcAlert.js index a2d9e3ceb..d280117ca 100644 --- a/public/js/plugin/FhcAlert.js +++ b/public/js/plugin/FhcAlert.js @@ -227,6 +227,25 @@ export default { }); }); }, + confirm(options) { + return new Promise((resolve, reject) => { + helperAppInstance.$confirm.require({ + group: options?.group ?? 'fhcAlertConfirm', + header: options?.header ?? 'Achtung', + message: options?.message ?? '', + acceptLabel: options?.acceptLabel ?? 'Ok', + acceptClass: options?.acceptClass ?? 'btn btn-primary', + rejectLabel: options?.rejectLabel ?? 'Abbrechen', + rejectClass: options?.rejectClass ?? 'btn btn-outline-secondary', + accept() { + resolve(true); + }, + reject() { + resolve(false); + }, + }); + }); + }, alertDefault(severity, title, message, sticky = false) { let options = { severity: severity, summary: title, detail: message}; diff --git a/public/js/plugin/FhcApi.js b/public/js/plugin/FhcApi.js index 88d2ac919..0c51de53b 100644 --- a/public/js/plugin/FhcApi.js +++ b/public/js/plugin/FhcApi.js @@ -46,9 +46,9 @@ export default { result.meta.response = response; return result; } - + const baseURL = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/"; const fhcApiAxios = axios.create({ - timeout: 5000, + timeout: 500000, baseURL: FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/" }); @@ -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,7 +96,7 @@ 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( @@ -107,7 +107,7 @@ export default { }, error => { if (error.code == 'ERR_CANCELED') return Promise.reject({...{handled: true}, ...error}); - + if (error.config?.errorHandling == 'off' || error.config?.errorHandling === false || error.config?.errorHandling == 'success') @@ -118,7 +118,7 @@ export default { app.config.globalProperties.$fhcAlert.alertDefault('error', error.message, error.request.responseURL, true); 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) @@ -132,7 +132,7 @@ export default { app.config.globalProperties.$fhcAlert.alertError(error.message); return Promise.reject({...{handled: true}, ...error}); } - + return Promise.reject(error); }); diff --git a/system/checksystem.php b/system/checksystem.php index bdc14c9d3..4af8bc56d 100644 --- a/system/checksystem.php +++ b/system/checksystem.php @@ -374,4 +374,4 @@ if($neue==false) echo '
Keine neuen Webservicerechte'; echo ''; -?> +?> \ No newline at end of file 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 0221cf7c8..5d08f0e96 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -31224,6 +31224,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', @@ -31279,7 +31339,7 @@ array( array( 'app' => 'anwesenheiten', 'category' => 'global', - 'phrase' => 'tooltipStudentAssistenz', + 'phrase' => 'tooltipAssistenz', 'insertvon' => 'system', 'phrases' => array( array( @@ -37181,4 +37241,4 @@ foreach ($phrases as $phrase) } if(!$new) - echo 'Keine neuen Phrasen
'; \ No newline at end of file + echo 'Keine neuen Phrasen
';