Code Duplication    Length = 7-14 lines in 2 locations

main/exercise/exercise.class.php 2 locations

@@ 7451-7464 (lines=14) @@
7448
                            $item++;
7449
                        }
7450
7451
                        if (!empty($answerCorrect) && !empty($selectedValue)) {
7452
                            $s.= '<script>
7453
                                jsPlumb.ready(function() {
7454
                                    jsPlumb.connect({
7455
                                        source: "window_'.$windowId.'",
7456
                                        target: "window_'.$questionId.'_'.$selectedValue.'_answer",
7457
                                        endpoint:["Blank", { radius:15 }],
7458
                                        anchor:["RightMiddle","LeftMiddle"],
7459
                                        paintStyle:{ strokeStyle:"#8a8888" , lineWidth:8 },
7460
                                        connector: [connectorType, { curviness: curvinessValue } ],
7461
                                    })
7462
                                });
7463
                                </script>';
7464
                        }
7465
                        $s .= '</select></div></td>';
7466
7467
                        $s.='<td width="45%" valign="top" >';
@@ 7538-7544 (lines=7) @@
7535
                        }
7536
                        $s .= '</select>';
7537
7538
                        if (!empty($answerCorrect) && !empty($selectedValue)) {
7539
                            $s.= '<script>
7540
                                $(function() {
7541
                                    deleteItem($("#'.$questionId.'_'.$selectedValue.'"), $("#drop_'.$windowId.'"));
7542
                                });
7543
                                </script>';
7544
                        }
7545
7546
                        if (isset($select_items[$lines_count])) {
7547
                            $s.= '<div id="window_'.$windowId.'_answer" class="">