Code Duplication    Length = 5-5 lines in 2 locations

main/newscorm/lp_view.php 1 location

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

main/newscorm/learnpath.class.php 1 location

@@ 3485-3489 (lines=5) @@
3482
3483
                            $type_quiz = false;
3484
3485
                            foreach ($list as $toc) {
3486
                                if ($toc['id'] == $lp_item_id && ($toc['type'] == 'quiz')) {
3487
                                    $type_quiz = true;
3488
                                }
3489
                            }
3490
3491
                            if ($type_quiz) {
3492
                                $lp_item_id = intval($lp_item_id);