GithubHelp home page GithubHelp logo

Comments (9)

abias avatar abias commented on August 17, 2024

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.

sebmehr avatar sebmehr commented on August 17, 2024

Hi Alexander,

thanks for your reply !

You'll find attach to this message two files : one with the course list and one with teachers.

teachers.xlsx
courses.xlsx

The one with the id 847 is Florence Bolo.

Seb

from moodle-block_course_overview_campus.

abias avatar abias commented on August 17, 2024

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.

sebmehr avatar sebmehr commented on August 17, 2024

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.

sebmehr avatar sebmehr commented on August 17, 2024

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.

janeklb avatar janeklb commented on August 17, 2024

@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.

sebmehr avatar sebmehr commented on August 17, 2024

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.

janeklb avatar janeklb commented on August 17, 2024

@sebmehr thanks - I'll have a deeper look

from moodle-block_course_overview_campus.

abias avatar abias commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.