22 Commits

Author SHA1 Message Date
fierke a0eac4ae95 Merge pull request '[chore:] better crafting' (#5) from bettercrafting into main
Reviewed-on: #5
2026-05-30 11:33:11 +00:00
fierke 22e9377062 [chore:] better crafting 2026-05-29 12:52:02 +02:00
fierke 11e6aab8fd [fix:] removed triple-calling of OptimizeStudentWishCoverage() 2026-04-22 07:25:46 +02:00
fierke 13f313d4a0 Merge remote-tracking branch 'origin/main' 2026-04-21 14:14:07 +02:00
fierke 64951c579f [fix:] massive bug that prevented correct course crafting (sports's id was always 0) 2026-04-21 14:13:54 +02:00
fierke 4130c36335 [chore:] import function that won't be called 2026-04-21 14:13:14 +02:00
fierke 7f2fc99d0b [gui:] import-button in the menu 2026-04-21 14:12:54 +02:00
fierke eb640ff749 [chore:] file picker, but currently not using the file itself 2026-04-21 14:12:40 +02:00
fierke 54a564df04 [chore:] tiny little comment to prevent confusion 2026-04-21 14:11:51 +02:00
fierke 71dc63f2a2 [file:] added logo 2026-04-18 16:04:14 +02:00
fierke 68f673c8d7 Update README.md 2026-04-15 11:48:44 +00:00
fierke d5b7fd7af3 [file:] uploaded app-screenshots 2026-04-15 13:45:37 +02:00
fierke 573e7c86e8 [fix:] course amount per semester synchronized with NumCoursesPerSemester, fixing #1 2026-04-15 13:22:12 +02:00
fierke a1bf573a07 [chore:] updated version 2026-03-19 08:53:53 +01:00
fierke 525f3fb4ae Update README.md 2026-03-19 07:52:11 +00:00
fierke 9f298d8ce8 [chore:] implemented csv-export access from gui 2026-03-19 08:49:03 +01:00
fierke 11d9c641a6 [chore:] cleanup 2026-03-19 08:48:51 +01:00
fierke c2f7adc1d0 [fix:] typo 2026-03-19 08:48:34 +01:00
fierke c19f96ea37 [chore:] added results to Student.Result 2026-03-19 08:48:24 +01:00
fierke 9bbde62d70 [feat:] csv-exporter (basic implementation) 2026-03-19 08:48:01 +01:00
fierke a83f97828c [chore:] changed Student.Result-Field-Type to array 2026-03-19 08:47:38 +01:00
fierke 44654dd784 [gui:] added csv-export placeholder button 2026-03-18 14:37:23 +01:00
10 changed files with 1266 additions and 767 deletions
+17 -7
View File
@@ -12,6 +12,7 @@
<!-- <MenuItem Click="MnuSettings_OnClick" x:Name="MnuSettings" Header="Einstellungen" /> -->
<!-- <Separator /> -->
<MenuItem x:Name="MnuExpSettings" Header="Einstellungen exportieren" Click="MnuExpSettings_OnClick" />
<MenuItem x:Name="MnuImpResult" Header="Berechnung importieren" Click="MnuImpResult_OnClick" />
<MenuItem x:Name="MnuExit" Header="Beenden" Click="MnuExit_OnClick"/>
</MenuItem>
<MenuItem Header="Hilfe">
@@ -211,13 +212,22 @@
</TabItem.Header>
<Grid ColumnDefinitions="*,*" RowDefinitions="50,2*,*">
<ListBox Grid.RowSpan="2" x:Name="LbResult" Margin="0,10,10,10"></ListBox>
<Button Grid.Row="0" Grid.Column="1" Margin="0,10,0,0" x:Name="BtnExportCoursePDF" VerticalAlignment="Top" Height="35" HorizontalAlignment="Stretch" Click="BtnExportCoursePDF_OnClick" HorizontalContentAlignment="Center">
<StackPanel Orientation="Horizontal">
<LucideIcon Kind="FileText" Width="24" Height="24" />
<Label Content="Export (PDF)..." VerticalContentAlignment="Center" FontSize="12"
FontWeight="Bold" />
</StackPanel>
</Button>
<Grid Grid.Row="0" Grid.Column="1" Grid.ColumnDefinitions="*,*">
<Button Grid.Column="0" Margin="0,10,0,0" x:Name="BtnExportCoursePDF" VerticalAlignment="Top" Height="35" HorizontalAlignment="Stretch" Click="BtnExportCoursePDF_OnClick" HorizontalContentAlignment="Center">
<StackPanel Orientation="Horizontal">
<LucideIcon Kind="FileText" Width="24" Height="24" />
<Label Content="Export (PDF)..." VerticalContentAlignment="Center" FontSize="12"
FontWeight="Bold" />
</StackPanel>
</Button>
<Button Grid.Column="1" Margin="5,10,0,0" x:Name="BtnExportCourseCSV" VerticalAlignment="Top" Height="35" HorizontalAlignment="Stretch" Click="BtnExportCourseCSV_OnClick" HorizontalContentAlignment="Center">
<StackPanel Orientation="Horizontal">
<LucideIcon Kind="FileJson" Width="24" Height="24" />
<Label Content="Export (CSV)..." VerticalContentAlignment="Center" FontSize="12"
FontWeight="Bold" />
</StackPanel>
</Button>
</Grid>
<ScrollViewer Grid.Row="1" Grid.Column="1" Margin="0,5,0,10" Background="#44CCCCCC">
<TextBlock x:Name="TbResultStatistics"></TextBlock>
</ScrollViewer>
+38 -2
View File
@@ -11,7 +11,7 @@ namespace spplus;
public partial class MainWindow : Window
{
public static MainWindow Instance { get; set; }
public static string ApplicationVersion = "v1.1.17";
public static string ApplicationVersion = "v1.2.24";
public MainWindow()
{
InitializeComponent();
@@ -166,7 +166,7 @@ public partial class MainWindow : Window
{
try
{
for(int i = 0; i<s.Result.Count;i++)
for(int i = 0; i<s.Result.Length;i++)
{
LbResult.Items.Add($"{s.Name} ({s.ID}) - {i+1}. Semester: {s.Result[i]}");
}
@@ -423,4 +423,40 @@ public partial class MainWindow : Window
Settings.Instance.NumCoursesPerSemester = Convert.ToInt32(NudSportMaxPerSemester.Value);
} catch {}
}
private async void BtnExportCourseCSV_OnClick(object? sender, RoutedEventArgs e)
{
var topLevel = GetTopLevel(this);
var file = await topLevel!.StorageProvider.SaveFilePickerAsync(new FilePickerSaveOptions
{
Title = "CSV-Datei speichern",
SuggestedFileType = new FilePickerFileType(".csv-Datei")
{
Patterns = new[] { "*.csv" }
}
});
if (file == null) return;
ExportUtility.ExportToCSV(file.Path.AbsolutePath);
}
private async void MnuImpResult_OnClick(object? sender, RoutedEventArgs e)
{
// Hier importieren
var topLevel = GetTopLevel(this);
var file = await topLevel!.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
{
Title = "CSV-Datei laden",
SuggestedFileType = new FilePickerFileType(".csv-Datei")
{
Patterns = new[] { "*.csv" }
}
});
if (file == null) return;
}
}
+7 -1
View File
@@ -1,13 +1,17 @@
# SP+
Interaktiver Sportkursplaner für Oberstufen auf Basis einer Sportkurswahl durch SuS.
Plattformunabhängiger (Windows, Linux, Mac), interaktiver Sportkursplaner für Oberstufen auf Basis einer Sportkurswahl durch SuS.
![spplus-Hauptbildschirm](img/spplus_planung.png)
## Features
* \+ Import von CSV-Dateien mit Kurswahl
* \+ Wahlansicht
* \+ Statistiken
* \+ Pflege von Sportkursen (inkl. Kürzel/ alternativen Bezeichnungen)
* \+ CSV-Export
* ~ Fehleransicht für nicht-existente, aber gewählte Kurse
* ~ PDF-Export
\+ Vorhanden, ~ Pending
@@ -19,3 +23,5 @@ Interaktiver Sportkursplaner für Oberstufen auf Basis einer Sportkurswahl durch
* Suche `spplus` bzw. `spplus.exe` und führe aus
* Linux/MacOS evl.: `chmod +x spplus`
![spplus-Sportkursübersicht](img/spplus_sport.png)
+711 -324
View File
File diff suppressed because it is too large Load Diff
+19
View File
@@ -0,0 +1,19 @@
using System.IO;
namespace spplus;
public static class ExportUtility
{
public static void ExportToCSV(string filepath)
{
char separator = ',';
string header = $"SchuelerID{separator}Sem1{separator}Sem2{separator}Sem3{separator}Sem4";
string output = header + "\n";
foreach (var student in Settings.Instance.Students)
{
output += $"{student.ID}{separator}{student.Result[0]}{separator}{student.Result[1]}{separator}{student.Result[2]}{separator}{student.Result[3]}\n";
}
File.WriteAllText(filepath, output);
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

+41
View File
@@ -47,4 +47,45 @@ public static class import
return result;
}
public static List<Student> ImportResultFromFile(string path)
{
var dict = new Dictionary<string, (string Name, List<string> Courses)>();
foreach (var line in File.ReadLines(path).Skip(1)) // Header überspringen
{
if (string.IsNullOrWhiteSpace(line))
continue;
var parts = line.Split(',');
if (parts.Length < 3)
continue;
string nameWithId = parts[0].Trim();
string course = parts[2].Replace("(2)", "").Replace("(3)", "").Replace("(4)", "").Trim();
int open = nameWithId.LastIndexOf('(');
int close = nameWithId.LastIndexOf(')');
if (open < 0 || close < 0 || close <= open)
continue;
string name = nameWithId[..open].Trim();
string id = nameWithId[(open + 1)..close].Trim();
if (!dict.ContainsKey(id))
dict[id] = (name, new List<string>());
dict[id].Courses.Add(course);
}
var result = new List<Student>();
foreach (var (id, data) in dict)
{
var student = new Student(id, data.Name, data.Courses);
result.Add(student);
}
return result;
}
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

+2 -2
View File
@@ -59,7 +59,7 @@ public class Student
public string ID { get; set; } = ""; // ID des Schüler (z.B. NolteSeb)
public string Name { get; set; } = ""; // Name des Schülers
public List<string> SelectedCourseNames { get; set; } = new();
public List<string>? Result { get; set; } = null;
public string[] Result { get; set; } = new string[4];
public Student()
{
@@ -85,7 +85,7 @@ public class Settings
public List<Student> Students { get; set; } = [];
public List<Sport> Sports { get; set; } = [];
public int NumCoursesPerSemester { get; set; } = 10;
public int NumCoursesPerSemester { get; set; } = 10; // Exact Amount of courses, not a maximum
public Settings()
{