Code Duplication    Length = 5-5 lines in 3 locations

main/inc/lib/myspace.lib.php 3 locations

@@ 1074-1078 (lines=5) @@
1071
        } else {
1072
            $total_score_percentage = 0;
1073
        }
1074
        if ($total_score_percentage > 0) {
1075
            $total_score = $total_score_obtained.'/'.$total_score_possible.' ('.$total_score_percentage.' %)';
1076
        } else {
1077
            $total_score = '-';
1078
        }
1079
        $return .= '<tr>';
1080
        // time spent in the course
1081
        $return .= '    <td style="width:164px;">'.api_time_to_hms($time_spent).'</td>';
@@ 1469-1473 (lines=5) @@
1466
            } else {
1467
                $total_score_percentage = 0;
1468
            }
1469
            if ($total_score_percentage > 0) {
1470
                $total_score = $total_score_obtained.'/'.$total_score_possible.' ('.$total_score_percentage.' %)';
1471
            } else {
1472
                $total_score = '-';
1473
            }
1474
            // time spent in the course
1475
            $return .= '    <td><div>'.api_time_to_hms($time_spent).'</div></td>';
1476
            // student progress in course
@@ 1643-1647 (lines=5) @@
1640
                } else {
1641
                    $total_score_percentage = 0;
1642
                }
1643
                if ($total_score_percentage > 0) {
1644
                    $total_score = $total_score_obtained.'/'.$total_score_possible.' ('.$total_score_percentage.' %)';
1645
                } else {
1646
                    $total_score = '-';
1647
                }
1648
                // time spent in the course
1649
                $csv_row[] = api_time_to_hms($time_spent);
1650
                // student progress in course