From dba3ba85912690fcca4b02699f7d1e5fc77eb1b1 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 6 Nov 2008 22:05:13 +0000 Subject: [PATCH] improved error message, some reformatting svn: r12335 --- collects/handin-server/checker.ss | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/collects/handin-server/checker.ss b/collects/handin-server/checker.ss index aaa896522a..0963b6a9bf 100644 --- a/collects/handin-server/checker.ss +++ b/collects/handin-server/checker.ss @@ -321,8 +321,8 @@ (define (add-header-line! line) (let ([new (list line)] [cur (thread-cell-ref added-lines)]) (if cur - (set-box! cur (append (unbox cur) new)) - (thread-cell-set! added-lines (box new))))) + (set-box! cur (append (unbox cur) new)) + (thread-cell-set! added-lines (box new))))) (define ((wrap-evaluator eval) expr) (define unknown "unknown") @@ -450,11 +450,11 @@ (cond [(list? allowed) (unless (member users allowed) (error* - "You are not registered ~a for this submission" + "You are not registered for ~a submission" (case (length users) - [(1) "for individual submission"] - [(2) "as a pair"] - [else "as a group"])))] + [(1) "individual"] + [(2) "pair"] + [else "group"])))] [(procedure? allowed) (allowed users)] [(not allowed) ; default is single-user submission (unless (= 1 (length users)) @@ -479,7 +479,9 @@ (prefix-line (user-substs user student-line))) (for-each prefix-line/substs extra-lines) (for-each prefix-line/substs - (unbox (or (thread-cell-ref added-lines) (box '())))) + (cond [(thread-cell-ref added-lines) + => unbox] + [else '()])) (display submission-text)))) (define submission-text (and create-text?