New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract get_courses
with dependent methods from Sensei_Analysis_Overview_List_Table
#4938
Extract get_courses
with dependent methods from Sensei_Analysis_Overview_List_Table
#4938
Conversation
Not sure it's entirely relevant, but we have something called enrolment providers (https://github.com/Automattic/sensei/blob/c1432e4e66f115e63fff50b4b434ca5eaf36d222/includes/enrolment/class-sensei-course-enrolment-provider-interface.php) that handle course enrolment that we could draw inspiration from. |
Looks solid to me! The only thing I can think of is to maybe abstract the filters passed to the data providers (I like the name). For example, the courses currently have a last activity date filter, but the lessons have only a course filter. Right now the data provider interface assumes that all instances will have a last activity date filter, which is not the case. If the filters are abstracted, we could also easily add an enrolment date filter for example. |
...des/reports/overview/data-provider/class-sensei-reports-overview-data-provider-interface.php
Outdated
Show resolved
Hide resolved
Looks good, a nice design to adopt. I think I'll create a branch based on this one and implement the Reports->Lessons related classes. |
@merkushin Could you merge master? There are a few things missing for the students. 🙂 |
Merged :) |
includes/reports/overview/list-table/class-sensei-reports-overview-list-table-courses.php
Show resolved
Hide resolved
That was fast!!! ⚡ |
@merkushin Sorry, can you do one more merge with master? |
Merged! |
...-tests/reports/overview/list-table/test-class-sensei-reports-overview-list-table-courses.php
Outdated
Show resolved
Hide resolved
get_courses
with dependent methods from Sensei_Analysis_Overview_List_Table
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. 🙂
Refactor the students overview report code
Proposed changes:
Testing instructions:
trunk
branch.Reports
and click "Courses" tab link.update/reports-structure-proposal
.In this PR, lessons and students list tables are not implemented, so you will get errors on corresponding pages.
These changes are part of: