Assigning Learning Plans to Users

Assigning Learning Plans to Users

by Jen Roadman -
Number of replies: 8
I am trying to set permissions so that a user can assign learning plans to a select group of individuals.  The user would only see that select group when assigning or viewing learning plans.  The concept would be very similar to setting up a course with "separate groups" configured and having a manager be part of that group.  


Ideally, when a user with the appropriate permissions clicked "Learning plan templates" they would see only an option to "create learning plans" in the Actions menu.  When selecting users to create learning plans for, they would only see users in the same group or cohort that they are currently in.  


I have attempted to use cohorts to limit the users displayed, but have not been successful.   Did I miss something?  I would really like to make this work, if anyone has suggestions, please help!

Average of ratings: -
In reply to Jen Roadman

Re: Assigning Learning Plans to Users

by Damyon Wiese -

You can do this with the "User Cohort Roles" tool.

You need to create 2 roles - one to be assigned at the system context - and one to be assigned for each user in the cohort.

The first role "LP Manager System" needs to have:

"moodle/site:configview" (Moodle 3.2 only)

"moodle/competency:templatemanage"

"moodle/competency:templateview"


The second role "LP Manager User" needs to have:

moodle/competency:planmanage

moodle/competency:planreview

moodle/competency:plancomment


Then create a cohort containing the students to be managed - and use the admin tool "Users -> Permissions -> Assign user role to cohort" to assign the "LP Manager User" role to every student in the cohort.

Assign the manager user the first role at the system context (Users -> Permissions -> Assign system roles)


After doing this, the manager should see the learning plan templates page and be able to assign templates to users - but only the users from the cohort.


Average of ratings: Useful (2)
In reply to Damyon Wiese

Re: Assigning Learning Plans to Users

by Jen Roadman -

Damyon,


This was incredibly helpful.  The one part I will add for anyone who is using this as a reference in the future is that the cohort roles do not take effect immediately and are updated by a scheduled task.  This was the piece I was missing when I attempted to do this on my own.  

The other part of my question focused on the ability to separate the permission to "Create a new learning plan" from the ability to "Add new learning plan template" and the ability to edit, duplicate, and delete learning plan templates.  In this case, the "Add new learning plan template" button would not be visible to the LP Manager System, and the edit menu would only display the option to "Create new learning plan".


In reply to Damyon Wiese

Re: Assigning Learning Plans to Users

by Vivek SM -

if the cohort members has been changed or moved to some other cohort, the learning plan will be unassigned and changed to another learning plan or manually we have to do.

If we want to manually change then how to do that

In reply to Damyon Wiese

Re: Assigning Learning Plans to Users

by Joost Elshoff -
Picture of Particularly helpful Moodlers Picture of Testers

Should be nice to find this in the Docs as well as in this forum... Once all documentation on these roles is complete...

In reply to Joost Elshoff

Re: Assigning Learning Plans to Users

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

I documented Damyon's role here: Learning plan supervisor but regarding (quote) the other part of my question focused on the ability to separate the permission to "Create a new learning plan" from the ability to "Add new learning plan template I haven't myself found a way to allow someone to create learning plans without also having the add a new template button. Maybe someone else will smile

As for what happens with cohort and learning plans when they are removed or added - I think if a new person is added to a cohort with a learning plan attached then they are given a learning plan. However, I haven't tested what happens to their learning plan if you remove a person from a cohort. Has anyone else experimented?

In reply to Mary Cooch

Re: Assigning Learning Plans to Users

by Jen Roadman -

Just checking in to see if you or anyone has found a way to separate the ability to create learning plans without also having the add a new template button.  


In reply to Mary Cooch

Re: Assigning Learning Plans to Users

by Shirley Gregorczyk -
Picture of Particularly helpful Moodlers

I created a test Learning Plan Template and assigned the learning plan to myself.

During my testing process, I created another Learning Plan Template, and again assigned the learning plan to myself.

There appears to be no option to unassign (remove) a learning plan from a student.

I elected not to use cohorts, after reviewing various issues with retaining a student's training history after they are removed from a cohort.

Does the functionality to remove an assigned student from a learning plan? 

Attachment Learning plan assignment Recruiter test LP.jpg
Attachment Learning plan templates.png
In reply to Damyon Wiese

Re: Assigning Learning Plans to Users

by Randy Thornton -
Picture of Documentation writers


Just a note that this will not work in Moodle 3.1 because the capability "moodle/site:configview" does not exist there yet.

Which means such a role can't get to the Site admin menu to be able to add a user to a Learning Plan. So, it will not work in most cases, as you would not want to grant site:config to such users, which is far too dangerous.

You'd have to give such a LP assigner some other way to get to site admin menu, which bascially defeats the purpose of having a limited role to do just this one task of assigning LPs to users.

Works as described in 3.2 where this capability exists.