Problems with quiz questions

Problems with quiz questions

by Mary Kaplan -
Number of replies: 49

Please help if you can: For matching quizzes, instead of the question information I put in, for matching questions the test prints out with {6:MULTICHOICE:%100%le#Oui!~%0%la#Non!~%0%l at the top where the text or question should be. The matching elements are there. The same is happening with true false questions. The {6:MULTICHOICE:%100%le#Oui!~%0%la#Non!~%0%l is at the top, where the question should be and the two boxes for true and false, but no text or question.

I checked a course (http://ahshornets.moodle.com/course/view.php?id=55) that is practically all quizzes, and the questions (Matching, Multiple choice, True-False) have all changed to {6:MULTICHOICE:%100%le#Oui!~%0%la#Non!~%0%l 

We just upgraded to 1.5.2. I looked but did not see another posting on this problem. Did I just overlook it? If so, sorry! sad (Could someone please point it out?)

--Mary

Average of ratings: -
In reply to Mary Kaplan

Re: Problems with quiz questions

by Art Lader -

Mary,

I have not yet found anything at http://www.moodle.org/bugs/ either. I will keep looking. I know that we have a lot of quizzes posted and that many seem to be messed up, so this is a priority.

Thanks for posting!

-- Art

In reply to Art Lader

Re: Problems with quiz questions

by Mary Kaplan -

I hope my post was clear. I re-worked it several times to try to make it really clear. It is difficult not being a techie! shy I find myself wondering if I did something to cause it.

--Mary

In reply to Mary Kaplan

Re: Problems with quiz questions

by Art Lader -

No, I am seeing it in everyone's quizzes. I really, really hope that there is something we can do to avoid telling the teachers here to redo all those quizzes. That's about a gazillion quiz items.

Maybe there is some little tweak we need to make to the new installation.

-- Art

In reply to Art Lader

{6:MULTICHOICE:%100%le#Oui!~%0%la#Non!~%0%l

by Art Lader -
Any ideas where we should look, folks? See http://moodle.org/mod/forum/discuss.php?d=28953

Thanks,
Art
In reply to Art Lader

Re: {6:MULTICHOICE:%100%le#Oui!~%0%la#Non!~%0%l

by Art Lader -
Mary,

I think I messed the quizzes up when I did this in the database:
http://moodle.org/mod/forum/discuss.php?d=13856

This looks like it is NOT A MOODLE PROBLEM. It is a LADER PROBELM.

Surpise, surprise. blush

-- Art


In reply to Art Lader

Re: {6:MULTICHOICE:%100%le#Oui!~%0%la#Non!~%0%l

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I'm pretty sure this is not that SQL command or the Moodle 1.5 upgrade, but perhaps a problem with quiz importing. Mary, did you import any questions recently?

This issue is being tracked as bug 3915.
In reply to Martin Dougiamas

Re: {6:MULTICHOICE:%100%le#Oui!~%0%la#Non!~%0%l

by Mary Kaplan -
Martin,
I didn't import any questions. I did make one very short new quiz, but I wrote those questions in moodle. I can delete those questions and that quiz if you think that might help. That quizzes worked the evening before, after I finished writing that one, because some of my students were online practicing. The next morning everything went crazy.
By the way, I checked several other courses unrelated to French, and the same French error message comes out from their quizzes.
Hope this helps.
--Mary

In reply to Mary Kaplan

Re: {6:MULTICHOICE:%100%le#Oui!~%0%la#Non!~%0%l

by Art Lader -

Were you using the Cloze questions utility? Or some other one (multiple choice, true/false, etc.)?

Thanks,
Art

In reply to Art Lader

Re: {6:MULTICHOICE:%100%le#Oui!~%0%la#Non!~%0%l

by Mary Kaplan -
"This looks like it is NOT A MOODLE PROBLEM. It is a LADER PROBLEM."

Maybe. I just re-checked and our Algebra 1/Math Tech 2 is OK. My UFPT is still not running properly. Now I'm getting an English:
{12:MULTICHOICE:%100%l as an error in the text where the question should be. Same thing for Margrit's German quizzes.

--Mary
In reply to Mary Kaplan

Re: {6:MULTICHOICE:%100%le#Oui!~%0%la#Non!~%0%l

by Art Lader -

I just made a little quiz using the multiple choice option and it worked fine. The weird string looks like it is from the Cloze option to me.

-- Art

In reply to Art Lader

Re: {6:MULTICHOICE:%100%le#Oui!~%0%la#Non!~%0%l

by Mary Kaplan -
The questions I made were multiple choice and true-false--no cloze. I agree that the error string looks like a cloze thing. I don't understand why it might have happened. Also interesting, the Algebra 1/Tech 2 course is now OK, but mine, Margrits, etc, are not. Strange...

I noticed that the new quiz had been deleted, and I went in to check to see if the questions had been as well. I couldn't find them, so I assume they were gone.

--Mary
In reply to Mary Kaplan

Re: {6:MULTICHOICE:%100%le#Oui!~%0%la#Non!~%0%l

by Art Lader -

Martin reset the quizzes to August 8. That's probably why some stuff is gone. I wonder why the quiz I made this morning using the multiple choice option is fine... Oh well, we'll figure it out.

In the meantime, it is HotPot quizzes for me!

-- Art

In reply to Art Lader

Re: {6:MULTICHOICE:%100%le#Oui!~%0%la#Non!~%0%l

by Mary Kaplan -
I haven't written these quizzes since August 8. They are as old as the Algebra ones. This is really beyond me.

I understand wanting to use HotPots. But I just can't possibly re-do all these quizzes. Sigh...

I wonder if these quizzes have been messed up for a while and I just didn't notice, because I have been otherwise occupied. I set the language to English (what is the Aiken English option?) so that might help you navigate around in it. I am lost for a solution.

Why did it also mess up Margrits? Are Dave Smith's OK? What about the other science ones, Amy and Richard's, for example?
--Mary
In reply to Mary Kaplan

{12:MULTICHOICE:%100%l

by Mary Kaplan -
http://moodle.org/bugs/bug.php?op=show&bugid=3915

The error has changed to this: {12:MULTICHOICE:%100%l

I checked and rechecked one cloze question that I got to work after working hard on it--I went back to the original code--

~for wrong answer
~=for correct answer

Before, when you saved the question as written, the ~ would then change to %0% and the ~= changed to %100%. Now it is staying the same (~ or ~=). Does this help anyone figuring out what is going on?

(I have not written any more new cloze questions, but in re-editing one to try to figure out what was going on, this is what I found.)

--Mary
In reply to Mary Kaplan

Re: {12:MULTICHOICE:%100%l

by Art Lader -
We will get to the bottom of this, Mary. We have to. Teachers have spent many, many hours on these quizzes. We can't just abandon them.

-- Art
In reply to Art Lader

Re: {12:MULTICHOICE:%100%l

by John Blake -
Know this quiz issue must be driving you crazy. I have a quick question. On your Moodle site, how did you create the Site Policy Agreement http://ahshornets.moodle.com/user/policy.php
?
In reply to Art Lader

Re: {12:MULTICHOICE:%100%l

by Mary Kaplan -
Art,
I must sound really frantic--OK, I guess I could get that way! tongueout Actually, I have complete faith that this will be handled. I was just trying to give what I thought MIGHT be more assistance in finding the problem. I want to help if I can. And for my AP kids, this is pretty important, but I can just switch to reading for a while and hit grammar harder later, or use these as review of acquired elements later. Seriously, no biggie! I know it will be fine. wink


--Mary
In reply to Mary Kaplan

Re: {12:MULTICHOICE:%100%l

by Julian Sedding -
The change you noticed is correct, but it is nothing to get worried about. Before the changes the question was not saved exactly as it was typed and for editing the string was reconstructed from the saved data. Now the questiontype saves exactly what was typed in, therefore the '~' isn't replaced with '%0%' any more, etc.

Julian
In reply to Julian Sedding

Re: {12:MULTICHOICE:%100%l

by Mary Kaplan -

So, when possible, do I need to go back in and edit those old cloze questions that did have the % in them? (Not possible right now, since we have the {12:MULTICHOICE:%100%l 

error as the text-question.

--Mary

In reply to Julian Sedding

Re: {12:MULTICHOICE:%100%l

by Art Lader -

So, new quizzes should be okay, right? How do we deal with the old ones, though? Is nobody else seeing this problem?

Thanks!

-- Art

In reply to Art Lader

Re: {12:MULTICHOICE:%100%l

by Julian Sedding -
I was by no means implying that old quizzes (or cloze questions rather) aren't ok, I just wanted to clarify that the observation Mary made ('~' not changing to '%0%') is expected and has nothing to do with your problem.

It is *not* necessary to edit old cloze questions, they work as they did before.

With regards to your problem I have no idea where it comes from. It sounds like your database is somewhat corrupted with the questiontext of several questions (maybe questions that are in the same quiz or category?) set to the strings you indicated. I cannot verify this assumption, however and I also have no clue what would cause such data corruption.

Could you describe what you did before you first noticed the problem? E.g. did you upgrade your site and if so, from which version to which other version? Are definitely other questions than from the cloze type affected (you said something about matching questions)? Did you restore any backups, if so, under which moodle version were those backups made and to which version were they restored?

Julian
In reply to Julian Sedding

Re: {12:MULTICHOICE:%100%l

by Art Lader -

Hi, Julian,

We upgraded from 1.4 to 1.5. (Well, Martin did the upgrade for us. smile) We have done nothing special since then. The problem seems to happen in all the many, many, old quizzes, but new ones (post-upgrade) are okay.

We noticed the problem just a few days ago.

We appreciate your taking an interest in this!

-- Art

In reply to Art Lader

Re: {12:MULTICHOICE:%100%l

by Mary Kaplan -

Julian,

Ditto what Art said, we certainly do appreciate your interest in our problem!

If there is anything we can do on this end to help test something, to narrow down the issue, we will be glad to do so. We really need these quizzes! I have 95 quizzes in one course, and they are carefully crafted to follow my instruction. They are mainly reinforcement, but very useful!

Thanks again! big grin

--Mary

In reply to Mary Kaplan

Re: {12:MULTICHOICE:%100%l

by Julian Sedding -
Right, I looked quite intensively if I could find a place in the code that could have caused your problem, but I didn't get anywhere sad

Especially I checked the database upgrade file (mysql.php), which handles the upgrade o multianswer (cloze) questions to their new storage format, but the only time the questiontext field is set, it is set to an empty string, i.e. nothing. I also looked at the multianswer questiontype, especially the file editquestion.php, which I suspected could be a potential place of failure, but it looks ok. Finally I searched the whole quiz module for the strings 'questiontext' and 'update' and (omitting the formats and restore files) didn't find any code that could have caused your problem, in my opinion.

I'm afraid that that's not so good news for you, but I can't really do much more at the moment. I really hope that you have a backup of your database?! And suggest that you restore it and watch your installation very carefully. If the bug then strikes back again, you should report exactly what you were doing before you first noticed it.

Let me know if you have any more ideas, I'm happy to investigate other possibilities! I just can't think of any others at the moment sad

Julian
In reply to Julian Sedding

Re: {12:MULTICHOICE:%100%l

by Art Lader -
Thanks, Julian.

Martin does have a backup and we can reset quizzes to August 8th. We did that oce already, but the old quizzes corrupted again in a few hours.

But is it really possible that no one else is having this upgrade problem? It seems to be a pretty serious matter if 1.4.x quizzes are not usable in 1.5.x.

Anyone?

Thanks,
Art
In reply to Art Lader

Re: {12:MULTICHOICE:%100%l

by Art Lader -

Maybe we should try reinstaling the quiz module. Maybe whatever is causing our old quizzes to go crazy would be fixed if we did that. Is that a sensible idea?

-- Art

In reply to Art Lader

Re: {12:MULTICHOICE:%100%l

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I wish it was that easy, but this was the first thing I checked.  Your code is the same as in CVS.
In reply to Martin Dougiamas

Re: {12:MULTICHOICE:%100%l

by Art Lader -
Sigh... If we cannot solve this, is it possible to revert to 1.4.x? (And thanks for being patient with us, Martin.)

Thanks,
Art
In reply to Art Lader

Re: {12:MULTICHOICE:%100%l

by Bernard Boucher -
Hi Art, Mary and Martin,
sorry for thatsad

If you send me a valid backup with some cloze questions ( I don't use cloze questions ) in it, I will try to find what part of the code degrade yours questions.


I hope it may help,

Bernard


In reply to Bernard Boucher

Re: {12:MULTICHOICE:%100%l

by Art Lader -
Dear Barnard,

I am sure that you have nothing to be sorry about! It is contributions like yours that help Moodle grow. We are grateful to you and to all the developers who have helped make Moodle the living, dynamic, amazing software that it is. And it is responses like the one you have made that make this a terrific (in my experience, unique) community.

I am sure there will be a resolution to our problem. I am just getting nervous that my teachers are going to become angry and frustrated about this, but, to their credit, that has not yet happened. No one has even complained to me. In the beginning, a couple of teachers who had put in many hours creating quizzes came to me alarmed and worried, but when I told them it was was being addressed, they were all super-reasonable.

Maybe your looking at it would help, though.

-- Art
In reply to Art Lader

Re: {12:MULTICHOICE:%100%l

by Bernard Boucher -
Hi Art,
           happy that Martin again solved it!

I was sorry not for my implication but because it is rarefull that a modification destroy something in Moodle. Generally you have an error or a warning but not a damage.

Also I suspected french caracters in Mary questions to be part of the problem, and I have only french stuff!

Now you can have a nice Sunday afternoon!

Bernard

In reply to Bernard Boucher

Re: {12:MULTICHOICE:%100%l

by Art Lader -
Yes, it looks like Martin has run it down. Hurray! smile

I wonder if there are some strings we should avoid using in the future. I will have to ask about that.

Best regards,
Art
In reply to Art Lader

Re: {12:MULTICHOICE:%100%l

by Bernard Boucher -
Hi Art,
           I think that no string should be avoided, because Moodle is supposed to support completly French and many other languages.

Single apostrophe like used in
c'est  or loi d'ohm
cause many problems when the function addslashes() is not used.  That same symbol, the apostrophe is used by the database to delimit string.

Maybe a set of questions in many languages and with applets, flash, ... should be created and updated as new difficulties appears, to test GIFT import format and quiz and lesson execution.


Bye,

Bernard

In reply to Art Lader

Re: {12:MULTICHOICE:%100%l

by John Blake -
Art,

You need to take the rest of the week off... Might have to settle for the "rest of the weekend"

As in life, there is a lesson in this somewhere-- if at first you don't succeed, keep on Moodlin' to you do succeed.
In reply to John Blake

Re: {12:MULTICHOICE:%100%l

by Art Lader -

Well, I was getting a little tense, but the teachers were actually very reasonable. I'll have to think about the lesson in this...

-- Art

In reply to Julian Sedding

Re: {12:MULTICHOICE:%100%l

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I'm quite sure it's nothing to do with the upgrade procedure itself. I reset everything to an earlier backup and it seemed fine, then suddenly everything became corrupted again.

No-one else seems to have reported this yet, which is wierd.

However, given that the crud is in cloze format I'm almost certain the problem is somewhere in the logic of cvs:/moodle/mod/quiz/questiontypes/multianswer/editquestion.php
In reply to Martin Dougiamas

Re: {12:MULTICHOICE:%100%l

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I'm pretty certain I've got this bug nailed now.

It's a combination of a bug in the code that upgrades cloze questions on the fly (ie when you edit them) and some particular text that was in these particular questions. The combination produced an SQL query that updated all the records in the table, instead of just one.  Fixed in CVS (and Art's site).
In reply to Martin Dougiamas

Re: {12:MULTICHOICE:%100%l

by Art Lader -
Really? You solved it already? You are amazing! (so it was not anythging we had done other than the particular text in those questions?)

-- Art

smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile smile
In reply to Art Lader

Re: {12:MULTICHOICE:%100%l

by Mary Kaplan -
We who are in the trenches salute you all (Julian Sedding, Bernard Boucher, and Art Lader) for your help, especially you, Martin, for continuing to pursue the problem! Everything seems to be working properly! We love you, and moodle! (Of course, we had faith in your abilities all along, you know, and we are not surprised, just glad to be moodlers!) big grin

--Mary
In reply to Martin Dougiamas

Re: {12:MULTICHOICE:%100%l

by MC Otake -

I've just found out about this problem (2 days ago) and I'd really like to know how to solve it. I upgraded from 1.4.5 to 1.5.1 and then to 1.5.2. I thought everything was OK, but when my students started answering the quizzes they had a problem with some of the clozes. I'm not a techie, but I'll try to do my best to understand how to fix it. I don't know how to use CVS. Is there another way to correct the problem.

Thanks a lot.

MC Otake

In reply to MC Otake

Re: {12:MULTICHOICE:%100%l

by MC Otake -

I’m a little disappointed at not getting any kind of response to my question. I thought someone would answer, but it’s been over a week now. I’ve started to redo all my quizzes with that problem. sad sad sad sad sad sad sad sad sad sad