Menu items should always default to "Course" menu group
Currently, if no additional menu group labels have been defined, new menu items go under the "Course" menu group.
If some menu items have a custom menu group label, new menu items go, by default, under the first custom menu group, when they should still go under "Course".
Detailed reproduction
Reproduction 1
Steps
- create a menu item with group label
label1and the labellabelitem1 - create a menu item with empty group label and the label
nonlabelitem1 - create a menu item with group label
label2and the labellabelitem2 - everything else default
Results
correctly fell into the
label1
fell into the wrong category
fell into the latest the wrong category
Reproduction 2 (Reversed sequence)
Steps
- create a menu item with empty group label and the label
nonlabelitem1 - create a menu item with group label
label1and the labellabelitem1 - create a what iten with group label
label2and the labellabelitem2 - everything else default
Results
correctly fell into default group
jumped into the wrong group
jumped into the latest labelled group
Bug description in short
All the menu items that have being set an empty menu group label will automatically categorized to lastest added menu group on the sidebar menu.
~I discovered that the original code does not intend to make items without a group label under the Course section by default. Instead, because the label is an empty string and it coincidentally seems that they go under the Course label by default. In this case, should I put them under the Nolabel(Or some other names) section for those menu items instead of under the Course section by default.~
Sticking to the original plan.