-
Notifications
You must be signed in to change notification settings - Fork 198
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
Fix/issue 2802 - Include private lessons in course completion count #2879
base: trunk
Are you sure you want to change the base?
Conversation
Please see my comment. I think this fixes one small piece of a larger problem, and that we need to think holistically about it and figure out what all the issues are for private courses and lessons. We can then fix them in one go. |
Hey @donnapep ! With these commits, I try to fix as many issues related to the private status as I could find... There are a bunch of them, so I try to be as descriptive as possible in the commit messages, but I'll also reference every commit here in this comment so that I could add extra information for each one. I hope this workflow makes it easy for you to check them, but if you'd like me to handle it in a different way, please let me know! I'm making a few general assumptions here:
Regarding roles and capabilities:
Another important comment:
(I'll use "Frontend" to refer to the site where users take courses and "Backend" to refer to the WordPress Dashboard section...) Ok, so here are the descriptions of the issues: 01. Course archive - fix lesson countLocated in: includes/class-sensei-course.php -> 02. Single course - fix display private lessonsLocated in: includes/class-sensei-course.php -> 03. Private course - fix is_enrolled() functionLocated in: includes/enrolment/class-sensei-course-enrolment.php -> 04. Single course - fix lesson countLocated in: includes/class-sensei-course.php -> 05. My courses - fix private lessons not appearingLocated in: includes/shortcodes/class-sensei-shortcode-user-courses.php -> 06. Single course - fix completion status not working in private coursesLocated in: includes/class-sensei-utils.php -> 07. Grading - fix dropdown not including private lessonsLocated in: includes/class-sensei-grading.php -> 08. Learners Management - fix table does not include private coursesLocated in: includes/admin/class-sensei-learners-main.php -> 09. Learners Management - fix table does not include private lessonsLocated in: includes/admin/class-sensei-learners-main.php -> 10. Dashboard - fix at a glance widgetLocated in: includes/class-sensei-admin.php -> 11. New Lesson - fix lesson prerequisite dropdownLocated in: includes/class-sensei-lesson.php -> 12. New Course - fix course prerequisite dropdownLocated in: includes/class-sensei-course.php -> 13. New Lesson - fix add lesson to course orderLocated in: includes/class-sensei-lesson.php -> 14. Single course module - fix error in module progress calculationLocated in: includes/class-sensei-modules.php -> 15. Modules - fix table not displaying private lessonsLocated in: includes/class-sensei-modules.php -> 16. Authors - fix lesson countLocated in: includes/class-sensei-course.php -> 17. Teacher Notification - fix error on sending notificationLocated in: includes/class-sensei-teacher.php -> Ok Donna, so basically that's it! Those were the issues I found related to the private/publish status... As I mentioned before, I hope I made myself clear, but if it's not the case, let me know and I'll try to do a better job! Also, please let me know if you find more "places" where this issue is occurring and if there's anything else I could do to help! |
Fixes #2802
Changes proposed in this Pull Request:
Testing instructions: