Code Duplication    Length = 9-9 lines in 3 locations

main/survey/survey.lib.php 3 locations

@@ 4199-4207 (lines=9) @@
4196
        $table->set_header(7, get_lang('Invite'));
4197
        $table->set_header(8, get_lang('Anonymous'));
4198
4199
        if (api_get_configuration_value('allow_mandatory_survey')) {
4200
            $table->set_header(9, get_lang('IsMandatory'));
4201
            $table->set_header(10, get_lang('Modify'), false, 'width="150"');
4202
            $table->set_column_filter(9, 'anonymous_filter');
4203
            $table->set_column_filter(10, 'modify_filter_drh');
4204
        } else {
4205
            $table->set_header(9, get_lang('Modify'), false, 'width="150"');
4206
            $table->set_column_filter(9, 'modify_filter_drh');
4207
        }
4208
4209
        $table->set_column_filter(8, 'anonymous_filter');
4210
        $table->display();
@@ 4246-4254 (lines=9) @@
4243
        $table->set_header(7, get_lang('Invite'));
4244
        $table->set_header(8, get_lang('Anonymous'));
4245
4246
        if (api_get_configuration_value('allow_mandatory_survey')) {
4247
            $table->set_header(9, get_lang('IsMandatory'));
4248
            $table->set_header(10, get_lang('Modify'), false, 'width="150"');
4249
            $table->set_column_filter(9, 'anonymous_filter');
4250
            $table->set_column_filter(10, 'modify_filter');
4251
        } else {
4252
            $table->set_header(9, get_lang('Modify'), false, 'width="150"');
4253
            $table->set_column_filter(9, 'modify_filter');
4254
        }
4255
4256
        $table->set_column_filter(8, 'anonymous_filter');
4257
        $table->set_form_actions(array('delete' => get_lang('DeleteSurvey')));
@@ 4286-4294 (lines=9) @@
4283
        $table->set_header(7, get_lang('Invite'));
4284
        $table->set_header(8, get_lang('Anonymous'));
4285
4286
        if (api_get_configuration_value('allow_mandatory_survey')) {
4287
            $table->set_header(9, get_lang('Modify'), false, 'width="130"');
4288
            $table->set_header(10, get_lang('Modify'), false, 'width="130"');
4289
            $table->set_column_filter(9, 'anonymous_filter');
4290
            $table->set_column_filter(10, 'modify_filter_for_coach');
4291
        } else {
4292
            $table->set_header(9, get_lang('Modify'), false, 'width="130"');
4293
            $table->set_column_filter(9, 'modify_filter_for_coach');
4294
        }
4295
4296
        $table->set_column_filter(8, 'anonymous_filter');
4297
        $table->display();