Log error: A student is able to enroll another student to a course

Log error: A student is able to enroll another student to a course

by Sarath P -
Number of replies: 3

Hello everyone,

I am getting weird log reports that a student has assigned a role to another student. Please find the image attached. 

Also I am getting another log report that a particular user is able to enroll other users into a course. I could see that the Origin is marked as 'cli' and the IP is not recorded. 

We are using profile field based cohort membership and user profile field rules to enroll the students.

Moodle version: 3.4.2+

The bellow image is a log showing a user assigned another user. Please note that both the users are Students.


The second image a log showing a particular user enrolled other students. This user has not logged in for more than 220 days.

Can anyone please tell me what's causing this issue? 

Thanks in Advance

Average of ratings: -
In reply to Sarath P

Re: Log error: A student is able to enroll another student to a course

by Sarath P -
Suggestion please...
In reply to Sarath P

Re: Log error: A student is able to enroll another student to a course

by Dominique Palumbo -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi,

Did you validate that the student that enrol is only a student in that specific course ?
Did you verify that the role student doesn't have the permission to enroll other student ?

you can go there :

mymoodle.xyz/admin/roles/allow.php?mode=assign

and also use the capacity report
mymoodle.xyz/admin/tool/capability/index.php

write enrol in the capacity field and select student in the list
most of it should be undefined and specialy that one : enrol/manual:enrol

Hope it's help.

Dominique.
In reply to Dominique Palumbo

Re: Log error: A student is able to enroll another student to a course

by Sarath P -
Hi Dominique,
Thank you for your response.
Yes, In all courses that student is enrolled as a student only. 
I checked the student doesn't has permission to allow roles and the role doesn't have the permission to enroll as well.
Please find the screenshot below:

User capability:


Assign page