In sqlexamples.xml 'Simple join test' "columnwidths": [0, 0, 15] do lead to unwanted behaviour

In sqlexamples.xml 'Simple join test' "columnwidths": [0, 0, 15] do lead to unwanted behaviour

von Luca Bösch -
Anzahl Antworten: 3

Hi

Note that in the "Simple join test" question in the sqlexamples.xml downloadable question set, a parameter

{"columnwidths": [0, 0, 15]}
is set which leads to unrecognized solutions whilst the SQL query is written correctly (seems like whitespace inaccuracies).
It would be great to amend it in the downloadable xml. If the columnwidths are e.g. 10, then everything works out.

This might prevent frustration ("Nice Moodle plugin, but it doesn't work as I expect!") when someone tries that example.

Thanks in advance.

Best,
Luca

Als Antwort auf Luca Bösch

Re: In sqlexamples.xml 'Simple join test' "columnwidths": [0, 0, 15] do lead to unwanted behaviour

von Richard Lobb -
Many thanks for pointing this out, Luca - sorry about the long delay. Interestingly, the exported question was exactly the version that was running just fine on coderunner.org.nz using the University of Canterbury outward facing Jobe server. It seems the meaning of a zero column width in sqlite3 has been changed. It used to be the minimum of the column header width, the first data row entry and 10, but now the wording says just that "the column width is chosen automatically". 

Making it explicitly 10 seems to work with both the old sqlite3 and the current one.

I've updated the .xml file in the question itself (on this page) but you refer to the "sqlexamples.xml downloadable question set - that sounds like a file with both questions in it. I'm not immediately seeing it - could you point me at it, please, so I can fix it, too.

Thanks again

Richard
Als Antwort auf Richard Lobb

Re: In sqlexamples.xml 'Simple join test' "columnwidths": [0, 0, 15] do lead to unwanted behaviour

von Richard Lobb -
Thanks Luca. I'd forgotten I'd replicated the SQL examples in the repo. I've fixed the column width problem there too and the change will go out in the next push.