mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 00:42:15 +00:00
Merge branch 'master' into feature-25999/C4
This commit is contained in:
@@ -121,7 +121,7 @@ class AntragLib
|
||||
public function unpauseAntrag($antrag_id, $insertvon)
|
||||
{
|
||||
if ($insertvon == Studierendenantragstatus_model::INSERTVON_DEREGISTERED)
|
||||
return error($this->p->t('studierendenantrag', 'error_no_right'));
|
||||
return error($this->_ci->p->t('studierendenantrag', 'error_no_right'));
|
||||
if ($insertvon == Studierendenantragstatus_model::INSERTVON_ABMELDUNGSTGL) {
|
||||
return $this->_ci->StudierendenantragstatusModel->resumeAntraegeForAbmeldungStgl($antrag_id);
|
||||
}
|
||||
@@ -257,18 +257,28 @@ class AntragLib
|
||||
if (isError($result))
|
||||
$errors[] = getError($result);
|
||||
|
||||
$this->_ci->load->model('crm/Statusgrund_model', 'StatusgrundModel');
|
||||
$result = $this->_ci->StatusgrundModel->loadWhere(['statusgrund_kurzbz' => 'abbrecherStud']);
|
||||
if (isError($result)) {
|
||||
$errors[] = getError($result);
|
||||
continue;
|
||||
} elseif (!hasData($result)) {
|
||||
$errors[] = $this->_ci->p->t('lehre', 'error_noStatusgrund', ['statusgrund_kurzbz' => 'abbrecherStud']);
|
||||
continue;
|
||||
}
|
||||
$statusgrund = current(getData($result));
|
||||
|
||||
$result = $this->_ci->prestudentlib->setAbbrecher(
|
||||
$antrag->prestudent_id,
|
||||
$antrag->studiensemester_kurzbz,
|
||||
$insertvon,
|
||||
'abbrecherStud',
|
||||
$statusgrund->statusgrund_id,
|
||||
$antrag->datum,
|
||||
$insertam
|
||||
);
|
||||
if (isError($result))
|
||||
{
|
||||
if (isError($result)) {
|
||||
$errors[] = getError($result);
|
||||
return $errors;
|
||||
continue;
|
||||
}
|
||||
|
||||
$result = $this->_ci->PersonModel->loadPrestudent($antrag->prestudent_id);
|
||||
@@ -421,11 +431,20 @@ class AntragLib
|
||||
// NOTE(chris): here we should have error handling but at the
|
||||
// moment there is no way to notify the user for "soft" errors
|
||||
|
||||
$this->_ci->load->model('crm/Statusgrund_model', 'StatusgrundModel');
|
||||
$result = $this->_ci->StatusgrundModel->loadWhere(['statusgrund_kurzbz' => 'abbrecherStgl']);
|
||||
if (isError($result))
|
||||
return $result;
|
||||
if (!hasData($result))
|
||||
return error($this->_ci->p->t('lehre', 'error_noStatusgrund', ['statusgrund_kurzbz' => 'abbrecherStgl']));
|
||||
|
||||
$statusgrund = current(getData($result));
|
||||
|
||||
$result = $this->_ci->prestudentlib->setAbbrecher(
|
||||
$antrag->prestudent_id,
|
||||
$antrag->studiensemester_kurzbz,
|
||||
$insertvon,
|
||||
'abbrecherStgl',
|
||||
$statusgrund->statusgrund_id,
|
||||
$status->insertamum
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user