• Resolved sszukhent

    (@sszukhent)


    Hi all. Looking to solve an issue with making a completed courses section to not just hide completed courses, but move them to a new location that I can create within the student dashboard. This is the source I’m referencing: https://ww.wp.xz.cn/support/topic/courses-complete-now-what-part-2/

    After looking through the directories of my version (3.37.19) I don’t see the files mentioned: my-courses.php or my-account.php. I see the post is from over 3 years ago, so I know there has been changes since then. Has the core functionality changed completely from this since then? What would be the closest viable solution to this?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter sszukhent

    (@sszukhent)

    Thomas, can you or a colleague possibly expand on the suggestion you gave me in slack?

    You suggested I use this filter: https://github.com/gocodebox/lifterlms/blob/2c9a6f581350de280ba8eb2fe141000301738712/includes/functions/llms.functions.templates.dashboard.php#L218-L236

    You suggested looping through the courses pulled into post__in, and then use this:https://developer.lifterlms.com/reference/classes/llms_student/get_progress/ to check the progress of each course, and drop the courses that are completed.

    That sounded simple enough. I’m used to working in Js and Js frameworks, and immediately I’m thinking of iterating over the array ($courses) with something like the map method, creating a new array of those that are complete, and returning them to be displayed in a ‘Completed’ section, while also dropping them from the main ‘My Courses’ array.

    The problem I’m running into is just a lack of familiarity with the WordPress ecosystem, and not knowing where to call that filter from, and accessing post__in to iterate over the courses. I’m using lifterlms customizer. Is that the best route? Are filters and that array available globally? Do they have to be imported to be used? I’m not intimidated by this, and I know what I want to do, just learning the inner workings of WP.

    Then I saw a more direct and to-the-point solution that I referenced in my OP. Is something like that still feasible? Because I don’t want to ONLY drop courses, but I want display completed courses in a new section, and that seemed very simple. I just didn’t see the referenced files in the directory.

    Any help is appreciated, as this is for a paid installation of LifterLMS, so it’s not just someone trying to learn with your free plugin.

    Thanks!

    Hi @sszukhent,

    Since this is for a paid version of LifterLMS we can’t actually help you here in the forms.

    If you can copy and paste this into a support ticket with your system report we are more than happy to follow up with you and provide support through the ticket desk.

    I apologize for the trouble and look forward to seeing you in the support desk!

    Thanks and take care,

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Completed Courses Solution Deprecated?’ is closed to new replies.