diff --git a/vilesci/bis/lehrgangsmeldung.php b/vilesci/bis/lehrgangsmeldung.php
index 9cc560d32..b9d6a2526 100644
--- a/vilesci/bis/lehrgangsmeldung.php
+++ b/vilesci/bis/lehrgangsmeldung.php
@@ -242,29 +242,37 @@ if($result = $db->db_query($qry))
$zustell_strasse = $rowzustelladr->strasse;
$zustell_nation = $rowzustelladr->nation;
}
-
- // eMail-Adresse
- $qry_mail = "
+
+ // FH eMail-Adresse FH aus UID@Domain
+ $email = '';
+ if ($row->student_uid != '')
+ {
+ $email = $row->student_uid. '@'. DOMAIN;
+ }
+
+ // private eMail-Adresse
+ $email_privat = '';
+ $qry_privmail = "
SELECT kontakt
FROM public.tbl_kontakt
- WHERE kontakttyp = 'email'
- AND zustellung = TRUE
- AND person_id = ". $db->db_add_param($row->pers_id). "
- ORDER BY insertamum DESC LIMIT 1;
+ WHERE zustellung = TRUE
+ AND kontakttyp = 'email'
+ AND person_id=". $db->db_add_param($row->pers_id). "
+ ORDER BY insertamum DESC
+ LIMIT 1;
";
-
- $email = '';
- if ($result_email = $db->db_query($qry_mail))
+
+ if ($privmail_result = $db->db_query($qry_privmail))
{
- if($db->db_num_rows($result_email) == 1)
+ if($db->db_num_rows($privmail_result) == 1)
{
- if($row_mail = $db->db_fetch_object($result_email))
+ if ($row_privmail = $db->db_fetch_object($privmail_result))
{
- $email = $row_mail->kontakt;
+ $email_privat = $row_privmail->kontakt;
}
}
}
-
+
if($row->gebdatum<'1920-01-01' OR $row->gebdatum==null OR $row->gebdatum=='')
{
$error_log.=(!empty($error_log)?', ':'')."Geburtsdatum ('".$row->gebdatum."')";
@@ -620,7 +628,8 @@ if($result = $db->db_query($qry))
$datei.="
".$row->svnr."";
}
- if($row->ersatzkennzeichen!='')
+ // Ersatzkennzeichen nur inkludieren wenn svnr nicht gesetzt
+ if($row->ersatzkennzeichen!='' && $row->svnr == null)
{
$datei.="
".$row->ersatzkennzeichen."";
@@ -648,7 +657,8 @@ if($result = $db->db_query($qry))
}
$datei.="
- ". $email. "
+ ". $email_privat. "
+ ". $email. "
".$row->zgv_code."
".date("dmY", $datumobj->mktime_fromdate($row->zgvdatum))."";
diff --git a/vilesci/bis/studentenmeldung.php b/vilesci/bis/studentenmeldung.php
index dceb4d30c..901181a24 100644
--- a/vilesci/bis/studentenmeldung.php
+++ b/vilesci/bis/studentenmeldung.php
@@ -758,6 +758,29 @@ function GenerateXMLStudentBlock($row)
$email = $row->student_uid. '@'. DOMAIN;
}
+ // private eMail-Adresse
+ $email_privat = '';
+ $qry_privmail = "
+ SELECT kontakt
+ FROM public.tbl_kontakt
+ WHERE zustellung = TRUE
+ AND kontakttyp = 'email'
+ AND person_id=". $db->db_add_param($row->pers_id). "
+ ORDER BY insertamum DESC
+ LIMIT 1;
+ ";
+
+ if ($privmail_result = $db->db_query($qry_privmail))
+ {
+ if($db->db_num_rows($privmail_result) == 1)
+ {
+ if ($row_privmail = $db->db_fetch_object($privmail_result))
+ {
+ $email_privat = $row_privmail->kontakt;
+ }
+ }
+ }
+
if($row->gebdatum<'1920-01-01' OR $row->gebdatum==null OR $row->gebdatum=='')
{
$error_log.=(!empty($error_log)?', ':'')."Geburtsdatum ('".$row->gebdatum."')";
@@ -1263,7 +1286,9 @@ function GenerateXMLStudentBlock($row)
$datei .= "
" . $row->svnr . "";
}
- if ($row->ersatzkennzeichen != '')
+
+ // Ersatzkennzeichen nur inkludieren wenn svnr nicht gesetzt
+ if ($row->ersatzkennzeichen != '' && $row->svnr == null)
{
$datei .= "
" . $row->ersatzkennzeichen . "";
@@ -1296,11 +1321,16 @@ function GenerateXMLStudentBlock($row)
";
}
+ if ($email_privat != '')
+ {
+ $datei .= "
+ " . $email_privat . "";
+ }
+
if ($email != '')
{
$datei .= "
- " . $email . "
- ";
+ " . $email . "";
}
if(!$ausserordentlich)
@@ -1531,12 +1561,12 @@ function GenerateXMLStudentBlock($row)
if ($aktstatus != 'Incoming' && $rowio->ects_erworben != '')
{
$datei.="
- ".$rowio->ects_erworben."";
+ ".round($rowio->ects_erworben)."";
}
if ($aktstatus != 'Incoming' && $rowio->ects_angerechnet != '')
{
$datei.="
- ".$rowio->ects_angerechnet."";
+ ".round($rowio->ects_angerechnet)."";
}
foreach ($aufenthaltfoerderung_code_arr as $aufenthaltfoerderung_code)
{