prestudentstatus check: added personenkennzeichen semester check

This commit is contained in:
Alexei Karpenko
2026-06-10 11:17:42 +02:00
parent 2a49a19069
commit a03ba291d0
2 changed files with 120 additions and 32 deletions
@@ -425,6 +425,29 @@ class Status extends FHCAPI_Controller
''
);
return $this->getDataOrTerminateWithError($result);
}],
['wrong_personenkennzeichen', function () use (
$isBerechtigtNoStudstatusCheck,
$prestudent_id,
$status_kurzbz,
$datum,
$studiensemester_kurzbz,
$ausbildungssemester
) {
if ($isBerechtigtNoStudstatusCheck)
return true; // Skip if access right says so
$result = $this->prestudentstatuschecklib->checkPersonenkennzeichen(
$prestudent_id,
$status_kurzbz,
$datum,
$studiensemester_kurzbz,
$ausbildungssemester,
'',
''
);
return $this->getDataOrTerminateWithError($result);
}]
], [
@@ -434,7 +457,8 @@ class Status extends FHCAPI_Controller
'history_laststatus' => $this->p->t('lehre', 'error_endstatus'),
'history_unterbrecher' => $this->p->t('lehre', 'error_consecutiveUnterbrecher'),
'history_abbrecher' => $this->p->t('lehre', 'error_consecutiveUnterbrecherAbbrecher'),
'history_diplomant' => $this->p->t('lehre', 'error_consecutiveDiplomandStudent')
'history_diplomant' => $this->p->t('lehre', 'error_consecutiveDiplomandStudent'),
'wrong_personenkennzeichen' => $this->p->t('lehre', 'error_personenkennzeichenPasstNichtZuStudiensemester')
]);
if (!$this->form_validation->run())
@@ -1031,15 +1055,40 @@ class Status extends FHCAPI_Controller
''
);
return $this->getDataOrTerminateWithError($result);
}],
['wrong_personenkennzeichen', function () use (
$isBerechtigtNoStudstatusCheck,
$prestudent_id,
$status_kurzbz,
$datum,
$studiensemester_kurzbz,
$ausbildungssemester
) {
if ($isBerechtigtNoStudstatusCheck)
return true; // Skip if access right says so
$result = $this->prestudentstatuschecklib->checkPersonenkennzeichen(
$prestudent_id,
$status_kurzbz,
new DateTime($datum),
$studiensemester_kurzbz,
$ausbildungssemester,
'',
''
);
return $this->getDataOrTerminateWithError($result);
}]
], [
'rolle_doesnt_exist' => $this->p->t('lehre', 'error_rolleBereitsVorhanden'),
'history_timesequence' => $this->p->t('lehre', 'error_statuseintrag_zeitabfolge'),
'history_laststatus' => $this->p->t('lehre', 'error_endstatus'),
'history_unterbrecher' => $this->p->t('lehre', 'error_consecutiveUnterbrecher'),
'history_abbrecher' => $this->p->t('lehre', 'error_consecutiveUnterbrecherAbbrecher'),
'history_diplomant' => $this->p->t('lehre', 'error_consecutiveDiplomandStudent')
'history_diplomant' => $this->p->t('lehre', 'error_consecutiveDiplomandStudent'),
'wrong_personenkennzeichen' => $this->p->t('lehre', 'error_personenkennzeichenPasstNichtZuStudiensemester')
]);
if (!$this->form_validation->run())
@@ -1339,6 +1388,31 @@ class Status extends FHCAPI_Controller
$key_ausbildungssemester
);
return $this->getDataOrTerminateWithError($result);
}],
['wrong_personenkennzeichen', function () use (
$isBerechtigtNoStudstatusCheck,
$prestudent_id,
$status_kurzbz,
$datum,
$studiensemester_kurzbz,
$ausbildungssemester,
$key_studiensemester_kurzbz,
$key_ausbildungssemester
) {
if ($isBerechtigtNoStudstatusCheck)
return true; // Skip if access right says so
$result = $this->prestudentstatuschecklib->checkPersonenkennzeichen(
$prestudent_id,
$status_kurzbz,
new DateTime($datum),
$studiensemester_kurzbz,
$ausbildungssemester,
$key_studiensemester_kurzbz,
$key_ausbildungssemester
);
return $this->getDataOrTerminateWithError($result);
}]
], [
@@ -1347,7 +1421,8 @@ class Status extends FHCAPI_Controller
'history_laststatus' => $this->p->t('lehre', 'error_endstatus'),
'history_unterbrecher' => $this->p->t('lehre', 'error_consecutiveUnterbrecher'),
'history_abbrecher' => $this->p->t('lehre', 'error_consecutiveUnterbrecherAbbrecher'),
'history_diplomant' => $this->p->t('lehre', 'error_consecutiveDiplomandStudent')
'history_diplomant' => $this->p->t('lehre', 'error_consecutiveDiplomandStudent'),
'wrong_personenkennzeichen' => $this->p->t('lehre', 'error_personenkennzeichenPasstNichtZuStudiensemester')
]);
if (!$this->form_validation->run())