         (cond
          (not approved) (str "You've solved the unapproved problem. Now you can approve it!")
          user (do
-                (when (not-any? #{id} (get-solved user))
-                  (update! :users {:user user} {:$addToSet {:solved id}})
-                  (update! :problems {:_id id} {:$inc {:times-solved 1}})
+                (when (not-any? #{_id} (get-solved user))
+                  (update! :users {:user user} {:$addToSet {:solved _id}})
+                  (update! :problems {:_id _id} {:$inc {:times-solved 1}})
                   (send total-solved inc))
-                (record-golf-score! user id (code-length code))
+                (record-golf-score! user _id (code-length code))
                 (str "Congratulations, you've solved the problem!"
-                     "<br />" (next-problem-link id)))
+                     "<br />" (next-problem-link _id)))
          :else (str "You've solved the problem! If you "
                     (login-link "log in") " we can track your progress."))]
-    (session/session-put! :code [id code])
-    (flash-msg (str message " " gist-link) (str "/problem/" id))))
+    (session/session-put! :code [_id code])
+    (flash-msg (str message " " gist-link) (str "/problem/" _id))))
 
 (def restricted-list '[use require in-ns future agent send send-off pmap pcalls])
 

                 i 0]
            (session/flash-put! :failing-test i)
            (if-not test
              (mark-completed id code)
              (let [testcase (s/replace test "__" user-forms)]
                (if (sb sb-tester (first (read-string-safely testcase)))
                  (recur more (inc i))

                   {:_id _id}
                   {:$set {user-score-key score}}))))))

(defn mark-completed [problem code & [user]]
  (let [user (or user (session/session-get :user))
        {:keys [_id approved]} problem
        gist-link (html [:div.share
                         [:a.novisited {:href "/share/code"} "Share"]
                         " this solution with your friends!"])
