mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Studstatus: get details without whitelist
This commit is contained in:
@@ -267,7 +267,7 @@ class Prestudentstatus_model extends DB_Model
|
||||
return $this->loadWhere($where);
|
||||
}
|
||||
|
||||
public function loadLastWithStgDetails($prestudent_id, $studiensemester_kurzbz = null)
|
||||
public function loadLastWithStgDetails($prestudent_id, $studiensemester_kurzbz = null, $max_date = null)
|
||||
{
|
||||
$this->load->config('studierendenantrag');
|
||||
|
||||
@@ -304,7 +304,8 @@ class Prestudentstatus_model extends DB_Model
|
||||
|
||||
$this->addLimit(1);
|
||||
|
||||
$this->db->where_in($this->dbTable . '.status_kurzbz', $this->config->item('antrag_prestudentstatus_whitelist'));
|
||||
if ($max_date)
|
||||
$this->db->where($this->dbTable . '.insertamum <', $max_date);
|
||||
|
||||
$whereArr = [
|
||||
$this->dbTable . '.prestudent_id' => $prestudent_id,
|
||||
|
||||
@@ -184,7 +184,11 @@ class Studierendenantrag_model extends DB_Model
|
||||
|
||||
$this->addJoin(
|
||||
'public.tbl_prestudentstatus s',
|
||||
$this->dbTable . '.prestudent_id=s.prestudent_id AND ' . $this->dbTable . '.studiensemester_kurzbz=s.studiensemester_kurzbz'
|
||||
$this->dbTable . '.prestudent_id=s.prestudent_id
|
||||
AND ' .
|
||||
$this->dbTable . '.studiensemester_kurzbz=s.studiensemester_kurzbz
|
||||
AND ' .
|
||||
$this->dbTable . '.insertamum > s.insertamum'
|
||||
);
|
||||
$this->addJoin('public.tbl_prestudent p', $this->dbTable . '.prestudent_id=p.prestudent_id');
|
||||
$this->addJoin('public.tbl_studiengang stg', 'studiengang_kz', 'LEFT');
|
||||
@@ -196,8 +200,6 @@ class Studierendenantrag_model extends DB_Model
|
||||
|
||||
$this->addLimit(1);
|
||||
|
||||
$this->db->where_in('s.status_kurzbz', $this->config->item('antrag_prestudentstatus_whitelist'));
|
||||
|
||||
return $this->loadWhere([
|
||||
$this->pk => $antrag_id
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user