marcusgreen / moodle-qtype_wordselect

langHighlight words by clicking e.g. select all nouns in this sentence
2 stars 10 forks source link

Error during backup: Field "question" does not exist in table "question_wordselect" #7

Closed leac closed 7 years ago

leac commented 7 years ago

We tried to back up a course having this type of questions, and got the following error: Field "question" does not exist in table "question_wordselect"

Here is a screenshot of the call stack:

wordselect_error

What could be causing this?

marcusgreen commented 7 years ago

Just to acknowledge I have received your message and am investigating. In the mean time could you export an example of a wordselect question on your system in xml format and send it to marcusavgreen at gmail dot com.

marcusgreen commented 7 years ago

The backup/restore functionality was tested before it was submitted to the plugins database and I have just tested it successfully. Are you running the code from Github rather than the plugins database?. I made a change to the code on August 28th just before my first release to the plugins database that may trigger this error. If you install the latest version I think this problem will go away.

If you are interested in the details behind this you can see where I changed the code here (lines 68 to 71) https://github.com/marcusgreen/moodle-qtype_wordselect/commit/85f12db338b52a0991cb44407e93faa978f3186f

Please let me know if that addresses the issue.

leac commented 7 years ago

Thank you for your quick reply. I was running the code from the plugins database. So now I copied the changed code from the commit you mentioned, and that solved the problem. Thanks!