diff --git a/application/models/crm/Prestudent_model.php b/application/models/crm/Prestudent_model.php index 5db9a98f1..c122adbc6 100644 --- a/application/models/crm/Prestudent_model.php +++ b/application/models/crm/Prestudent_model.php @@ -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"; diff --git a/application/models/organisation/Studiengang_model.php b/application/models/organisation/Studiengang_model.php index e2b3bdfb7..0d0c248a6 100644 --- a/application/models/organisation/Studiengang_model.php +++ b/application/models/organisation/Studiengang_model.php @@ -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"; diff --git a/application/views/system/infocenter/infocenterAbgewiesenData.php b/application/views/system/infocenter/infocenterAbgewiesenData.php index dbe0540be..40582a668 100644 --- a/application/views/system/infocenter/infocenterAbgewiesenData.php +++ b/application/views/system/infocenter/infocenterAbgewiesenData.php @@ -14,7 +14,7 @@ $query = ' ps.prestudent_id AS "PreStudentID", p.vorname AS "Vorname", p.nachname AS "Nachname", - sg.kurzbzlang as "Studiengang", + so.studiengangkurzbzlang as "Studiengang", pss.insertamum AS "AbgewiesenAm", ( SELECT l.zeitpunkt @@ -43,6 +43,8 @@ $query = ' JOIN public.tbl_prestudent ps USING(prestudent_id) JOIN public.tbl_person p USING(person_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 pss.status_kurzbz = '. $ABGEWIESENEN_STATUS .' AND pss.studiensemester_kurzbz = '. $STUDIENSEMESTER .' AND (sg.typ IN ('. $STUDIENGANG_TYP .') diff --git a/application/views/system/infocenter/infocenterData.php b/application/views/system/infocenter/infocenterData.php index f3849d622..49cc33326 100644 --- a/application/views/system/infocenter/infocenterData.php +++ b/application/views/system/infocenter/infocenterData.php @@ -137,11 +137,12 @@ LIMIT 1 ) AS "AnzahlAbgeschickt", ( - SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(sg.typ || sg.kurzbz) || \':\' || sp.orgform_kurzbz), \', \') + SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(so.studiengangkurzbzlang) || \':\' || sp.orgform_kurzbz), \', \') FROM public.tbl_prestudentstatus pss 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 pss.status_kurzbz = '.$INTERESSENT_STATUS.' AND pss.bewerbung_abgeschicktamum IS NOT NULL -- AND pss.bestaetigtam IS NULL @@ -162,11 +163,12 @@ LIMIT 1 ) AS "StgAbgeschickt", ( - SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(sg.typ || sg.kurzbz) || \':\' || sp.orgform_kurzbz), \', \') + SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(so.studiengangkurzbzlang) || \':\' || sp.orgform_kurzbz), \', \') FROM public.tbl_prestudentstatus pss 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 pss.status_kurzbz = '.$INTERESSENT_STATUS.' AND pss.bewerbung_abgeschicktamum IS NULL AND pss.bestaetigtam IS NULL @@ -214,11 +216,12 @@ LIMIT 1 ) AS "AnzahlStgNichtAbgeschickt", ( - SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(sg.typ || sg.kurzbz) || \':\' || sp.orgform_kurzbz), \', \') + SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(so.studiengangkurzbzlang) || \':\' || sp.orgform_kurzbz), \', \') FROM public.tbl_prestudentstatus pss 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 pss.status_kurzbz IN ('.$STATUS_KURZBZ.') AND pss.bewerbung_abgeschicktamum IS NULL AND ps.person_id = p.person_id diff --git a/application/views/system/infocenter/infocenterFreigegebenData.php b/application/views/system/infocenter/infocenterFreigegebenData.php index 92f062b62..5c0adb165 100644 --- a/application/views/system/infocenter/infocenterFreigegebenData.php +++ b/application/views/system/infocenter/infocenterFreigegebenData.php @@ -106,11 +106,12 @@ $query = ' LIMIT 1 ) AS "AnzahlAbgeschickt", ( - SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(sg.typ || sg.kurzbz || \':\' || sp.orgform_kurzbz)), \', \') + SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(so.studiengangkurzbzlang) || \':\' || sp.orgform_kurzbz), \', \') FROM public.tbl_prestudentstatus pss 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 pss.status_kurzbz = '.$INTERESSENT_STATUS.' AND pss.bewerbung_abgeschicktamum IS NOT NULL AND ps.person_id = p.person_id @@ -128,11 +129,12 @@ $query = ' LIMIT 1 ) AS "StgAbgeschickt", ( - SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(sg.typ || sg.kurzbz) || \':\' || sp.orgform_kurzbz), \', \') + SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(so.studiengangkurzbzlang) || \':\' || sp.orgform_kurzbz), \', \') FROM public.tbl_prestudentstatus pss 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 pss.status_kurzbz IN ('.$STATUS_KURZBZ.') AND ps.person_id = p.person_id diff --git a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php index dbc0124bc..1aeac022b 100644 --- a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php +++ b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php @@ -85,11 +85,12 @@ $query = ' LIMIT 1 ) AS "AnzahlAbgeschickt", ( - SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(sg.typ || sg.kurzbz || \':\' || sp.orgform_kurzbz)), \', \') + SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(so.studiengangkurzbzlang) || \':\' || sp.orgform_kurzbz), \', \') FROM public.tbl_prestudentstatus pss 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 pss.status_kurzbz = '.$INTERESSENT_STATUS.' AND pss.bewerbung_abgeschicktamum IS NOT NULL AND ps.person_id = p.person_id