Issue #3309362: Cover API endpoints for checklists & progress saving with automated tests
5 unresolved threads
Compare changes
+ 6
− 2
@@ -156,7 +156,9 @@ class CourseProgress {
@@ -156,7 +156,9 @@ class CourseProgress {
@@ -172,7 +174,9 @@ class CourseProgress {
@@ -172,7 +174,9 @@ class CourseProgress {
How does this work? If you return only lesson IDs, then array_filter will not be able to call ->isCompleted() on the lesson ID.
getLessons returns exactly node objects, not ids. This function were not used anywhere in the code (since some moment) and that's a reason why you didn't detect it before. But I decided that I could use it for tests.
I think this is misleading now. The method says "get completed lessons", not "get completed lesson ids". Also, bare in mind that someone else might be using this method in their code - we can't just provide breaking changes for no real reason. Please, either move your code to another method with the appropriate name or use this method in your tests and get only IDs there.