Code Duplication    Length = 5-5 lines in 2 locations

main/lp/lp_view.php 1 location

@@ 169-173 (lines=5) @@
166
$get_teacher_buttons = $_SESSION['oLP']->get_teacher_toc_buttons();
167
168
$type_quiz = false;
169
foreach ($get_toc_list as $toc) {
170
    if ($toc['id'] == $lp_item_id && $toc['type'] == 'quiz') {
171
        $type_quiz = true;
172
    }
173
}
174
175
if (!isset($src)) {
176
    $src = null;

main/lp/learnpath.class.php 1 location

@@ 3429-3433 (lines=5) @@
3426
3427
                            $type_quiz = false;
3428
3429
                            foreach ($list as $toc) {
3430
                                if ($toc['id'] == $lp_item_id && ($toc['type'] == 'quiz')) {
3431
                                    $type_quiz = true;
3432
                                }
3433
                            }
3434
3435
                            if ($type_quiz) {
3436
                                $lp_item_id = intval($lp_item_id);