Hi Dan,
I've had look at this, and I believe it is mostly working as expected (except for one bit - see below), but I can see that it is currently quite unclear how to get the behaviour you are wanting. Below is a description which does what I think you want, we will update our help docs to explain this more clearly.
To be able to allocate or reserve spaces, a manager needs the relevant capability (mod/facetoface:reservespace or mod/facetoface:reserveother) in the context of the course where they want to do the assignment (or in a higher context).
What was not clear but you discovered is that a staff manager doesn't automatically get that capability in courses where their staff are enrolled, it has to be given to them. The reason for that is because we want to maintain maximum flexibility to ensure people can control who can assign their staff and in which courses. The capability system gives us that flexibility.
So the question becomes, how do you give managers access to this feature in the courses where you want them to have it, without giving them full access to all courses or other unwanted capabilities in those courses? The steps below detail how to do this for a range of cases:
Giving one manager access to one course
- Click Admin > Users > Permissions > Define Roles > Add a new role
- Create a blank role (no role or archetype). Call it "Staff Manager within a course" or something similar
- Under context types check system, category and course.
- In the capability list check mod/facetoface:reserveother and/or mod/facetoface:reservespace. You could also add any other capabilities you want this person to have within a course
- Click "Create this role"
- Visit the course you want to give them access to
- Click Course admin > Users > Enrolled users, then Enrol users
- Choose the role from 2 in the pulldown menu then click enrol user for that user.
Note that this assumes that the manager already has access to view the course (via the guest enrollment plugin or some other role assignment). Or you could give view access to the course in the role created above if you wanted.
Giving all managers access to all courses
- Repeat steps 1-5 above
- Click Admin > Users > Audiences > Add an audience
- Create a dynamic audience called "Managers" with the rule "Has direct reports" = Yes. e.g. an audience containing all managers.
- Click the Assigned Roles tab (2.6 only)
- Check the role you created previously
Giving one manager access to all courses
- Create the role as before
- Assign the role to a specific user or users in the system context
Giving all managers access to one course
- Create the role as before
- Create the audience as before
- Within the course click Course admin > Users > Enrolled users
- Click Add audience
- Select the role you created from 1 in the pulldown then click Enrol audience for the audience from 2
Essentially all this boils down to "The manager must have an assigned role with the relevant capability, in the context of the course where they want to do the action (or higher)". The steps above all just provide different ways of assigning that capability to different groups of people in different contexts.
Note I wouldn't recommend giving the staff manager in the system context (because as you said it would give people a lot of permissions they didn't need).
I hope that makes some sense - if not shout with any questions.
Finally, from your original post:
If "Manager Reservation" is enabled for a Face-to-Face activity ... [and] if an admin tries to "reserve for another manager" we get the message "This manager has already allocated the maximum number of spaces they are able to for this activity, you cannot reserve any more for them" even if no reservations have been made for them. (Not as expected)
This part is a bug and I have reproduced it - it seems that message comes up if the manager doesn't have permission, even when it is another user trying to do the assignment. We'll file a bug for that one.
Simon