Graph UI problem

Graph UI problem

by Jan Derriks -
Number of replies: 8

With a later update of Coderunner we have a problem drawing graphs: cannot enter label name into a self-loop from a state. After shift-click in a state the selfloop shows and the cursor blinks but no text appears when typing. On the coderunner.org site it works. How to proceed?

Version: 3.7.5 2020012500

Moodle Moodle 3.6.8+ (Build: 20200214

Browser: latest Firefox or Chrome.

In reply to Jan Derriks

Re: Graph UI problem

by Richard Lobb -

This bug was fixed in 3.7.5+, pushed to github on 18 January. Are you able to pull the latest version from there?

In reply to Richard Lobb

Re: Graph UI problem

by Jan Derriks -

After installing moodle-qbehaviour_adaptive_adapted_for_coderunner-master.zip from the github master branch that worked, thanks!

Was I right that it was broken after a regular Moodle plugins upgrade?
In reply to Jan Derriks

Re: Graph UI problem

by Richard Lobb -

Yes, sorry about that. CodeRunner 3.7.5 added some extra GraphUI functionality to allow you to provide an answer-preload graph with specified aspects locked, for example to prevent the student from changing edges or edge labels or nodes etc. The bug was a consequence of that - self-loop edges became locked.

You're the first person outside our University ever to ask me about the GraphUI, so I thought the bug would have very little impact. I held back on updating the Moodle repository until I had a more worthwhile set of updates but that doesn't seem to have happened yet - my apologies.

In reply to Richard Lobb

Re: Graph UI problem

by Jan Derriks -


Such an honour to be the first to ask GraphUI questions.. I have more:

A collegue pointed me to this: marking a state as final does not seem to work:

Maybe that is also something for the next update.

Thanks for the support!

In reply to Jan Derriks

Re: Graph UI problem

by Richard Lobb -

Could you clarify what you mean by "does not seem to work", please? It seems to work OK for me in the sense that double clicking a node adds an extra ring inside the node. Is that not working for you, or did you have some other expectations?


In reply to Richard Lobb

Re: Graph UI problem

by Jan Derriks -

Hi Richard,

Exactly what I expected: a double ring on doubleclick. Used to work once upon a time. Now it acts the same as a single click in a node. The cursor happily blinks to let me change the node name while all I wanted is one more ring.


In reply to Jan Derriks

Re: Graph UI problem

by Richard Lobb -

I think the problem here is that the graph isn't defined to be a Finite State Machine. You need to have the template parameter isfsm set to true to enable incoming edges from empty space and to allow double clicking to define nodes as accept states. Try defining the template parameter field for your question or question type to be

{"isfsm": true}

I see I haven't documented that adequately; my apologies. I have now updated the documentation.

It sounds like I might have changed the default value of isfsm from true to false as our local use of GraphUI moved from its original use only for state machines to more general contexts. Sorry again, but as I said earlier I wasn't other of other people using the GraphUI.

I hope to push version 3.7.6 to github within the next day or two; this will contain the updated documentation.

In reply to Richard Lobb

Re: Graph UI problem

by Jan Derriks -


Such a simple solution and it works perfectly, thank you Richard!