Aus Date und Time wurde DateTime gemacht und kleine Bugs behoben

This commit is contained in:
2023-11-01 13:11:50 +01:00
parent 224a99dec6
commit c0f392938c
7 changed files with 62 additions and 63 deletions

View File

@ -92,12 +92,9 @@ func (s *Session) HandleNewParticipant(cp chan<- *BriefingParticipant) http.Hand
func (s *Session) HandleBriefingForm(db *data.DB) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
now := time.Now()
s.Date = now.Format("2006-01-02")
s.Time = now.Format("15:04:05")
s.DateTime = time.Now().Format("2006-01-02 15:04:05")
s.Location = r.PostFormValue("location")
s.DocumentName = r.PostFormValue("document")
s.Document = r.PostFormValue("document")
s.AsOf = r.PostFormValue("as-of")
err := db.WriteBriefing(s.Briefing)

View File

@ -60,6 +60,8 @@ func makeHTMLQuestions(sq []data.Question, givenAnswers []int) []resultQuestion
questions[i].Answers = make([]resultAnswer, len(q.Answers))
for j := range q.Answers {
questions[i].Answers[j].Text = q.Answers[j].Text
if j+1 == q.Correct {
questions[i].Answers[j].Correct = true
} else {