- master messages an studiengang, wenn bereits bestaetigt

- lehrgang messages direkt an lehrgang
This commit is contained in:
ma0048
2022-10-28 10:56:02 +02:00
parent 409ccd7640
commit f7bd49b408
2 changed files with 11 additions and 4 deletions
+2 -2
View File
@@ -128,8 +128,8 @@ class Messages_model extends CI_Model
{
$ouOptions .= sprintf(
"\n".'<option value="%s">%s</option>',
is_numeric($ou->prestudent_id) ? $ou->oe_kurzbz : self::ALT_OE,
$ou->bezeichnung . (is_numeric($ou->prestudent_id) ? '' : ' *')
($ou->typ === 'l' ? $ou->oe_kurzbz : (is_numeric($ou->prestudent_id) ? $ou->oe_kurzbz : self::ALT_OE)),
$ou->bezeichnung . ((is_numeric($ou->prestudent_id) || $ou->typ === 'l' ) ? '' : ' *')
);
}
}
+9 -2
View File
@@ -560,9 +560,10 @@ class Prestudent_model extends DB_Model
o.bezeichnung,
(CASE
WHEN sg.typ = \'b\' THEN ps.prestudent_id
WHEN sg.typ = \'m\' THEN ps.prestudent_id
WHEN sg.typ = \'m\' THEN mps.prestudent_id
ELSE NULL
END) AS prestudent_id
END) AS prestudent_id,
sg.typ
FROM public.tbl_prestudent p
JOIN public.tbl_studiengang sg USING(studiengang_kz)
JOIN public.tbl_organisationseinheit o USING(oe_kurzbz)
@@ -571,11 +572,17 @@ class Prestudent_model extends DB_Model
FROM public.tbl_prestudentstatus
WHERE status_kurzbz = \'Bewerber\'
) ps USING(prestudent_id)
LEFT JOIN (
SELECT prestudent_id
FROM public.tbl_prestudentstatus
WHERE status_kurzbz = \'Interessent\' AND bestaetigtam IS NOT NULL
) mps ON p.prestudent_id = mps.prestudent_id
WHERE p.person_id = ?
GROUP BY o.oe_kurzbz,
o.bezeichnung,
sg.typ,
ps.prestudent_id,
mps.prestudent_id,
p.prestudent_id
ORDER BY o.bezeichnung';