• Resolved creativenorthmedia

    (@creativenorthmedia)


    Hi there,

    Ex-developer here, wondering what it would take to make lessons assignable to multiple courses. I basically want to reuse lessons across multiple courses.

    If someone could point me in the general direction of the code which can be altered with a custom plugin, I would be most grateful. Not asking for you do to the work, just point me in the general direction of the problem, I can take it from there.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Nick Mariano

    (@reddotinmotion)

    Hi @creativenorthmedia,

    Lessons can already be cloned into multiple courses: the only catch is that this action will automatically clone the lesson. That cloned version have the exact same content as the original lesson — the only difference is that it will have its own post ID since it will be a separate post altogether. You can learn about that in lifterlms.com/docs/using-course-builder/#how-to-clone-lessons.

    If you are interested in attaching the same lesson to multiple courses without cloning the lessons, the potential side effect is that you will also have to ensure that any progress made towards that lesson will not be counted as progress towards all other courses associated with that course. If this is okay with you, then you can start with the add_existing_lesson() function of the Backbone.js code from lifterlms/assets/js/builder/Views/Elements.js and from lifterlms/assets/js/builder/Models/Course.js, and then work backwards from there. You can see that code from our GitHub repository.

    Thread Starter creativenorthmedia

    (@creativenorthmedia)

    OK fantastic. Yes I need to make sure that progress on that lesson does not count towards other courses.

    So in terms of the plugin, would I then simply override the requisite functions?

    Plugin Support Alexander

    (@alextonio22)

    Hi @creativenorthmedia ,

    I want to set the expectation that we do not provide support for customizations made to our products. Our products are provided as is. We do not customize our products to meet additional specifications or requirements outside the scope of their existing capabilities.

    To make lessons assignable to multiple courses in LifterLMS, a custom solution is required, as this feature is not supported yet. We haven’t done this before, but here are some potential solutions:

    1. Create a custom query to fetch lessons for multiple courses. You can use the pre_get_posts action to alter the main query.
    2. Use custom meta fields to assign a lesson to multiple courses. This involves saving multiple course IDs in the lesson meta.

    Please note that customization may cause conflicts with other existing functions. For detailed guidance, you can refer to our LifterLMS developer resources. The WordPress Codex for hooks documentation is also helpful for these customizations. Additionally, you may consider consulting with a LifterLMS expert, which you can find here.

    Thread Starter creativenorthmedia

    (@creativenorthmedia)

    Hi Alexander,

    Of course, I would expect to support this myself and/or with the help of an expert.

    Thank you for the tips, I will look at those in future.

    Can I ask, why this feature hasn’t been instantiated? It seems like something that would reduce maintenance burden of lessons. Perhaps I am a unique use-case in that regard: each of my students receives a custom learning path.

    Plugin Support Alexander

    (@alextonio22)

    Hi @creativenorthmedia

    Thank you for understanding. Currently, you can add an existing lesson to another course lesson. However, it works by cloning the lesson rather than using the same one. This allows you to easily identify which course each lesson belongs to.

    If you add an existing lesson to another course, you can identify that the lesson belongs to this course. If you need to edit this lesson, such as changing the title or specific text to differ slightly from the original or other course lesson, you can do so.

    And I understand your concern about reducing maintenance burdens. If you have an account with LifterLMS or are using our plugin or add-ons, you can submit a feature request here: Submit Feature Request.

    Plugin Support Nick Mariano

    (@reddotinmotion)

    Hi @creativenorthmedia,

    As we haven’t had any response in over a month I am going to mark this thread as resolved. Please reopen or post a new thread if you require further assistance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.