Code Duplication    Length = 13-13 lines in 2 locations

main/gradebook/index.php 1 location

@@ 930-942 (lines=13) @@
927
                    $gradebooktable->td_attributes = [
928
                        4 => 'class=centered'
929
                    ];
930
                } else {
931
                    $gradebooktable->td_attributes = [
932
                        3 => 'class=centered',
933
                        4 => 'class=centered',
934
                        5 => 'class=centered',
935
                        6 => 'class=centered',
936
                        7 => 'class=centered'
937
                    ];
938
939
                    if ($action == 'export_table') {
940
                        unset($gradebooktable->td_attributes[7]);
941
                    }
942
                }
943
944
                $table = $gradebooktable->return_table();
945
                $graph = $gradebooktable->getGraph();

main/gradebook/lib/GradebookUtils.php 1 location

@@ 1363-1375 (lines=13) @@
1360
1361
        $gradebooktable->userId = $userId;
1362
1363
        if (api_is_allowed_to_edit()) {
1364
            $gradebooktable->td_attributes = [
1365
                4 => 'class=centered'
1366
            ];
1367
        } else {
1368
            $gradebooktable->td_attributes = [
1369
                3 => 'class=centered',
1370
                4 => 'class=centered',
1371
                5 => 'class=centered',
1372
                6 => 'class=centered',
1373
                7 => 'class=centered'
1374
            ];
1375
        }
1376
1377
        $table = $gradebooktable->return_table();
1378
        $graph = $gradebooktable->getGraph();