Ok, here I am with, I hope, some clues as to where the problem may be situated. A friend of mine who is pretty good at PHP (but who doesn't use Moodle) had a quick look at the query and came up with the following suggestion (I am no techie, so I'll try and be as clear as I can)
What follows will be understandable to our developers, I hope..
My friend thinks the query gets too much info. If I'm not mistaken, normally the query for participation report says that if it can't find any logs of the student in the
context of the activity, it will return NULL:true the line is:
AND
(l.id IS NULL
However, it seems to take into account actions that are situated outside the course, like just logging in to the Moodle site, so the NULL value is never true, so it can't display the "no" students.
I tested his hypothesis this way:
On my test platform, I created 4 students and did the following things:
- Student01: logged in to the course and did the activity
- Student02: logged in to the course but didn't do the activity
- Student03: was added manually to the students of the course, logged in on the platform but not to the course.
- Student04: was added manually to the platform but never logged in at all.
When I do a "participation report", this is what I get:
2 studentStudent 04: No (never logged in to the platform)
Student 01: Yes (1) (logged in and did the activity)
My conclusion would be that the query seems to consider that just logging in to the platform is logged, obviously, but the query doesn't return NULL:True as it seems to take into account the student's logging in on the Moodle site. On the other hand, it can't display the others (Student02 and 03) as "Yes" as they haven't done the activity. As the query can't display them as "Yes" but can't display them as "no" (as the result is not NULL:true) it just ignores them...
I hope I was clear enough in the explanation... My friend doesn't really have the time to look into the problem further, and I'm only starting to understand php...
I'd be happy to provide more info or clear things up, if I can...