From 73244df019f925315c33ab298fdb497a176b3ca9 Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Tue, 11 Nov 2025 12:41:20 +0100 Subject: [PATCH] Projektabgaben Uebersicht: added comments, changed placehoder search text, added phrase --- .../v1/education/PaabgabeUebersicht.php | 20 +++++-------------- .../models/education/Paabgabe_model.php | 17 ++++++++++++++++ .../ProjektabgabeUebersicht.js | 12 +++++++---- system/phrasesupdate.php | 20 +++++++++++++++++++ 4 files changed, 50 insertions(+), 19 deletions(-) diff --git a/application/controllers/api/frontend/v1/education/PaabgabeUebersicht.php b/application/controllers/api/frontend/v1/education/PaabgabeUebersicht.php index 31b7a27fb..13824d6df 100644 --- a/application/controllers/api/frontend/v1/education/PaabgabeUebersicht.php +++ b/application/controllers/api/frontend/v1/education/PaabgabeUebersicht.php @@ -46,9 +46,7 @@ class PaabgabeUebersicht extends FHCAPI_Controller } /** - * - * - * @return array|stdClass|null + * Get Projektabgaben for search criteria. */ public function getPaAbgaben() { @@ -71,9 +69,7 @@ class PaabgabeUebersicht extends FHCAPI_Controller } /** - * - * - * @return array|stdClass|null + * Get all Studiengänge for which user is entitled for */ public function getStudiengaenge() { @@ -94,9 +90,7 @@ class PaabgabeUebersicht extends FHCAPI_Controller } /** - * - * - * @return array|stdClass|null + * Get projekt work due dates, depending on search criteria. */ public function getTermine() { @@ -111,9 +105,7 @@ class PaabgabeUebersicht extends FHCAPI_Controller } /** - * - * - * @return array|stdClass|null + * Get all submission types. */ public function getPaAbgabetypen() { @@ -129,9 +121,7 @@ class PaabgabeUebersicht extends FHCAPI_Controller } /** - * - * @param - * @return object success or error + * Download zip files with project works matching submission search criteria. */ public function downloadZip() { diff --git a/application/models/education/Paabgabe_model.php b/application/models/education/Paabgabe_model.php index 2598e79f1..d0feb7f3a 100644 --- a/application/models/education/Paabgabe_model.php +++ b/application/models/education/Paabgabe_model.php @@ -61,6 +61,16 @@ class Paabgabe_model extends DB_Model return $this->execReadOnlyQuery($qry, array($person_id)); } + /** + * Gets project submissions for search criteria. + * @param array $projekttyp_kurzbz_arr contains all relevant project types (e.g. Bachelor) + * @param int $studiengang_kz study program + * @param string $abgabetyp_kurzbz project submission type (e.g. end upload, intermediate submission) + * @param string $abgabedatum due date for hand-in + * @param string $personSearchString for searching by person, i.e. name, uid, person/prestudent id + * @param int $limit limiting max number of results if search criteria is not precise enough + * @return object + */ public function getPaAbgaben( $projekttyp_kurzbz_arr, $studiengang_kz = null, @@ -171,6 +181,13 @@ class Paabgabe_model extends DB_Model return $this->execReadOnlyQuery($qry, $params); } + /** + * Gets due dates for projekt submission search criteria. + * @param array $projekttyp_kurzbz_arr contains all relevant project types (e.g. Bachelor) + * @param int $studiengang_kz study program + * @param string $abgabetyp_kurzbz project submission type (e.g. end upload, intermediate submission) + * @return object + */ public function getTermine($projekttyp_kurzbz_arr, $studiengang_kz, $abgabetyp_kurzbz) { $params = []; diff --git a/public/js/components/Cis/ProjektabgabeUebersicht/ProjektabgabeUebersicht.js b/public/js/components/Cis/ProjektabgabeUebersicht/ProjektabgabeUebersicht.js index b14f6ff16..4a36339a8 100644 --- a/public/js/components/Cis/ProjektabgabeUebersicht/ProjektabgabeUebersicht.js +++ b/public/js/components/Cis/ProjektabgabeUebersicht/ProjektabgabeUebersicht.js @@ -103,7 +103,6 @@ export const ProjektabgabeUebersicht = { { title: "in Visual Library", field: 'in_visual_library', - widthGrow: 1, formatter: (cell) => { return cell.getValue() ? this.$p.t('ui/ja') : this.$p.t('ui/nein'); } @@ -135,6 +134,7 @@ export const ProjektabgabeUebersicht = { this.$refs.paabgabeTable.tabulator.setData(this.abgaben); }, + // set placeholder text for no data table setNoDataPlaceholder() { this.$refs.paabgabeTable.tabulatorOptions.placeholder = this.$p.t('global/noDataAvailable'); }, @@ -176,13 +176,17 @@ export const ProjektabgabeUebersicht = { //~ // TODO: router push //~ }, async setupMounted() { + + // load data for dropdowns this.loadStudiengaenge(); this.loadPaabgabeTypes(); this.loadTermine(); + // wait for table to build this.tableBuiltPromise = new Promise(this.tableResolve); await this.tableBuiltPromise; + // data placeholder after table built so phrases are available this.setNoDataPlaceholder(); //this.loadPaAbgaben(); @@ -206,8 +210,8 @@ export const ProjektabgabeUebersicht = { //~ '_blank' //~ ); }, - actionDownloadZip(ev) { - console.log(ev); + // download zip file with all searched submission files + actionDownloadZip() { const url = new URL(FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router +'/api/frontend/v1/education/PaabgabeUebersicht/downloadZip'); @@ -297,7 +301,7 @@ export const ProjektabgabeUebersicht = { type="text" name="person-search" class="form-control" - :placeholder="'name, uid, person ID, prestudent ID'" + :placeholder="'name/uid/person ID/prestudent ID'" :disabled="!personSearchEnabled" v-on:keyup.enter="loadPaAbgaben" v-model="personSearchString" diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 4cbef80c7..e9831cce2 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -49984,6 +49984,26 @@ I have been informed that I am under no obligation to consent to the transmissio ) ), //**************************** CIS Projektabgabeuebersicht start + array( + 'app' => 'core', + 'category' => 'abgabetool', + 'phrase' => 'projektabgabeUebersicht', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Projektabgabe Übersicht', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Project work submission overview', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'abgabetool',