-
Notifications
You must be signed in to change notification settings - Fork 42
Protocols
Protocols are objects that describe some kind of interaction between the student and ok-client. They are all subclassed from here.
All protocols contain a run
method that will do some action and potentially modify the messages dictionary. Think of these as pluggable elements that every instructor can pick and choose from to decide which ones to use where.
There are seven protocols so far, and more will be added later. They are described below:
The Analytics protocol collects command line arguments (currently only whether the student is unlocking or not and which question they're focusing on) as well as a timestamp.
The Backup protocol sends all messages to the server. When the --submit flag is passed it, it makes sure to send them. Otherwise, it can timeout. This protocol must occur last in the config file.
The File Contents protocol collects the contents of the files that are going to be turned in. The list of files that it cares about are specified in the configuration file.
The Grading protocol grades the submission according to the specifications in the config file and the tests that are provided.
The Lock protocol locks all ok-tests so that students will have to unlock them before usage.
The Unlock protocol is an interactive protocol where it takes students through the unlocking process. To read more about locking and unlocking, see the System Design section of this.
The Scoring protocol assigns a number of points and displays the breakdown.