Questions have disappeared, but there are

Questions have disappeared, but there are

by Ricardo Souza -
Number of replies: 4


teste

I did an moodle update but an error occurred.

I created a new installation and I'm importing data from the old one.

By downloading parts of my question bank I came across this error.

The questions are in the bank, when you click edit, I can see them (image 2)

But when I try to export, in the part of visualizing all the questions, THEY DO NOT APPEAR.


GONE !


Can someone help me ?

Is there an sql solution?

Average of ratings: -
In reply to Ricardo Souza

Re: Questions have disappeared, but there are

by C Behan -

Is it possible at all that you did not specify a category with questions in it e.g. "TOP" or "SALA DE ARTES"?

In reply to Ricardo Souza

Re: Questions have disappeared, but there are

by Perry Way -

I have noticed a bug in the restore mechanism when it comes to quizzes. I have experienced the same thing. We have our main Moodle site which is what is used for instruction and we have an archive site where we used to use that to take older courses and restore them into the alternate site for posterity for administrative reasons. Not only is there a bug in the question bank but there's other bugs as well in that when you restore a course into a new system, the user id field in the backup does not correspond to the user id in the other system's database, so it always creates a new user account rather than attempt to locate the proper user using email address or idnumber field. So we abandoned the whole idea of this archive site as a result. 

I attempted to look into the quiz question bank issue. That's when I discovered that it was a question bank issue (my particular case).

I don't have any go around for you or any suggestions, but often when we see problems being reported a lot of people will just walk on by without making any notation. I'm just here to say, yeah I noticed bugs too.

I'm not sure if all those bugs were addressed now. The last time I attempted to restore to our archive site was when we were on version 3.1.x. Now we are on version 3.6.1 so, perhaps I should try that out sometime, by resurrecting our archive site, getting it online again and then attempt to restore to it.

One thing I suggest if you don't absolutely need the question bank but need the quizzes those questions were used in: if it is possible, go into the backup file into the xml file that lists all the objects that will be restored and modify that file directly to remove all questions from the question bank that also gets backed up, allowing for the quiz to be restored without the question bank. I once did that manually and the same file that would not restore before I did that wound up restoring correctly. Not sure if that will help you in your case but you might consider spending the time to do that. It may not be obvious so I'll mention this first, before you modify the xml files in the backup, to work with a copy of your original file so you have the original in case you mess it up.

Cheers!

Average of ratings: Useful (1)
In reply to Ricardo Souza

Re: Questions have disappeared, but there are

by Perry Way -

Hello again, I think maybe there's an explanation for some of this behavior you experienced. If you look in the documentation for Moodle 3.6 backup and restore there appears the following. "quiz questions are only backed up if at least one question from their category has been added to a quiz". Perhaps that might shed additional light in your issue. Not sure... But it's worth considering.


What data is not contained in course backups?

By selecting all the options when setting up the backup you can include almost all the data in the course. However you should be aware of the fact that some things are not backed up:

  • Quiz questions are only backed up if at least one question from their category has been added to a quiz.
  • Scales are only backed up if they are used by at least one activity.
  • Users' passwords are not backed up when the "Include enrolled users" option is selected.
  • Glossary data
  • Badges - if they have not been awarded to at least one user and users are not included in the course backup.


Average of ratings: Useful (1)
In reply to Ricardo Souza

Re: Questions have disappeared, but there are

by Ken Task -
Picture of Particularly helpful Moodlers

First, Perry has provided some excellent information.

Second ... you asked if there was  'an sql solution' ... answer: maybe.

It's a hidden admin tool ... only admins can execute.  But before you do, make a backup of the database (an SQL dump).  And you should also know this is considered to be an experimental tool.   But, I have used it successfully before and it did fix quiz bank issues.   Also know how to restore that sql dump you make.

Then go to: https://yoursite/admin/tool/health/

That will grind away some ... be patient.

If there are 'health' problems it will show them.  Many times you will see quizzes or question bank with issues.   There is a 'Solution' button at the bottom.   Click it.

What you will see is a recommendation ... if it can find one ... presented to you as an SQL query.   Copy that SQL query.   Get into whatever interface you have (cli or phpmyadmin or webmin or ???) that will allow you to make a query of the database, paste the SQL and hit enter or whatever you have to click on to execute.

That might grind away some more ... let it finish ... it will then re-run the check.

Fingers crossed ... it will fix some stuff and you'll have a 'green' screen.

Now go look at your quiz stuff again.

Again ...'fingers crossed' ... but warn your mileage might vary. :|

'spirit of sharing', Ken