-
Bug
-
Resolution: Fixed
-
Minor
-
4.1.6
-
MOODLE_401_STABLE
-
MOODLE_402_STABLE, MOODLE_403_STABLE
-
MDL-79681-403 -
There are two problems with the course participants filter when used inside a course (as opposed to the site front page):
- The conditional for checking the current course is wrong (as described in
MDL-75536); - The generated SQL for determining whether a user had never accessed a course was wrong (because the user_lastaccess record would not exist at all, so the Never option was broken as described in
MDL-71088)
Original report
Open file - /user/classes/output/participants_filter.php, go to get_accesssince_filter() method.
1) Condition is incorrect - "if (!$this->course->id == SITEID)".
2) The condition for getting not active participants is incorrect:
$params = [
|
'courseid' => $this->course->id, |
'timeaccess' => 0, |
];
|
In this case, rows with "timeaccess=0" condition do not exist. Need to change condition, for example, use join with tables {user_enrolments}, {enrol}
We noticed a problem when we tried to select course participants due to "Inactivity for more than Never"