Manager or teachers (we call AOD Trainers) cannot enrol and assign roles

Re: Manager or teachers (we call AOD Trainers) cannot enrol and assign roles

by Randy Thornton -
Number of replies: 11
Picture of Documentation writers

Mata,

How is the role of AOD Teacher defined?

Was it based on the existing editingteacher role and have all of its same settings, including the ARCHTYPE: Teacher(editing) and does it have the proper contexts (especially Course) and the proper Allow role assignments highlighted?  The definition for the role should look something like the screenshot below.

Also, does the Trainee role have the ability to be assigned to a course?

Make sure that it is defined to be able to be assigned in the Course and Activity module context (same context settings as Teacher).  Otherwise your Teacher may have the power to assign things, but the Trainee role may not be able to be assigned in the course.



In reply to Randy Thornton

Re: Manager or teachers (we call AOD Trainers) cannot enrol and assign roles

by Mata Henry -

Hi Randy


Firstly, thank you for helping me!
I'll try search through all the settings again.
I've given the same users even managerial access and they cannot enrol a student so I guess I'll look into the trainee role first. I'm befuddled why it would be different from a student as I just renamed student to trainee but willing to try any solution - I'll now and let you know if this is the case.

Thanks again
Mata

In reply to Mata Henry

Re: Manager or teachers (we call AOD Trainers) cannot enrol and assign roles

by Randy Thornton -
Picture of Documentation writers


Mata,

So, if the Trainee is just a renaming of the standard Student role, then that is probably not the issue.


A couple of things:

1) Going back to the screenshot of your settings, you will notice that there are more things there than in the default ones, as in the screenshot that Helen has.

For instance, a Trainer can assign Managers in a course, which is not a good thing. And course creator has all sorts of role assigning power it does not need and should not have. Also, notice that the Authenticated user column, where four roles can assign that. That is not needed and may cause issues.

In other words, there are a lot of odd things on this screen which need to be cleared up first so you can eliminate those as possible sources of the problem.

Basically, setting aside the Enrolment Manager one, those other roles are standard and so this screen should resemble the default screen shown in  Helen's screenshot.

In general, it's a best practice not to assign users multiple roles at the site level unless absolutely needed, because the various permissions of the multiple roles can collide and do unexpected things.

That is the first thing I would clear up: regularize that page. You need to simply those settings to eliminate potential role conflict issues.


2) Next, I would test the roles themselves by isolating them:

a) Enrolling a test user account who has NO other site wide role at all except Authenticated user into a course in the AOD Trainer role. If it works, then issue is probably due to the conflict of roles and assignments thing and not to the specific capabilities and permissions of the role.

b) If it does not work, then I next suspect the role capabilities and to test that I would create a new Test Teacher role from scratch based on the Teacher archteype. I would enroll a test user who has NO other site level role at all to be the Test Teacher in a course.

If that solves the issue, then the source of the problem is in the difference between Teacher archetype and the AOD Trainer role you have. (I usually analyze such issues by exporting both roles into their XML files and the comparing the two files in a text editor because staring at those screens is not healthy. However you can also obviously use the Capability overview tool in Site admin > Users> Permissions as well. )

If you have changed nothing but the names, then all those other settings should be the same.


3) Sanity checks

I am sure you have also done a sanity check for your enrollment methods, that they are on and have no weird things like dates.

