Code Duplication    Length = 13-13 lines in 2 locations

main/exercise/exercise.class.php 2 locations

@@ 3483-3495 (lines=13) @@
3480
3481
                        $studentChoice = isset($choice[$answerAutoId]) ? $choice[$answerAutoId] : null;
3482
3483
                        if ($answerCorrect == 1) {
3484
                            if ($studentChoice) {
3485
                                $real_answers[$answerId] = true;
3486
                            } else {
3487
                                $real_answers[$answerId] = false;
3488
                            }
3489
                        } else {
3490
                            if ($studentChoice) {
3491
                                $real_answers[$answerId] = false;
3492
                            } else {
3493
                                $real_answers[$answerId] = true;
3494
                            }
3495
                        }
3496
                    } else {
3497
                        $studentChoice = isset($choice[$answerAutoId]) ? $choice[$answerAutoId] : null;
3498
@@ 3499-3511 (lines=13) @@
3496
                    } else {
3497
                        $studentChoice = isset($choice[$answerAutoId]) ? $choice[$answerAutoId] : null;
3498
3499
                        if ($answerCorrect == 1) {
3500
                            if ($studentChoice) {
3501
                                $real_answers[$answerId] = true;
3502
                            } else {
3503
                                $real_answers[$answerId] = false;
3504
                            }
3505
                        } else {
3506
                            if ($studentChoice) {
3507
                                $real_answers[$answerId] = false;
3508
                            } else {
3509
                                $real_answers[$answerId] = true;
3510
                            }
3511
                        }
3512
                    }
3513
                    break;
3514
                case FILL_IN_BLANKS: