progress.php 666 Bytes
Newer Older
cyrille's avatar
cyrille committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
<?php
/**
 * Display a course progress bar and
 * a button for the next incomplete lesson in the course
 *
 * @since    1.0.0
 * @version  3.11.1
 */

defined( 'ABSPATH' ) || exit;

global $post;

if ( ! llms_is_user_enrolled( get_current_user_id(), $post->ID ) ) {
	return;
}

$student  = new LLMS_Student();
$progress = $student->get_progress( $post->ID, 'course' );
?>

<div class="llms-course-progress">

	<?php if ( apply_filters( 'lifterlms_display_course_progress_bar', true ) ) : ?>

		<?php lifterlms_course_progress_bar( $progress, false, false ); ?>

	<?php endif; ?>

	<?php lifterlms_course_continue_button( $post->ID, $student, $progress ); ?>

</div>