From 259a3c218a6ef8e468c018c60a3c862141abe331 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Mon, 27 May 2024 14:57:18 +0200 Subject: [PATCH] Funktionalitaet feature-39602 --- .../controllers/Studentenverwaltung.php | 4 +- .../api/frontend/v1/stv/Status.php | 3 +- application/models/crm/Prestudent_model.php | 4 +- .../js/components/Stv/Studentenverwaltung.js | 1 + .../Details/Prestudent/MultiStatus.js | 27 ++++++++++++- system/phrasesupdate.php | 40 +++++++++++++++++++ 6 files changed, 72 insertions(+), 7 deletions(-) diff --git a/application/controllers/Studentenverwaltung.php b/application/controllers/Studentenverwaltung.php index 0c27f3aba..75faf2cba 100644 --- a/application/controllers/Studentenverwaltung.php +++ b/application/controllers/Studentenverwaltung.php @@ -26,8 +26,8 @@ class Studentenverwaltung extends FHC_Controller 'assistenz_stgs' => $this->permissionlib->getSTG_isEntitledFor('assistenz'), 'admin' => $this->permissionlib->isBerechtigt('admin'), 'assistenz_schreibrechte' => $this->permissionlib->isBerechtigt('assistenz','suid'), - 'student/keine_studstatuspruefung' => $this->permissionlib->isBerechtigt('student/keine_studstatuspruefung') - + 'student/keine_studstatuspruefung' => $this->permissionlib->isBerechtigt('student/keine_studstatuspruefung'), + 'lehre/reihungstestAufsicht' => $this->permissionlib->isBerechtigt('lehre/reihungstestAufsicht') ], 'variables' => [ 'semester_aktuell' => $this->variablelib->getVar('semester_aktuell') diff --git a/application/controllers/api/frontend/v1/stv/Status.php b/application/controllers/api/frontend/v1/stv/Status.php index 768e8e196..f85780141 100644 --- a/application/controllers/api/frontend/v1/stv/Status.php +++ b/application/controllers/api/frontend/v1/stv/Status.php @@ -484,8 +484,9 @@ class Status extends FHCAPI_Controller $isBerechtigtAdmin = $this->permissionlib->isBerechtigt('admin', null, 'suid'); $isBerechtigtNoStudstatusCheck = $this->permissionlib->isBerechtigt('student/keine_studstatuspruefung', null, 'suid'); + $isBerechtigtToDeleteAbgewiesen = $this->permissionlib->isBerechtigt('lehre/reihungstestAufsicht') && $status_kurzbz == "Abgewiesener"; - if(!$this->permissionlib->isBerechtigt('admin', 'suid', $stg) && !$this->permissionlib->isBerechtigt('assistenz', 'suid', $stg)) + if(!$this->permissionlib->isBerechtigt('admin', 'suid', $stg) && !$this->permissionlib->isBerechtigt('assistenz', 'suid', $stg) && !$isBerechtigtToDeleteAbgewiesen) { return $this->terminateWithError($this->p->t('lehre','error_keineSchreibrechte'), self::ERROR_TYPE_GENERAL); } diff --git a/application/models/crm/Prestudent_model.php b/application/models/crm/Prestudent_model.php index 0b198bb7d..109abafe3 100644 --- a/application/models/crm/Prestudent_model.php +++ b/application/models/crm/Prestudent_model.php @@ -764,9 +764,9 @@ class Prestudent_model extends DB_Model ps.updatevon FROM public.tbl_prestudentstatus ps - JOIN + LEFT JOIN public.tbl_student st USING (prestudent_id) - JOIN + LEFT JOIN public.tbl_studiengang sg ON (st.studiengang_kz = sg.studiengang_kz) LEFT JOIN lehre.tbl_studienplan sp USING (studienplan_id) diff --git a/public/js/components/Stv/Studentenverwaltung.js b/public/js/components/Stv/Studentenverwaltung.js index 2fe6c9713..5b4b117c5 100644 --- a/public/js/components/Stv/Studentenverwaltung.js +++ b/public/js/components/Stv/Studentenverwaltung.js @@ -54,6 +54,7 @@ export default { hasSchreibrechtAss: this.permissions['assistenz_schreibrechte'], hasAdminPermission: this.permissions['admin'], hasPermissionToSkipStatusCheck: this.permissions['student/keine_studstatuspruefung'], + hasPermissionRtAufsicht: this.permissions['lehre/reihungstestAufsicht'], lists: this.lists, defaultSemester: this.defaultSemester, $reloadList: () => { diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js index b1badff91..a0eb81491 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js @@ -39,6 +39,10 @@ export default{ from: 'hasSchreibrechtAss', default: false }, + hasPermissionRtAufsicht: { + from: 'hasPermissionRtAufsicht', + default: false + }, $reloadList: { from: '$reloadList', required: true @@ -96,6 +100,10 @@ export default{ }, hasPermissionCurrentStg(){ return this.arrayStg.includes(this.studiengang_kz); + }, + isStatusBeforeStudent(){ + let isStatusStudent = ['Student', 'Absolvent', 'Diplomand']; + return !isStatusStudent.includes(this.statusData.status_kurzbz); } }, props: { @@ -669,6 +677,7 @@ export default{ mounted(){}, template: `
+ @@ -828,11 +837,15 @@ export default{ + -
- {{$p.t('bismeldestichtag', 'meldestichtag_erreicht')}} +
+ {{$p.t('bismeldestichtag', 'info_MeldestichtagStatusgrund')}} +
+
+ {{$p.t('bismeldestichtag', 'info_MeldestichtagStatusgrundSemester')}}
@@ -866,7 +879,9 @@ export default{ type="select" name="studiensemester_kurzbz" v-model="statusData['studiensemester_kurzbz']" + :disabled="statusData.datum < dataMeldestichtag" > +
@@ -879,6 +894,7 @@ export default{ type="select" name="ausbildungssemester" v-model="statusData['ausbildungssemester']" + :disabled="statusData.datum < dataMeldestichtag && !isStatusBeforeStudent" > @@ -897,6 +913,7 @@ export default{ format="dd.MM.yyyy" preview-format="dd.MM.yyyy" :teleport="true" + :disabled="statusData.datum < dataMeldestichtag" >
@@ -912,6 +929,7 @@ export default{ format="dd.MM.yyyy" preview-format="dd.MM.yyyy" :teleport="true" + :disabled="statusData.datum < dataMeldestichtag" > @@ -927,6 +945,7 @@ export default{ format="dd.MM.yyyy" preview-format="dd.MM.yyyy" :teleport="true" + :disabled="statusData.datum < dataMeldestichtag" > @@ -937,6 +956,7 @@ export default{ type="select" name="studienplan" v-model="statusData['studienplan_id']" + :disabled="statusData.datum < dataMeldestichtag" > @@ -949,6 +969,7 @@ export default{ type="text" name="anmerkung" v-model="statusData['anmerkung']" + :disabled="statusData.datum < dataMeldestichtag" > @@ -961,6 +982,7 @@ export default{ type="select" name="aufnahmestufe" v-model="statusData['rt_stufe']" + :disabled="statusData.datum < dataMeldestichtag" > @@ -975,6 +997,7 @@ export default{ name="statusgrund" v-model="statusData['statusgrund_id']" > + diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index b923b649b..c675be789 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -28062,6 +28062,46 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'bismeldestichtag', + 'phrase' => 'info_MeldestichtagStatusgrund', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Meldestichtag erreicht - ausschließlich Bearbeiten Statusgrund möglich', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Reporting deadline reached - only editing status reason possible', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'bismeldestichtag', + 'phrase' => 'info_MeldestichtagStatusgrundSemester', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Meldestichtag erreicht - Bearbeiten Ausbildungssemester und Statusgrund möglich', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Edit education semester and status reason possible', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), );