Aus Date und Time wurde DateTime gemacht und kleine Bugs behoben
This commit is contained in:
@ -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)
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user