feat: add optional student nickname for informal display
Keep legal first and last names for formal lists; show DisplayFirstName on teams, calendars, and import matching so two Josiahs can be told apart. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -56,6 +56,10 @@ namespace Core.Parsers
|
||||
{
|
||||
}
|
||||
|
||||
public TeamParser(StreamReader reader, bool ignoreBlankLines = true) : base(reader, ignoreBlankLines)
|
||||
{
|
||||
}
|
||||
|
||||
public Team[] Parse(ICollection<EventDefinition> events, ICollection<Student> students)
|
||||
{
|
||||
var teams = new List<Team>();
|
||||
@@ -118,7 +122,9 @@ namespace Core.Parsers
|
||||
{
|
||||
Fuzz.Ratio(s.Name, studentName),
|
||||
Fuzz.Ratio(s.FirstNameLastName, studentName),
|
||||
Fuzz.Ratio(s.FirstName, studentName)
|
||||
Fuzz.Ratio(s.FirstName, studentName),
|
||||
Fuzz.Ratio(s.DisplayFirstName, studentName),
|
||||
string.IsNullOrWhiteSpace(s.Nickname) ? 0 : Fuzz.Ratio(s.Nickname, studentName)
|
||||
}.Max()
|
||||
where rat > 90
|
||||
orderby rat descending
|
||||
|
||||
Reference in New Issue
Block a user