Hello, I’m having trouble getting the handin server to accept a BSL file that uses the image library and also includes template definitions. I can make it work separately. That is, I can accept BSL image program files as long as they don’t have any templates and I can accept BSL programs with templates as long as they don’t use images.
The problem is that when I go to require both 2htdp/image and lang/htdp-beginner in the checker, there is a conflict with the image? procedure being defined in both modules. Trying to use (except-in 2htdp/image image?) inside the requires list doesn’t work. What do I need to do to write a checker that will accept the student file shown below? My broken checker is included below. (The student file will also have check-expects, which explains the presence of test-engine/racket-tests.) Suzanne ––––––-––––––-––––––-––––––-––––––- ;; broken checker! #lang s-exp handin-server/checker (require handin-server/grading-utils) (pre: (check-deadline)) (check: :language 'racket :requires '(2htdp/image ;;; (except-in 2htdp/image image?) test-engine/racket-tests lang/htdp-beginner) :create-text? #t :textualize? #f ) (post: #f) ;; Student file to be submitted (require 2htdp/image) ;; template: (define (process-strings strings) (cond [(empty? strings) ...] [else (... (first strings) ... (process-strings (rest strings)))])) ;; function based on template: (define (make-color-chart colors) (cond [(empty? colors) empty-image] [else (beside (rectangle 30 100 "solid" (first colors)) (make-color-chart (rest colors)))])) (check-expect (image-width (make-color-chart empty)) 0)
____________________ Racket Users list: http://lists.racket-lang.org/users