Code Duplication    Length = 29-29 lines in 3 locations

main/exercice/exercise.class.php 3 locations

@@ 4423-4451 (lines=29) @@
4420
                        case UNIQUE_ANSWER_NO_OPTION:
4421
                        case MULTIPLE_ANSWER:
4422
                        case GLOBAL_MULTIPLE_ANSWER :
4423
                        case MULTIPLE_ANSWER_COMBINATION:
4424
                            if ($answerId == 1) {
4425
                                ExerciseShowFunctions::display_unique_or_multiple_answer(
4426
                                    $feedback_type,
4427
                                    $answerType,
4428
                                    $studentChoice,
4429
                                    $answer,
4430
                                    $answerComment,
4431
                                    $answerCorrect,
4432
                                    $exeId,
4433
                                    $questionId,
4434
                                    $answerId,
4435
                                    $results_disabled
4436
                                );
4437
                            } else {
4438
                                ExerciseShowFunctions::display_unique_or_multiple_answer(
4439
                                    $feedback_type,
4440
                                    $answerType,
4441
                                    $studentChoice,
4442
                                    $answer,
4443
                                    $answerComment,
4444
                                    $answerCorrect,
4445
                                    $exeId,
4446
                                    $questionId,
4447
                                    "",
4448
                                    $results_disabled
4449
                                );
4450
                            }
4451
                            break;
4452
                        case MULTIPLE_ANSWER_COMBINATION_TRUE_FALSE:
4453
                            if ($answerId == 1) {
4454
                                ExerciseShowFunctions::display_multiple_answer_combination_true_false(
@@ 4452-4480 (lines=29) @@
4449
                                );
4450
                            }
4451
                            break;
4452
                        case MULTIPLE_ANSWER_COMBINATION_TRUE_FALSE:
4453
                            if ($answerId == 1) {
4454
                                ExerciseShowFunctions::display_multiple_answer_combination_true_false(
4455
                                    $feedback_type,
4456
                                    $answerType,
4457
                                    $studentChoice,
4458
                                    $answer,
4459
                                    $answerComment,
4460
                                    $answerCorrect,
4461
                                    $exeId,
4462
                                    $questionId,
4463
                                    $answerId,
4464
                                    $results_disabled
4465
                                );
4466
                            } else {
4467
                                ExerciseShowFunctions::display_multiple_answer_combination_true_false(
4468
                                    $feedback_type,
4469
                                    $answerType,
4470
                                    $studentChoice,
4471
                                    $answer,
4472
                                    $answerComment,
4473
                                    $answerCorrect,
4474
                                    $exeId,
4475
                                    $questionId,
4476
                                    "",
4477
                                    $results_disabled
4478
                                );
4479
                            }
4480
                            break;
4481
                        case MULTIPLE_ANSWER_TRUE_FALSE:
4482
                            if ($answerId == 1) {
4483
                                ExerciseShowFunctions::display_multiple_answer_true_false(
@@ 4481-4509 (lines=29) @@
4478
                                );
4479
                            }
4480
                            break;
4481
                        case MULTIPLE_ANSWER_TRUE_FALSE:
4482
                            if ($answerId == 1) {
4483
                                ExerciseShowFunctions::display_multiple_answer_true_false(
4484
                                    $feedback_type,
4485
                                    $answerType,
4486
                                    $studentChoice,
4487
                                    $answer,
4488
                                    $answerComment,
4489
                                    $answerCorrect,
4490
                                    $exeId,
4491
                                    $questionId,
4492
                                    $answerId,
4493
                                    $results_disabled
4494
                                );
4495
                            } else {
4496
                                ExerciseShowFunctions::display_multiple_answer_true_false(
4497
                                    $feedback_type,
4498
                                    $answerType,
4499
                                    $studentChoice,
4500
                                    $answer,
4501
                                    $answerComment,
4502
                                    $answerCorrect,
4503
                                    $exeId,
4504
                                    $questionId,
4505
                                    "",
4506
                                    $results_disabled
4507
                                );
4508
                            }
4509
                            break;
4510
                        case FILL_IN_BLANKS:
4511
                            ExerciseShowFunctions::display_fill_in_blanks_answer(
4512
                                $feedback_type,