Merge branch 'master' into feature-25999/C4_ma0594dev

This commit is contained in:
Simon Gschnell
2023-12-13 14:34:37 +01:00
174 changed files with 8343 additions and 2898 deletions
@@ -572,20 +572,6 @@ class Studiengang_model extends DB_Model
return $this->execQuery($query, $params);
}
public function loadWithOrgform($studiengang_kzs)
{
$sql = "SELECT index FROM public.tbl_sprache WHERE sprache='" . getUserLanguage() . "' LIMIT 1";
$this->addSelect($this->dbTable . '.*');
$this->addSelect('o.bezeichnung_mehrsprachig[(' . $sql . ')] AS orgform');
$this->addJoin('bis.tbl_orgform o', 'orgform_kurzbz');
$this->db->where_in($this->dbTable . '.studiengang_kz', $studiengang_kzs);
return $this->load();
}
/**
* @param array $studiengang_kzs
* @param array $not_antrag_typ (optional) If the prestudent has an antrag with one of the specified types it will be excluded from the result
@@ -618,8 +604,10 @@ class Studiengang_model extends DB_Model
AND ps.ausbildungssemester=get_absem_prestudent(p.prestudent_id, NULL)
AND ps.status_kurzbz=get_rolle_prestudent(p.prestudent_id, NULL)'
);
$this->addJoin('bis.tbl_orgform o', $this->dbTable . '.orgform_kurzbz=o.orgform_kurzbz');
$this->addJoin('lehre.tbl_studienplan plan', 'studienplan_id');
$this->addJoin('bis.tbl_orgform o', 'COALESCE(plan.orgform_kurzbz, ps.orgform_kurzbz, ' . $this->dbTable . '.orgform_kurzbz)=o.orgform_kurzbz');
$this->addJoin('public.tbl_person pers', 'person_id');
$this->addJoin('public.tbl_student stud', 'p.prestudent_id=stud.prestudent_id', 'LEFT');
$this->db->where_in($this->dbTable . '.studiengang_kz', $studiengang_kzs);
$this->db->where_in('ps.status_kurzbz', $this->config->item('antrag_prestudentstatus_whitelist'));
@@ -646,6 +634,7 @@ class Studiengang_model extends DB_Model
$this->db->group_start();
$this->db->where('pers.vorname ILIKE', "%" . $q . "%");
$this->db->or_where('pers.nachname ILIKE', "%" . $q . "%");
$this->db->or_where('stud.student_uid ILIKE', "%" . $q . "%");
$this->db->or_where($this->dbTable . '.bezeichnung ILIKE', "%" . $q . "%");
if (is_numeric($q))
$this->db->or_where('p.prestudent_id', $q);