student_id is not included in the notebook directory structure, because the master source version of the assignment is used for all students and master release version for all students.
nbgrader assign, the release version of the notebooks will be:
As a reminder, the instructor is responsible for distributing this release version to their students using their institution's existing student communication and document distribution infrastructure.
This example walks an instructor through the workflow for generating an assignment and preparing it for release to students:
Setting up the database is the first workflow step to create a release version of an assignment.
A connection to the database is set by passing
Gradebook the default database url,
sqlite:///gradebook.db which links to the sqlite database
gradebook.db located in the current directory.
Next, the assignment is added to the database and the assignment's due date is set using
In [ ]:import os # remove an existing database if os.path.exists("gradebook.db"): os.remove("gradebook.db") # create a connection to the db using the nbgrader API from nbgrader.api import Gradebook gb = Gradebook("sqlite:///gradebook.db") # add the assignment to the database and specify a due date gb.add_assignment("Problem Set 1", duedate="2015-02-01 15:00:00.000000 PST")
Now that the gradebook is set up, run
nbgrader assign. When running
nbgrader assign, the assignment name (which is "Problem Set 1") is passed. We also specify a header notebook (
source/header.ipynb) to preprend at the beginning of each notebook in the assignment:
In [ ]:%%bash nbgrader assign "Problem Set 1" --IncludeHeaderFooter.header=source/header.ipynb
Upon completion of
nbgrader assign in the previous step, there will be a new folder called
release with the same structure as
release folder contains the actual release version of the assignment files: