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

Displaying if a lesson in the syllabus has a quiz, assignment, or both #2802

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

kimcoleman
Copy link
Member

Description

Now showing if a lesson in the Course Syllabus has a quiz, assignment, or has both.

How has this been tested?

Locally

Screenshots

Screenshot 2024-11-12 at 3 08 19 PM

Types of changes

New feature (non-breaking change which adds functionality)

Checklist:

  • This PR requires and contains at least one changelog file.
  • My code has been tested.
  • My code follows the LifterLMS Coding & Documentation Standards.

@@ -63,6 +63,31 @@
do_action( 'llms_lesson_preview_before_title', $lesson )
?>
<div class="llms-lesson-title"><?php echo esc_html( get_the_title( $lesson->get( 'id' ) ) ); ?></div>

<?php
$has_quiz = $lesson->is_quiz_enabled();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a huge deal but could we put this inline within the if rather than having a temp variable $has_quiz that we don't use again?

?>

<?php
// Does the lesson have an assignment?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we remove the "what" comment since the llms_lesson_has_assignment function shows this already? I've been cleaning up any what-type comments especially since the "what" can change and the comment doesn't get updated down the road.

@brianhogg brianhogg added this to the Next Available Release milestone Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Review in Progress
Development

Successfully merging this pull request may close these issues.

2 participants