                   :times-solved 0
                   :description description
                   :tags (s/split tags #"\s+")
+                  :restricted (s/split restricted #"\s+")
                   :tests (s/split-lines code)
                   :user (if (empty? author) user author)
                   :approved false})


(defn create-problem
  "create a user submitted problem"
  [title tags description code id author]
  (let [user (session/session-get :user)]
    (if (can-submit? user)
      (let [prob-id (or id

      (flash-error "You are not authorized to submit a problem." "/problems"))))

(defn edit-problem [id]
  (let [{:keys [title user tags restricted description tests]} (get-problem id)]
    (doseq [[k v] {:prob-id id
                   :author user
                   :title title
                   :tags (s/join " " tags)
                   :restricted (s/join " " restricted)
                   :description description
                   :tests (s/join "\n" tests)}]
      (session/flash-put! k v))
