Skip to content
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

Swapping the lessons list for a course to use the course ID so it can be used on the single lesson page also #61

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

kimcoleman
Copy link
Member

All Submissions:

Changes proposed in this Pull Request:

The function that shows the lesson list for a single course (including whether its completed or not) works great on the single course page (in the context of that global $post / $post->ID.

I wanted to use this same function to output the lesson list on a lesson within the course - but the status of whether it was complete wasn't showing.

This change should not affect any functionality and only opens it up to checking the context of the passed $course_id which is already a requirement of rendering the output anyway.

How to test the changes in this Pull Request:

  1. Add the function to output the lessons html to a single lesson template file: echo pmpro_courses_get_lessons_html( $post->post_parent );
  2. without the change, the status of whether lessons are complete is not available.
  3. with the change, the correct lesson status is shown in the list.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully run tests with your changes locally?

Changelog entry

  • BUG FIX/ENHANCEMENT: Now using $course_id in outputting lesson list in the context of a specific course.

Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant