Code Duplication    Length = 5-5 lines in 2 locations

main/newscorm/lp_view.php 1 location

@@ 145-149 (lines=5) @@
142
$get_teacher_buttons = $_SESSION['oLP']->get_teacher_toc_buttons();
143
144
$type_quiz = false;
145
foreach ($get_toc_list as $toc) {
146
    if ($toc['id'] == $lp_item_id && $toc['type'] == 'quiz') {
147
        $type_quiz = true;
148
    }
149
}
150
151
if (!isset($src)) {
152
    $src = null;

main/newscorm/learnpath.class.php 1 location

@@ 3476-3480 (lines=5) @@
3473
3474
                            $type_quiz = false;
3475
3476
                            foreach ($list as $toc) {
3477
                                if ($toc['id'] == $lp_item_id && ($toc['type'] == 'quiz')) {
3478
                                    $type_quiz = true;
3479
                                }
3480
                            }
3481
3482
                            if ($type_quiz) {
3483
                                $lp_item_id = intval($lp_item_id);