plom-demo

Plom script to start a demo server.

Instructions:
  • Run this script

  • In a new terminal, run the Plom Client and connect to localhost.

usage: plom-demo [-h] [--version] [-n N] [--port PORT] [--no-scans] [--prepare-only] [--in-tree-dev]
                 [server_dir]

Positional Arguments

server_dir
The directory containing the filespace to be used by this server.

It will be created if it does not exist. You can specify “.” to use the current directory. If omitted, a uniquely-named directory will be used.

options

--version

show program’s version number and exit

-n, --num-papers

How many fake exam papers for the demo (defaults to 20 if omitted)

--port

Which port to use for the demo server (41984 if omitted)

--no-scans

Start demo server but without uploading fake-scans. For testing purposes. Some scribbled simulated student data is still created (with names like fake_scribbled_exams1.pdf) but these are not automatically uploaded to the server.

Default: False

--prepare-only

Start the demo server long enough to get things running, then stop. This is primarily for testing and debugging.

Default: False

--in-tree-dev

Developer option. “plom-demo” changes the current working directory and then tries to run python3 -m plom.create. This will fail when running the code in-place. This option will hack the PYTHONPATH env var, adding “.” to it. Don’t use unless you’re experimenting with Plom’s source code.

Default: False

You can reproduce the demo using using various command line tools. Here we assume the Bash shell on a Unix system. Open two terminals. In the first terminal:

plom-server init mysrv --manager-pw 1234
plom-server launch mysrv

Now in the second terminal:

export PLOM_NO_SSL_VERIFY=1
export PLOM_MANAGER_PASSWORD=1234
export PLOM_SCAN_PASSWORD=4567

cd mysrv
plom-create newspec --demo
plom-create uploadspec demoSpec.toml
plom-create users --demo
cd ..
plom-create class --demo
plom-create rubric --demo
cd mysrv
plom-create make
plom-create extra-pages
plom-solutions extract solutionSpec.toml
plom-solutions extract --upload
cd ..

cd mysrv
python3 -m plom.create.exam_scribbler
plom-scan process --demo fake_scribbled_exams1.pdf
plom-scan upload -u fake_scribbled_exams1
plom-scan process --demo fake_scribbled_exams2.pdf
plom-scan upload -u fake_scribbled_exams2
plom-scan process --demo fake_scribbled_exams3.pdf
plom-scan upload -u fake_scribbled_exams3
cd ..