Implemented page view for courses

This commit is contained in:
denizk0461
2023-04-08 13:43:26 +02:00
parent 73ea48626d
commit 9c0e67b396
8 changed files with 108 additions and 24 deletions
@@ -4,9 +4,17 @@ data class StudIPEvent(
val title: String, // the name of the event
val lecturer: Array<String>, // the lecturer(s)
val room: String, // the room the event takes place in; assumes that the room doesn't change
val timeStart: Int, // 1 = 08:15, 2 = 10:15, 3 = 12:15, 4 = 14:15, 5 = 16:15, 6 = 18:15
val timeLength: Int, // the amount of hours the course takes place over
val day: Int, // 0 = Monday, 1 = Tuesday, 2 = Wednesday, 3 = Thursday, 4 = Friday
val timeslotStart: Int, // 0 = 08:15, 1 = 10:15, 2 = 12:15, 3 = 14:15, 4 = 16:15, 5 = 18:15
val timeslots: Int, // the amount of timeslots the course takes place over (1 timeslot = 90min)
) {
private val timeSlotStartTimes: List<String> = listOf("08:15", "10:15", "12:15", "14:15", "16:15", "18:15")
private val timeSlotEndTimes: List<String> = listOf("09:45", "11:45", "13:45", "15:45", "17:45", "19:45")
val timeslot: String =
"${timeSlotStartTimes[timeslotStart]} ${timeSlotEndTimes[timeslots - 1]}"
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false