[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.116.40.134: ~ $
<?php
/**
 * Course loop continue when enrolled
 *
 * @package Tutor\Templates
 * @subpackage CourseLoopPart
 * @author Themeum <support@themeum.com>
 * @link https://themeum.com
 * @since 1.7.4
 */

use Tutor\Models\CourseModel;

?>	
<div class="list-item-button">
<?php
$user_id    = get_current_user_id();
$course_id  = get_the_ID();
$enroll_btn = '<a href="' . esc_url( get_the_permalink() ) . '" class="tutor-btn tutor-btn-outline-primary tutor-btn-md tutor-btn-block">
					' . __( 'Start Learning', 'tutor' ) . '
				</a>
			';

$lesson_url          = tutor_utils()->get_course_first_lesson();
$completed_percent   = tutor_utils()->get_course_completed_percent();
$is_completed_course = tutor_utils()->is_completed_course();
$retake_course       = tutor_utils()->can_user_retake_course();
$button_class        = 'tutor-btn tutor-btn-outline-primary tutor-btn-md tutor-btn-block ';
$can_complete_course = CourseModel::can_complete_course( $course_id, $user_id );
$completion_mode     = tutor_utils()->get_option( 'course_completion_process' );

if ( $retake_course && $can_complete_course && CourseModel::MODE_FLEXIBLE === $completion_mode ) {
	$button_class .= ' tutor-course-retake-button';
}

if ( $lesson_url && ! $is_completed_course ) {
	ob_start();
	$link_text = __( 'Continue Learning', 'tutor' );
	if ( 0 === (int) $completed_percent ) {
		$link_text = __( 'Start Learning', 'tutor' );
	} elseif ( $completed_percent > 0 && $completed_percent < 100 ) {
		$link_text = __( 'Continue Learning', 'tutor' );
	} elseif ( 100 === (int) $completed_percent && false === $can_complete_course ) {
		$lesson_url = CourseModel::get_review_progress_link( $course_id, $user_id );
		$link_text  = __( 'Review Progress', 'tutor' );
	} else {
		$link_text = __( 'Continue Learning', 'tutor' );
	}
	?>
	<a 	href="<?php echo esc_url( $lesson_url ); ?>" 
		class="<?php echo esc_attr( $button_class ); ?>" 
		data-course_id="<?php echo get_the_ID(); ?>">
		<?php echo esc_html( $link_text ); ?>
	</a>
	<?php
		$enroll_btn = ob_get_clean();
}

    //phpcs:ignore --printing safe data.
	echo apply_filters( 'tutor_course/loop/start/button', $enroll_btn, get_the_ID() );
?>
</div>

Filemanager

Name Type Size Permission Actions
add-to-cart-edd.php File 1.37 KB 0644
add-to-cart-tutor.php File 1.43 KB 0644
add-to-cart-woocommerce.php File 2.49 KB 0644
course-author.php File 1.44 KB 0644
course-continue.php File 2.12 KB 0644
course-in-cart.php File 1.43 KB 0644
course-price-edd.php File 4.07 KB 0644
course-price-tutor.php File 3.71 KB 0644
course-price-woocommerce.php File 4.42 KB 0644
course-price.php File 4.45 KB 0644
course.php File 1.56 KB 0644
end_content_wrap.php File 195 B 0644
enrolled-course-progress.php File 986 B 0644
footer.php File 239 B 0644
header.php File 1.23 KB 0644
loop-after-content.php File 232 B 0644
loop-before-content.php File 268 B 0644
loop-end.php File 232 B 0644
loop-start.php File 581 B 0644
meta.php File 2.44 KB 0644
rating.php File 1.18 KB 0644
start_content_wrap.php File 221 B 0644
thumbnail.php File 619 B 0644
title.php File 364 B 0644