mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-26 00:54:27 +00:00
Leitungsansicht Autocomplete 1st draft
This commit is contained in:
@@ -532,7 +532,7 @@ class Studiengang_model extends DB_Model
|
||||
*
|
||||
* @return stdClass
|
||||
*/
|
||||
public function getAktivePrestudenten($studiengang_kzs, $not_antrag_typ = null)
|
||||
public function getAktivePrestudenten($studiengang_kzs, $not_antrag_typ = null, $query = null)
|
||||
{
|
||||
$this->load->config('studierendenantrag');
|
||||
|
||||
@@ -571,6 +571,21 @@ class Studiengang_model extends DB_Model
|
||||
$this->db->group_end();
|
||||
}
|
||||
|
||||
if ($query) {
|
||||
$query = explode(' ', $query);
|
||||
$this->db->group_start();
|
||||
foreach ($query as $q) {
|
||||
$this->db->group_start();
|
||||
$this->db->where('pers.vorname ILIKE', "%" . $q . "%");
|
||||
$this->db->or_where('pers.nachname ILIKE', "%" . $q . "%");
|
||||
$this->db->or_where($this->dbTable . '.bezeichnung ILIKE', "%" . $q . "%");
|
||||
if (is_numeric($q))
|
||||
$this->db->or_where('p.prestudent_id', $q);
|
||||
$this->db->group_end();
|
||||
}
|
||||
$this->db->group_end();
|
||||
}
|
||||
|
||||
return $this->load();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user