Skip to content

Commit

Permalink
[Add] an attribute indicating whether exam registration is possible
Browse files Browse the repository at this point in the history
  • Loading branch information
natasakasikovic committed Apr 28, 2024
1 parent 47999ef commit 9004a44
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions LangLang/Core/Model/ExamSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ public class ExamSlot: ISerializable, Overlapable
public int Id { get; set; }
public string Language { get; set; }
public LanguageLevel Level { get; set; }

public int TutorId { get; set; }

public TimeSlot TimeSlot { get; set; }
public int MaxStudents { get; set; }
public bool ApplicationPossible { get; set; }

// NOTE: if possible don't save number of registeredStudents, ask the database. If not, then add attribute.


public ExamSlot(int id, string language, LanguageLevel level, TimeSlot timeSlot, int maxStudents, int tutorId)
public ExamSlot(int id, string language, LanguageLevel level, TimeSlot timeSlot, int maxStudents, int tutorId, bool applicationPossible)
{
Id = id;
Language = language;
Level = Level;
TutorId = tutorId;
TimeSlot = timeSlot;
MaxStudents = maxStudents;
ApplicationPossible = applicationPossible;
}

public ExamSlot() { }
Expand All @@ -38,6 +38,7 @@ public string[] ToCSV()
TutorId.ToString(),
// TODO: add serialization for timeSlot when implemented
MaxStudents.ToString(),
ApplicationPossible.ToString()
};
}

Expand All @@ -49,6 +50,7 @@ public void FromCSV(string[] values)
TutorId = int.Parse(values[3]);
// TODO: add deserialization for timeSlot when implemented
MaxStudents = int.Parse(values[6]);
ApplicationPossible = bool.Parse(values[7]);
}
}
}

0 comments on commit 9004a44

Please sign in to comment.