Code Duplication    Length = 7-14 lines in 2 locations

main/exercice/exercise.class.php 2 locations

@@ 7371-7384 (lines=14) @@
7368
                            $item++;
7369
                        }
7370
7371
                        if (!empty($answerCorrect) && !empty($selectedValue)) {
7372
                            $s.= '<script>
7373
                                jsPlumb.ready(function() {
7374
                                    jsPlumb.connect({
7375
                                        source: "window_'.$windowId.'",
7376
                                        target: "window_'.$questionId.'_'.$selectedValue.'_answer",
7377
                                        endpoint:["Blank", { radius:15 }],
7378
                                        anchor:["RightMiddle","LeftMiddle"],
7379
                                        paintStyle:{ strokeStyle:"#8a8888" , lineWidth:8 },
7380
                                        connector: [connectorType, { curviness: curvinessValue } ],
7381
                                    })
7382
                                });
7383
                                </script>';
7384
                        }
7385
                        $s .= '</select></div></td>';
7386
7387
                        $s.='<td width="45%" valign="top" >';
@@ 7458-7464 (lines=7) @@
7455
                        }
7456
                        $s .= '</select>';
7457
7458
                        if (!empty($answerCorrect) && !empty($selectedValue)) {
7459
                            $s.= '<script>
7460
                                $(function() {
7461
                                    deleteItem($("#'.$questionId.'_'.$selectedValue.'"), $("#drop_'.$windowId.'"));
7462
                                });
7463
                                </script>';
7464
                        }
7465
7466
                        if (isset($select_items[$lines_count])) {
7467
                            $s.= '<div id="window_'.$windowId.'_answer" class="">