I'm trying, unsuccessfully to figure out why there would be several records for the same student, in the same course, at the same level (contextlevel=50) appearing in the Role Assignment Table. Can anyone explain it to me? Thanks, in advance.
Difficult to answer without more details.
Can you specify (at least):
- your (exact) Moodle version
- if it's only for one student, in one course
- are there several enrolment methods
- do you use some script/tools that make direct inserts in tables
- is this a new problem, or something occuring long ago
- all other information that could help to understand...
Here's my version info:
Version: 2.8.8+ (2014111008.06)
Regarding your other questions,
- It's many students that have multiple records like this in the mdl_role_assignments table.
- We use Manual, Self-Enrolment, Cohort-enrolment and auto-enrol from BANNER. However, not all with the same students. In this case and others that I'm looking at, the students were manually enrolled.
- The BANNER autoenrol would insert into tables, but not in this students case, or others that I've checked.
- I've only discovered it, as I was trying to do an SQL JOIN with mdl_logstore_standard_log and mdl_role_assignments, on userid and contextid, and receiving more records than I expected.
Thanks for your time. Let me know if you have any other questions.