Another sanity check is that the issue not just that pull down menu. So, I would go into the course as AOD Trainer, and in Users > Enrolment methods > Manual enrolments, click the people icon in the Edit column. This should bring up a left-right two column picking screen. Can you enrol users here? Does the pull down here work? If so, then issue is theme or interface related rather than role definitions.  (That would be super obscure, but that's why we do sanity checks ;)

Hope this is helpful.

- Randy




Attachment screenshot_2170.jpg
In reply to Randy Thornton

Re: Manager or teachers (we call AOD Trainers) cannot enrol and assign roles

by Mata Henry -

Thanks Randy

Initially I only had default settings applied - no changes, but the trainers still didnt have access. So as one does - I applied myriad of swaps/changes, double checks, stripped back to default again, reapplied other access priviledges created new positions etc etc and didnt work. 

I'm sure a button click will all that it takes so I'll go through your recommendations and let you know - big thank you.

Mata

In reply to Mata Henry

Re: Manager or teachers (we call AOD Trainers) cannot enrol and assign roles

by Randy Thornton -
Picture of Documentation writers

Mata,

We've all been through the 'as one does' phase - I know the feeling smile

What version of Moodle are you using?

What theme are you using?


If Moodle was installed properly, the one thing you can should be able to count on is that if you create new roles from the ARCHETYPEs, then those will work. Because the archetypes can't be messed with (directly). So, that is why creating an new student and new teacher role  from scratch directly from the archetypes, and then using those in a new course with a new user, should confirm whether there was something wrong with the changes to the roles you have, or whether there was something wrong in the system before that. It at least will point you in the right direction if the issue is not the actual role definitions.



In reply to Randy Thornton

Re: Manager or teachers (we call AOD Trainers) cannot enrol and assign roles

by Mata Henry -

Hi Randy

Here's our specs:
Moodle 3.1.1+ (Build: 20160811), will update if I sort all these time consuming issues (I have more than the assign roles issue ugh..)
PHP Version 5.5.9-1ubuntu4.20

I tried your suggestions above. Still no luck.

Unfortunately I've give the two trainers admin access to everything. What can you do! So over this now and tired of looking around for help on forums that have used up so much time..

In reply to Randy Thornton

Re: Manager or teachers (we call AOD Trainers) cannot enrol and assign roles

by Mata Henry -

Hi Randy

Forgot to mention this before, but the untouched manager role also cannot enrol anyone as a trainee. 
Theres some fundamental permission somewhere that absolutely disables the moodle/role:assign capability.

I trashed my original trainer role and created it again from scratch - from the teacher archetype. I also in frustration deleted the unused non editing 

Im going to create a raw student role again and try that.

PS Could I manually edit the php on the server somewhere to give the permission that way?

Thank you

Mata

In reply to Mata Henry

Re: Manager or teachers (we call AOD Trainers) cannot enrol and assign roles

by Randy Thornton -
Picture of Documentation writers

I suspect you are right: there is something deep that is set that is messing with the roles. 

It could be an number of things. Seems to me you have done a lot of the right things already, certainly all the logical things!

There's no way to really set this in the PHP. Capabilities are defined for roles in the database and as long as the default role capability is present in a role, the code will obey (unless bugs, of course.)  If there were custom code changes or weird enrollment plugin, or may be even a really weird database issue. A really outside possibility is something is set in the site's config.php file. Or the original definitions of the archtypes is wrong. Or a really bizarre theme thing relating to pull downs and javascript


I am about out of ideas. I don't like being out of ideas. 

How about I am willing to donate an hour of time to do a screen share session and you can show me the site? Send me a PM to my account here if that would be a thing you would like to do...


Randy


In reply to Randy Thornton

Re: Manager or teachers (we call AOD Trainers) cannot enrol and assign roles

by Mata Henry -

Hi Randy

That would be absolutely wonderful if you could offer any time! Will PM you thank you very much.

Mata

In reply to Mata Henry

Re: Manager or teachers (we call AOD Trainers) cannot enrol and assign roles

by Randy Thornton -
Picture of Documentation writers

Mata,

I tried to send a reply to the PM but I am not in your contact list. I sent an email directly instead to set up a time...

Randy

In reply to Randy Thornton

Re: Manager or teachers (we call AOD Trainers) cannot enrol and assign roles

by Mata Henry -

Big thank you Randy for saving the day!!! - or rather more 90 days!!
The issue has been resolved with Randy's help on skype.

In Front Page settings > Default frontpage role - I had changed (silly me) from 'Authenticated user on frontpage (frontpage)' to my new 'Trainee (trainee)' role. 

Changing it back to 'Authenticated user on frontpage (frontpage)' allows the teachers (I've named at Trainers) to now see the drop down of enrollable user types!!

I will now go back and test out thoroughly. I know I've tweaked the trainer role so I need to test out thoroughly and possibly reset as per the teacher archetype.

Hugest thank you Randy I could almost cry with happiness!

Mata smile

Average of ratings: Useful (2)
In reply to Mata Henry

Re: Manager or teachers (we call AOD Trainers) cannot enrol and assign roles

by Randy Thornton -
Picture of Documentation writers

Mata,

I am very happy we got this working.

I think you deserve an award for "Most persistent did-all-the-right-things-but-it-still-doesn't-work troubleshooting of a super obscure problem."

Now your roles should work fine and you can build them out and customize them as you need. So all that troubleshooting will not go to waste as you know know roles and permissions far better than you probably ever wanted to smile


Randy