When linking to an existing quiz all the categories are not in name sequence

When linking to an existing quiz all the categories are not in name sequence

Bởi Bill Click -
Số lượng các câu trả lời: 3

Whenever I attempt to build a new quiz, when I click on categories to see the list and to select the one that has the questions that I want to use, all the categories come up in date entered sequence.  How do I change the default for this only to show by category name and not affect anything else?

bill c.

Trung bình điểm đánh giá: -
Để phản hồi tới Bill Click

Re: When linking to an existing quiz all the categories are not in name sequence

Bởi Tim Hunt -
Hình của Core developers Hình của Documentation writers Hình của Particularly helpful Moodlers Hình của Peer reviewers Hình của Plugin developers
It is designed so that you can put the categories in whatever order you like. That is why new categories appear at the end of the list, and there are up and down arrows to let you choose the order you want. I agree that an option to stort alphabetically would be good, but I am afraid it does not exist yet.
Để phản hồi tới Tim Hunt

Re: When linking to an existing quiz all the categories are not in name sequence

Bởi Bill Click -
Thank you for the response Tim.  I know there are people with more than the 300-400 quiz categories than me but this used to be in alpha sequence in prior editions.  And I can see the up and down arrows, but they make no sense with you have this many categories.  Is it in the works to make a sort for this?  We could certainly use one.
Để phản hồi tới Bill Click

Re: When linking to an existing quiz all the categories are not in name sequence

Bởi Tim Hunt -
Hình của Core developers Hình của Documentation writers Hình của Particularly helpful Moodlers Hình của Peer reviewers Hình của Plugin developers
I've just checked, and although the code responsible has been restructured a bit, the sort order is still the same.

And it is working for me. Let me explain how it should work:

There is a sort-order field in the database, so you can order things manually. However, if all the sort-orders are the same, then it will sort alphabetically. And new categories are always created with sortorder = 999.

So, if you want to get back to alphabetical order, then you need to execute some SQL like

UPDATE mdl_question_categories SET sortorder = 999 WHERE context = XXX

or WHERE parent = XXX. You need to find an appropriate XXX by looking in the database. This assumes you are happy fiddling around in the database.