Timed assignments
See original GitHub issueI’d like to explore the possibility of adding timed assignments in nbgrader. Specifically, within a certain timeframe–
- Students would fetch the assignment, starting an internal timer
- Each assignment would have an “expiration” time attached to it, e.g. 3 hours from fetch
- After this expiration time, nbgrader will no longer allow the students to perform new submissions
This could be used in a “take-home exam” format, or even along the lines of a Google Codejam-style coding competition, where once a student actually begins the assignment they have only a short window in which to finish it before their ability to submit that assignment is disabled.
A quick-and-dirty way of implementing this would be to freeze the exchange directory (even revoke write permissions) for certain users after a certain time frame, but that wouldn’t scale too well and would require resetting the permissions for the next assignment. Something more robust would likely require an optional argument for the assignments in nbgrader_config
to specify their expiration time limit, and some kind of logging within nbgrader to enforce the time limit when a student attempts to submit.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
@angadhn I put this repo together a few years back with the scripts / changes you’re looking for: https://github.com/eds-uga/nbgrader-scripts
Keep in mind it’s two years old at this point so may be slightly out of date. It’s also not super robust–I only ever used it for classes with 20-30 students, so e.g. the tamper-“proofing” of the timestamps was never actually triggered, and so I can’t say for sure that it works or even works well–so YMMV.
Still, I’m happy to help out with it if needed! PRs / tickets are welcome 😃
This may be solvable using a bespoke external exchange plugin: you subclass the
exchangefetchassignment
class (see https://nbgrader.readthedocs.io/en/stable/exchange/exchange_api.html#exchangefetchassignment) and replace thecopy_files
method.In there, you can add logic to note who fetches what, when.
You could also subclass
ExchangeSubmit
, and replace thecopy_files
method to block submissions past a certain time.Alternatively, or in parallel, you could subclass
ExchangeCollect.copy_files()
to not collect late submissions.