fix another magic string in handin server

svn: r7214
This commit is contained in:
Matthew Flatt 2007-08-29 20:41:19 +00:00
parent 76cad48393
commit 551a9e9dcc
2 changed files with 11 additions and 8 deletions

View File

@ -174,9 +174,9 @@
(define (submission->bytes submission maxwidth textualize? untabify? (define (submission->bytes submission maxwidth textualize? untabify?
markup-prefix bad-re) markup-prefix bad-re)
(define magic #"WXME") (define magic #rx#"^(?:#reader[(]lib\"read.ss\"\"wxme\"[)])?WXME")
(unless (equal? magic (subbytes submission 0 (bytes-length magic))) (unless (regexp-match? magic submission)
(error* "bad submission format, expecting a single DrScheme submission")) (error* "bad submission format, expecting a single DrScheme submission"))
(let-values ([(defs inters) (unpack-submission submission)]) (let-values ([(defs inters) (unpack-submission submission)])
(parameterize ([current-input-port (parameterize ([current-input-port
(if textualize? (if textualize?

View File

@ -645,6 +645,9 @@ _utils.ss_
submission byte string. The byte string is opened for reading, with submission byte string. The byte string is opened for reading, with
line-counting enabled. line-counting enabled.
See the "sandbox.ss" MzLib library for information on
`make-evaluator'.
> (call-with-evaluator language teachpack-paths input-program proc) > (call-with-evaluator language teachpack-paths input-program proc)
Calls `proc' with an evaluator for the given language, teachpack Calls `proc' with an evaluator for the given language, teachpack
paths, and initial definition content as supplied by input-program paths, and initial definition content as supplied by input-program
@ -788,13 +791,13 @@ Keywords for configuring `check:':
"utils.ss"). "utils.ss").
* :language -- the language that is used for evaluating submissions, * :language -- the language that is used for evaluating submissions,
same as the `language' argument for `make-evaluator' (see above). same as the `language' argument for `make-evaluator' (see
There is no default for this, so it must be set or an error is "sandbox.ss"). There is no default for this, so it must be set or
raised. an error is raised.
* :teachpacks -- teachpacks for evaluating submissions, same as the * :teachpacks -- teachpacks for evaluating submissions, same as the
`teachpacks' argument for `make-evaluator' (see above). Defaults to `teachpacks' argument for `make-evaluator' (see "sandbox.ss").
null -- no teachpacks. Defaults to null -- no teachpacks.
* :create-text? -- if true, then a textual version of the submission * :create-text? -- if true, then a textual version of the submission
is saved as "text.scm" in a "grading" subdirectory (or any suffix is saved as "text.scm" in a "grading" subdirectory (or any suffix