gocodebox/lifterlms-rest

Lessons not linked to course via parent_course

holistic3d opened this issue · 0 comments

Reproduction Steps

I've developed NodeJS apps to create a course, add sections to the course and then add lessons for each section. In Wordpress it all looks okay and linked up. On the Course page you can see the sections and the lessons. A lesson is assigned to the section via the parent_id. However if the issue I have is that while these lessons are assigned to a section, they don't get linked to the course and when looking at the lesson the right side bar which is meant to be a list of topics isn't there. But if I manually create another lesson in the same course and take a look at it, the sidebar topics appear.
From what I can see from digging around, the manually created lesson has both the parent_course and parent_section fields set like this:
"parent_course":19018,
"parent_section":19022,
But the ones I am injecting with the RESTAPI ends up with:
"parent_course":0,
"parent_section":19022,
I'm assuming this lack of a link to the course is causing my topic list to fail???

Expected Behavior

That there would be a parent course assigned to the lesson

Actual Behavior

parent_course is 0

Error Messages / Logs

  • Include any relevant error messages or log files
<!-- Paste error logs / backtraces below this line -->

System Information

System Report
<!-- Paste your System Report below this line -->

Browser, Device, and Operating System Information

  • Browser name and version
  • Operating System name and version
  • Device name and version (if applicable)