-
Bug
-
Resolution: Fixed
-
Minor
-
2.2.1, 2.2.4, 3.3.3, 3.4
-
MySQL
-
MOODLE_22_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
-
MOODLE_33_STABLE, MOODLE_34_STABLE
-
MDL-34389-subcategories-for-category-changer -
After enabling the "Change course category (moodle/course:changecategory)" permission for a Category Admin role the user can see a dropdown menu for changing course category but with only one option - the current category. Subcategories of the current category or other categories the Category Admin is assigned to do not appear in the drop-down menu (Edit course settings > Category). Are there any other prerequisites for displaying a dropdown menu with a complete list of categories the user is assigned to?
Steps to replicate this bug:
- Have a user in your Moodle.
- As admin, create a subcategory of "Miscellaneous", e.g "Miscellaneous sub".
- Create a top level category "Not allowed", too.
- Have a course ready in "Miscellaneous".
- Go to "Manage roles" roles/manage.php and click "Add a new role" - Use role or archetype "ARCHETYPE Authenticated user" and let's call it "Category Changer" - with the following permissions:
- Context types where this role may be assigned: Category
- See hidden categories (moodle/category:viewhiddencategories) Allow
- Change course category (moodle/course:changecategory) Allow
- Update course settings (moodle/course:update) Allow
- View courses without participation (moodle/course:view) Allow
- View hidden courses (moodle/course:viewhiddencourses) Allow
- View hidden sections (moodle/course:viewhiddensections) Allow
- View participants (moodle/course:viewparticipants) Allow
- Navigate to course and category management course/management.php?categoryid=1.
- On category "Miscellaneous", click "Assign role" and in the following screen "Category Changer".
- Assign the "Category Changer" role to the user you have.
- Log in as the user.
- Go to the course in the "Miscellaneous" category, Cog → Edit settings
What you expect:
- The pulldown menu for "Course category" should show "Miscellaneous" and its subcategory "Miscellaneous sub" but not "Not allowed".
What actually happens:
- The pulldown menu for "Course category" just shows "Miscellaneous"