Best practice forum (Archived)

Manager Reservation - Requirement to assign System role?

 
Daniel Bond
Manager Reservation - Requirement to assign System role?
بواسطة Friday, 27 June 2014, 4:04 AM - Daniel Bond
مجموعة Most helpful contributor 2023

Hi,

Just want to confirm something, because there doesn't seem to be a definitive answer anywhere:

If a member of staff is assigned someone (i.e. they are a manager), then the default manager role is assigned to them in the user's profile context. (As expected)

If "Manager Reservation" is enabled for a Face-to-Face activity, on our system that manager doesn't have the option of reserving a space for a member of staff (no link) 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)

The suggestion from our Totara partner is that the manager role (normally Staff Manager) needs to be assigned in the System or Course context, and they are correct that if the role is assigned then the feature works as expected. This is, of course, not practical with 1200 managers, not to mention giving a lot of rights at the system or course level that we wouldn't want people to have.

Is there a problem with our setup (i.e. the Face-to-Face manager reservation should pick up the Staff Manager role from the user's profile context and allow reservation) or is it the intended functionality that only those who have been manually assigned the Staff Manager role can reserve places?

Regards

Dan

لقد تمت إزالة مشاركة المنتدى هذه
Sunday, 29 June 2014, 2:23 PM
تمت إزالة محتوى هذه المشاركة في المنتدى ولم يعد من الممكن الوصول إليها
Daniel Bond
Re: Manager Reservation - Requirement to assign System role?
بواسطة Monday, 30 June 2014, 3:11 AM - Daniel Bond
مجموعة Most helpful contributor 2023

Hi Petr, thanks for your detailed reply.

It's a little unfortunate that http://help.totaralms.com/ appears to only cover 2.5 rather than 2.6 so doesn't include any documentation about Manager Reservation, because it would be useful to understand what the intention behind the feature was.

I had rather assumed that the Face to Face module was checking a user to see if they had the Staff Manager role in a user context anywhere in the system, and if so enabling them to reserve a space. After that, I assumed it would pull a list of staff that they were assigned as Manager for and allow any of those staff to be assigned to that space. Not sure if that's actually how it's implemented, but without access to the code I'm just making a guess based on what would seem to make sense.

Really interested to hear a bit more about your discussions and plans for hierarchies and permission design (assuming they aren't private), always good to know where Totara is heading. In particular, if that has an impact on being able to use Secondary Position properly, that would be very interesting indeed!

Regards

Dan

me
Re: Manager Reservation - Requirement to assign System role?
بواسطة Monday, 30 June 2014, 7:09 PM - George Angus
مجموعة Totara

Hi Dan,

This module enhancement was delivered by a Totara Partner, It adds some pretty cool features including the ability for managers and admins to "reserve" spaces in sessions for users without naming them specifically (which can be done later or not at all). These spaces can be automatically removed before the session start time, etc.

The main purpose(s) with the new extension is:

        A)  To support un-named reservations by a manager (or admin) for a specific F2F-session.

        B) To support the workflow where a staff manager signs up members of his team to a specific F2F-session.

Ill some guidance up on the Help about this as soon as I can.

br,

George.

Daniel Bond
Re: Manager Reservation - Requirement to assign System role?
بواسطة Tuesday, 1 July 2014, 1:57 AM - Daniel Bond
مجموعة Most helpful contributor 2023

Thanks, that is appreciated.

Just to clarify, when you say managers, do you mean "someone with the Staff Manager (or other) role in the system or course context" or do you mean "someone who has been selected for at least one user as their manager in the Primary Position screen, and therefore has the Staff Manager role in that user's profile"? This will obviously make a significant difference to how this feature works and how useful it actually is.

Thanks again

Dan

me
Re: Manager Reservation - Requirement to assign System role?
بواسطة Tuesday, 1 July 2014, 6:27 PM - George Angus
مجموعة Totara

Hi Dan,

Sorry - to be clear its "someone with the Staff Manager (or other) role in the system or course context" but NOT "someone who has been selected for at least one user as their manager in the Primary Position screen, and therefore has the Staff Manager role in that user's profile".

cheers,

George.

Simon Coggins
Re: Manager Reservation - Requirement to assign System role?
بواسطة Tuesday, 1 July 2014, 7:26 PM - Simon Coggins
مجموعة Totara

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

  1. Click Admin > Users > Permissions > Define Roles > Add a new role
  2. Create a blank role (no role or archetype). Call it "Staff Manager within a course" or something similar
  3. Under context types check system, category and course.
  4. 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
  5. Click "Create this role"
  6. Visit the course you want to give them access to
  7. Click Course admin > Users > Enrolled users, then Enrol users
  8. 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

  1. Repeat steps 1-5 above
  2. Click Admin > Users > Audiences > Add an audience
  3. Create a dynamic audience called "Managers" with the rule "Has direct reports" = Yes. e.g. an audience containing all managers.
  4. Click the Assigned Roles tab (2.6 only)
  5. Check the role you created previously

