             [sandbar.stateful-session :as      session]
             [clojure.string           :as      s]
             [ring.util.response       :as      response])
+  (:import  [org.apache.commons.mail  EmailException])
   (:use     [foreclojure.utils        :only    [from-mongo get-user get-solved login-link *url* flash-msg flash-error def-page row-class approver? can-submit? send-email image-builder]]
             [foreclojure.social       :only    [tweet-link gist!]]
             [foreclojure.feeds        :only    [create-feed]]

               :golfChart (html (render-golf-chart))})))

(def-page code-box [id]
  (let [{:keys [_id title difficulty tags description restricted tests approved user]}
        (get-problem (Integer. id))]
    [:div
     [:span#prob-title
      (when-not approved

         [:td.centered user]])
      problems))])

(defn unapproved-problem-list []
  (let [user (session/session-get :user)]
    (if (approver? user)
      (unapproved-problem-list-page)
      (flash-error "You cannot access this page" "/problems"))))

(def-page problem-submission-page []
