Releasing assignments

.. seealso:: :doc:`03_generating_assignments` Details on generating assignments :doc:`/command_line_tools/nbgrader-release` Command line options for ``nbgrader release`` :doc:`/command_line_tools/nbgrader-list` Command line options for ``nbgrader list`` :doc:`01_philosophy` More details on how the nbgrader hierarchy is structured. :doc:`/config_options` Details on ``nbgrader_config.py``

After an assignment has been created using nbgrader assign, the instructor must actually release that assignment to students. If the class is being taught on a single filesystem, then the instructor may use nbgrader release to copy the assignment files to a shared location on the filesystem for students to then download.

First, we must specify a few configuration options. We'll need to use these a few times, so we'll create a nbgrader_config.py file that will get automatically loaded when we run nbgrader:


In [ ]:
%%file nbgrader_config.py

c = get_config()

c.NbGrader.course_id = "example_course"
c.TransferApp.exchange_directory = "/tmp/exchange"

In the config file, we've specified the "exchange" directory to be /tmp/exchange. This directory must exist before running nbgrader, and it must be readable and writable by all users, so we'll first create it and configure tha appropriate permissions:


In [ ]:
%%bash

# remove existing directory, so we can start fresh for demo purposes
rm -rf /tmp/exchange

# create the exchange directory, with write permissions for everyone
mkdir /tmp/exchange
chmod ugo+rw /tmp/exchange

Now that we have the directory created, we can actually run nbgrader release (and as with the other nbgrader commands for instructors, this must be run from the root of the course directory):


In [ ]:
%%bash

nbgrader release "Problem Set 1"

Finally, you can verify that the assignment has been appropriately released by running the nbgrader list command:


In [ ]:
%%bash

nbgrader list

Note that there should only ever be one instructor who runs the nbgrader release and nbgrader collect commands (and there should probably only be one instructor -- the same instructor -- who runs nbgrader assign, nbgrader autograde and nbgrader formgrade as well). However this does not mean that only one instructor can do the grading, it just means that only one instructor manages the assignment files. Other instructors can still perform grading by accessing the formgrader URL.