Show Antrag to Student when finished

This commit is contained in:
cgfhtw
2024-02-16 13:28:26 +01:00
parent ab2fc11797
commit 658212a6eb
2 changed files with 14 additions and 0 deletions
+10
View File
@@ -1413,6 +1413,16 @@ class AntragLib
if (hasData($result))
return success(-1);
$result = $this->_ci->StudierendenantragModel->loadWithStatusWhere([
'prestudent_id' => $prestudent_id,
'typ' => Studierendenantrag_model::TYP_WIEDERHOLUNG,
'campus.get_status_studierendenantrag(studierendenantrag_id)' => Studierendenantragstatus_model::STATUS_DEREGISTERED
]);
if (isError($result))
return $result;
if (hasData($result))
return success(-1);
return success(0);
}
$result = $this->_ci->StudierendenantragModel->loadWithStatusWhere(['prestudent_id' => $prestudent_id]);
@@ -180,7 +180,11 @@ class Pruefung_model extends DB_Model
$this->addJoin('bis.tbl_orgform o', 'COALESCE(plan.orgform_kurzbz, pss.orgform_kurzbz, g.orgform_kurzbz)=o.orgform_kurzbz');
$this->addJoin('campus.tbl_studierendenantrag a', 'ps.prestudent_id=a.prestudent_id and a.typ=' . $this->escape(Studierendenantrag_model::TYP_WIEDERHOLUNG), 'LEFT');
$this->db->group_start();
$this->db->where_in("get_rolle_prestudent(ps.prestudent_id, null)", $this->config->item('antrag_prestudentstatus_whitelist'));
// NOTE(chris): If the status of the Antrag is DEREGISTERED the prestudentstatus must be Abbrecher which is not in the whitelist
$this->db->or_where("campus.get_status_studierendenantrag(a.studierendenantrag_id)", Studierendenantragstatus_model::STATUS_DEREGISTERED);
$this->db->group_end();
$this->db->where("g.aktiv", true);