Quiz Has Stopped Working

Quiz Has Stopped Working

av Peter Kupfer -
Antall svar: 14

I have several quizzes on my site and they were working fine until 5:30 on October 1st. Suddenly at that point time they ceased to work. The quiz in question had numerical questions and after 5:30 when students would put in answers and press Submit the program would mark them wrong, no matter what, and give them new numbers. Then, somehow in this process students would end up with grades like 20/10 when they were told they were wrong all of the time.

I thought this was an isolated incident, but when another teacher was making a quiz, a similar issue is happening with MC and TF questions.

To further this, when I go back to a quiz that was closed a month ago, there is no more data about individual student responses. The scores for the quiz are still there, but not the points for each question.

This picture shows where the quiz stops working 5:24 PM and 5:30 PM.

m2.png

This picture is of an old quiz that closed in September. Previously the for each question score for each student would show, but now they don't, but yet the final score for the quiz shows. 

m1.png

I have posted this as issue 16777 but I was wondering if anyone has a fast fix or can even help me diagnose the problem. If I re-install the quiz module would that fix it?

Thanks, Peter Kupfer

Gjennomsnittlig vurdering: -
Som svar til Peter Kupfer

Re: Quiz Has Stopped Working

av Pierre Pichet -
Have you done the reports tests?
go to your administration site, click on reports and do the question (and units) test ?
You could also put the dedugging on to see if there is any message.

Pierre
P.S. wich version do you use i.e 1.9.2+ build 20080902 ?

Gjennomsnittlig vurdering:Useful (1)
Som svar til Pierre Pichet

Re: Quiz Has Stopped Working

av Peter Kupfer -
I am running Moodle 1.9.2+ (Build: 20080820). I would be willing to try a newer version, but I am not sure what the problem is and I didn't want extra variables. The quizzes were working on this version, and then just stopped.

I ran the question report and it came back fine. The unit tests report returned 8 errors, but I am not sure what to do with them. I am attaching the picture of the report.

Thanks.

Peter
Vedlegg m3.png
Som svar til Peter Kupfer

Re: Quiz Has Stopped Working

av Pierre Pichet -
Can we understand that you put also the debugging to its more detailed option i.e DEVELOPPER?

Pierre
P.S. Sorry sad this is the most I can suggest and we wait for Tim holiday return (18th?) although I am happy that he could have a life outside Moodlewink.

You could explore the database attempts records for a given student and a given quiz and a given question to see if the student data is there.
look at
question_sessions
question_states
quiz_grades
quiz_question_instances
quiz_question_regrade
Have you try to regrade ?


Gjennomsnittlig vurdering:Useful (1)
Som svar til Pierre Pichet

Re: Quiz Has Stopped Working

av Peter Kupfer -
I tried to regrade and received the attached. It mentions question_sessions like you did, but I do not know what you mean by explore the database and what I would want to look for.

Thanks,
PK
Vedlegg m4.png
Som svar til Pierre Pichet

Re: Quiz Has Stopped Working

av Peter Kupfer -
I also turned on the full debug. When I went into an old quiz that worked a month and is closed, this is list of errors I received. List of Errors

Thanks for any insight.

PK
Som svar til Peter Kupfer

Re: Quiz Has Stopped Working

av Ann Adamcik -
It looks like you've got some db corruption. Do you have a backup of your database? If not, you could try to repair the mdl_question_sessions table.

http://docs.moodle.org/en/Administration_FAQ#How_do_I_repair_a_corrupted_Moodle_database.3F
Gjennomsnittlig vurdering:Useful (1)
Som svar til Ann Adamcik

Re: Quiz Has Stopped Working

av Pierre Pichet -
This is what I suspect but I didn't know how to do this as this never happened to me.
Moodle community is greatsmile.
Pierre
Som svar til Ann Adamcik

Re: Quiz Has Stopped Working

av Peter Kupfer -
Ann --

I found that doc as well. But where do you run that command? Do I open a console in Linux and then type in that line? I am used to running through phpMySql for personal use, but now I am working off a Linux Console at work.

Any help would be appreciated.

Thanks,
PK
Som svar til Ann Adamcik

Re: Quiz Has Stopped Working

av Peter Kupfer -
Okay, I did that and the program repaired the grade_grades_history table and the question_states tables. So, this seemed good.

So, I went in to see if the problem was corrected. I still saw the quizzes with grades (not correct still) and no individual question grades (same as before). So, I tried regrading as suggested and I got a new error as attached.

Any thoughts?
Vedlegg m5.png
Som svar til Peter Kupfer

Re: Quiz Has Stopped Working

av Tim Hunt -
Bilde av Core developers Bilde av Documentation writers Bilde av Particularly helpful Moodlers Bilde av Peer reviewers Bilde av Plugin developers
What about repairing or checking the mdl_question_sessions table, since that is the one mentioned in the error message.
Som svar til Tim Hunt

Re: Quiz Has Stopped Working

av Peter Kupfer -
Tim --

Well, this is interesting. I wasn't sure how to accomplish what you suggested so I went back to the log from the database repair I attempted yesterday, however when I look at the log when it lists all of the tables, I do not see a moodle_question_session table listed as ok or as repaired. So, the problem seems to be that this table does not exist! I am not sure how this could be. (Or rather how it could have gotten erased.)

I am attaching the log.

This looks similar, maybe, to issue 9184 or possible 16026.

Two questions:

1) How do I correctly re-insert the table?

2) Can I recover the old quiz results (from one of that worked) if I restore just that activity after I fix the table?

Thanks,
PK
Som svar til Peter Kupfer

Re: Quiz Has Stopped Working

av Tim Hunt -
Bilde av Core developers Bilde av Documentation writers Bilde av Particularly helpful Moodlers Bilde av Peer reviewers Bilde av Plugin developers
Well, since your quizzes used to work, you must have had a question_sessions table once upon a time. And databases don't just lose tables. So there must be some explanation for what happened. Can you test directly whether that table is still there: connect to the database and do a SHOW tables; or SELECT * FROM xxx_question_sessions;

I think you should really try to find out what happened. Knowing what happened is probably going to help you decide the best way to undo the problem.

By the way, if you type the full issue id including the MDL- bit, then it automatically gets hyper-linked, like this: MDL-16026, which is much more convenient.
Gjennomsnittlig vurdering:Useful (1)
Som svar til Tim Hunt

Re: Quiz Has Stopped Working

av Peter Kupfer -
Well, I am not sure how it broke, but I think I have fixed the issue.

I downloaded the PHPMySQL admin addon for Moodle and installed it and went into that and found that two databases where in need of repair. The question_sessions was one of them.

Well, in PHPMySQL I was able to repair that table and the other one (I don't recall what it was right now.) But now the quizzes seem to work. I can see all of the old results. I haven't re-tested a working quiz, but that will happen next week.

I am not sure how to find out how it broke. When I look at the Moodle logs for that time, I do not see anything out of the ordinary. Just students taking the quiz smoothly until 5:30 and then weird attempts.

Oh well. Thanks for your help and thanks for the MDL-Issue tip.

PK
Som svar til Peter Kupfer

Re: Quiz Has Stopped Working

av Tim Hunt -
Bilde av Core developers Bilde av Documentation writers Bilde av Particularly helpful Moodlers Bilde av Peer reviewers Bilde av Plugin developers
Whew! I am glad you were able to fix the problem.

As to why it broke, you would probably need to look at lower-level system or database logs to find out. I would not expect to see anything in the Moodle logs.