sensei
sensei copied to clipboard
Refactor students report in order to support environments with separated user table
trafficstars
Steps to Reproduce
- Use an environment where the user table is separated from the comments table.
- Go to WP Admin > Sensei LMS > Reports.
What I Expected
To see the reports.
What Happened Instead
It doesn't list any student.
PHP / WordPress / Sensei LMS version
PHP 7.4 / WP 6.0 (multisite) / Sensei 4.5.1
Browser / OS version
Chrome
Context / Source
Sensei_Reports_Overview_Data_Provider_Students::get_items makes a query in the user table, but adds some actions to relate it to the comments table. Could we make a refactor to extract this relation from the query, and maybe join it through PHP?
p6rkRX-3N9-p2