handin icon and doc fixes

svn: r634
This commit is contained in:
Matthew Flatt 2005-08-22 18:45:51 +00:00
parent 742b6682ea
commit 6d0fdec1df
4 changed files with 30 additions and 21 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 696 B

After

Width:  |  Height:  |  Size: 334 B

View File

@ -1,12 +1,11 @@
(module info (lib "infotab.ss" "setup") (module info (lib "infotab.ss" "setup")
;; Modify these four definitions to customize the tool. ;; Modify these four definitions to customize the tool.
;; Also replace the "icon.png" and "server-cert.pem" files. ;; Also replace the "icon.png" and "server-cert.pem" files.
;; Instead of uncommenting the definition of server:port, you
;; can set the PLT_HANDIN_SERVER_PORT environment variable.
(define name "Course Handin") (define name "Course Handin")
(define collection "handin-client") (define collection "handin-client")
;(define server:port "localhost:7979") (define server:port "localhost:7979")
;; --> server:port should be defined here, if it is not defined, not tool
;; will appear. To try things, you can set the PLT_HANDIN_SERVER_PORT
;; environment variable when this is undefined.
;; The following are optional. Uncomment and fill in ;; The following are optional. Uncomment and fill in
;; the values to add a menu item under "Help" to open ;; the values to add a menu item under "Help" to open

View File

@ -442,14 +442,22 @@
(show #t)))) (show #t))))
(define (scale-by-half file) (define (scale-by-half file)
(let* ([bm (make-object bitmap% file)] (let* ([bm (make-object bitmap% file 'unknown/mask)]
[w (send bm get-width)] [w (send bm get-width)]
[h (send bm get-height)] [h (send bm get-height)]
[bm2 (make-object bitmap% (quotient w 2) (quotient h 2))] [bm2 (make-object bitmap% (quotient w 2) (quotient h 2))]
[mbm2 (and (send bm get-loaded-mask)
(make-object bitmap% (quotient w 2) (quotient h 2)))]
[mdc (make-object bitmap-dc% bm2)]) [mdc (make-object bitmap-dc% bm2)])
(send mdc set-scale 0.5 0.5) (send mdc set-scale 0.5 0.5)
(send mdc draw-bitmap bm 0 0) (send mdc draw-bitmap bm 0 0)
(send mdc set-bitmap #f) (send mdc set-bitmap #f)
(when mbm2
(send mdc set-bitmap mbm2)
(send mdc set-scale 0.5 0.5)
(send mdc draw-bitmap (send bm get-loaded-mask) 0 0)
(send mdc set-bitmap #f)
(send bm2 set-loaded-mask mbm2))
bm2)) bm2))
(define handin-icon (define handin-icon

View File

@ -93,8 +93,8 @@ Client Customization
To customize the client: To customize the client:
1. Rename (or make a copy of) the "handin-client" collection 1. Rename (or make a copy of) the "handin-client" collection
directory. The new name should describe your class more or less directory. The new name should describe your class uniquely.
uniquely. For example, "uu-cpsc2010" is a good name for CPSC 2010 For example, "uu-cpsc2010" is a good name for CPSC 2010
at the University of Utah. at the University of Utah.
2. Edit the first three definitions of "info.ss" in your renamed 2. Edit the first three definitions of "info.ss" in your renamed
@ -153,17 +153,17 @@ The server must be run from a directory that is specially prepared to
host the server. This directory contains the following files and host the server. This directory contains the following files and
sub-directories: sub-directories:
* server-cert.pem --- the server's certificate. To create a * "server-cert.pem" --- the server's certificate. To create a
certificate and key with openssl: certificate and key with openssl:
openssl req -new -nodes -x509 -days 365 -out server-cert.pem openssl req -new -nodes -x509 -days 365 -out server-cert.pem
-keyout private-key.pem -keyout private-key.pem
* private-key.pem --- the private key to go with "server-cert.pem". * "private-key.pem" --- the private key to go with "server-cert.pem".
Whereas "server-cert.pem" gets distributed to students with the Whereas "server-cert.pem" gets distributed to students with the
handin client, "private-key.pem" is kept private. handin client, "private-key.pem" is kept private.
* config.ss (optional) --- configuration options. The file format * "config.ss" (optional) --- configuration options. The file format
is is
((<key> <val>) ...) ((<key> <val>) ...)
@ -211,7 +211,7 @@ sub-directories:
allows login as any user; the default is #f, which disables allows login as any user; the default is #f, which disables
the password the password
* users.ss (created if not present if a user is added) --- keeps * "users.ss" (created if not present if a user is added) --- keeps
the list of user accounts, along with the associated password the list of user accounts, along with the associated password
(actually the MD5 hash of the password), full name, and free-form (actually the MD5 hash of the password), full name, and free-form
id (perhaps a student id at a university) of the account. The file id (perhaps a student id at a university) of the account. The file
@ -226,7 +226,7 @@ sub-directories:
The username "solution" is special. It is used by the HTTPS status The username "solution" is special. It is used by the HTTPS status
server. server.
* active/ --- sub-directory for active assignments. A list of active * "active/" --- sub-directory for active assignments. A list of active
assignments is sent to a client tool when a student clicks assignments is sent to a client tool when a student clicks
"Handin". The student then selects from the list. The list of "Handin". The student then selects from the list. The list of
active assignments is built once by the server when it starts. active assignments is built once by the server when it starts.
@ -254,10 +254,10 @@ sub-directories:
For submissions from a test-suite window, the file is a normal For submissions from a test-suite window, the file is a normal
test-suite file. test-suite file.
* inactive/ --- sub-directory for inactive assignments, used by the * "inactive/" --- sub-directory for inactive assignments, used by the
HTTPS status web server. HTTPS status web server.
* active/<assignment>/checker.ss (optional) --- a module that * "active/<assignment>/checker.ss" (optional) --- a module that
exports a `checker' function. This function receives two exports a `checker' function. This function receives two
strings. The first is a username and the second is the user's strings. The first is a username and the second is the user's
submission as a string. (See also `unpack-submission', etc. from submission as a string. (See also `unpack-submission', etc. from
@ -277,27 +277,29 @@ sub-directories:
and return "tests" if the string is a test-suite submission or and return "tests" if the string is a test-suite submission or
"program" if it is not. "program" if it is not.
* log.ss (created if not present, appended otherwise) --- records * "log.ss" (created if not present, appended otherwise) --- records
connections and actions, where each entry is of the form connections and actions, where each entry is of the form
(id time-str msg-str) (id time-str msg-str)
and `id' is an integer representing the connection (numbered and `id' is an integer representing the connection (numbered
consecutively from 1 when the server starts) or 0 for a message consecutively from 1 when the server starts) or 0 for a message
for server without a connection. for server without a connection.
* web-status-log.ss (created if not present, appended otherwise) * "web-status-log.ss" (created if not present, appended otherwise)
--- records accesses of the HTTPS status web server. --- records accesses of the HTTPS status web server.
* [in]active/<assignment>/<user>/<filename> (if submitted) --- the * "[in]active/<assignment>/<user>/<filename>" (if submitted) --- the
most recent submission for <assignment> by <user> where <filename> most recent submission for <assignment> by <user> where <filename>
was returned by the checker (or the value of the was returned by the checker (or the value of the
`default-file-name' configuration option if there's no checker). `default-file-name' configuration option if there's no checker).
* [in]active/<assignment>/<user>/grade (optional) --- <user>'s grade * "[in]active/<assignment>/<user>/grade" (optional) --- <user>'s grade
for <assignment>, to be reported by the HTTPS status web server. for <assignment>, to be reported by the HTTPS status web server.
* [in]active/<assignment>/solution/<assignment>sol.scm --- the * "[in]active/<assignment>/solution/<file>" --- the solution to the
solution to the assignment, made available by the status server assignment, made available by the status server to any user who
to any user who logs in. logs in. There must be only one file in "<assignment>/solution/";
if there are multiple files, only one named "<assignment>sol.scm"
is made available as the solution.
The server can be run within either MzScheme or MrEd, but "utils.ss" The server can be run within either MzScheme or MrEd, but "utils.ss"
requires MrEd (which means that `checker' modules will likely require requires MrEd (which means that `checker' modules will likely require