prefix : Prefix Notation Quiz
_prefix : Prefix Notation Quiz_
By Jordan Johnson w/ Matt Jadud; and Jay McCarthy
Jordan Johnson used DrScheme for his TeachScheme! based curriculum. As a way to help students become comfortable with prefix notation, he created this testing servlet, with the help of Matt Jadud. At the TeachScheme! Anniversary Workshop, Jay McCarthy packaged the servlet for Jordan.
Directions are at the bottom.
This file contains the module-based servlet base. Require it like this:
> (require (planet "prefix.ss" ("jaymccarthy" "prefix.plt" 1)))
It provides the follow definitions:
A symbol denoting the interface of the web-server that this works with.
A number denoting the timeout for continuation URLs.
> (generate-start path-to-log) : string -> (request -> response)
This returns a start function that handles the initial request, taking a string path to the log file for results.
The following module-based servlet represents an installation of YPPDB:
(module your-prefix mzscheme
(require (prefix prefix: (planet "prefix.ss" ("jaymccarthy" "prefix.plt" 1))))
(define PATH-TO-LOG "/Users/jay/Desktop/prefix-test.log")
(define timeout prefix:timeout)
(define interface-version prefix:interface-version)
(define start (prefix:generate-start PATH-TO-LOG))
(provide timeout interface-version start))
Change the PATH-TO-LOG variable to a path on your machine.
Copy the above text to a new file:
<Your Path to PLT Scheme>/collect/web-server/default-web-root/servlets/your-prefix.ss
Run the web-server application, located in the PLT Scheme directory. If you already are running a web server, then you must edit the scheme file
<Your Path to PLT Scheme>/collect/web-server/configuration-table
And change the expression "(port 80)" to "(port 8080)", or another port.
Navigate to http://localhost:8080/servlets/your-prefix.ss and test out the quiz.
Find your IP address on your machine and give your students the URL
http://<Your IP Address>:8080/servlets/your-prefix.ss
for them to use the quiz software. The web-server must be running during quiz periods.
Notes and Limitations
There is no authentication of user IDs and it could email results rather than log.
v1.0 :: June 11th, 2005
* Initial revision