From c88354bb172841ef0c58c1ab4ed096b81ed8f0f7 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 12 Nov 2005 16:08:46 +0000 Subject: [PATCH] small fixes svn: r1295 --- collects/handin-server/doc.txt | 8 ++++---- collects/handin-server/extra-utils.ss | 6 +++++- collects/handin-server/handin-server.ss | 5 +++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/collects/handin-server/doc.txt b/collects/handin-server/doc.txt index 89b411fd7a..bc284d14ab 100644 --- a/collects/handin-server/doc.txt +++ b/collects/handin-server/doc.txt @@ -214,10 +214,10 @@ sub-directories: which matches the default user-regexp 'username-case-sensitive? : a boolean; when #f, usernames - are case-folded for all purposes; defaults to #f - (note that you should not set this to #t on Windows or when - using a case-insensitive filesystem, since usernames are used - as directory names) + are case-folded for all purposes; defaults to #f (note that + you should not set this to #t on Windows or when using other + case-insensitive filesystems, since usernames are used as + directory names) 'allow-new-users : a boolean indicating whether to allow new-user requests from a client tool; the default is #f diff --git a/collects/handin-server/extra-utils.ss b/collects/handin-server/extra-utils.ss index 763cd6e25a..f6c19fe229 100644 --- a/collects/handin-server/extra-utils.ss +++ b/collects/handin-server/extra-utils.ss @@ -377,6 +377,10 @@ [else (error* "no language configured for submissions")]) output-file) ;; ======================================== + ;; indirection for user-post (may be set after `check:') + (define (post users submission) + (when user-post (user-post users submission))) + ;; ======================================== ;; configuration sanity checks (let ([bad (cond [(and eval? (not language)) "`eval?' without `language'"] @@ -390,7 +394,7 @@ (when bad (error* "bad checker specifications: cannot use ~a" bad))) ;; ======================================== - (list pre check user-post))))]))) + (list pre check post))))]))) (define-syntax (with-bindings stx) (syntax-case stx () diff --git a/collects/handin-server/handin-server.ss b/collects/handin-server/handin-server.ss index 9a4956b028..c771182963 100644 --- a/collects/handin-server/handin-server.ss +++ b/collects/handin-server/handin-server.ss @@ -473,7 +473,8 @@ (when (a-ref data key #f) (perror "multiple values for ~e" key)) (case key [(username/s) - (when USERNAME-CASE-SENSITIVE? (set! val (string-foldcase val))) + (unless USERNAME-CASE-SENSITIVE? + (set! val (string-foldcase val))) (let ([usernames ;; Username lists must always be sorted, and never empty ;; (regexp-split will not return an empty list) @@ -507,7 +508,7 @@ [else (when (eof-object? msg) (LOG "hangup") - (error 'handin "hangup" (a-ref data 'username/s))) + (error 'handin "hangup (~a)" (a-ref data 'username/s))) (let ([usernames (a-ref data 'usernames #f)] [user-datas (a-ref data 'user-datas #f)]) (when (or (memq #f user-datas)