After upgrading, all my quizzes are gone and I cannot edit a new quiz

After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Christina Rutledge -
Number of replies: 20

After having my moodle upgraded from 1.9.12 to 2.4, I lost all my quizzes. Is this normal? The question banks are still in the site, but the quizzes that were in various topics are all gone.

Also I tried to create a new quiz, but it says I cannot edit it because there are attempts. When I click on the attempts and try to search for them, NONE come up. Confused. sad

Average of ratings: -
In reply to Christina Rutledge

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Did you check the site at the intervening 2.2 upgrade which you must have done?
In reply to Howard Miller

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Christina Rutledge -

Did not check it.. I had someone do the upgrade for me and when they were completed I checked it.

In reply to Christina Rutledge

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That is not normal. Upgrade should preserve all data.

In reply to Tim Hunt

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Christina Rutledge -

Apparently something is happening with the tests, because when I try to create a new test, and click "save and display" in order to add questions, it tells me there are attempts on the test already (even though I just created it). The numbers of attempts LOOK like old test data. Like the quiz I made this morning said there were 186 attempts. So I deleted it and tried to make a new quiz with a different name and it says 212 attempts.  Whene I click on the attempts to try and find and delete them, NOTHING shows up. It looks as though there were no attempts.

 

Any suggestions or ideas?

In reply to Christina Rutledge

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Christina Rutledge -

I think I might have solved the problem by resetting the course to delete all quiz attempts.

In reply to Christina Rutledge

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

It reallly looks like your site was not upgraded properly. That is odd, because the upgrade should be completely automatic.

The bad news is that the mess was fixable in Moodle 2.2. Now that you have gone on to 2.4, it is too late.

In reply to Tim Hunt

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Christina Rutledge -

Is there a way to find all the quizzes? I hired someone to do the upgrade for me because I didn't want to "mess it up" and they said that I would not lose my quizzes, but they are all gone.

 

In reply to Christina Rutledge

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Well, you need to ask the person who did the upgrade what exactly they did, and why your quiz attempts have gone.

It might be possible to use this tool: https://github.com/timhunt/moodle-local_qeupgradehelper to complete the upgrade. I don't know if this tool still works in Moodle 2.4. As I said, all this was meant to be taken care of during the upgrade to 2.2.

In reply to Tim Hunt

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Christina Rutledge -

The attempts were there. the actuall quizzes themselves were gone from my topics.

Have you any idea why the total number of marks would be different than the number of questions if each question is only coded as 1 mark?

I deleted the quiz and tried to make it again and it had the same problem. Says the number of marks is 61 when there are only 51 questions, all regular multiple choice and all worth only 1 point.

Attachment marks problem.jpg
In reply to Christina Rutledge

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Is this MDL-38282? MDL-32791 is also relevant, but was fixed in 2.3.2. Basically, are you running 2.4, or 2.4.2+

In reply to Tim Hunt

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Christina Rutledge -

MDL-32791 looks like the exact problem I have. I am using 2.4.3

Is it fixable?

In reply to Christina Rutledge

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

If you are using 2.4.3 then MDL-32791 is already fixed.

There is a suggestion in a comment there: Try changing the max mark for one question from 1 -> 2 (then change it back from 2 -> 1). See if that fixes it.

In reply to Tim Hunt

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Christina Rutledge -

Yeah I did see that and tried it, but it didn't work. Once someone upgrades, can the upgrade be undone and then redone? Just trying to think outside the box of a way to fix it.

In reply to Christina Rutledge

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Luis de Vasconcelos -

The only way to undo an upgrade is to restore the site from a backup.

But before you do that, what happens when you regrade the quiz attempts?

In reply to Luis de Vasconcelos

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Christina Rutledge -

Regrading doesn't change it. I also tried changing the marks for one of the questions and then changing it back and that didn't work either.

In reply to Christina Rutledge

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I don't yet have a clear picture of what situation you are in. From the thread so far we have these descriptions:

  • The question banks are still in the site, but the quizzes that were in various topics are all gone.
    • The attempts were there. the actuall quizzes themselves were gone from my topics.
  • I tried to create a new quiz, but it says I cannot edit it because there are attempts.
    • Apparently something is happening with the tests, because when I try to create a new test, and click "save and display" in order to add questions, it tells me there are attempts on the test already (even though I just created it). The numbers of attempts LOOK like old test data. Like the quiz I made this morning said there were 186 attempts. So I deleted it and tried to make a new quiz with a different name and it says 212 attempts.  Whene I click on the attempts to try and find and delete them, NOTHING shows up. It looks as though there were no attempts. 
  • When I click on the attempts and try to search for them, NONE come up.
  • I think I might have solved the problem by resetting the course to delete all quiz attempts.
  • the number of marks is 61 when there are only 51 questions, all regular multiple choice and all worth only 1 point.

The only thing that could explain this is if the mdl_quiz table got deleted and recreated, or truncated by the person who did your upgrade. Just to be clear, the upgrade does not do this. This is something someone would have to do manually, and there is no good reason why they would do it.

If the mdl_quiz table got deleted, then new quizzes would start being created numbered from 1 again, whereas other data in your database refers to the old quizzes with ids 1, 2, 3, ... So, now, when you create a new quiz, and it gets automatically assigned id 7, say, then any old data that belong to the original quiz with id 7 is now sort-of associated with the new quiz you created, except that it relates to the original quiz, so Moodle can't really understand the data, and that leads to the weird behaviour you see..

To answer you last question: is there any way to undo the upgrade and do it again? Well, if you have a backup from before the upgrade, you can restore the backup, to get your 1.9 site back, and then do the upgrade again. I suggest you do that.

In reply to Tim Hunt

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Christina Rutledge -

Everything above is correct.

I know when he started he ran into a small problem. I am using an outside hosting service and as part of that program they install moodle for you.  When he got in to do my upgrade, he emailed me and said "your moodle is installed in the root directory and the moodledata folder is installed in your moodle installation.  The moodledata folder should be outside the public_html for security. I will have to move the folder, then do some adjustments and then do the upgrade."

I think he used the term migration. So would the above problem be a reason that the mdl_quiz data table qould disappear? He went in to try and located the missing quizzes and couldn't find them.

In reply to Christina Rutledge

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The changes he told you about sound like sensible changes, and sound like they would not cause the problems you report.

In reply to Tim Hunt

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Christina Rutledge -

I did find this today. Listed are two quizzes I tried to create since the upgrade. Once I created them, I was unable to add questions because it said that there were attempts already. The attempts are shown here, but when I click convert attempts, it procedes and then says conversion complete. When I go to the quiz however, I am still unable to edit because the attempts still show up and I am unable to find them to delete them.

 

Attachment quiz conversions.jpg
In reply to Christina Rutledge

Re: After upgrading, all my quizzes are gone and I cannot edit a new quiz

by Christina Rutledge -

In case anyone else has the problems I had. I believe I figured out a solution. The phantom attempts and incorrect grading were both fixed by deleting all the data in the php database that had to do with

mod_quiz

mod_question

mod_attempt

mod_grade

From the actual site I deleted all quizzes from the main courses and deleted all categories etc.

I believe that somehow during my upgrade the old data/information was interfering with the new data and that explains the problems I had.

I have to start over with putting the quizzes back into the courses, but all my originals were created in examview and easily imported back into moodle with the new 2.4 version.