yedidiaklein / moodle-local_catdup

Moodle Category Duplicate Plugin
3 stars 1 forks source link

Origin and Destination Category Sort #4

Open bfriesenvcc opened 3 years ago

bfriesenvcc commented 3 years ago

It appears that both the Origin and Destination Category drop-down menus are sorted by category ID. Although this may be helpful in the case of the Destination, since the category was probably recently created for this copy and therefore is at the bottom of the list, it is incredibly difficult to find the category of origin.

IMO it would be better to sort the category alphabetically OR concatenate the category ID to the beginning and sort by the combination in the dropdown so it can be easily located when known. (e.g. '124 - Category Name')

bfriesenvcc commented 2 years ago

I'm not a skilled PHP coder, but I managed to hack the code a little to at least get the Category ID added to the front, as I mentioned in my previous post, by adding the line $catpath[$category->id] = $category->id . ' - '; after line 41 in the local_catdup_main_form.php file. At least now I can more easily locate the categories I'm looking for (we have over 600 categories) categoryduplicate .