diff --git a/application/controllers/Cis/Abgabetool.php b/application/controllers/Cis/Abgabetool.php
index 1895f7472..269496738 100644
--- a/application/controllers/Cis/Abgabetool.php
+++ b/application/controllers/Cis/Abgabetool.php
@@ -14,7 +14,7 @@ class Abgabetool extends Auth_Controller
{
parent::__construct([
'index' => self::PERM_LOGGED,
- 'getStudentProjektarbeitAbgabeFile' => self::PERM_LOGGED,
+ 'getStudentProjektarbeitAbgabeFile' => array('basis/abgabe_student:rw', 'basis/abgabe_lektor:rw', 'basis/abgabe_assistenz:rw'),
'Mitarbeiter' => self::PERM_LOGGED,
'Student' => self::PERM_LOGGED,
'Deadlines' => self::PERM_LOGGED
diff --git a/application/controllers/api/frontend/v1/Abgabe.php b/application/controllers/api/frontend/v1/Abgabe.php
index d0b39d35c..f95655a1d 100644
--- a/application/controllers/api/frontend/v1/Abgabe.php
+++ b/application/controllers/api/frontend/v1/Abgabe.php
@@ -287,18 +287,24 @@ class Abgabe extends FHCAPI_Controller
private function signaturFehltEmail($student_uid) {
$this->load->model('crm/Student_model', 'StudentModel');
- $this->load->model('education/Studiengang_model', 'StudiengangModel');
+ $this->load->model('organisation/Studiengang_model', 'StudiengangModel');
+
+ $this->StudentModel->addJoin('public.tbl_benutzer', 'ON (public.tbl_benutzer.uid = public.tbl_student.student_uid)');
+ $this->StudentModel->addJoin('public.tbl_person', 'person_id');
+
+// $this->StudentModel->load($student_uid); -> this loads all students for some reason
+ $result = $this->StudentModel->loadWhere(array('student_uid' => $student_uid));
+ $this->StudentModel->resetQuery();
- $result = $this->StudentModel->load($student_uid);
$studentArr = $this->getDataOrTerminateWithError($result);
-
+
if(count($studentArr) > 0) {
$student = $studentArr[0];
} else {
$this->terminateWithError($this->p->t('global','userNichtGefunden'), 'general');
}
-
- $result = $this->Studiengang_model->load($student->studiengang_kz);
+
+ $result = $this->StudiengangModel->load($student->studiengang_kz);
$studiengangArr = $this->getDataOrTerminateWithError($result);
if(count($studiengangArr) > 0) {
@@ -341,7 +347,6 @@ class Abgabe extends FHCAPI_Controller
$this->terminateWithError($this->p->t('global','projektarbeitNichtGefunden'), 'general');
}
- $this->load->model('education/Projektarbeit_model', 'ProjektarbeitModel');
$projektarbeitIsCurrent = $this->ProjektarbeitModel->projektarbeitIsCurrent($projektarbeit_id);
if(!$projektarbeitIsCurrent) {
$this->terminateWithError($this->p->t('abgabetool','c4fehlerAktualitaetProjektarbeit'), 'general');
diff --git a/public/js/api/factory/abgabe.js b/public/js/api/factory/abgabe.js
index 0b6a0cb03..c51da95fe 100644
--- a/public/js/api/factory/abgabe.js
+++ b/public/js/api/factory/abgabe.js
@@ -36,11 +36,9 @@ export default {
};
},
getStudentProjektarbeitAbgabeFile(paabgabe_id, student_uid) {
- // TODO: check if this is fine with new api scheme
-
const url = `/Cis/Abgabetool/getStudentProjektarbeitAbgabeFile?paabgabe_id=${paabgabe_id}&student_uid=${student_uid}`;
- window.location = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + url
+ window.open(FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + url)
},
getMitarbeiterProjektarbeiten(all) {
return {
diff --git a/public/js/components/Cis/Abgabetool/AbgabeMitarbeiterDetail.js b/public/js/components/Cis/Abgabetool/AbgabeMitarbeiterDetail.js
index 3e5a6717d..08fc74e04 100644
--- a/public/js/components/Cis/Abgabetool/AbgabeMitarbeiterDetail.js
+++ b/public/js/components/Cis/Abgabetool/AbgabeMitarbeiterDetail.js
@@ -420,7 +420,7 @@ export const AbgabeMitarbeiterDetail = {
-
+
@@ -530,9 +530,9 @@ export const AbgabeMitarbeiterDetail = {
{{$p.t('abgabetool/c4abgabedatum')}}
diff --git a/public/js/components/Cis/Abgabetool/AbgabeStudentDetail.js b/public/js/components/Cis/Abgabetool/AbgabeStudentDetail.js
index 5c5d88ecc..ead8154b0 100644
--- a/public/js/components/Cis/Abgabetool/AbgabeStudentDetail.js
+++ b/public/js/components/Cis/Abgabetool/AbgabeStudentDetail.js
@@ -52,21 +52,54 @@ export const AbgabeStudentDetail = {
return false
}
- // TODO: refine these
+ // TODO: define these
if(endupload) {
- // check these input fields for length of entry ? standard fallback '' anyways
-
- // this.form['abstract']
- // this.form['abstract_en']
- // this.form['schlagwoerter']
- // this.form['schlagwoerter_en']
- // this.form['seitenanzahl']
-
- if(this.form['abstract'].length < 10 && await this.$fhcAlert.confirm({
- message: 'Abstract is very short, wirklich speichern?',
- acceptLabel: 'Verstanden und Fortfahren',
+ // check these input fields for length of entry
+ if(this.form['abstract'].length < 100 && await this.$fhcAlert.confirm({
+ message: this.$p.t('abgabetool/warningShortAbstract'),
+ acceptLabel: this.$p.t('abgabetool/c4AcceptAndProceed'),
acceptClass: 'btn btn-danger',
- rejectLabel: 'Zurück',
+ rejectLabel: this.$p.t('abgabetool/c4Cancel'),
+ rejectClass: 'btn btn-outline-secondary'
+ }) === false) {
+ return false
+ }
+
+ if(this.form['abstract_en'].length < 100 && await this.$fhcAlert.confirm({
+ message: this.$p.t('abgabetool/warningShortAbstractEn'),
+ acceptLabel: this.$p.t('abgabetool/c4AcceptAndProceed'),
+ acceptClass: 'btn btn-danger',
+ rejectLabel: this.$p.t('abgabetool/c4Cancel'),
+ rejectClass: 'btn btn-outline-secondary'
+ }) === false) {
+ return false
+ }
+
+ if(this.form['schlagwoerter'].length < 50 && await this.$fhcAlert.confirm({
+ message: this.$p.t('abgabetool/warningShortSchlagwoerter'),
+ acceptLabel: this.$p.t('abgabetool/c4AcceptAndProceed'),
+ acceptClass: 'btn btn-danger',
+ rejectLabel: this.$p.t('abgabetool/c4Cancel'),
+ rejectClass: 'btn btn-outline-secondary'
+ }) === false) {
+ return false
+ }
+
+ if(this.form['schlagwoerter_en'].length < 50 && await this.$fhcAlert.confirm({
+ message: this.$p.t('abgabetool/warningShortSchlagwoerterEn'),
+ acceptLabel: this.$p.t('abgabetool/c4AcceptAndProceed'),
+ acceptClass: 'btn btn-danger',
+ rejectLabel: this.$p.t('abgabetool/c4Cancel'),
+ rejectClass: 'btn btn-outline-secondary'
+ }) === false) {
+ return false
+ }
+
+ if(this.form['seitenanzahl'] <= 5 && await this.$fhcAlert.confirm({
+ message: this.$p.t('abgabetool/warningSmallSeitenanzahl'),
+ acceptLabel: this.$p.t('abgabetool/c4AcceptAndProceed'),
+ acceptClass: 'btn btn-danger',
+ rejectLabel: this.$p.t('abgabetool/c4Cancel'),
rejectClass: 'btn btn-outline-secondary'
}) === false) {
return false
@@ -159,13 +192,13 @@ export const AbgabeStudentDetail = {
},
handleUploadRes(res, termin) {
if(res.meta.status == "success") {
- this.$fhcAlert.alertSuccess('File erfolgreich hochgeladen')
+ this.$fhcAlert.alertSuccess(this.$p.t('abgabetool/c4fileUploadSuccess'))
// update 'abgabedatum' for successful upload -> shows the pdf icon and date once set
termin.abgabedatum = new Date().toISOString().split('T')[0];
} else {
- this.$fhcAlert.alertError('File upload error')
+ this.$fhcAlert.alertError(this.$p.t('abgabetool/c4fileUploadError'))
}
if(res.meta.signaturInfo) {
@@ -316,7 +349,7 @@ export const AbgabeStudentDetail = {
-
+
{{$p.t('abgabetool/c4abgabekurzbz')}}
@@ -327,9 +360,9 @@ export const AbgabeStudentDetail = {
{{$p.t('abgabetool/c4abgabedatum')}}
diff --git a/public/js/components/Cis/Abgabetool/AbgabetoolMitarbeiter.js b/public/js/components/Cis/Abgabetool/AbgabetoolMitarbeiter.js
index 89c9b4fda..0d60234b9 100644
--- a/public/js/components/Cis/Abgabetool/AbgabetoolMitarbeiter.js
+++ b/public/js/components/Cis/Abgabetool/AbgabetoolMitarbeiter.js
@@ -391,6 +391,10 @@ export const AbgabetoolMitarbeiter = {
this.setupMounted()
},
template: `
+
+
+
+
@@ -487,13 +491,6 @@ export const AbgabetoolMitarbeiter = {
{{ $p.t('abgabetool/showDeadlines') }}
-
- {{ $p.t('abgabetool/currentlySaving') }}
-
-
- {{ $p.t('abgabetool/currentlyLoading') }}
-
-
diff --git a/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js b/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js
index f1d284452..9aa9032b7 100644
--- a/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js
+++ b/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js
@@ -48,7 +48,7 @@ export const AbgabetoolStudent = {
let qgate2Passed = false
termine.forEach(t => {
- const noteOption = this.notenOptions.find(opt => opt.note == t.note)
+ const noteOption = this.notenOptions?.find(opt => opt.note == t.note)
if(noteOption && noteOption.positiv) {
if(t.paabgabetyp_kurzbz == 'qualgate1') {
qgate1Passed = true
@@ -196,12 +196,15 @@ export const AbgabetoolStudent = {
} else return ''
},
getNoteBezeichnung(projektarbeit) {
- if(projektarbeit.note) {
+ if(projektarbeit.note && this.notenOptions) {
const noteOpt = this.notenOptions.find(opt => opt.note == projektarbeit.note)
return noteOpt?.bezeichnung
} else {
return ''
}
+ },
+ handleDownloadBeurteilung(projektarbeit) {
+ window.open(projektarbeit.beurteilung)
}
},
watch: {
@@ -212,9 +215,10 @@ export const AbgabetoolStudent = {
return this.student_uid !== this.viewData.uid
}
},
- created() {
+ async created() {
+ this.loading = true
//TODO: SWITCH TO NOTEN API ONCE NOTENTOOL IS IN MASTER TO AVOID DUPLICATE API
- this.$api.call(ApiAbgabe.getNoten()).then(res => {
+ await this.$api.call(ApiAbgabe.getNoten()).then(res => {
this.notenOptions = res.data
}).catch(e => {
this.loading = false
@@ -272,7 +276,9 @@ export const AbgabetoolStudent = {
{{$p.t('abgabetool/c4beurteilung')}}
diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php
index 8a0f2f42f..3b19bb00a 100644
--- a/system/phrasesupdate.php
+++ b/system/phrasesupdate.php
@@ -33898,6 +33898,46 @@ array(
)
)
),
+ array(
+ 'app' => 'anwesenheiten',
+ 'category' => 'global',
+ 'phrase' => 'c4fileUploadSuccess',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Datei erfolgreich hochgeladen!',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'File upload successful',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'anwesenheiten',
+ 'category' => 'global',
+ 'phrase' => 'c4fileUploadError',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Fehler beim hochladen der Datei!',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'File upload error!',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
array(
'app' => 'anwesenheiten',
'category' => 'global',
@@ -41944,7 +41984,7 @@ array(
'phrases' => array(
array(
'sprache' => 'German',
- 'text' => "Betreuer",
+ 'text' => "BetreuerIn",
'description' => '',
'insertvon' => 'system'
),
@@ -42004,7 +42044,7 @@ array(
'phrases' => array(
array(
'sprache' => 'German',
- 'text' => "Dokumentabgabe - Studentenbereich",
+ 'text' => "Dokumentabgabe - Studierendenbereich",
'description' => '',
'insertvon' => 'system'
),
@@ -42664,7 +42704,7 @@ array(
'phrases' => array(
array(
'sprache' => 'German',
- 'text' => "Studentenansicht",
+ 'text' => "Studierendenansicht",
'description' => '',
'insertvon' => 'system'
),
@@ -42844,13 +42884,13 @@ array(
'phrases' => array(
array(
'sprache' => 'German',
- 'text' => "Möchten Sie w",
+ 'text' => "Möchten Sie wirklich Löschen?",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
- 'text' => 'No projects found!',
+ 'text' => 'Do you really want to delete?',
'description' => '',
'insertvon' => 'system'
)
@@ -42924,7 +42964,7 @@ array(
'phrases' => array(
array(
'sprache' => 'German',
- 'text' => "Emailkontakt Betreuer",
+ 'text' => "Emailkontakt BetreuerIn",
'description' => '',
'insertvon' => 'system'
),
@@ -42956,6 +42996,26 @@ array(
)
)
),
+ array(
+ 'app' => 'core',
+ 'category' => 'abgabetool',
+ 'phrase' => 'c4downloadBeurteilung',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => "Beurteilung herunterladen",
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Download Evaluation',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
array(
'app' => 'core',
'category' => 'abgabetool',
@@ -42976,6 +43036,86 @@ array(
)
)
),
+ array(
+ 'app' => 'core',
+ 'category' => 'abgabetool',
+ 'phrase' => 'c4AcceptAndProceed',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => "Akzeptieren und Fortfahren",
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Accept and proceed',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'abgabetool',
+ 'phrase' => 'c4Cancel',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => "Abbrechen",
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Cancel',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'abgabetool',
+ 'phrase' => 'c4downloadAbgabe',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => "Abgabe herunterladen",
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Download Abgabe',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'abgabetool',
+ 'phrase' => 'warningShortAbstract',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => "Ihr Abstract ist sehr kurz, möchten Sie den Endupload trotzdem durchführen?",
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Your abstract is very short. Would you still like to complete the final upload?',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
array(
'app' => 'core',
'category' => 'abgabetool',