Code Duplication    Length = 3-16 lines in 2 locations

main/exercice/exercise.class.php 2 locations

@@ 1856-1871 (lines=16) @@
1853
                    )
1854
                );
1855
1856
                if (api_get_setting('exercise.enable_quiz_scenario') == 'true') {
1857
                    //Can't convert a question from one feedback to another if there is more than 1 question already added
1858
                    if ($this->selectNbrQuestions() == 0) {
1859
                        $radios_feedback[] = $form->createElement(
1860
                            'radio',
1861
                            'exerciseFeedbackType',
1862
                            null,
1863
                            get_lang('DirectFeedback'),
1864
                            '1',
1865
                            array(
1866
                                'id' => 'exerciseType_1',
1867
                                'onclick' => 'check_direct_feedback()',
1868
                            )
1869
                        );
1870
                    }
1871
                }
1872
1873
                $radios_feedback[] = $form->createElement(
1874
                    'radio',
@@ 1908-1910 (lines=3) @@
1905
                    $radios_feedback = array();
1906
                    $radios_feedback[] = $form->createElement('radio', 'exerciseFeedbackType', null, get_lang('ExerciseAtTheEndOfTheTest'),'0',array('id' =>'exerciseType_0', 'onclick' => 'check_feedback()'));
1907
1908
                    if (api_get_setting('exercise.enable_quiz_scenario') == 'true') {
1909
                        $radios_feedback[] = $form->createElement('radio', 'exerciseFeedbackType', null, get_lang('DirectFeedback'), '1', array('id' =>'exerciseType_1' , 'onclick' => 'check_direct_feedback()'));
1910
                    }
1911
                    $radios_feedback[] = $form->createElement('radio', 'exerciseFeedbackType', null, get_lang('NoFeedback'),'2',array('id' =>'exerciseType_2'));
1912
                    $form->addGroup($radios_feedback, null, array(get_lang('FeedbackType'),get_lang('FeedbackDisplayOptions')));
1913