Releasing assignmentsΒΆ
See also
- Assign and release an assignment
- Details on generating assignments
- nbgrader release
- Command line options for
nbgrader release
- nbgrader list
- Command line options for
nbgrader list
- The philosophy and the approach
- More details on how the nbgrader hierarchy is structured.
- Configuration 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
:
%%file nbgrader_config.py
c = get_config()
c.NbGrader.course_id = "example_course"
c.TransferApp.exchange_directory = "/tmp/exchange"
Overwriting nbgrader_config.py
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:
%%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):
%%bash
nbgrader release "Problem Set 1"
[ReleaseApp | INFO] Source: /Users/jhamrick/project/tools/nbgrader/docs/source/user_guide/release/./Problem Set 1
[ReleaseApp | INFO] Destination: /tmp/exchange/example_course/outbound/Problem Set 1
[ReleaseApp | INFO] Released as: example_course Problem Set 1
Finally, you can verify that the assignment has been appropriately
released by running the nbgrader list
command:
%%bash
nbgrader list
[ListApp | INFO] Released assignments:
[ListApp | INFO] example_course Problem Set 1
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.