Could not update quiz (Cloze)

Could not update quiz (Cloze)

by Ian Farmery -
Number of replies: 20

After creating a cloze question and then going back to edit it i get the following error (Could not update question!). it then kicks me out and returns me to the moodle front page.

Can anybody help me with this?

Attachment untitled.JPG
Average of ratings: -
In reply to Ian Farmery

Re: Could not update quiz (Cloze)

by Pierre Pichet -
Could you give more details i.e. which moodle version you use and which database and server.

Pierre
P.S. Is the problem happened once or more?
In reply to Ian Farmery

Re: Could not update quiz (Cloze)

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Most likely a syntax error (hidden formatting character) in your cloze question. Remember such questions must contain pure text, typed directly into the question text window, and not copy-pasted from somewhere else.
Can you post your question text here?
Joseph
In reply to Joseph Rézeau

Re: Could not update quiz (Cloze)

by Ian Farmery -

As a test I copy and pasted the text from the example in the moodle docs which worked fine. Then i went back to edit it to add an extra answer to one of the questions and I got this error.

A member of staff has recieved this error a few times also. Whenver she tries adding anything to one of these questions.

Could you give more details i.e. which moodle version you use and which database and server.

We are using moodle version 1.9.1, MySQL database and the server is Apache.

Thanks

Ian

In reply to Ian Farmery

Re: Could not update quiz (Cloze)

by Pierre Pichet -
The best thing will be to migrate to the latest 1.9.2 as some problems with cloze question type has been solved in the last months.

Pierre
In reply to Ian Farmery

Re: Could not update quiz (Cloze)

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Ian > ... Then i went back to edit it to add an extra answer to one of the questions and I got this error.

Sorry, but it is quite impossible to help you if you don't say exactly what you did to trigger the error. If the sample worked fine and something went wrong when you "added an extra answer", then it is likely that the syntax of that extra answer was wrong. Could you please try again the experiment, copy the exact text of your modified question text, post it here?

Other than that, follow Pierre Pichet's advice and upgrade to the latest version of moodle 1.9.2.

Joseph

In reply to Joseph Rézeau

Re: Could not update quiz (Cloze)

by Ian Farmery -

I have since been investigating this issue. Regardless of the syntax of the question it always displays the error 'Could not update question!' if you go to edit a Cloze question and attempt to save it.

Not changing anything just saving gives this error.

adding a question or extra answer and making sure the question is verified also gives the same error.

Regardless of the question text this error is returned when going into the editing part of a cloze question after it has been created. Unless there is another solution i can only think that upgrading 1.9.2 may fix this issue.

Ian

In reply to Ian Farmery

Re: Could not update quiz (Cloze)

by S Chasse -

Me too I am getting this bug.

Cannot update cloze questions.

In reply to S Chasse

Re: Could not update quiz (Cloze)

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
All I can say is that most people can update their Cloze type questions most of the time. If you can't, then it is quite impossible to help you if you do not provide specific details.mixed
In reply to Joseph Rézeau

Re: Could not update quiz (Cloze)

by S Chasse -

We are using SQL Server 2005.

Moodle 1.9.2.

I also tried with a fresh install using 1.9.3+

I add a cloze question to a course 

I used the example from http://docs.moodle.org/en/Cloze

Match the following cities with the correct state:
* San Francisco: {1:MULTICHOICE:=California#OK~Arizona#Wrong}
* Tucson: {1:MULTICHOICE:California#Wrong~%100%Arizona#OK}
* Los Angeles: {1:MULTICHOICE:=California#OK~Arizona#Wrong}
* Phoenix: {1:MULTICHOICE:%0%California#Wrong~=Arizona#OK}
The capital of France is {1:SHORTANSWER:=Paris#Congratulations!~%50%Marseille#No, that
is the second largest city in France (after Paris).~*#Wrong answer. The capital of France
is Paris, of course.}.

It saves the first time in the bank, then when I update (open and save), I am getting "Could not update question!"

In reply to S Chasse

Re: Could not update quiz (Cloze)

by S Chasse -

Also, in my case, I did not update the text, just save again.

I tried with modifications and depending where the modification is, I might loose part of the text.

It is like if it did not like something in the middle of it and refuses to replace old content. That is why you would see old content coming back.

Other types of questions like Multiple Choices (non cloze), updates fine.

Only cloze does not update.

If you are creating questions, it works fine but updating does not work at all.

In reply to S Chasse

Re: Could not update quiz (Cloze)

by Pierre Pichet -
Try again with a new question and check whet you see after clicking the decode and verify the question text button.
Pierre

P.S. Jeff remark is pertinent.

In reply to S Chasse

Re: Could not update quiz (Cloze)

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Isn't this MDL-12719?
In reply to Tim Hunt

Re: Could not update quiz (Cloze)

by S Chasse -
Yes, it is and the Issue is still open. They consider it major. Open someone comes with a solution soon.

What are the consequences of this bug?
In reply to S Chasse

Re: Could not update quiz (Cloze)

by S Chasse -

ok confusion with the moodle zip files happend.

The installed version is 1.9.

I upgraded to 1.9.3+ and now it works fine.

Before 1.9, I had 1.9.2 installed and the bug was also there.

So that means it was fixed in a version superior as 1.9.2.

Should http://tracker.moodle.org/browse/MDL-12719 be closed?

In reply to Joseph Rézeau

Re: Could not update quiz (Cloze)

by S Chasse -

My cloze question was:

Match the following cities with the correct state:
* San Francisco: {1:MULTICHOICE:=California#OK~Arizona#Wrong}

Opened it, modified the text and save it as (got obviously the Could not update msg):

Match the following cities with the correct state:
* San Francisco: {1:MULTICHOICE:=California#OK~Arizona#Wrong}
* Tucson: {1:MULTICHOICE:California#Wrong~%100%Arizona#OK}
* Los Angeles: {1:MULTICHOICE:=California#OK~Arizona#Wrong}
* Phoenix: {1:MULTICHOICE:%0%California#Wrong~=Arizona#OK}
The capital of France is {1:SHORTANSWER:=Paris#Congratulations!~%50%Marseille#No, that
is the second largest city in France (after Paris).~*#Wrong answer. The capital of France
is Paris, of course.}.

Opened it and it was:

Match the following cities with the correct state:
* San Francisco: {1:MULTICHOICE:=California#OK~Arizona#Wrong}
* Tucson: {#2}
* Los Angeles: {#3}
* Phoenix: {#4}
The capital of France is {#5}.

It basically lost the details for each row.

I got in SQL server and rows 2,3,4,5 are in the mdl_question table.

We run apache

In reply to S Chasse

Re: Could not update quiz (Cloze)

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Thanks for providing these details. I have followed the steps described in your post dated Friday, 24 October 2008, 08:14 PM and cannot reproduce your problem. Everything works fine on my Moodle 1.9.3.
Joseph
In reply to Joseph Rézeau

Re: Could not update quiz (Cloze)

by S Chasse -
Looks like the bug was not fixed.

http://tracker.moodle.org/browse/MDL-12719

What do you think?

In reply to S Chasse

Re: Could not update quiz (Cloze)

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
All I can say is insist that I cannot reproduce this problem so it's not a bug for me. Any "bug" that is not reproducible cannot be fixed...
In reply to S Chasse

Re: Could not update quiz (Cloze)

by Jeff Forssell -
Make sure that you check in the code view (press the <> button) that there aren't any extra codes in your page. I have had spooky problems sometimes because something (in my case a browser plugin, Xinha Here) inserting some invisible code.
Average of ratings: Useful (1)