diff --git a/controllers/addOfficeHourHandler.go b/controllers/addOfficeHourHandler.go index 72f508b..76dd06c 100644 --- a/controllers/addOfficeHourHandler.go +++ b/controllers/addOfficeHourHandler.go @@ -59,10 +59,10 @@ func (b *BaseHandler) AddOfficeHourHandler(w http.ResponseWriter, req *http.Requ //Parse date week, err := strconv.Atoi(req.FormValue("woche")) if err != nil { - errors = append(errors, "Die Vorlesungswoche muss eine ganze Zahl sein.") + errors = append(errors, "Die Woche muss eine ganze Zahl sein.") } if !(week >= 0 && week <= 2) { - errors = append(errors, "Sprechstunden müssen jede, jede gerade oder jede ungerade Vorlesungswoche stattfinden.") + errors = append(errors, "Sprechstunden müssen jede, jede gerade oder jede ungerade Woche stattfinden.") } day, err := strconv.Atoi(req.FormValue("tag")) if err != nil { diff --git a/repositories/officeHour.go b/repositories/officeHour.go index a5de5ad..21dae2b 100644 --- a/repositories/officeHour.go +++ b/repositories/officeHour.go @@ -240,9 +240,7 @@ func (r *OfficeHourRepo) NumberByTimeSpanAndRoom(date models.Date, duration int, for _, officeHour := range officeHours { // increase count if officehour starts before this point in time and ends later if models.DateLess(officeHour.Date, models.GetEndDate(date, minute, false)) && models.DateLess(models.GetEndDate(date, minute, false), models.GetEndDate(officeHour.Date, officeHour.Duration, false)) { - if date.Week == 0 || officeHour.Week == 0 || date.Week == officeHour.Week { // office hours in alternating weeks should not collide - minuteCount += 1 - } + minuteCount += 1 } } if minuteCount > count { diff --git a/templating/templates/addMask.html b/templating/templates/addMask.html index de74138..b7066b3 100644 --- a/templating/templates/addMask.html +++ b/templating/templates/addMask.html @@ -11,7 +11,7 @@ {{end}}
- : + :