From 6d0fdec1df399961040c20356833fc0bc7380eb7 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 22 Aug 2005 18:45:51 +0000 Subject: [PATCH] handin icon and doc fixes svn: r634 --- collects/handin-client/icon.png | Bin 696 -> 334 bytes collects/handin-client/info.ss | 7 +++---- collects/handin-client/tool.ss | 10 +++++++++- collects/handin-server/doc.txt | 34 +++++++++++++++++--------------- 4 files changed, 30 insertions(+), 21 deletions(-) diff --git a/collects/handin-client/icon.png b/collects/handin-client/icon.png index 8876ac78f0c016760b3b362de1a49d544abc36b7..2d37039a107054641af6ead096a133618a406b68 100644 GIT binary patch delta 308 zcmV-40n7fl1=N1G9S|0t(dj4spt+Gv=)(_IkOk=cVB!}mPuW($q(W9zw5@=5*j8Zl7U+UUZ^5z(CSL`S z^lYL&5hPX5xE>;4~t64s2Bdp#I(;Mj$Um-cFnQ&V-p~ z5zWlMJf=F7W-Y+g6Z!rZxlRDoN2ehow3U>PWRqj|zvB;}9Z)ZG7XYgO0000>)aTLdu(QdTcEH(<6Ng^y55HZQ1lu$}G zQIb+hZ!q{burS#4_BUhk2IDh7eTHwHex38)ySa4@r~BSLzkhSS-}61^-FseJynQXk)m zAvO~MjKE5z(yi*P&w}COyJAxEHpWvoBwzzm0x6gXSRY`JO!K7#n-Wm66vS4=84m~r zqkK}ZB?8yC4}W7G0ep|oFT*E7gh0j2)Ehzj~kn0S1k50+y5ul&B&VXK@UJJY@p?{L)HUo{?;5~99WjKeg5ownI zH)w+wNHvzk)bw--5U+X>@W>Gtz6)pp1aJ~;lS>7R3L>rOX@BJaV_H(EJ|tjgL7Q+Sx0QBqa_%Ob8OYEMOwz0O?oMb`fCN&(n4W7WNy?Rq zRhg<&ivU7u4J)5L@Q{E=u(v@%gJ+Z4$^^h!dtO7!J?(%E*YZdS{WM9ICPyLs+H^%) zru)&qs-}OP>|hGOnoVxc>3#&9i9kxmUjJ&p02%-Q|NjF3zl{a(9mZ(V00000NkvXX Hu0mjfl(R0o diff --git a/collects/handin-client/info.ss b/collects/handin-client/info.ss index 9c2afa2871..95facb0892 100644 --- a/collects/handin-client/info.ss +++ b/collects/handin-client/info.ss @@ -1,12 +1,11 @@ (module info (lib "infotab.ss" "setup") ;; Modify these four definitions to customize the tool. ;; 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 collection "handin-client") - ;(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. + (define server:port "localhost:7979") ;; The following are optional. Uncomment and fill in ;; the values to add a menu item under "Help" to open diff --git a/collects/handin-client/tool.ss b/collects/handin-client/tool.ss index e3044c6eb3..38019ddd3c 100644 --- a/collects/handin-client/tool.ss +++ b/collects/handin-client/tool.ss @@ -442,14 +442,22 @@ (show #t)))) (define (scale-by-half file) - (let* ([bm (make-object bitmap% file)] + (let* ([bm (make-object bitmap% file 'unknown/mask)] [w (send bm get-width)] [h (send bm get-height)] [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)]) (send mdc set-scale 0.5 0.5) (send mdc draw-bitmap bm 0 0) (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)) (define handin-icon diff --git a/collects/handin-server/doc.txt b/collects/handin-server/doc.txt index 04b04d44c9..3602a282ee 100644 --- a/collects/handin-server/doc.txt +++ b/collects/handin-server/doc.txt @@ -93,8 +93,8 @@ Client Customization To customize the client: 1. Rename (or make a copy of) the "handin-client" collection - directory. The new name should describe your class more or less - uniquely. For example, "uu-cpsc2010" is a good name for CPSC 2010 + directory. The new name should describe your class uniquely. + For example, "uu-cpsc2010" is a good name for CPSC 2010 at the University of Utah. 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 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: openssl req -new -nodes -x509 -days 365 -out server-cert.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 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 (( ) ...) @@ -211,7 +211,7 @@ sub-directories: allows login as any user; the default is #f, which disables 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 (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 @@ -226,7 +226,7 @@ sub-directories: The username "solution" is special. It is used by the HTTPS status 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 "Handin". The student then selects from the list. The list of 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 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. - * active//checker.ss (optional) --- a module that + * "active//checker.ss" (optional) --- a module that exports a `checker' function. This function receives two strings. The first is a username and the second is the user's 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 "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 (id time-str msg-str) and `id' is an integer representing the connection (numbered consecutively from 1 when the server starts) or 0 for a message 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. - * [in]active/// (if submitted) --- the + * "[in]active///" (if submitted) --- the most recent submission for by where was returned by the checker (or the value of the `default-file-name' configuration option if there's no checker). - * [in]active///grade (optional) --- 's grade + * "[in]active///grade" (optional) --- 's grade for , to be reported by the HTTPS status web server. - * [in]active//solution/sol.scm --- the - solution to the assignment, made available by the status server - to any user who logs in. + * "[in]active//solution/" --- the solution to the + assignment, made available by the status server to any user who + logs in. There must be only one file in "/solution/"; + if there are multiple files, only one named "sol.scm" + is made available as the solution. The server can be run within either MzScheme or MrEd, but "utils.ss" requires MrEd (which means that `checker' modules will likely require