Programmatic assignment handling
Otter Grader integration
5
6
Last updated
Was this helpful?
Outcome You collect, grade, and hand back assignments at the command line using nvcollect, integrated with otter-grader.
This is a new and experimental feature of Nuvolos, please provide us with feedback to make it better!
Before you start
You have access to a JupyterLab + TeX Live application.
otter-grader and pandoc are available in the application (TeX Live is available on request from Nuvolos support).
You have installed nvcollect (contact support for the current install command).
You are working in the Master Instance.
To install nvcollect, run the following command from the terminal in your JupyterLab application:
pip install --upgrade git+https://github.com/alphacruncher/nv-collectnvcollect is a command-line tool available in supported applications. It lets you:
Collect assignments from all students into a folder in your instance.
Grade assignments with the otter-grader package.
Hand back assignments to all students in one command.
Below is a complete pipeline integrating nvcollect with otter-grader. It assumes you have already set up a JupyterLab application with otter-grader, pandoc, and TeX Live.
In a JupyterLab terminal, download the Otter Grader tutorial files. Refer to the otter-grader documentation for the current download command.
Copy dist/student/demo.ipynb to a clean folder under /files, then stage and distribute it as an Assignment (see Creating an assignment above).
For example, copy from /files/otter-test/dist/student/demo.ipynb to /files/assignment_1/demo.ipynb, stage /files/assignment_1/, and create an assignment named 'assignment_1'.
Keeping the assignment name in Nuvolos the same as the folder name (assignment_1) is a useful convention - it is not required, but it makes the nvcollect command much easier to remember.
Once the deadline has passed, collect submissions:
nvcollect collect \
--assignment_name "assignment_1" \
--assignment_folder assignment_1 \
--target_folder /files/test_collectThis gathers everything in the assignment_1 folder of the assignment_1 assignment from all students into /files/test_collect/. The directory structure is:
/files/test_collect
+-- nvcollect_manifest.json
+-- single_user_inst_<code1>
| +-- ...
+-- single_user_inst_<code2>
| +-- ...Run autograding across all collected submissions:
nvcollect otter-grade \
--source_folder /files/test_collect \
--autograder_location /files/otter-test/dist/autograder/autograder.zip \
--relative_path demo.ipynbThree notes:
source_folder is the same as the target_folder from the collect command.
autograder_location is the absolute path to the autograder zip from step 3.
relative_path tells the tool where to look inside each student folder for the notebook to grade.
After grading, source_folder contains:
A grade.csv file at the top level with the score of each student.
A grade.csv file inside each student folder with that student's score.
Last updated
Was this helpful?
Was this helpful?