Assigning Parent Role and Teaching Role to a student

Assigning Parent Role and Teaching Role to a student

by Neil Faulkner -
Number of replies: 1

Hello,

I am trying to attach the role of both Parent and Teacher to a student in Moodle.

The logic of implementing a student - parent relationship seems to work as intended.

The logic of implementing a student - teacher relationship seems to work as intended.

I have two mentee blocks - one for parents, one for teachers. The aim was to have the parents appear in the parents block and the teachers to appear in the teachers block. However the parent then appears in both mentee blocks as does the teacher. 

Any suggestions as to how to resolve this? For the time being I have defaulted to a single mentee block and renamed this to 'Parents and Teachers'.

Average of ratings: -
In reply to Neil Faulkner

Re: Assigning Parent Role and Teaching Role to a student

by Randy Thornton -
Picture of Documentation writers
The Mentee block only looks to see what users you have a direct assignment to via the user context. It does not distinguish whether those assignments come from different roles. So in your case, you have two new roles both assigned at the user level and so it puts them together in one list.

The code in the block_mentees.php file line 52+ clearly shows how this works. You would have to change the code to do what you want. It would be a nice enhancement if you could set each Mentee block with the shortname of the specific role to use.