Code Duplication    Length = 9-11 lines in 2 locations

includes/class-sensei-analysis-course-list-table.php 1 location

@@ 444-454 (lines=11) @@
441
						$lesson_average_grade = abs( round( doubleval( $grade_total / $grade_count ), 2 ) );
442
					}
443
					// Output lesson data
444
					if ( $this->csv_output ) {
445
						$lesson_title = apply_filters( 'the_title', $item->post_title, $item->ID );
446
					}
447
					else {
448
						$url = add_query_arg( array( 'page' => $this->page_slug, 'lesson_id' => $item->ID ), admin_url( 'admin.php' ) );
449
						$lesson_title = '<strong><a class="row-title" href="' . esc_url( $url ) . '">' . apply_filters( 'the_title', $item->post_title, $item->ID ) . '</a></strong>';
450
451
						if ( is_numeric( $lesson_average_grade ) ) {
452
							$lesson_average_grade .= '%';
453
						}
454
					} // End If Statement
455
					$column_data = apply_filters( 'sensei_analysis_course_column_data', array( 'title' => $lesson_title,
456
													'num_learners' => $lesson_students,
457
													'completions' => $lesson_completions,

includes/class-sensei-analysis-overview-list-table.php 1 location

@@ 306-314 (lines=9) @@
303
304
305
				// Output course data
306
				if ( $this->csv_output ) {
307
					$course_title = apply_filters( 'the_title', $item->post_title, $item->ID );
308
				}
309
				else {
310
					$url = add_query_arg( array( 'page' => $this->page_slug, 'course_id' => $item->ID ), admin_url( 'admin.php' ) );
311
312
					$course_title = '<strong><a class="row-title" href="' . esc_url( $url ) . '">' . apply_filters( 'the_title', $item->post_title, $item->ID ) . '</a></strong>';
313
					$course_average_percent .= '%';
314
				} // End If Statement
315
				$column_data = apply_filters( 'sensei_analysis_overview_column_data', array( 'title' => $course_title,
316
												'students' => $course_students,
317
												'lessons' => $course_lessons,