Code Duplication    Length = 3-16 lines in 2 locations

main/exercice/exercise.class.php 2 locations

@@ 1918-1933 (lines=16) @@
1915
                    )
1916
                );
1917
1918
                if (api_get_setting('enable_quiz_scenario') == 'true') {
1919
                    //Can't convert a question from one feedback to another if there is more than 1 question already added
1920
                    if ($this->selectNbrQuestions() == 0) {
1921
                        $radios_feedback[] = $form->createElement(
1922
                            'radio',
1923
                            'exerciseFeedbackType',
1924
                            null,
1925
                            get_lang('DirectFeedback'),
1926
                            '1',
1927
                            array(
1928
                                'id' => 'exerciseType_1',
1929
                                'onclick' => 'check_direct_feedback()',
1930
                            )
1931
                        );
1932
                    }
1933
                }
1934
1935
                $radios_feedback[] = $form->createElement(
1936
                    'radio',
@@ 1970-1972 (lines=3) @@
1967
                    $radios_feedback = array();
1968
                    $radios_feedback[] = $form->createElement('radio', 'exerciseFeedbackType', null, get_lang('ExerciseAtTheEndOfTheTest'),'0',array('id' =>'exerciseType_0', 'onclick' => 'check_feedback()'));
1969
1970
                    if (api_get_setting('enable_quiz_scenario') == 'true') {
1971
                        $radios_feedback[] = $form->createElement('radio', 'exerciseFeedbackType', null, get_lang('DirectFeedback'), '1', array('id' =>'exerciseType_1' , 'onclick' => 'check_direct_feedback()'));
1972
                    }
1973
                    $radios_feedback[] = $form->createElement('radio', 'exerciseFeedbackType', null, get_lang('NoFeedback'),'2',array('id' =>'exerciseType_2'));
1974
                    $form->addGroup($radios_feedback, null, array(get_lang('FeedbackType'),get_lang('FeedbackDisplayOptions')));
1975