Skip to content

Commit

Permalink
Merge commit 'v1.3.0.1' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
amalloy committed Sep 17, 2011
2 parents fd76795 + 6fd1c7e commit 57b9382
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject foreclojure "1.3.0"
(defproject foreclojure "1.3.0.1"
:description "4clojure - a website for lisp beginners"
:dependencies [[clojure "1.2.1"]
[clojure-contrib "1.2.0"]
Expand Down
9 changes: 5 additions & 4 deletions src/foreclojure/problems.clj
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,10 @@ Return a map, {:message, :error, :url, :num-tests-passed}."
{:$inc {:seq 1}})))
edit-url (str "https://4clojure.com/problem/"
id)
approved (true? (:approved (fetch-one :problems
:where {:_id id}
:only [:approved])))]
existing-problem (fetch-one :problems
:where {:_id id}
:only [:approved :times-solved])
approved (true? (:approved existing-problem))]

(when (empty? author) ; newly submitted, not a moderator tweak
(try
Expand All @@ -490,7 +491,7 @@ Return a map, {:message, :error, :url, :num-tests-passed}."
{:_id id
:title title
:difficulty difficulty
:times-solved 0
:times-solved (or (:times-solved existing-problem) 0)
:description description
:tags (re-seq #"\S+" tags)
:restricted (re-seq #"\S+" restricted)
Expand Down

0 comments on commit 57b9382

Please sign in to comment.