:names-checker can have a filename list
svn: r2513
This commit is contained in:
parent
dd942a3885
commit
d328e461be
|
@ -953,10 +953,11 @@ submissions, do the following:
|
||||||
suffix that should be used for the single concatenated output file.
|
suffix that should be used for the single concatenated output file.
|
||||||
|
|
||||||
* You can also add a `:names-checker' keyword -- the value can be a
|
* You can also add a `:names-checker' keyword -- the value can be a
|
||||||
regexp that all submitted files must follow (eg, ".*[.]scm$").
|
regexp that all submitted files must follow (eg, ".*[.]scm$"), or a
|
||||||
Alternatively, it can be a 1-argument procedure that will receive
|
list of expected file names. Alternatively, it can be a 1-argument
|
||||||
the (sorted) list of submitted files and can throw an error if some
|
procedure that will receive the (sorted) list of submitted files and
|
||||||
files are missing or some files are forbidden.
|
can throw an error if some files are missing or some files are
|
||||||
|
forbidden.
|
||||||
|
|
||||||
* In the "info.ss" file of the handin-client you need to set
|
* In the "info.ss" file of the handin-client you need to set
|
||||||
`enable-multifile-handin' to #t, and adjust `selection-default' to
|
`enable-multifile-handin' to #t, and adjust `selection-default' to
|
||||||
|
|
|
@ -299,6 +299,11 @@
|
||||||
(and (not (regexp-match names-checker n)) n))
|
(and (not (regexp-match names-checker n)) n))
|
||||||
names)
|
names)
|
||||||
=> (lambda (file) (error* "bad filename: ~e" file))])]
|
=> (lambda (file) (error* "bad filename: ~e" file))])]
|
||||||
|
[(and (list? names-checker) (andmap string? names-checker))
|
||||||
|
(let ([missing (remove* names names-checker)])
|
||||||
|
(when (pair? missing) (error* "missing files: ~e" missing)))
|
||||||
|
(let ([extra (remove* names-checker names)])
|
||||||
|
(when (pair? extra) (error* "unexpected files: ~e" extra)))]
|
||||||
[names-checker (error* "bad names-checker specification: ~e"
|
[names-checker (error* "bad names-checker specification: ~e"
|
||||||
names-checker)])
|
names-checker)])
|
||||||
;; problem: students might think that submitting files one-by-one will keep
|
;; problem: students might think that submitting files one-by-one will keep
|
||||||
|
|
Loading…
Reference in New Issue
Block a user