diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..ef279da --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,16 @@ +# Changelog + +All notable changes to this project are documented in this file. + +## [1.0] - 2026-02-01 +### Added +- Initial release of the KonfiCastle Workshop-Wahlen plugin (Admin backend, participant frontend, assignment logic, CSV export, teamer password management). +- Shortcodes: `[konficastle_workshopwahl wahl=ID]`, `[konficastle_workshop_ergebnis wahl=ID]`. + +### Fixed +- Removed query against non-existent table `kc_phasen`; phases are derived from `kc_wahlen.anzahl_einheiten`. See [includes/admin-workshops.php](includes/admin-workshops.php). +- Initialized `$debug_output` to prevent PHP warning in frontend. See [includes/frontend-form.php](includes/frontend-form.php). + +### Notes +- Database tables use WordPress prefix via `$wpdb->prefix`. +- Force assignments have priority over automatic allocation. diff --git a/README.md b/README.md index 157bba0..dad92b6 100644 --- a/README.md +++ b/README.md @@ -48,3 +48,7 @@ Dieses WordPress-Plugin ermöglicht die Verwaltung und Durchführung von Worksho Für Detailfragen zu Datenbankstruktur, Shortcodes oder Zuteilungslogik siehe die jeweiligen Dateien im `includes/`-Verzeichnis. +## Release Notes + +Siehe die ausführlichen Hinweise zur Version 1.0 in [RELEASE_NOTES.md](RELEASE_NOTES.md). + diff --git a/includes/admin-workshops.php b/includes/admin-workshops.php index a03c672..d06296f 100644 --- a/includes/admin-workshops.php +++ b/includes/admin-workshops.php @@ -10,8 +10,9 @@ function kc_workshops_page() { // Liste aller Wahlen für Auswahl $wahlen_liste = $wpdb->get_results("SELECT * FROM {$prefix}kc_wahlen ORDER BY id DESC"); - // Liste aller Phasen für Auswahl - $phasen_liste = $wpdb->get_results("SELECT * FROM {$prefix}kc_phasen ORDER BY nummer"); + // Phasen werden pro Wahl über die Spalte `anzahl_einheiten` in `kc_wahlen` bestimmt. + // Eine separate Tabelle `kc_phasen` wird nicht benötigt. + $phasen_liste = []; // Workshop löschen if (isset($_GET['delete_workshop'])) { diff --git a/includes/frontend-form.php b/includes/frontend-form.php index d0be839..a706958 100644 --- a/includes/frontend-form.php +++ b/includes/frontend-form.php @@ -5,14 +5,8 @@ add_shortcode('konficastle_workshopwahl', function($atts) { global $wpdb; - // KRITISCHER TEST: Ausgabe ganz am Anfang - //$debug_output = '
' . print_r($_POST, true) . ''; - //$debug_output .= '