Merge branch 'master' into feature-13011/installation_on_multiple_servers

This commit is contained in:
Paolo
2022-04-13 14:25:46 +02:00
340 changed files with 2072 additions and 11426 deletions
+9 -8
View File
@@ -560,7 +560,7 @@ class Prestudent_model extends DB_Model
o.bezeichnung,
(CASE
WHEN sg.typ = \'b\' THEN ps.prestudent_id
WHEN sg.typ = \'m\' THEN p.prestudent_id
WHEN sg.typ = \'m\' THEN ps.prestudent_id
ELSE NULL
END) AS prestudent_id
FROM public.tbl_prestudent p
@@ -581,7 +581,7 @@ class Prestudent_model extends DB_Model
return $this->execQuery($query, array($person_id));
}
/**
* Get latest ZGV Bezeichnung of Prestudent.
*
@@ -593,19 +593,19 @@ class Prestudent_model extends DB_Model
{
show_error('Prestudent_id is not numeric.');
}
$language_index = getUserLanguage() == 'German' ? 0 : 1;
$this->addSelect('
COALESCE(
array_to_json(zgvmaster.bezeichnung::varchar[])->>' . $language_index . ',
array_to_json(zgv.bezeichnung::varchar[])->>' . $language_index . '
) AS bezeichnung'
);
$this->addJoin('bis.tbl_zgv zgv', 'zgv_code', 'LEFT');
$this->addJoin('bis.tbl_zgvmaster zgvmaster', 'zgvmas_code', 'LEFT');
return $this->loadWhere(array(
'prestudent_id' => $prestudent_id
));
@@ -618,8 +618,9 @@ class Prestudent_model extends DB_Model
JOIN public.tbl_prestudent ps USING(prestudent_id)
JOIN public.tbl_studiengang sg USING(studiengang_kz)
JOIN lehre.tbl_studienplan sp USING(studienplan_id)
JOIN lehre.tbl_studienordnung so USING(studienordnung_id)
WHERE ps.person_id = ?
AND UPPER((sg.typ || sg.kurzbz) || ':' || sp.orgform_kurzbz) = ?
AND UPPER(so.studiengangkurzbzlang || ':' || sp.orgform_kurzbz) = ?
AND pss.studiensemester_kurzbz = ?
AND";
@@ -629,7 +630,7 @@ class Prestudent_model extends DB_Model
$query .= " NOT EXISTS";
$query .= " (SELECT 1 FROM public.tbl_prestudentstatus spss
JOIN public.tbl_prestudent sps USING(prestudent_id)
JOIN public.tbl_prestudent sps USING(prestudent_id)
WHERE sps.prestudent_id = ps.prestudent_id
AND spss.bewerbung_abgeschicktamum IS NOT NULL)";
@@ -495,11 +495,12 @@ class Studiengang_model extends DB_Model
public function getStudiengaengeWithOrgForm($typ, $semester)
{
$query = "SELECT DISTINCT (UPPER(sg.typ || sg.kurzbz || ':' || sp.orgform_kurzbz)) AS Studiengang
$query = "SELECT DISTINCT (UPPER(so.studiengangkurzbzlang || ':' || sp.orgform_kurzbz)) AS Studiengang
FROM public.tbl_studiengang sg
JOIN lehre.tbl_studienordnung USING (studiengang_kz)
JOIN lehre.tbl_studienplan sp USING (studienordnung_id)
JOIN lehre.tbl_studienplan_semester spsem USING (studienplan_id)
JOIN lehre.tbl_studienordnung so USING(studienordnung_id)
WHERE sp.aktiv = TRUE AND sg.aktiv = TRUE AND sg.typ IN ?
AND spsem.studiensemester_kurzbz = ?
ORDER BY Studiengang";