CodeRunner Documentation (V3.3.0)

11.1 The Graph UI

The Graph UI plugin, which should be regarded as experimental at this point, provides simple graph-drawing capabilities to support questions where the student is asked to draw or edit a graph. By default the Graph UI, which was developed for Finite State Machines, draws directed graphs, allows nodes to be marked as Accept states and allows incoming start edges. For example:

Clicking the Help button on the graph canvas displays information on how to draw graphs.

Some limited control of the Graph UI is available to the question author via template parameters as follows:

  1. isdirected - defaults to true. Set it to false for a non-directed graph.

  2. isfsm - defaults to true. Set it to false to prevent edges the enter the graph from space, i.e., without a start node.

  3. noderadius - defaults to 26. The radius of nodes, in pixels.

For example, for a non-directed non-fsm graph set the template parameters field to

    {"isdirected": false, "isfsm": false}

or merge those values into any other template parameters required by the question.

Other template parameters may be added as required.

Many thanks to Emily Price for the original implementation of the Graph UI.

All active CodeRunner user interface plugins in both the question authoring form and the student's quiz page can be toggled off and on with a CTRL-ALT-M keypress, alternately exposing and hiding the underlying textarea element.