Code Duplication    Length = 5-5 lines in 2 locations

main/lp/learnpath.class.php 1 location

@@ 3406-3410 (lines=5) @@
3403
3404
                            $type_quiz = false;
3405
3406
                            foreach ($list as $toc) {
3407
                                if ($toc['id'] == $lp_item_id && ($toc['type'] == 'quiz')) {
3408
                                    $type_quiz = true;
3409
                                }
3410
                            }
3411
3412
                            if ($type_quiz) {
3413
                                $lp_item_id = intval($lp_item_id);

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;