Category Dropdown box is empty

Category Dropdown box is empty

par H K,
Nombre de réponses : 13

Hi

I am using Moodle 1.9 + (Build 20080430)

I am creating new questions for a quiz, the 'Category' dropdown box is empty. When I give a name to the quiz and click on the 'Save Changes' button'  I am receiving the error message 'Neither a question id, nor a category id and question type, was specified'.

I am unsure as to how I can correct this?

Moyenne des évaluations  -
En réponse à H K

Re: Category Dropdown box is empty

par Tim Hunt,
Avatar Core developers Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Peer reviewers Avatar Plugin developers
It sounds like the default category for the course was not created for some reason. Weird.

Can you go to the question categories tab and create a category manually?
En réponse à Tim Hunt

Re: Category Dropdown box is empty

par H K,

Thanks for getting back to me Tim.  I tried to create a category manually in the question categories tab, saved it and went back to the quiz. but the category's dropdown box is still empty.  I went back to the question categories tab, but the new category that I created was not displayed.

En réponse à H K

Re: Category Dropdown box is empty

par Tim Hunt,
Avatar Core developers Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Peer reviewers Avatar Plugin developers
That is certainly very strange. I have never seen a problem like it. Therefore, I don't know what else I can say? Can you try making a new installation of Moodle1.9.1+ on a test server and see if that works? If it does work, can you compare the definition of the mdl_question_... tables between the working version and the broken version?
En réponse à Tim Hunt

Re: Category Dropdown box is empty

par H K,

Hi Tim

I have make a new installation of Moodle 1.9 + on another server and the issue is occurring on that as well.  Which specific table(s) in the database is the Category stored in?

En réponse à H K

Re: Category Dropdown box is empty

par Tim Hunt,
Avatar Core developers Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Peer reviewers Avatar Plugin developers
mdl_question_categories.

The bug is the fact that the category dropdown is empty. Any further investigation you can do would be appreciated.
En réponse à Tim Hunt

Re: Category Dropdown box is empty

par Tim Hunt,
Avatar Core developers Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Peer reviewers Avatar Plugin developers
The default categories should be created by the question_make_default_categories method in lib/questionlib.php, if necessary. And that method should be called from all appropriate places.
En réponse à Tim Hunt

Re: Category Dropdown box is empty

par H K,

Hi Tim

Can you attach the questionlib.php file from the lib location to this post please? I would like to compare the the questionlib.php file on my server with what is the correct version.  The Moodle version on the new server is Moodle 1.9 + (Build 20080430)

En réponse à H K

Re: Category Dropdown box is empty

par H K,

Hi Tim

My thinking is that if I replace the existing questionlib.php file ont he server with one included in a new download of the Moodle version 1.9 (Build 20080430) this might resolve the issue.  In your opinion, might fix the problem?

En réponse à H K

Re: Category Dropdown box is empty

par Tim Hunt,
Avatar Core developers Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Peer reviewers Avatar Plugin developers
I don't know. It depends on when the relevant parts of that file were last edited. The CVS log may be able to tell you something: http://cvs.moodle.org/moodle/lib/questionlib.php?view=log
En réponse à Tim Hunt

Re: Category Dropdown box is empty

par H K,

I have removed Moodle 1.9 twice from the server and reinstalled. The same issue is occurring. The mdl_question_categories table is storing the Category names when the course is created, but the category dropdown box is still empty when I attempt to create questions for the quiz

En réponse à Tim Hunt

Re: Category Dropdown box is empty

par H K,

Hi Tim

As regards this issue, I have come across the MDL-7531 issue.  It affects version 1.7.

I am currently using Oracle database with Moodle 1.9.1 + (Build:20080625)

In your opinion, would a fix like this resolve my issue?

En réponse à H K

Re: Category Dropdown box is empty

par Tim Hunt,
Avatar Core developers Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Peer reviewers Avatar Plugin developers
That fix is already included in Moodle 1.9, but it might be worth looking for something similar.

The fact you are using Oracle makes me less surprised that a few things don't work. Fewer people have used Oracle, so it is less well tested, and Oracle's version of SQL is not very standard.
En réponse à Tim Hunt

Re: Category Dropdown box is empty

par H K,

Hi Tim

We were able to resolve the issue by removing Moodle 1.9 and reinstalling version 1.8.  The Quiz module is working successfully