How to extract questions & answers from moodle servers?

Re: How to extract questions & answers from moodle servers?

by Colin Fraser -
Number of replies: 0
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers

First off: 

The site administrator should also check that the database details have been correctly specified in config.php

Have you checked the config.php file to make sure the database is properly named and accurately mapped? Do that first. Also, has the database had a name change or been deleted or something? Has the config.php been moved? 

Second: If you have phpMyAdmin on yourserver or the Moodle Adminer plugin, you can search your database using the UI for that tool and perform any SQL operation you may chose. You can search for, then extract whatever data you require, or backup any group of tables and restore them to the new database, although that is not necessarily a good option. Check to make sure the tables in both Moodles are the same. 

As a wild speculation:  The only times I have ever seen this error is on installation of a new Moodle - and one other time. In that case a person who should have known better, (not me, really,)thought he was dropping several unused or obsolete databases. He picked the wrong one. That was a very difficult two days I can tell you...