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

Nosūtīja Bill Click
Atbilžu skaits: 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.

Vidējais novērtējums: -
Atbildot uz Bill Click

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

Nosūtīja Tim Hunt
Core developers attēls Documentation writers attēls Particularly helpful Moodlers attēls Peer reviewers attēls Plugin developers attēls
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.
Atbildot uz Tim Hunt

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

Nosūtīja 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.
Atbildot uz Bill Click

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

Nosūtīja Tim Hunt
Core developers attēls Documentation writers attēls Particularly helpful Moodlers attēls Peer reviewers attēls Plugin developers attēls
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.