 
 (defn run-code [id raw-code]
   (let [code (.trim raw-code)
-        {:keys [tests restricted]} (get-problem id)
+        {:keys [tests restricted] :as problem} (get-problem id)
         sb-tester (get-tester restricted)]
     (session/flash-put! :code code)
     (try

                 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!"])
