Code Duplication    Length = 3-7 lines in 3 locations

includes/class-sensei-course.php 3 locations

@@ 1442-1448 (lines=7) @@
1439
1440
								$complete_html .= '<p class="sensei-results-links">';
1441
								$results_link = '';
1442
								if( $has_quizzes ) {
1443
1444
									$results_link = '<a class="button view-results" href="'
1445
                                        . Sensei()->course_results->get_permalink( $course_item->ID )
1446
                                        . '">' . __( 'View results', 'woothemes-sensei' )
1447
                                        . '</a>';
1448
								}
1449
                                /**
1450
                                 * Filter documented in Sensei_Course::the_course_action_buttons
1451
                                 */
@@ 2092-2094 (lines=3) @@
2089
2090
                    $has_quizzes = Sensei()->course->course_quizzes( $course->ID, true );
2091
                    $results_link = '';
2092
                    if( $has_quizzes ){
2093
                        $results_link = '<a class="button view-results" href="' . Sensei()->course_results->get_permalink( $course->ID ) . '">' . __( 'View results', 'woothemes-sensei' ) . '</a>';
2094
                    }
2095
2096
                    // Output only if there is content to display
2097
                    if ( has_filter( 'sensei_results_links' ) || $has_quizzes ) { ?>
@@ 2770-2772 (lines=3) @@
2767
                    <p class="sensei-results-links">
2768
                        <?php
2769
                        $results_link = '';
2770
                        if( $has_quizzes ) {
2771
                            $results_link = '<a class="view-results" href="' . Sensei()->course_results->get_permalink( $post->ID ) . '">' .  __( 'View results', 'woothemes-sensei' ) . '</a>';
2772
                        }
2773
                        /**
2774
                         * Filter documented in Sensei_Course::the_course_action_buttons
2775
                         */