download files with window.open instead of window.location; fix signature mail student_modal info loading; check length of every entry field when doing endupload and force user to accept or cancel upon notification; berechtigung check für Abgabetool.php controller; phrasen everywhere;

This commit is contained in:
Johann Hoffmann
2025-10-06 13:58:26 +02:00
parent dab34eff35
commit 1e23b6de61
8 changed files with 230 additions and 51 deletions
@@ -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');