diff --git a/tutor/app/assets/javascripts/problems.js.coffee b/tutor/app/assets/javascripts/problems.js.coffee
index 63cef662..f90d9c77 100644
--- a/tutor/app/assets/javascripts/problems.js.coffee
+++ b/tutor/app/assets/javascripts/problems.js.coffee
@@ -11,11 +11,13 @@ timer = ->
digit++
if digit > 59
min++
- document.getElementById("mins").innerHTML = min
+ $(".mins").html min
digit = 0
if digit <= 9
digit = "0" + digit
- document.getElementById("secs").innerHTML = digit
+ $(".secs").html digit
+ $("#sec").val($(".secs").html())
+ $("#min").val($(".mins").html())
activate = ->
unless timer_is_on
diff --git a/tutor/app/views/solutions/_new.html.erb b/tutor/app/views/solutions/_new.html.erb
index e999d5b6..2d227f25 100644
--- a/tutor/app/views/solutions/_new.html.erb
+++ b/tutor/app/views/solutions/_new.html.erb
@@ -4,13 +4,15 @@
Time spent:
-0:00
+0:00
<%= form_for :solution,
:url => { :controller => "solutions", :action => "create" },
:html => {:method => :post} do |f| %>
<%= @code = f.text_area :code, placeholder: "Write your code here and then click submit",
class: "editor" %>
+ <%= f.hidden_field :mins, id: "min", value: "" %>
+ <%= f.hidden_field :secs, id: "sec", value: "" %>
<%= f.hidden_field :problem_id, value: params[:id] %>