From 551a9e9dcc65f02a2c99cdd0d702a441d76c307b Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 29 Aug 2007 20:41:19 +0000 Subject: [PATCH] fix another magic string in handin server svn: r7214 --- collects/handin-server/checker.ss | 6 +++--- collects/handin-server/doc.txt | 13 ++++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/collects/handin-server/checker.ss b/collects/handin-server/checker.ss index e7ee140042..ff6ca9c201 100644 --- a/collects/handin-server/checker.ss +++ b/collects/handin-server/checker.ss @@ -174,9 +174,9 @@ (define (submission->bytes submission maxwidth textualize? untabify? markup-prefix bad-re) - (define magic #"WXME") - (unless (equal? magic (subbytes submission 0 (bytes-length magic))) - (error* "bad submission format, expecting a single DrScheme submission")) + (define magic #rx#"^(?:#reader[(]lib\"read.ss\"\"wxme\"[)])?WXME") + (unless (regexp-match? magic submission) + (error* "bad submission format, expecting a single DrScheme submission")) (let-values ([(defs inters) (unpack-submission submission)]) (parameterize ([current-input-port (if textualize? diff --git a/collects/handin-server/doc.txt b/collects/handin-server/doc.txt index 961e37ca6a..19d0b5d5c0 100644 --- a/collects/handin-server/doc.txt +++ b/collects/handin-server/doc.txt @@ -645,6 +645,9 @@ _utils.ss_ submission byte string. The byte string is opened for reading, with line-counting enabled. + See the "sandbox.ss" MzLib library for information on + `make-evaluator'. + > (call-with-evaluator language teachpack-paths input-program proc) Calls `proc' with an evaluator for the given language, teachpack paths, and initial definition content as supplied by input-program @@ -788,13 +791,13 @@ Keywords for configuring `check:': "utils.ss"). * :language -- the language that is used for evaluating submissions, - same as the `language' argument for `make-evaluator' (see above). - There is no default for this, so it must be set or an error is - raised. + same as the `language' argument for `make-evaluator' (see + "sandbox.ss"). There is no default for this, so it must be set or + an error is raised. * :teachpacks -- teachpacks for evaluating submissions, same as the - `teachpacks' argument for `make-evaluator' (see above). Defaults to - null -- no teachpacks. + `teachpacks' argument for `make-evaluator' (see "sandbox.ss"). + Defaults to null -- no teachpacks. * :create-text? -- if true, then a textual version of the submission is saved as "text.scm" in a "grading" subdirectory (or any suffix