- user story 4023: when Fotoliste is generated for more than 1 Mitarbeiter (e.g. Freifächer), now different photos for each Mitarbeiter are generated (person_id is used instead of Matrikelnr)

This commit is contained in:
alex
2019-11-04 17:08:36 +01:00
parent 927975aa5f
commit 86a129a5e3
+3 -2
View File
@@ -173,6 +173,7 @@ $qry = 'SELECT DISTINCT ON
tbl_student.studiengang_kz AS stg_kz_student,
tbl_zeugnisnote.note,
tbl_mitarbeiter.mitarbeiter_uid,
tbl_person.person_id,
tbl_person.matr_nr,
tbl_person.geschlecht,
tbl_person.foto,
@@ -244,7 +245,7 @@ if ($result = $db->db_query($qry)) {
if ($row->foto_sperre == 'f' && $row->foto != '') {
$foto_src = $row->foto;
$foto_url = sys_get_temp_dir() . '/foto' . trim($row->matrikelnr) . '.jpg';
$foto_url = sys_get_temp_dir() . '/foto' . trim($row->person_id) . '.jpg';
$foto_url_arr[] = $foto_url;
//create writeable file
@@ -257,7 +258,7 @@ if ($result = $db->db_query($qry)) {
}
//add foto to document
$doc->addImage($foto_url, trim($row->matrikelnr) . '.jpg', 'image/jpg');
$doc->addImage($foto_url, trim($row->person_id) . '.jpg', 'image/jpg');
}
elseif ($row->foto_sperre == 't')
{