Giving one manager access to all courses

  1. Create the role as before
  2. Assign the role to a specific user or users in the system context

Giving all managers access to one course

  1. Create the role as before
  2. Create the audience as before
  3. Within the course click Course admin > Users > Enrolled users
  4. Click Add audience
  5. 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

 

لقد تمت إزالة مشاركة المنتدى هذه
Tuesday, 1 July 2014, 8:13 PM
تمت إزالة محتوى هذه المشاركة في المنتدى ولم يعد من الممكن الوصول إليها
Daniel Bond
Re: Manager Reservation - Requirement to assign System role?
بواسطة Wednesday, 2 July 2014, 2:20 AM - Daniel Bond
مجموعة Most helpful contributor 2023

Simon: Thank you, that is very helpful indeed, the "Giving all managers access to all courses" option was exactly what we needed. It's obviously not a totally ideal solution (audiences not being instantly updated when someone has their first staff member assigned to them, so having to wait until the audience cron next runs), but I definitely agree that it provides significant flexibility as far as permissions go.

Everyone: I'm definitely with Amir that this is confusing. In particular, the Manager Reservation feature actually does use the list of staff who are assigned to a manager when they are allocating spaces (which is obviously the right decision), but not when deciding whether a particular member of staff is or isn't a manager in the first place. It may be that the above post, put into the form of a help article, would be perfectly sufficient for people to get this set up. Equally, it might be worth having some explanation when enabling manager reservation itself that you will need to follow the above steps to actually make it work. Ultimately, a more automated solution (which didn't require audiences) would be best I think, but I totally respect Petr's point about how access control is meant to work in Moodle and the fact that the Staff Manager role is in the user profile context, not the course or system.

Regards

Dan

لقد تمت إزالة مشاركة المنتدى هذه
Monday, 28 July 2014, 4:46 PM
تمت إزالة محتوى هذه المشاركة في المنتدى ولم يعد من الممكن الوصول إليها
me
Re: Manager Reservation - Requirement to assign System role?
بواسطة Monday, 28 July 2014, 7:54 PM - George Angus
مجموعة Totara

Hi John,

The functionality in the F2F plugin refers only to Managers who have the Manager role within the course context, its pretty badly phrased & Ive submitted a bug. We are looking at this issue but technically its very problematic - the Role Permissions you refer to would be impossible to implement at present without a major re-working of the code.

regards,

George.

لقد تمت إزالة مشاركة المنتدى هذه
Tuesday, 29 July 2014, 8:24 AM
تمت إزالة محتوى هذه المشاركة في المنتدى ولم يعد من الممكن الوصول إليها
لقد تمت إزالة مشاركة المنتدى هذه
Tuesday, 29 July 2014, 12:04 PM
تمت إزالة محتوى هذه المشاركة في المنتدى ولم يعد من الممكن الوصول إليها
me
Re: I think that i found a glitch in the Manager Reservation
بواسطة Tuesday, 29 July 2014, 7:22 PM - George Angus
مجموعة Totara

Hi John,

To begin with when none of the spaces have been allocated you have for each session 0 out of 4 possible allocations (0/4).

Then you allocate 1 space, so you have used 1 out of a possible 4 for the first (1/4) but 0 out of a possible 3 (0/3) for the others because there are only three left.

Then you allocate a further 2 spaces to the second course, leaving one space left. 

This means there are 1 of a possible 2 allocations for the first (1/2), 2 of a possible 3 for the second (2/3) and 0 of a possible 1 (0/1) for the last.

Hope this clears it up.

cheers,

George.

 

لقد تمت إزالة مشاركة المنتدى هذه
Tuesday, 7 April 2015, 4:55 AM
تمت إزالة محتوى هذه المشاركة في المنتدى ولم يعد من الممكن الوصول إليها
me
Re: I think that i found a glitch in the Manager Reservation
بواسطة Tuesday, 7 April 2015, 10:07 PM - George Angus
مجموعة Totara

Hi Amir,

My bad re the Help  - Ill get this fixed ASAP.

cheers,

 

George.

Easter Island / Rapa Nui
Re: I think that i found a glitch in the Manager Reservation
بواسطة Monday, 8 June 2015, 11:38 PM - Russell England
 

Also need to add mod/facetoface:view to the role

Also the options for "Giving all managers access to all courses" doesn't really work because the manager still needs to be enrolled.

So we added moodle/course:view to the role which skips the enrolment checks by the require_login() function.