Comments (9)
Hi Seb,
I have seen this message before, but had no time to fix the problem. Frankly speaking, it should not be a real problem as it is just an indication that Moodle removed duplicate entries of the same teacher, but in the end the course list was fine in my case.
To check if your scenario matches mine and to hopefully remove the message, can you send me a screenshot or list of the user's course list in the block and of the content of the teacher filter in the block?
Thanks,
Alex
from moodle-block_course_overview_campus.
Hi Alexander,
thanks for your reply !
You'll find attach to this message two files : one with the course list and one with teachers.
The one with the id 847 is Florence Bolo.
Seb
from moodle-block_course_overview_campus.
Hi Seb,
thanks for the files. Unfortunately, they don't really help my to isolate the problem.
However, I did some more tests. I was able to trigger the debug message you have raised in two cases. Steps to reproduce:
Case 1:
- Set setting "block_course_overview_campus | secondrowshowteachername" to On OR set setting "block_course_overview_campus | teachercoursefilter" to On
- Set setting "block_course_overview_campus | teacherroles" to more than one teacher role
- Make sure that there is at least one user who has more than one of these roles in the same course
Case 2:
- Set setting "block_course_overview_campus | secondrowshowteachername" to On OR set setting "block_course_overview_campus | teachercoursefilter" to On
- Set setting "block_course_overview_campus | teacherrolesparent" to Yes
- Set setting "block_course_overview_campus | teacherroles" to at least one teacher role
- Make sure that there is at least one user who has this role assigned in course context AND at the same time assigned the same role in a higher context (category context or system context).
In both cases, the get_role_users() function calls in line 442 / 446 / 450 / 454 of block_course_overview_campus.php will produce duplicate results which the debug message is complaining about (but the duplicate results will be eliminated before the function call returns its results). I am confused that this happens at all because I ask for the "ra.id" field which should produce unique result items...
Seb, can you confirm that your case with Florence Bolo matches case 1 or case 2?
Thanks,
Alex
from moodle-block_course_overview_campus.
Hi Alexander,
Thanks for the test and all these informations. I haven't access to the platform until mid-march. I'll keep you in touch asap.
Seb
from moodle-block_course_overview_campus.
Hi Alexander,
I have some news about this debug message. I tried the two cases with an other user and both produce the debug message but Florence Bolo doesn't match with these scenarios.
So, I checked in the database every enrolmnents concerning her and i've found something interesting. One of the course in the list uses course meta link enrolment methods and in both courses (parent and child) she has the teacher role. when i disable this enrolment method, the message disappears.
I haven't noticed this before because in the course meta link's options we don't synchronize teacher and non-editing teacher role. Despite this, it seems Moodle record this enrolment in the database so that could explain the duplicate entry in your query.
Seb
from moodle-block_course_overview_campus.
@sebmehr, which minor version of 2.9 are you using? Also, what database (postgres, mysql, etc.) is your Moodle running on?
from moodle-block_course_overview_campus.
Hello,
when i wrote my first message i was running a Moodle 2.9 but now i'm in 2.9.4+ with a Mysql database.
Seb
from moodle-block_course_overview_campus.
@sebmehr thanks - I'll have a deeper look
from moodle-block_course_overview_campus.
Hi all,
please note that this problem is fixed now thanks to @davosmith in the latest version here on Github, but it will take some more days until a new release with the fix is available in the Moodle plugin repo.
Alex
from moodle-block_course_overview_campus.
Related Issues (20)
- Wrong id used for teacher filter HOT 4
- Eye icon not work HOT 1
- Missing course category attribute HOT 1
- Suggestion: Students see list of all courses they are enrolled to, but can only access those available. HOT 2
- Bug: Refreshing VLE page shows category as empty HOT 13
- Suggestions HOT 4
- "Undefined variable: modchoices" error whenever I perform an upgrade HOT 2
- Problem with dropdown after logging back in HOT 3
- Error when users are enrolled in too many courses (or long course names) HOT 5
- Plugin Name in language file HOT 7
- pix_url is depraceted in Moodle 3.4 HOT 1
- User can see hidden categories HOT 1
- Moodle 3.5 compability? HOT 1
- Suggestion: Separate link for category/top category at course list output HOT 2
- PHP Notice: Undefined variable / PHP Warning: array_key_exists() expects parameter HOT 3
- Plugin breaks behat tests
- "No courses" text HOT 1
- Please add a "Reset filters" button HOT 3
- Remove course news functionality as it does not work anymore from Moodle 3.7 on HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moodle-block_course_overview_campus.