Files
chapter-organizer/WebApp/Services/IStudentEventRankingSaveService.cs
T
poprhythmandCursor 4c91db37c2 feat: add CSV import for student event rankings
Let advisors load preference ranks from a converted CSV with fuzzy matching, known aliases, and a parse-preview-save page instead of relying on the ranking editor.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 23:41:13 -04:00

35 lines
1009 B
C#

using Core.Models;
namespace WebApp.Services;
/// <summary>
/// Persists parsed student event rankings.
/// </summary>
public interface IStudentEventRankingSaveService
{
/// <summary>
/// Students in the parse result who already have rankings stored.
/// </summary>
Task<IReadOnlyList<string>> GetStudentsWithExistingRankingsAsync(
StudentEventRankingParseResult parseResult,
CancellationToken cancellationToken = default);
/// <summary>
/// Replaces rankings for students who have at least one accepted rank in the parse result.
/// Other students are left unchanged.
/// </summary>
Task<StudentEventRankingSaveResult> SaveAsync(
StudentEventRankingParseResult parseResult,
CancellationToken cancellationToken = default);
}
/// <summary>
/// Outcome of saving imported event rankings.
/// </summary>
public class StudentEventRankingSaveResult
{
public int StudentsUpdated { get; set; }
public int RankingsSaved { get; set; }
}