diff --git a/server/frontend/pages/problem_result.html b/server/frontend/pages/problem_result.html index 900aa42..85e56ea 100644 --- a/server/frontend/pages/problem_result.html +++ b/server/frontend/pages/problem_result.html @@ -20,21 +20,26 @@
Congratulations, your answer is correct! Solving this problem nets you a total of {{ .PointsAwarded | floor }} points. + {{ if eq .Part 1 }} + You're halfway there! You can now submit the answer to the second part of the problem. + {{ else }} + You've completed all 2 parts of the problem. Congratulations! + {{ end }} +
+Go back to the problem here, or check out the leaderboard.
{{ else }} -- Sorry, your answer is incorrect. - Go back to the problem here. -
+Sorry, your answer is incorrect.
+ {{ end }} {{ end }} diff --git a/server/r_problems.go b/server/r_problems.go index d7646d3..4f2c240 100644 --- a/server/r_problems.go +++ b/server/r_problems.go @@ -112,6 +112,7 @@ func (s *Server) viewProblemInput(w http.ResponseWriter, r *http.Request) { type problemResultPageData struct { frontend.ComponentContext Day problemDay + Part int Cooldown time.Duration CooldownTime time.Time Correct bool @@ -254,6 +255,7 @@ func (s *Server) submitProblem(w http.ResponseWriter, r *http.Request) { Username: u.Username, }, Day: day, + Part: data.Part, Correct: correct, Cooldown: cooldown, CooldownTime: cooldownTime,