Skip to content
soumyabasu edited this page Jun 16, 2015 · 1 revision

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:

Analytics

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.

Backup

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.

File Contents

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.

Grading

The Grading protocol grades the submission according to the specifications in the config file and the tests that are provided.

Lock

The Lock protocol locks all ok-tests so that students will have to unlock them before usage.

Unlock

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.

Scoring

The Scoring protocol assigns a number of points and displays the breakdown.

Clone this wiki locally