Goal: Be able to hotswap between servers (e.g. for different courses or for different assignments in the same course) without having to delete the current server directory and redownload all the student papers, etc.
Use case: When running multiple courses that use plom it might be helpful to be able to switch between different servers to look at how the marking process is going in each one. Or, sometimes when marking multiple sections of the same course it can be convenient to be able to switch quickly between sections (e.g., "I know somebody in the first section made this same mistake but I can't quite remember what I thought was wrong with it, let me go check what they said")
General approach:
Store servers for each class/assignment combo in different local directories. Whenever the user wants to switch (course, assignment), check if a directory for that exists already. If so, then try and launch a server from that directory. Else, make the directory and initialize all the data, etc.
Whenever user wants to switch to a different (course, assignment), give the option to either kill the current server and start a new one in the new directory, or keep the old server alive and choose a different port for the new server and launch the new server.
Details:
__init__()
methods to CanvasServer
and CanvasServerState
so that we can do something like CanvasServer(course, assignment)
CanvasServer.directory
based on course
and assignment
instead of using a hardcoded path (already implemented a few days ago)LiveServers
that holds a list of all currently-running CanvasServer
objects LiveServers
and have its information (e.g. directory, port number, etc.) written to some file so that it's easy to later show the user something like "here are some servers you used in the past, do you want to start them back up?" from plom.server import PlomServer
to make this possible welcome
PlomServer
?
ipython
PlomServer.server._server_proc.terminate()
it doesn't seem to do it???
popen2
and some builtin python thing: latter not reliable yet
https://sekrit.math.com/exam/<SID>_random_hex.pdf
" a few days before the test. At 11am (test start), I put those files in place and tell students to begin. 35 mins later, they stop writing and scan. They then upload to our LMS (Canvas). I then pull all those PDFs from Canvas (using the LMS's API) and scan them into Plom using plom-hwscan
(we call this "Homework Mode" in Plom)