We need a function to detect circular references whenever a calculation has been edited:
detect_circular_reference(array) => boolean
The array is a whole lot of calculation strings containing verified idnumber strings for all the calcualtions in a course, eg:
C= A + B
A = B + C
B = C + A
See Double Loop on this page for an algorithm: http://phrogz.net/nodes/traversingdirectedgraph.asp