diff --git a/application/controllers/api/frontend/v1/Abgabe.php b/application/controllers/api/frontend/v1/Abgabe.php index c3f1d3a45..f35ea4761 100644 --- a/application/controllers/api/frontend/v1/Abgabe.php +++ b/application/controllers/api/frontend/v1/Abgabe.php @@ -111,7 +111,7 @@ class Abgabe extends FHCAPI_Controller if(count($projektarbeitArr) > 0) { $projektarbeit = $projektarbeitArr[0]; } else { - $this->terminateWithError($this->p->t('global','projektarbeitNichtGefunden'), 'general'); + $this->terminateWithError($this->p->t('abgabetool','c4projektarbeitNichtGefunden'), 'general'); } $projektarbeitIsCurrent = false; @@ -341,7 +341,7 @@ class Abgabe extends FHCAPI_Controller if(count($projektarbeitArr) > 0) { $projektarbeit = $projektarbeitArr[0]; } else { - $this->terminateWithError($this->p->t('global','projektarbeitNichtGefunden'), 'general'); + $this->terminateWithError($this->p->t('abgabetool','c4projektarbeitNichtGefunden'), 'general'); } $this->load->model('education/Paabgabe_model', 'PaabgabeModel'); @@ -351,7 +351,7 @@ class Abgabe extends FHCAPI_Controller if(count($paabgabeArr) > 0) { $paabgabe = $paabgabeArr[0]; } else { - $this->terminateWithError($this->p->t('global','projektabgabeNichtGefunden'), 'general'); + $this->terminateWithError($this->p->t('abgabetool','c4projektabgabeNichtGefunden'), 'general'); } $this->checkAbgabeSignatur($paabgabe, $projektarbeit); @@ -743,7 +743,7 @@ class Abgabe extends FHCAPI_Controller $student = $studentArr[0]; if(!$student) { - $this->terminateWithError($this->p->t('global','userNichtGefunden'), 'general'); + $this->terminateWithError($this->p->t('abgabetool','c4userNichtGefunden'), 'general'); } $subject = $this->p->t('abgabetool', 'c4qualgateNegativEmailSubject'); @@ -902,7 +902,7 @@ class Abgabe extends FHCAPI_Controller if(count($projektarbeitArr) > 0) { $projektarbeit = $projektarbeitArr[0]; } else { - $this->terminateWithError($this->p->t('global','projektarbeitNichtGefunden'), 'general'); + $this->terminateWithError($this->p->t('abgabetool','c4projektarbeitNichtGefunden'), 'general'); } // update projektarbeit cols @@ -967,7 +967,7 @@ class Abgabe extends FHCAPI_Controller if(count($projektarbeitArr) > 0) { $projektarbeit = $projektarbeitArr[0]; } else { - $this->terminateWithError($this->p->t('global','projektarbeitNichtGefunden'), 'general'); + $this->terminateWithError($this->p->t('abgabetool','c4projektarbeitNichtGefunden'), 'general'); } $projektarbeitIsCurrent = false; @@ -1016,7 +1016,7 @@ class Abgabe extends FHCAPI_Controller $email = $this->getProjektbetreuerEmail($projektarbeit_id); - if(!$email) $this->terminateWithError($this->p->t('abgabetool', 'fehlerMailBegutachter'), 'general'); + if(!$email) $this->terminateWithError($this->p->t('abgabetool', 'c4fehlerMailBegutachter'), 'general'); $mailres = sendSanchoMail( 'ParbeitsbeurteilungEndupload', @@ -1029,7 +1029,7 @@ class Abgabe extends FHCAPI_Controller if(!$mailres) { - $this->terminateWithError($this->p->t('abgabetool', 'fehlerMailBegutachter'), 'general'); + $this->terminateWithError($this->p->t('abgabetool', 'c4fehlerMailBegutachter'), 'general'); } // 2. Begutachter mail, wenn Endabgabe, mit Token wenn extern @@ -1049,14 +1049,14 @@ class Abgabe extends FHCAPI_Controller if (!$tokenGenRes) { - $this->terminateWithError($this->p->t('abgabetool', 'fehlerMailZweitBegutachter'), 'general'); + $this->terminateWithError($this->p->t('abgabetool', 'c4fehlerMailZweitBegutachter'), 'general'); } $begutachterMitTokenRetval = getData($this->ProjektbetreuerModel->getZweitbegutachterWithToken($bperson_id, $projektarbeit_id, $studentUser->uid, $begutachter->person_id)); if (!$begutachterMitTokenRetval && count($begutachterMitTokenRetval) <= 0) { - $this->terminateWithError($this->p->t('abgabetool', 'fehlerMailZweitBegutachter'), 'general'); + $this->terminateWithError($this->p->t('abgabetool', 'c4fehlerMailZweitBegutachter'), 'general'); } $begutachterMitToken = $begutachterMitTokenRetval[0]; @@ -1090,7 +1090,7 @@ class Abgabe extends FHCAPI_Controller if (!$mailres) { - $this->terminateWithError($this->p->t('abgabetool', 'fehlerMailBegutachter'), 'general'); + $this->terminateWithError($this->p->t('abgabetool', 'c4fehlerMailBegutachter'), 'general'); } } diff --git a/public/js/components/Cis/Abgabetool/AbgabetoolMitarbeiter.js b/public/js/components/Cis/Abgabetool/AbgabetoolMitarbeiter.js index a934230ca..6752319e1 100644 --- a/public/js/components/Cis/Abgabetool/AbgabetoolMitarbeiter.js +++ b/public/js/components/Cis/Abgabetool/AbgabetoolMitarbeiter.js @@ -305,9 +305,8 @@ export const AbgabetoolMitarbeiter = { termin.note = this.allowedNotenOptions.find(opt => opt.note == termin.note) termin.file = [] - // lektoren are only allowed to edit their own deadline entries - // TODO: cis old - termin.allowedToSave = termin.insertvon == this.viewData?.uid && pa.betreuerart_kurzbz != 'Zweitbegutachter' + // update 08-01-20206: everybody is allowed to do everything in client, critical checks happen at backend level + termin.allowedToSave = true // lektoren are not allowed to delete deadlines with existing submissions termin.allowedToDelete = termin.allowedToSave && !termin.abgabedatum diff --git a/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js b/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js index 098e80e7d..730e670f0 100644 --- a/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js +++ b/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js @@ -40,8 +40,6 @@ export const AbgabetoolStudent = { phrasenResolved: false, loading: false, notenOptions: null, - domain: '', - student_uid: null, detail: null, projektarbeiten: null, selectedProjektarbeit: null @@ -155,7 +153,7 @@ export const AbgabetoolStudent = { // development purposes // termin.allowedToUpload = this.checkQualityGatesStrict(pa.abgabetermine) - // termin.allowedToUpload = true + termin.allowedToUpload = true } else if(termin.fixtermin) { termin.allowedToUpload = !this.isPastDate(termin.datum) @@ -206,19 +204,14 @@ export const AbgabetoolStudent = { } else return '-' }, buildMailToLink(projekt) { - if(projekt.mitarbeiter_uid) { // standard - return 'mailto:' + projekt.mitarbeiter_uid +'@'+ this.domain - } else { // private - return 'mailto:' + projekt.email - } + // should always be "projekt.mitarbeiter_uid +'@'+ this.domain", built in backend + return 'mailto:' + projekt.email }, buildBetreuer(abgabe) { return (abgabe.btitelpre ? abgabe.btitelpre + ' ' : '') + abgabe.bvorname + ' ' + abgabe.bnachname + (abgabe.btitelpost ? ' ' + abgabe.btitelpost : '') }, async setupData(data){ // this.projektarbeiten = data[0] - this.domain = data[1] - this.student_uid = data[2] const projektarbeiten = data[0] ?? null if(!projektarbeiten) return this.projektarbeiten = projektarbeiten.map(projekt => { @@ -246,7 +239,7 @@ export const AbgabetoolStudent = { }, loadProjektarbeiten() { - this.$api.call(ApiAbgabe.getStudentProjektarbeiten(this.student_uid_prop || this.viewData?.uid || null)) + this.$api.call(ApiAbgabe.getStudentProjektarbeiten(this.student_uid)) .then(res => { if(res?.data) this.setupData(res.data) }) @@ -295,6 +288,9 @@ export const AbgabetoolStudent = { computed: { isViewMode() { return this.student_uid !== this.viewData.uid + }, + student_uid() { + return this.student_uid_prop || this.viewData?.uid || null } }, async created() { diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index d08a72046..77a812960 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -45487,6 +45487,126 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'abgabetool', + 'phrase' => 'c4fehlerMailBegutachter', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler beim Versenden des Mails an den Erstbegutachter!', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error sending E-Mail to first Assessor!', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'abgabetool', + 'phrase' => 'c4fehlerMailZweitBegutachter', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Fehler beim Versenden des Mails an den Zweitbegutachter!', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Error sending E-Mail to second Assessor!', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'abgabetool', + 'phrase' => 'c4projektarbeitNichtGefunden', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Keine Projektarbeit gefunden.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No projekt work has been found.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'abgabetool', + 'phrase' => 'c4projektarbeitNichtGefunden', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Keine Projektarbeit gefunden.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No projekt work has been found.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'abgabetool', + 'phrase' => 'c4projektabgabeNichtGefunden', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Keine Projektabgabe gefunden.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No projekt deadline has been found.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'abgabetool', + 'phrase' => 'c4userNichtGefunden', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'User nicht gefunden.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'User not found.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'abgabetool',