Error: Could not find any question categories!

Error: Could not find any question categories!

by Dave Solon -
Number of replies: 5
I'm getting the following message when I go to the quiz question creation page:

"Could not find any question categories!"

Then, when I try to create a new question, it gives me these errors at the top of the page and will not save the question because no catagory is specified:
Category:
Warning: array_keys() [function.array-keys]: The first argument should be an array in E:\Moodle\MoodleWindowsInstaller-latest-15\moodle\moodle\lib\questionlib.php on line 1434

Warning: Invalid argument supplied for foreach() in E:\Moodle\MoodleWindowsInstaller-latest-15\moodle\moodle\lib\questionlib.php on line 1434

Warning: array_keys() [function.array-keys]: The first argument should be an array in E:\Moodle\MoodleWindowsInstaller-latest-15\moodle\moodle\lib\questionlib.php on line 1442

Warning: Invalid argument supplied for foreach() in E:\Moodle\MoodleWindowsInstaller-latest-15\moodle\moodle\lib\questionlib.php on line 1442


Any help would be appreciated - I'm new to this, so move slowly with me, please... thanks!
Average of ratings: -
In reply to Dave Solon

Re: Error: Could not find any question categories!

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
When you create a new course, it should create a 'default' category for you. It seems this did not happen for some reason. Can you go to the Categories tab and create one manually?
In reply to Tim Hunt

Re: Error: Could not find any question categories!

by Sharon Gray -

I just had an instructor notify me that he's running into this problem, too!  When trying to create quiz questions (which he's been able to do in the past with no problems), he gets get a list of three "Error creating default category" messages and then one "Could not find any question categories".  I logged in and tried it and the same thing happens to me.

We've been using Moodle at Augie for about three years now and this is the first time we've encountered this.

Any ideas/help will be appreciated.

Sharon Gray, Instructional Technologist
Augustana College, Sioux Falls, SD

In reply to Tim Hunt

Re: Error: Could not find any question categories!

by Dave Solon -
Nope, couldn't create a category. sad

In reply to Dave Solon

Re: Error: Could not find any question categories!

by Dave Solon -
I am also getting a "categories database is marked as crashed" you must repair.

So, now I need to find out the commands to try that. If I find them, I'll post them. If someone knows how to repair this, please post. (We are running this on Windows Server.)

In reply to Dave Solon

Re: Error: Could not find any question categories!

by Dave Solon -
This was easier than I thought thanks to a small application called Navicat. I'm sure there are others, and some probably that are free, but this worked and has a 30-day trial. Simply install it and you can point it to the tables, then repair or check them.

http://www.navicat.com/detail.html

Seems to be a basic function of dealing with SQL - I'm slowly learning...blush