Compare commits

...

2 Commits

Author SHA1 Message Date
ProgrammGamer
7184d64116 Merge branch 'develop' of https://git.konfi-castle.com/linus/Workshop-Wahlen into develop
All checks were successful
Deploy Workshop-Wahlen (DEV / PROD) / deploy (push) Successful in 13s
2026-01-31 14:16:18 +01:00
ProgrammGamer
5c9c00b48e csv anpassungen 2026-01-31 14:16:06 +01:00

View File

@@ -86,7 +86,8 @@ if (isset($_GET['export_csv']) && current_user_can('manage_options')) {
$output = fopen('php://output', 'w'); $output = fopen('php://output', 'w');
// Excel erwartet in DE meist ; als Trennzeichen // Excel erwartet in DE meist ; als Trennzeichen
$delimiter = ';'; $delimiter = ';';
fputcsv($output, ['Phase','Workshop','Teamer','Teilnehmer'], $delimiter); // Kopfzeile mit separaten Namensspalten und Wunsch
fputcsv($output, ['Phase','Workshop','Teamer','Nachname','Vorname','Wunsch'], $delimiter);
foreach($phases as $phase) { foreach($phases as $phase) {
if (empty($workshop_groups[$phase])) continue; if (empty($workshop_groups[$phase])) continue;
$display = []; $display = [];
@@ -114,14 +115,27 @@ if (isset($_GET['export_csv']) && current_user_can('manage_options')) {
foreach($teilnehmer as $t) { foreach($teilnehmer as $t) {
$vorname = preg_replace('/<[^>]*>/', '', $t->vorname); $vorname = preg_replace('/<[^>]*>/', '', $t->vorname);
$nachname = preg_replace('/<[^>]*>/', '', $t->nachname); $nachname = preg_replace('/<[^>]*>/', '', $t->nachname);
$teilnehmer_name = trim($vorname . ', ' . $nachname);
$ws_name_clean = preg_replace('/<[^>]*>/', '', $ws_name); $ws_name_clean = preg_replace('/<[^>]*>/', '', $ws_name);
$teamer_str_clean = preg_replace('/<[^>]*>/', '', $teamer_str); $teamer_str_clean = preg_replace('/<[^>]*>/', '', $teamer_str);
// Wunsch-Text ermitteln
if ($t->wunsch_rang == 0) {
$wunsch = 'Vorzuteilung';
} elseif ($t->wunsch_rang == -1) {
$wunsch = 'zugelost';
} elseif ($t->wunsch_rang == 99) {
$wunsch = 'Zulosung';
} elseif ($t->wunsch_rang > 0) {
$wunsch = intval($t->wunsch_rang) . '.';
} else {
$wunsch = '';
}
fputcsv($output, [ fputcsv($output, [
$phase, $phase,
$ws_name_clean, $ws_name_clean,
$teamer_str_clean, $teamer_str_clean,
$teilnehmer_name, $nachname,
$vorname,
$wunsch $wunsch
], $delimiter); ], $delimiter);
} }