Skip to content

Commit

Permalink
Remove non-working problems from practise problem sets.
Browse files Browse the repository at this point in the history
  • Loading branch information
bvds committed Jun 29, 2012
1 parent 8ad87f9 commit 89aee47
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion KB/principles.cl
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,8 @@
;;;
;;; List of Andes distribution homework sets
;;;
;;
;; Warning: this list contains problems that are not working (or don't
;; exist) yet. One should filter out non-applicable problems.
(defparameter *sets*
'("All Andes problems"
(
Expand Down
14 changes: 8 additions & 6 deletions lon-capa/sets.cl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


(defun lon-capa-problem-sets (sets &optional (path #P"./"))
"construct lon-capa xml files for all problems"
"construct lon-capa xml files for all working problems"
;; sets can be *sets* or *guerra-assigned*
(dolist (set (cadr sets))
(let ((path (merge-pathnames (strcat (set-file-name (car set)) "/")
Expand All @@ -30,10 +30,11 @@
;; This is just a dummy/placeholder.
(lon-capa-meta-file (car set) path)
(dolist (problem (second set))
(lon-capa-meta-file (format nil "problem ~(~A~)" problem)
path
(format nil "~(~A~).problem" problem))
(lon-capa-problem-file problem path)))))
(when (working-problem-p (get-problem problem))
(lon-capa-meta-file (format nil "problem ~(~A~)" problem)
path
(format nil "~(~A~).problem" problem))
(lon-capa-problem-file problem path))))))

(defun lon-capa-meta-file (title &optional (path #P"./") (name "default"))
"construct meta file containing title of problem set"
Expand Down Expand Up @@ -220,7 +221,8 @@ $display
j from 1
with lasti
;; Excluding problems makes id non-consecutive
unless (member problem exclude)
when (and (not (member problem exclude))
(working-problem-p (get-problem problem)))
do
(format t " problem ~A~%" problem)
(when lasti (format Stream "<link to=\"~A\" index=\"~A\" from=\"~A\" />~%"
Expand Down

0 comments on commit 89aee47

Please sign in to comment.