The lechef framework helps in creating exercises for learning logic circuits. You can create exercises for simulating a circuit's behavior and exercises for designing circuits. Check the documentation for a more thorough description, examples, and instructions on how to use it.
Here are the components (or, gates) currently supported by the framework: NOT, AND, OR, NAND, NOR, XOR, EQV, and input and output
And here's an example of an exercise. In the exercise, student's task is to toggle the input/output values of each gate to match the correct values of the given input to the circuit. Note: This is only an image, see the docs for interactive examples.