diff --git a/collects/handin-server/main.rkt b/collects/handin-server/main.rkt index 2026d5964c..3505891b4f 100644 --- a/collects/handin-server/main.rkt +++ b/collects/handin-server/main.rkt @@ -600,7 +600,7 @@ (set! timeout (+ (current-inexact-milliseconds) (* 1000 msg))) (case msg [(reset) (timeout-control (get-conf 'session-timeout))] - [(disable) (set! timeout #f)] + [(disable #f) (set! timeout #f)] [else (error 'timeout-control "bad argument: ~s" msg)]))) (current-timeout-control timeout-control) (timeout-control 'reset) diff --git a/collects/handin-server/scribblings/checker.scrbl b/collects/handin-server/scribblings/checker.scrbl index caecf80e06..45f8614173 100644 --- a/collects/handin-server/scribblings/checker.scrbl +++ b/collects/handin-server/scribblings/checker.scrbl @@ -235,10 +235,10 @@ code.} the description of the @racket[pre-checker] and @racket[post-checker] values for what can be done with these, and note that the check for valid users is always first. An example for - a sophisticated @racket[post:] block is below---it will first - disable timeouts for this session, then it will send a email with a - submission receipt, with CC to the TA (assuming a single TA), and - pop-up a message telling the student about it: + a sophisticated @racket[post:] block is below---it will first set a + very long timeout for this session, then it will send an email with + a submission receipt, with a CC to the TA (assuming a single TA), + and pop-up a message telling the student about it: @racketblock[ (require net/sendmail) @@ -247,7 +247,7 @@ code.} (format "hw.rkt: ~a ~a" (file-size "hw.rkt") (file-or-directory-modify-seconds "hw.rkt"))) - (timeout-control 'disable) + (timeout-control 300) (log-line "Sending a receipt: ~a" info) (send-mail-message "course-staff@university.edu" diff --git a/collects/handin-server/scribblings/utils.scrbl b/collects/handin-server/scribblings/utils.scrbl index f739855234..9b7b1d7ac0 100644 --- a/collects/handin-server/scribblings/utils.scrbl +++ b/collects/handin-server/scribblings/utils.scrbl @@ -190,7 +190,7 @@ Every exception or result mismatch during the call to and flush it. (The log port will prefix all lines with a time stamp and a connection identifier.)} -@defproc[(timeout-control [msg string?]) void?]{ +@defproc[(timeout-control [msg any?]) void?]{ Controls the timeout for this session. The timeout is initialized by the value of the @racket[session-timeout] configuration entry, @@ -198,8 +198,8 @@ Every exception or result mismatch during the call to @racket[msg] is @racket['reset] the timeout is reset to @racket[session-timeout] seconds; if @racket[msg] is a number the timeout will be set to that many seconds in the future. The timeout - can be completely disabled by @racket[(timeout-control #f)]. (Note - that before the checker is used (after the pre-checker, if + can be completely disabled using @racket['disable] or @racket[#f]. + (Note that before the checker is used (after the pre-checker, if specified), the timer will be reset to the @racket['session-timeout] value.)}